#!/bin/sh
#
# This program prints up a few io_lib configuration parameters. It is
# designed to be used in other build environments so that programs
# using io_lib can automatically generate the appropriate CFLAGS and LDFLAGS.

usage() {
    cat << _EOF_
Usage: io_lib-config [option]

where 'option' is any one of:

  --cflags      C and preprocessor flags (eg -I/foo/include)
  --libs        Link-line parameters, eg -L/foo/lib -lstaden-read
  --version	List io_lib version number

_EOF_

    exit $1
}

[ $# -eq 0 ] && usage 1

prefix=/usr
exec_prefix=/usr
includedir=/usr/include

case "$1" in
--cflags)
    echo "-I/usr/include"
    ;;
--libs)
    echo "-L/usr/lib64 -lstaden-read -O2 -fomit-frame-pointer -gdwarf-4 -Wstrict-aliasing=2 -pipe -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -fstack-protector-all --param=ssp-buffer-size=4 -m64 -mtune=generic -flto -Wl,-O2  -Wl,--no-undefined -flto  -lm   -lz"
    ;;
--version)
    echo 1.14.9
    ;;
--help)
    usage 0
    ;;
*)
    echo "Unknown option '$1'" 1>&2
    exit 1
esac

