#! /bin/sh
#
#  Copyright 2000, 2001, 2002 Laurent Wacrenier
#
#  This file is part of libhome
#
#  libhome is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as
#  published by the Free Software Foundation; either version 2 of the
#  License, or (at your option) any later version.
#
#  libhome is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU Lesser General Public License for more details.
#
#  You should have received a copy of the GNU Lesser General Public
#  License along with libhome; if not, write to the Free Software
#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
#  USA
#
# $Id: libhome.sh.in,v 1.8 2005/04/11 11:26:48 lwa Exp $


prefix=@prefix@
sysconfdir=@sysconfdir@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
CPPFLAGS="@CPPFLAGS@"
LIBS="@LIBS@"
MYSQL_CFLAGS="@MYSQL_CFLAGS@"
PGSQL_CFLAGS="@PGSQL_CFLAGS@"
DB_CFLAGS="@DB_CFLAGS@"
LDAP_CFLAGS="@LDAP_CFLAGS@"
VERSION="@PACKAGE_VERSION@"

case "$1" in
-l|--lib*)
	echo " ${LIBS} -L${libdir} -lhome"
	;;
-i|--inc*)
	echo " -I${includedir}/home" ;;
--mysql)
        echo " $MYSQL_CFLAGS" ;;
--pgsql)
        echo " $PGSQL_CFLAGS" ;;
--db)
        echo " $DB_CFLAGS" ;;
--ldap)
        echo " $LDAP_CFLAGS" ;;
-V|--version)
        echo "$VERSION";;
*)
	cat << EOT >&2
`basename "$0"` option
  -V
  --version      display version number ($VERSION)

  -l
  --libraries    show libraries to use for linking libhome

  -i
  --includes     show includes to use for compiling simple programs

  --mysql        show MySQL includes used for compilation
  --pgsql        show PGSQL includes used for compilation
  --db           show DB includes used for compilation
  --ldap         show LDAP includes used for compilation
EOT
;;
esac
