2 # Copyright (C) 1999, 2002, 2003 Free Software Foundation, Inc.
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.
13 exec_prefix=@exec_prefix@
15 # Make sure that no weird locale setting messes up our sed regexps etc.
20 # GPGME's own cflags and libs
21 cflags="-I@includedir@"
25 assuan_cflags="@LIBASSUAN_CFLAGS@"
26 assuan_libs="@LIBASSUAN_LIBS@"
28 # Configure libgpg-error.
29 gpg_error_cflags="@GPG_ERROR_CFLAGS@"
30 gpg_error_libs="@GPG_ERROR_LIBS@"
32 # Configure thread packages.
35 @HAVE_PTH_TRUE@thread_modules="$thread_modules pth"
36 libs_pth="@PTH_LDFLAGS@ @PTH_LIBS@"
37 cflags_pth="@PTH_CFLAGS@"
39 @HAVE_PTHREAD_TRUE@thread_modules="$thread_modules pthread"
40 libs_pthread="-lpthread"
44 libs_glib="@GLIB_LIBS@"
45 cflags_glib="@GLIB_CFLAGS@"
53 Usage: gpgme-config [OPTIONS]
55 [--thread={${thread_modules}}]
69 if test $# -eq 0; then
73 while test $# -gt 0; do
76 optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'`
85 # For compatibility reasons with old M4 macros, we ignore
89 output="$output $prefix"
94 output="$output $exec_prefix"
104 echo "@GPGME_CONFIG_API_VERSION@"
108 echo "@GPGME_CONFIG_HOST@"
115 case "$thread_module" in
116 pthread) tmp_c="$cflags_pthread" ;;
117 pth) tmp_c="$cflags_pth" ;;
119 test "x$with_glib" = "xyes" && tmp_g="$cflags_glib"
120 for i in $cflags $tmp_c $assuan_cflags $gpg_error_cflags $tmp_g ; do
123 -I/usr/include|-I/include)
127 for j in $result ; do
128 if test x"$j" = x"$i" ; then
135 if test $skip = no ; then
139 output="$output $result"
144 case "$thread_module" in
145 pthread) tmp_l="-lgpgme-pthread"; tmp_x="$libs_pthread" ;;
146 pth) tmp_l="-lgpgme-pth"; tmp_x="$libs_pth" ;;
148 if test "x$with_glib" = "xyes" ; then
156 for i in $libs $tmp_l $assuan_libs $gpg_error_libs $tmp_x; do
163 for j in $result ; do
164 if test x"$j" = x"$i" ; then
171 if test $skip = no ; then
175 output="$output $result"
178 for thread_mod in $thread_modules; do
179 if test "$thread_mod" = "$optarg"; then
180 thread_module="$optarg";
183 if test "x$thread_module" = "x"; then
188 output="$output @GPG@"
191 output="$output @GPGSM@"