* gpgme-config.in: Made --prefix work for --libs.
authorWerner Koch <wk@gnupg.org>
Fri, 23 Aug 2002 19:48:30 +0000 (19:48 +0000)
committerWerner Koch <wk@gnupg.org>
Fri, 23 Aug 2002 19:48:30 +0000 (19:48 +0000)
trunk/gpgme/ChangeLog
trunk/gpgme/gpgme-config.in
trunk/gpgme/gpgme.m4

index 63193cf8474f7324ad1d1cac3b67b1bff8c3c0c5..30edecd2f47426c72ee11c3c795266c5047a0aaf 100644 (file)
@@ -1,3 +1,7 @@
+2002-08-23  Werner Koch  <wk@gnupg.org>
+
+       * gpgme-config.in: Made --prefix work for --libs. 
+
 2002-08-21  Marcus Brinkmann  <marcus@g10code.de>
 
        * ath.h: Update list of symbols that get a prefix: Rename the
index 67bce0f816df9207fb232fbbc38710caa4ba5645..ffe3b593fbdede445754f73fa26c513db681e0d3 100644 (file)
@@ -1,17 +1,32 @@
 #!/bin/sh
+#    Copyright (C) 1999, 2002 Free Software Foundation, Inc.
+#
+# This file is free software; as a special exception the author gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+#
+# This file is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
+PGM=gpgme-config
+libs="@GPGME_CONFIG_LIBS@"
+cflags="@GPGME_CONFIG_CFLAGS@"
 prefix=@prefix@
 exec_prefix=@exec_prefix@
+includes=""
+libdirs=""
 exec_prefix_set=no
-
-gpgme_libs="@GPGME_LIBS@"
-gpgme_cflags="@GPGME_CFLAGS@"
+echo_libs=no
+echo_cflags=no
+echo_prefix=no
+echo_exec_prefix=no
 
 
 usage()
 {
        cat <<EOF
-Usage: gpgme-config [OPTIONS]
+Usage: $PGM [OPTIONS]
 Options:
        [--prefix[=DIR]]
        [--exec-prefix[=DIR]]
@@ -77,17 +92,24 @@ fi
 if test "$echo_cflags" = "yes"; then
     if test "@includedir@" != "/usr/include" ; then
       includes="-I@includedir@"
-      for i in $gpgme_cflags ; do
+      for i in $cflags ; do
        if test "$i" = "-I@includedir@" ; then
          includes=""
        fi
       done
     fi
-    echo $includes $gpgme_cflags
+    echo $includes $cflags
 fi
 
 if test "$echo_libs" = "yes"; then
-    echo ${gpgme_libs}
+    if test "@libdir@" != "/usr/lib" ; then
+      libdirs="-L@libdir@"
+      for i in $libs ; do
+       if test "$i" = "-L@libdir@" ; then
+         libdirs=""
+       fi
+      done
+    fi
+    echo $libdirs $libs
 fi
 
-
index 63660d17e4a99deb2ae50534dee09f8aeb2aff63..dbfb983b25be7d2d678a7f3c043187a31740792b 100644 (file)
@@ -31,11 +31,11 @@ AC_DEFUN(AM_PATH_GPGME,
                sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
     gpgme_config_version=`$GPGME_CONFIG $gpgme_config_args --version`
     major=`echo $gpgme_config_version | \
-               sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
+               sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
     minor=`echo $gpgme_config_version | \
-               sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
+               sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'`
     micro=`echo $gpgme_config_version | \
-               sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
+               sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\3/'`
     if test "$major" -gt "$req_major"; then
         ok=yes
     else