#!/bin/sh
# $Id: yazpp-config.in,v 1.3 2007-04-13 10:26:57 adam Exp $
yaz_echo_help=no

usage()
{
	cat <<EOF
Usage: yaz++-config [OPTIONS] [LIBRARIES]
Options:
	[--prefix[=DIR]]
	[--version]
	[--libs]
	[--lalibs]
	[--cflags]
EOF
	exit $1
}

if test $# -eq 0; then
	yaz_echo_help=yes
fi

while test $# -gt 0; do
  case "$1" in
  -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  *) optarg= ;;
  esac

  case $1 in
    --prefix)
      echo "/usr"
      exit 0
      ;;
    --version)
      echo "1.0.4"
      exit 0
      ;;
    --cflags)
      echo "-I/usr/include @YAZ_CONFIG_CFLAGS@ @PTHREAD_CFLAGS@ @ICU_CPPFLAGS@"
      ;;
    --libs)
      echo "-L/usr/lib64 -lyazpp -lzoompp  @ICU_LIBS@"
      ;;
    --lalibs)
      echo "/usr/lib64/libyaz.la  @ICU_LIBS@"
      ;;
    -*)
      yaz_echo_help=yes
      ;;
  esac
  shift
done

if test "$yaz_echo_help" = "yes"; then
	usage 1 1>&2
fi
