build: Require libgpg-error >= 1.33.
authorNIIBE Yutaka <gniibe@fsij.org>
Thu, 25 Oct 2018 01:26:54 +0000 (10:26 +0900)
committerNIIBE Yutaka <gniibe@fsij.org>
Thu, 25 Oct 2018 01:26:54 +0000 (10:26 +0900)
* configure.ac (NEED_GPG_ERROR_VERSION): Require >= 1.33.
* m4/gpg-error.m4: Update from libgpg-error 1.33.
* src/ksba.m4: Fix to support --with-libksba-prefix.

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

index cc084a7..097e1da 100644 (file)
@@ -58,7 +58,7 @@ LIBKSBA_LT_REVISION=6
 KSBA_CONFIG_API_VERSION=1
 
 
-NEED_GPG_ERROR_VERSION=1.8
+NEED_GPG_ERROR_VERSION=1.33
 
 
 AC_CONFIG_AUX_DIR([build-aux])
index 9f26fa4..0f46cd6 100644 (file)
@@ -1,5 +1,5 @@
 # gpg-error.m4 - autoconf macro to detect libgpg-error.
-# Copyright (C) 2002, 2003, 2004, 2011, 2014 g10 Code GmbH
+# Copyright (C) 2002, 2003, 2004, 2011, 2014, 2018 g10 Code GmbH
 #
 # This file is free software; as a special exception the author gives
 # unlimited permission to copy and/or distribute it, with or without
@@ -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: 2014-10-02
+# Last-changed: 2018-10-25
 
 
 dnl AM_PATH_GPG_ERROR([MINIMUM-VERSION,
@@ -61,7 +61,7 @@ AC_DEFUN([AM_PATH_GPG_ERROR],
   fi
 
   AC_PATH_PROG(GPG_ERROR_CONFIG, gpg-error-config, no)
-  min_gpg_error_version=ifelse([$1], ,0.0,$1)
+  min_gpg_error_version=ifelse([$1], ,1.33,$1)
   AC_MSG_CHECKING(for GPG Error - version >= $min_gpg_error_version)
   ok=no
   if test "$GPG_ERROR_CONFIG" != "no" \
@@ -70,7 +70,7 @@ AC_DEFUN([AM_PATH_GPG_ERROR],
                sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
     req_minor=`echo $min_gpg_error_version | \
                sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
-    gpg_error_config_version=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --version`
+    gpg_error_config_version=`CC=$CC $GPG_ERROR_CONFIG --version`
     major=`echo $gpg_error_config_version | \
                sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
     minor=`echo $gpg_error_config_version | \
@@ -86,15 +86,15 @@ AC_DEFUN([AM_PATH_GPG_ERROR],
     fi
   fi
   if test $ok = yes; then
-    GPG_ERROR_CFLAGS=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --cflags`
-    GPG_ERROR_LIBS=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --libs`
-    GPG_ERROR_MT_CFLAGS=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --variable=mtcflags 2>/dev/null`
+    GPG_ERROR_CFLAGS=`CC=$CC $GPG_ERROR_CONFIG --cflags`
+    GPG_ERROR_LIBS=`CC=$CC $GPG_ERROR_CONFIG --libs`
+    GPG_ERROR_MT_CFLAGS=`CC=$CC $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 $gpg_error_config_args --variable=mtlibs 2>/dev/null`
+    GPG_ERROR_MT_LIBS=`CC=$CC $GPG_ERROR_CONFIG --variable=mtlibs 2>/dev/null`
     GPG_ERROR_MT_LIBS="$GPG_ERROR_LIBS${GPG_ERROR_LIBS:+ }$GPG_ERROR_MT_LIBS"
     AC_MSG_RESULT([yes ($gpg_error_config_version)])
     ifelse([$2], , :, [$2])
-    gpg_error_config_host=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --variable=host 2>/dev/null || echo none`
+    gpg_error_config_host=`CC=$CC $GPG_ERROR_CONFIG --variable=host 2>/dev/null || echo none`
     if test x"$gpg_error_config_host" != xnone ; then
       if test x"$gpg_error_config_host" != x"$host" ; then
   AC_MSG_WARN([[
index e7d2641..62dc17f 100644 (file)
@@ -21,12 +21,22 @@ dnl this features allows to prevent build against newer versions of libksba
 dnl with a changed API.
 dnl
 AC_DEFUN([AM_PATH_KSBA],
-[AC_REQUIRE([AC_CANONICAL_HOST])
- AC_REQUIRE([AM_PATH_GPG_ERROR])
- AC_ARG_WITH(ksba-prefix,
-            AC_HELP_STRING([--with-ksba-prefix=PFX],
-                           [prefix where KSBA is installed (optional)]),
+[ AC_REQUIRE([AC_CANONICAL_HOST])
+  AC_REQUIRE([AM_PATH_GPG_ERROR])
+  dnl --with-libksba-prefix=PFX is the preferred name for this option,
+  dnl since that is consistent with how our three siblings use the directory/
+  dnl package name in --with-$dir_name-prefix=PFX.
+  AC_ARG_WITH(libksba-prefix,
+              AC_HELP_STRING([--with-libksba-prefix=PFX],
+                             [prefix where KSBA is installed (optional)]),
      ksba_config_prefix="$withval", ksba_config_prefix="")
+
+  dnl Accept --with-ksba-prefix and make it work the same as
+  dnl --with-libksba-prefix above, for backwards compatibility,
+  dnl but do not document this old, inconsistently-named option.
+  AC_ARG_WITH(ksba-prefix,,
+     ksba_config_prefix="$withval", ksba_config_prefix="")
+
   if test x$ksba_config_prefix != x ; then
     if test x${KSBA_CONFIG+set} != xset ; then
       KSBA_CONFIG=$ksba_config_prefix/bin/ksba-config