2000-03-05 13:57:24 +00:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
2003-09-24 15:57:14 +00:00
|
|
|
# This script is part of SANE, <URL:http://www.sane-project.org/>
|
2000-03-05 13:57:24 +00:00
|
|
|
#
|
2003-09-24 15:57:14 +00:00
|
|
|
# Send bugreports and other requests to sane-devel@lists.alioth.debian.org
|
2000-03-05 13:57:24 +00:00
|
|
|
|
|
|
|
PACKAGE="@PACKAGE@"
|
2001-04-08 15:52:56 +00:00
|
|
|
scriptname="sane-config"
|
2000-03-05 13:57:24 +00:00
|
|
|
|
|
|
|
prefix="@prefix@"
|
|
|
|
exec_prefix="@exec_prefix@"
|
|
|
|
|
2011-09-16 10:18:06 +00:00
|
|
|
pkgconfig_package=sane-backends
|
2000-03-05 13:57:24 +00:00
|
|
|
|
1994-09-06 20:55:14 +00:00
|
|
|
usage ()
|
2002-07-28 11:40:09 +00:00
|
|
|
{
|
|
|
|
echo "Usage: " 1>&2
|
|
|
|
echo "$scriptname --version - show installed script and SANE version" 1>&2
|
|
|
|
echo "$scriptname --ldflags - linker flags required to link with SANE" 1>&2
|
|
|
|
echo "$scriptname --libs - libraries required to link with SANE" 1>&2
|
|
|
|
echo "$scriptname --cflags - compiler flags required to find SANE headers" 1>&2
|
|
|
|
echo "$scriptname --help - show usage info (this message) " 1>&2
|
|
|
|
echo "$scriptname --help SUBCOMMAND - show help for SUBCOMMAND " 1>&2
|
|
|
|
echo "$scriptname --prefix - prefix used during SANE compile" 1>&2
|
|
|
|
echo "$scriptname --exec-prefix - exec-prefix used during SANE compile" 1>&2
|
|
|
|
}
|
2000-03-05 13:57:24 +00:00
|
|
|
|
|
|
|
if test $# -eq 0; then
|
2002-07-28 11:40:09 +00:00
|
|
|
usage
|
2000-03-05 13:57:24 +00:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test $# -gt 0; then
|
|
|
|
case $1 in
|
|
|
|
--version)
|
2002-01-08 18:48:49 +00:00
|
|
|
echo @NUMBER_VERSION@
|
2000-03-05 13:57:24 +00:00
|
|
|
;;
|
|
|
|
--help)
|
|
|
|
if test $# -eq 1; then
|
2002-07-28 11:40:09 +00:00
|
|
|
usage
|
2000-03-05 13:57:24 +00:00
|
|
|
elif test $# -eq 2; then
|
2011-09-16 10:18:06 +00:00
|
|
|
case $2 in
|
2000-03-05 13:57:24 +00:00
|
|
|
--cflags)
|
|
|
|
echo "Usage: $0 --cflags"
|
|
|
|
echo " Print C compiler flags for compiling code that uses SANE."
|
|
|
|
echo " This includes any \`-I' flags needed to find Sane's header files."
|
|
|
|
;;
|
|
|
|
--ldflags)
|
|
|
|
echo "Usage: $0 --ldflags"
|
|
|
|
echo " Print linker flags for building the \`$PACKAGE' executable."
|
|
|
|
echo " Print the linker command-line flags necessary to link against"
|
|
|
|
echo " the SANE library. The libraries are listed with --libs."
|
|
|
|
;;
|
|
|
|
--libs)
|
|
|
|
echo "Usage: $0 --libs"
|
|
|
|
echo " Print linker flags for building the \`$PACKAGE' executable."
|
|
|
|
echo " Print the linker command-line flags necessary to link against"
|
|
|
|
echo " the SANE library, and any other libraries it requires."
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
else
|
2002-07-28 11:40:09 +00:00
|
|
|
usage
|
2000-03-05 13:57:24 +00:00
|
|
|
fi
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
--ldflags)
|
2011-09-16 10:18:06 +00:00
|
|
|
pkg-config --libs-only-L "$pkgconfig_package"
|
2000-03-05 13:57:24 +00:00
|
|
|
;;
|
|
|
|
--libs)
|
2011-09-16 10:18:06 +00:00
|
|
|
pkg-config --libs "$pkgconfig_package"
|
2000-03-05 13:57:24 +00:00
|
|
|
;;
|
|
|
|
--cflags)
|
2011-09-16 10:18:06 +00:00
|
|
|
pkg-config --cflags "$pkgconfig_package"
|
2000-03-05 13:57:24 +00:00
|
|
|
;;
|
|
|
|
--prefix)
|
2011-09-16 10:18:06 +00:00
|
|
|
echo "${prefix}"
|
2000-03-05 13:57:24 +00:00
|
|
|
;;
|
|
|
|
--exec-prefix)
|
2011-09-16 10:18:06 +00:00
|
|
|
echo "${exec_prefix}"
|
2000-03-05 13:57:24 +00:00
|
|
|
;;
|
|
|
|
*)
|
2002-07-28 11:40:09 +00:00
|
|
|
usage
|
2000-03-05 13:57:24 +00:00
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
fi
|
|
|
|
|