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_PTHREAD_TRUE@thread_modules="$thread_modules pthread"
36 libs_pthread="-lpthread"
40 libs_glib="@GLIB_LIBS@"
41 cflags_glib="@GLIB_CFLAGS@"
49 Usage: gpgme-config [OPTIONS]
51 [--thread={${thread_modules}}]
65 if test $# -eq 0; then
69 while test $# -gt 0; do
72 optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'`
81 # For compatibility reasons with old M4 macros, we ignore
85 output="$output $prefix"
90 output="$output $exec_prefix"
100 echo "@GPGME_CONFIG_API_VERSION@"
104 echo "@GPGME_CONFIG_HOST@"
111 case "$thread_module" in
112 pthread) tmp_c="$cflags_pthread" ;;
114 test "x$with_glib" = "xyes" && tmp_g="$cflags_glib"
115 for i in $cflags $tmp_c $assuan_cflags $gpg_error_cflags $tmp_g ; do
118 -I/usr/include|-I/include)
122 for j in $result ; do
123 if test x"$j" = x"$i" ; then
130 if test $skip = no ; then
134 output="$output $result"
139 case "$thread_module" in
140 pthread) tmp_l="-lgpgme-pthread"; tmp_x="$libs_pthread" ;;
142 if test "x$with_glib" = "xyes" ; then
150 for i in $libs $tmp_l $assuan_libs $gpg_error_libs $tmp_x; do
157 for j in $result ; do
158 if test x"$j" = x"$i" ; then
165 if test $skip = no ; then
169 output="$output $result"
172 for thread_mod in $thread_modules; do
173 if test "$thread_mod" = "$optarg"; then
174 thread_module="$optarg";
177 if test "x$thread_module" = "x"; then
182 output="$output @GPG@"
185 output="$output @GPGSM@"