*** empty log message ***
[gnutls.git] / libextra / libgnutls-extra-config.in
blobace4422c02dae3c74ebefd835951e03291889fa9
1 #!/bin/sh
3 prefix=@prefix@
4 exec_prefix=@exec_prefix@
5 exec_prefix_set=no
7 gnutls_libs="@LIBGNUTLS_EXTRA_LIBS@"
8 gnutls_cflags="@LIBGNUTLS_EXTRA_CFLAGS@"
10 usage()
12 cat <<EOF
13 Usage: libgnutls-config [OPTIONS]
14 Options:
15 [--prefix[=DIR]]
16 [--exec-prefix[=DIR]]
17 [--version]
18 [--libs]
19 [--cflags]
20 EOF
21 exit $1
24 if test $# -eq 0; then
25 usage 1 1>&2
28 while test $# -gt 0; do
29 case "$1" in
30 -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
31 *) optarg= ;;
32 esac
34 case $1 in
35 --prefix=*)
36 prefix=$optarg
37 if test $exec_prefix_set = no ; then
38 exec_prefix=$optarg
41 --prefix)
42 echo_prefix=yes
44 --exec-prefix=*)
45 exec_prefix=$optarg
46 exec_prefix_set=yes
48 --exec-prefix)
49 echo_exec_prefix=yes
51 --version)
52 echo "@VERSION@"
53 exit 0
55 --cflags)
56 echo_cflags=yes
58 --libs)
59 echo_libs=yes
62 usage 1 1>&2
64 esac
65 shift
66 done
68 if test "$echo_prefix" = "yes"; then
69 echo $prefix
72 if test "$echo_exec_prefix" = "yes"; then
73 echo $exec_prefix
76 if test "$echo_cflags" = "yes"; then
77 if test "@includedir@" != "/usr/include" ; then
78 includes="-I@includedir@"
79 for i in $gnutls_cflags ; do
80 if test "$i" = "-I@includedir@" ; then
81 includes=""
83 done
85 echo $includes $gnutls_cflags
88 if test "$echo_libs" = "yes"; then
89 echo ${gnutls_libs}