Initial release, version 0.0.0.
[gsasl.git] / src / libgsasl-config.in
blobec4b54e332a34077f48a00f68db5e06c3c5e1c39
1 #!/bin/sh
2 # Copyright (C) 2002 Simon Josefsson
4 # This file is free software; as a special exception the author gives
5 # unlimited permission to copy and/or distribute it, with or without
6 # modifications, as long as this notice is preserved.
8 # This file is distributed in the hope that it will be useful, but
9 # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
10 # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12 prefix=@prefix@
13 exec_prefix=@exec_prefix@
14 exec_prefix_set=no
16 libgsasl_libs="@LIBGSASL_LIBS@"
17 libgsasl_cflags="@LIBGSASL_CFLAGS@"
20 usage()
22 cat <<EOF
23 Usage: libgsasl-config [OPTIONS]
24 Options:
25 [--prefix[=DIR]]
26 [--exec-prefix[=DIR]]
27 [--version]
28 [--libs]
29 [--cflags]
30 EOF
31 exit $1
34 if test $# -eq 0; then
35 usage 1 1>&2
38 while test $# -gt 0; do
39 case "$1" in
40 -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
41 *) optarg= ;;
42 esac
44 case $1 in
45 --prefix=*)
46 prefix=$optarg
47 if test $exec_prefix_set = no ; then
48 exec_prefix=$optarg
51 --prefix)
52 echo_prefix=yes
54 --exec-prefix=*)
55 exec_prefix=$optarg
56 exec_prefix_set=yes
58 --exec-prefix)
59 echo_exec_prefix=yes
61 --version)
62 echo "@VERSION@"
63 exit 0
65 --cflags)
66 echo_cflags=yes
68 --libs)
69 echo_libs=yes
72 usage 1 1>&2
74 esac
75 shift
76 done
78 if test "$echo_prefix" = "yes"; then
79 echo $prefix
82 if test "$echo_exec_prefix" = "yes"; then
83 echo $exec_prefix
86 if test "$echo_cflags" = "yes"; then
87 if test "@includedir@" != "/usr/include" ; then
88 includes="-I@includedir@"
89 for i in $libgsasl_cflags ; do
90 if test "$i" = "-I@includedir@" ; then
91 includes=""
93 done
95 echo $includes $libgsasl_cflags
98 if test "$echo_libs" = "yes"; then
99 echo ${libgsasl_libs}