build: Update gpg-error.m4 and ksba.m4.
authorNIIBE Yutaka <gniibe@fsij.org>
Mon, 29 Oct 2018 03:49:25 +0000 (12:49 +0900)
committerNIIBE Yutaka <gniibe@fsij.org>
Mon, 29 Oct 2018 03:49:25 +0000 (12:49 +0900)
* m4/gpg-error.m4: Update to 2018-10-29.
* src/ksba.m4: Follow the change of gpgrt-config.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
m4/gpg-error.m4
src/ksba.m4

index 70dc501..0964a26 100644 (file)
@@ -9,7 +9,7 @@
 # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
 # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 #
-# Last-changed: 2018-10-26
+# Last-changed: 2018-10-29
 
 
 dnl AM_PATH_GPG_ERROR([MINIMUM-VERSION,
@@ -67,13 +67,16 @@ AC_DEFUN([AM_PATH_GPG_ERROR],
   use_gpgrt_config=""
   if test "$GPG_ERROR_CONFIG" = "no"; then
     AC_PATH_PROG(GPGRT_CONFIG, gpgrt-config, no)
-    if CC=$CC $GPGRT_CONFIG gpg-error >/dev/null 2>&1; then
-      GPG_ERROR_CONFIG="$GPGRT_CONFIG gpg-error"
-      use_gpgrt_config=yes
-      gpg_error_config_version=`CC=$CC $GPG_ERROR_CONFIG --modversion`
+    if test "$GPGRT_CONFIG" != "no"; then
+      GPGRT_CONFIG="$GPGRT_CONFIG --prefix=$prefix --exec-prefix=$exec_prefix --libdir=$libdir"
+      if $GPGRT_CONFIG gpg-error >/dev/null 2>&1; then
+        GPG_ERROR_CONFIG="$GPGRT_CONFIG gpg-error"
+        use_gpgrt_config=yes
+        gpg_error_config_version=`$GPG_ERROR_CONFIG --modversion`
+      fi
     fi
   else
-    gpg_error_config_version=`CC=$CC $GPG_ERROR_CONFIG --version`
+    gpg_error_config_version=`$GPG_ERROR_CONFIG --version`
   fi
   if test "$GPG_ERROR_CONFIG" != "no"; then
     req_major=`echo $min_gpg_error_version | \
@@ -96,30 +99,33 @@ AC_DEFUN([AM_PATH_GPG_ERROR],
     if test -z "$GPGRT_CONFIG"; then
       if test "$major" -gt 1 -o "$major" -eq 1 -a "$minor" -ge 33; then
         AC_PATH_PROG(GPGRT_CONFIG, gpgrt-config, no)
-        GPG_ERROR_CONFIG="$GPGRT_CONFIG gpg-error"
-        use_gpgrt_config=yes
+        if test "$GPGRT_CONFIG" != "no"; then
+          GPGRT_CONFIG="$GPGRT_CONFIG --prefix=$prefix --exec-prefix=$exec_prefix --libdir=$libdir"
+          GPG_ERROR_CONFIG="$GPGRT_CONFIG gpg-error"
+          use_gpgrt_config=yes
+        fi
       fi
     fi
   fi
   AC_MSG_CHECKING(for GPG Error - version >= $min_gpg_error_version)
   if test $ok = yes; then
-    GPG_ERROR_CFLAGS=`CC=$CC $GPG_ERROR_CONFIG --cflags`
-    GPG_ERROR_LIBS=`CC=$CC $GPG_ERROR_CONFIG --libs`
+    GPG_ERROR_CFLAGS=`$GPG_ERROR_CONFIG --cflags`
+    GPG_ERROR_LIBS=`$GPG_ERROR_CONFIG --libs`
     if test -z "$use_gpgrt_config"; then
-      GPG_ERROR_MT_CFLAGS=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --mt --cflags 2>/dev/null`
-      GPG_ERROR_MT_LIBS=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --mt --libs 2>/dev/null`
+      GPG_ERROR_MT_CFLAGS=`$GPG_ERROR_CONFIG --mt --cflags 2>/dev/null`
+      GPG_ERROR_MT_LIBS=`$GPG_ERROR_CONFIG --mt --libs 2>/dev/null`
     else
-      GPG_ERROR_MT_CFLAGS=`CC=$CC $GPG_ERROR_CONFIG --variable=mtcflags 2>/dev/null`
+      GPG_ERROR_MT_CFLAGS=`$GPG_ERROR_CONFIG --variable=mtcflags 2>/dev/null`
       GPG_ERROR_MT_CFLAGS="$GPG_ERROR_CFLAGS${GPG_ERROR_CFLAGS:+ }$GPG_ERROR_MT_CFLAGS"
-      GPG_ERROR_MT_LIBS=`CC=$CC $GPG_ERROR_CONFIG --variable=mtlibs 2>/dev/null`
+      GPG_ERROR_MT_LIBS=`$GPG_ERROR_CONFIG --variable=mtlibs 2>/dev/null`
       GPG_ERROR_MT_LIBS="$GPG_ERROR_LIBS${GPG_ERROR_LIBS:+ }$GPG_ERROR_MT_LIBS"
     fi
     AC_MSG_RESULT([yes ($gpg_error_config_version)])
     ifelse([$2], , :, [$2])
     if test -z "$use_gpgrt_config"; then
-      gpg_error_config_host=`CC=$CC $GPG_ERROR_CONFIG --host 2>/dev/null || echo none`
+      gpg_error_config_host=`$GPG_ERROR_CONFIG --host 2>/dev/null || echo none`
     else
-      gpg_error_config_host=`CC=$CC $GPG_ERROR_CONFIG --variable=host 2>/dev/null || echo none`
+      gpg_error_config_host=`$GPG_ERROR_CONFIG --variable=host 2>/dev/null || echo none`
     fi
     if test x"$gpg_error_config_host" != xnone ; then
       if test x"$gpg_error_config_host" != x"$host" ; then
index 22f8cf9..ee4b962 100644 (file)
@@ -44,7 +44,7 @@ AC_DEFUN([AM_PATH_KSBA],
 
   use_gpgrt_config=""
   if test x"$KSBA_CONFIG" = x -a x"$GPGRT_CONFIG" != x -a "$GPGRT_CONFIG" != "no"; then
-    if CC=$CC $GPGRT_CONFIG ksba >/dev/null 2>&1; then
+    if $GPGRT_CONFIG ksba --exists; then
       KSBA_CONFIG="$GPGRT_CONFIG ksba"
       use_gpgrt_config=yes
     fi
@@ -72,9 +72,9 @@ AC_DEFUN([AM_PATH_KSBA],
     req_micro=`echo $min_ksba_version | \
                sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
     if test -z "$use_gpgrt_config"; then
-      ksba_config_version=`CC=$CC $KSBA_CONFIG --version`
+      ksba_config_version=`$KSBA_CONFIG --version`
     else
-      ksba_config_version=`CC=$CC $KSBA_CONFIG --modversion`
+      ksba_config_version=`$KSBA_CONFIG --modversion`
     fi
     major=`echo $ksba_config_version | \
                sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
@@ -108,9 +108,9 @@ AC_DEFUN([AM_PATH_KSBA],
      # API is compatible.
      if test "$req_ksba_api" -gt 0 ; then
         if test -z "$use_gpgrt_config"; then
-          tmp=`CC=$CC $KSBA_CONFIG --api-version 2>/dev/null || echo 0`
+          tmp=`$KSBA_CONFIG --api-version 2>/dev/null || echo 0`
        else
-          tmp=`CC=$CC $KSBA_CONFIG --variable=api_version 2>/dev/null || echo 0`
+          tmp=`$KSBA_CONFIG --variable=api_version 2>/dev/null || echo 0`
        fi
         if test "$tmp" -gt 0 ; then
            AC_MSG_CHECKING([KSBA API version])
@@ -124,13 +124,13 @@ AC_DEFUN([AM_PATH_KSBA],
      fi
   fi
   if test $ok = yes; then
-    KSBA_CFLAGS=`CC=$CC $KSBA_CONFIG --cflags`
-    KSBA_LIBS=`CC=$CC $KSBA_CONFIG --libs`
+    KSBA_CFLAGS=`$KSBA_CONFIG --cflags`
+    KSBA_LIBS=`$KSBA_CONFIG --libs`
     ifelse([$2], , :, [$2])
     if test -z "$use_gpgrt_config"; then
-      libksba_config_host=`CC=$CC $KSBA_CONFIG --host 2>/dev/null || echo none`
+      libksba_config_host=`$KSBA_CONFIG --host 2>/dev/null || echo none`
     else
-      libksba_config_host=`CC=$CC $KSBA_CONFIG --variable=host 2>/dev/null || echo none`
+      libksba_config_host=`$KSBA_CONFIG --variable=host 2>/dev/null || echo none`
     fi
     if test x"$libksba_config_host" != xnone ; then
       if test x"$libksba_config_host" != x"$host" ; then