We reverted the ABI bump.
[gnutls.git] / lib / libgnutls-config.in
blob4707d0cea814ef85dbe23d1a0e0702e53dabd108
1 #!/bin/sh
3 prefix=@prefix@
4 exec_prefix=@exec_prefix@
5 exec_prefix_set=no
7 gnutls_libs="@LIBGNUTLS_LIBS@"
8 gnutls_cflags="@LIBGNUTLS_CFLAGS@"
9 gnutls_la_file="@libdir@/libgnutls.la"
11 usage()
13 cat <<EOF
14 Usage: libgnutls-config [OPTIONS]
15 Options:
16 [--prefix[=DIR]]
17 [--exec-prefix[=DIR]]
18 [--version]
19 [--libs]
20 [--cflags]
21 EOF
22 exit $1
25 if test $# -eq 0; then
26 usage 1 1>&2
29 while test $# -gt 0; do
30 case "$1" in
31 -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
32 *) optarg= ;;
33 esac
35 case $1 in
36 --prefix=*)
37 prefix=$optarg
38 if test $exec_prefix_set = no ; then
39 exec_prefix=$optarg
42 --prefix)
43 echo_prefix=yes
45 --exec-prefix=*)
46 exec_prefix=$optarg
47 exec_prefix_set=yes
49 --exec-prefix)
50 echo_exec_prefix=yes
52 --version)
53 echo "@VERSION@"
54 exit 0
56 --cflags)
57 echo_cflags=yes
59 --libs)
60 echo_libs=yes
62 --la-file)
63 echo_la_file=yes
65 --help)
66 usage 0
69 usage 1 1>&2
71 esac
72 shift
73 done
75 if test "$echo_prefix" = "yes"; then
76 echo $prefix
79 if test "$echo_exec_prefix" = "yes"; then
80 echo $exec_prefix
83 if test "$echo_cflags" = "yes"; then
84 if test "@includedir@" != "/usr/include" ; then
85 includes="-I@includedir@"
86 for i in $gnutls_cflags ; do
87 if test "$i" = "-I@includedir@" ; then
88 includes=""
90 done
92 echo $includes $gnutls_cflags
95 if test "$echo_la_file" = "yes"; then
96 echo ${gnutls_la_file}
99 if test "$echo_libs" = "yes"; then
100 echo ${gnutls_libs}