diff options
author | NIIBE Yutaka <[email protected]> | 2018-10-25 00:40:42 +0000 |
---|---|---|
committer | NIIBE Yutaka <[email protected]> | 2018-10-25 00:40:42 +0000 |
commit | abc641f27cf712dec572b6629552b6a6f0b7af27 (patch) | |
tree | 2d97eb1f445777c0f8f01a2b09f3ac083c11ced8 | |
parent | gpg-error-config: Fix previous commit. (diff) | |
download | libgpg-error-abc641f27cf712dec572b6629552b6a6f0b7af27.tar.gz libgpg-error-abc641f27cf712dec572b6629552b6a6f0b7af27.zip |
build: Update gpg-error.m4 and gpgrt.m4.
* src/gpg-error.m4: Bump version date.
(min_gpg_error_version): Require >= 1.33, if not specified.
(gpg_error_config_args): Remove bogus uses.
* src/gpgrt.m4: Bump version date.
(libgpgrt-prefix): Add support of --with-libgpgrt-prefix option.
(gpgrt-config): Search/call gpgrt-config instead of gpg-error-config.
(min_gpgrt_version): Require >= 1.33, if not specified.
(gpgrt_config_args): Remove bogus uses.
Signed-off-by: NIIBE Yutaka <[email protected]>
-rw-r--r-- | src/gpg-error.m4 | 18 | ||||
-rw-r--r-- | src/gpgrt.m4 | 46 |
2 files changed, 35 insertions, 29 deletions
diff --git a/src/gpg-error.m4 b/src/gpg-error.m4 index 9f26fa4..0f46cd6 100644 --- a/src/gpg-error.m4 +++ b/src/gpg-error.m4 @@ -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([[ diff --git a/src/gpgrt.m4 b/src/gpgrt.m4 index 179f7ae..fab1eb4 100644 --- a/src/gpgrt.m4 +++ b/src/gpgrt.m4 @@ -1,5 +1,5 @@ # gpgrt.m4 - autoconf macro to detect libgpgrt -# Copyright (C) 2002, 2003, 2004, 2011, 2014, 2017 g10 Code GmbH +# Copyright (C) 2002, 2003, 2004, 2011, 2014, 2017, 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 @@ -10,16 +10,16 @@ # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # SPDX-License-Identifier: FSFULLR # -# Last-changed: 2014-10-02 -# Note: This is a duplicate of gpg-error.m4 with uses the future name -# of libgpg-error to prepare for a smooth migration in some distant -# time. +# Last-changed: 2018-10-25 +# Note: This is a kind of duplicate of gpg-error.m4 with uses the +# future name of libgpg-error to prepare for a smooth migration in +# some distant time. dnl AM_PATH_GPGRT([MINIMUM-VERSION, dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]]) dnl dnl Test for libgpgrt and define GPGRT_CFLAGS, GPGRT_LIBS, -dnl GPG_ERROR_MT_CFLAGS, and GPG_ERROR_MT_LIBS. The _MT_ variants are +dnl GPGRT_MT_CFLAGS, and GPGRT_MT_LIBS. The _MT_ variants are dnl used for programs requiring real multi thread support. dnl dnl If a prefix option is not used, the config script is first @@ -44,14 +44,20 @@ AC_DEFUN([AM_PATH_GPGRT], AC_ARG_WITH(gpg-error-prefix,, [gpgrt_config_prefix="$withval"]) + dnl Also accept libgpgrt-prefix + AC_ARG_WITH(libgpgrt-prefix, + AC_HELP_STRING([--with-libgpgrt-prefix=PFX], + [prefix where GPG Runtime is installed (optional)]), + [gpgrt_config_prefix="$withval"]) + if test x"${GPGRT_CONFIG}" = x ; then if test x"${gpgrt_config_prefix}" != x ; then - GPGRT_CONFIG="${gpgrt_config_prefix}/bin/gpg-error-config" + GPGRT_CONFIG="${gpgrt_config_prefix}/bin/gpgrt-config" else case "${SYSROOT}" in /*) - if test -x "${SYSROOT}/bin/gpg-error-config" ; then - GPGRT_CONFIG="${SYSROOT}/bin/gpg-error-config" + if test -x "${SYSROOT}/bin/gpgrt-config" ; then + GPGRT_CONFIG="${SYSROOT}/bin/gpgrt-config" fi ;; '') @@ -63,9 +69,9 @@ AC_DEFUN([AM_PATH_GPGRT], fi fi - AC_PATH_PROG(GPGRT_CONFIG, gpg-error-config, no) - min_gpgrt_version=ifelse([$1], ,0.0,$1) - AC_MSG_CHECKING(for GPG Error - version >= $min_gpgrt_version) + AC_PATH_PROG(GPGRT_CONFIG, gpgrt-config, no) + min_gpgrt_version=ifelse([$1], ,1.33,$1) + AC_MSG_CHECKING(for GPG Runtime - version >= $min_gpgrt_version) ok=no if test "$GPGRT_CONFIG" != "no" \ && test -f "$GPGRT_CONFIG" ; then @@ -73,7 +79,7 @@ AC_DEFUN([AM_PATH_GPGRT], sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\1/'` req_minor=`echo $min_gpgrt_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\2/'` - gpgrt_config_version=`CC=$CC $GPGRT_CONFIG $gpgrt_config_args --version` + gpgrt_config_version=`CC=$CC $GPGRT_CONFIG --version` major=`echo $gpgrt_config_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` minor=`echo $gpgrt_config_version | \ @@ -89,15 +95,15 @@ AC_DEFUN([AM_PATH_GPGRT], fi fi if test $ok = yes; then - GPGRT_CFLAGS=`CC=$CC $GPGRT_CONFIG $gpgrt_config_args --cflags` - GPGRT_LIBS=`CC=$CC $GPGRT_CONFIG $gpgrt_config_args --libs` - GPGRT_MT_CFLAGS=`CC=$CC $GPGRT_CONFIG $gpgrt_config_args --mtcflags 2>/dev/null` + GPGRT_CFLAGS=`CC=$CC $GPGRT_CONFIG --cflags` + GPGRT_LIBS=`CC=$CC $GPGRT_CONFIG --libs` + GPGRT_MT_CFLAGS=`CC=$CC $GPGRT_CONFIG --variable=mtcflags 2>/dev/null` GPGRT_MT_CFLAGS="$GPGRT_CFLAGS${GPGRT_CFLAGS:+ }$GPGRT_MT_CFLAGS" - GPGRT_MT_LIBS=`CC=$CC $GPGRT_CONFIG $gpgrt_config_args --mtlibs 2>/dev/null` + GPGRT_MT_LIBS=`CC=$CC $GPGRT_CONFIG --variable=mtlibs 2>/dev/null` GPGRT_MT_LIBS="$GPGRT_LIBS${GPGRT_LIBS:+ }$GPGRT_MT_LIBS" AC_MSG_RESULT([yes ($gpgrt_config_version)]) ifelse([$2], , :, [$2]) - gpgrt_config_host=`CC=$CC $GPGRT_CONFIG $gpgrt_config_args --variable=host 2>/dev/null || echo none` + gpgrt_config_host=`CC=$CC $GPGRT_CONFIG --variable=host 2>/dev/null || echo none` if test x"$gpgrt_config_host" != xnone ; then if test x"$gpgrt_config_host" != x"$host" ; then AC_MSG_WARN([[ @@ -105,10 +111,10 @@ AC_DEFUN([AM_PATH_GPGRT], *** The config script $GPGRT_CONFIG was *** built for $gpgrt_config_host and thus may not match the *** used host $host. -*** You may want to use the configure option --with-libgpg-error-prefix +*** You may want to use the configure option --with-libgpgrt-prefix *** to specify a matching config script or use \$SYSROOT. ***]]) - gpg_config_script_warn="$gpg_config_script_warn libgpg-error" + gpg_config_script_warn="$gpg_config_script_warn libgpgrt" fi fi else |