#!/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=${prefix}
includedir=${prefix}/include

case "$1" in
--cflags)
    echo "-I${prefix}/include"
    ;;
--libs)
    echo "-L${prefix}/lib/x86_64-linux-gnu -lstaden-read -Wl,-z,relro -Wl,-z,now -lm -llzma -lbz2   -lcurl -lz"
    ;;
--version)
    echo 1.15.1
    ;;
--help)
    usage 0
    ;;
*)
    echo "Unknown option '$1'" 1>&2
    exit 1
esac

