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@
14 includedir=@includedir@
17 # Make sure that no weird locale setting messes up our sed regexps etc.
23 assuan_cflags="@LIBASSUAN_CFLAGS@"
24 assuan_libs="@LIBASSUAN_LIBS@"
26 # Configure libgpg-error.
27 gpg_error_cflags="@GPG_ERROR_CFLAGS@"
28 gpg_error_libs="@GPG_ERROR_LIBS@"
30 # Configure thread packages.
33 @HAVE_PTH_TRUE@thread_modules="$thread_modules pth"
34 libs_pth="@PTH_LDFLAGS@ @PTH_LIBS@"
35 cflags_pth="@PTH_CFLAGS@"
37 @HAVE_PTHREAD_TRUE@thread_modules="$thread_modules pthread"
38 libs_pthread="-lpthread"
42 libs_glib="@GLIB_LIBS@"
43 cflags_glib="@GLIB_CFLAGS@"
51 Usage: gpgme-config [OPTIONS]
53 [--thread={${thread_modules}}]
66 if test $# -eq 0; then
70 while test $# -gt 0; do
73 optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'`
82 # For compatibility reasons with old M4 macros, we ignore
86 output="$output $prefix"
91 output="$output $exec_prefix"
101 echo "@GPGME_CONFIG_API_VERSION@"
105 if test "x$includedir" != "x/usr/include" -a "x$includedir" != "x/include"; then
106 output="$output -I$includedir"
108 case "$thread_module" in
110 output="$output $cflags_pthread"
113 output="$output $cflags_pth"
116 output="$output $assuan_cflags $gpg_error_cflags"
117 if test "x$with_glib" = "xyes"; then
118 output="$output $glib_cflags"
122 if test "x$libdir" != "x/usr/lib" -a "x$libdir" != "x/lib"; then
123 output="$output -L$libdir"
125 case "$thread_module" in
127 output="$output -lgpgme-pthread $libs_pthread"
130 output="$output -lgpgme-pth $libs_pth"
133 if test "x$with_glib" = "xyes"; then
134 output="$output -lgpgme-glib"
136 output="$output -lgpgme"
140 output="$output $assuan_libs $gpg_error_libs"
141 if test "x$with_glib" = "xyes"; then
142 output="$output $glib_cflags"
146 for thread_mod in $thread_modules; do
147 if test "$thread_mod" = "$optarg"; then
148 thread_module="$optarg";
151 if test "x$thread_module" = "x"; then
156 output="$output @GPG@"
159 output="$output @GPGSM@"