summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNIIBE Yutaka <gniibe@fsij.org>2018-11-02 10:42:34 +0900
committerNIIBE Yutaka <gniibe@fsij.org>2018-11-02 11:44:51 +0900
commit50ed4f7d5b68e94464df7c0646c3424cee2f47de (patch)
tree167fd559c167636dc3c4306a0a2a2439ad5d70fd
parente916b1ece87dee254ea7899b01cd5d2c2ff58021 (diff)
downloadlibassuan-50ed4f7d5b68e94464df7c0646c3424cee2f47de.tar.gz
build: Update gpg-error.m4 and libassuan.m4.
* m4/gpg-error.m4: Update to 2018-11-02. * src/libassuan.m4: Add AC_MSG_NOTICE. Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
-rw-r--r--m4/gpg-error.m459
-rw-r--r--src/libassuan.m41
2 files changed, 47 insertions, 13 deletions
diff --git a/m4/gpg-error.m4 b/m4/gpg-error.m4
index 0964a26..a9d572f 100644
--- a/m4/gpg-error.m4
+++ b/m4/gpg-error.m4
@@ -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-29
+# Last-changed: 2018-11-02
dnl AM_PATH_GPG_ERROR([MINIMUM-VERSION,
@@ -64,15 +64,42 @@ AC_DEFUN([AM_PATH_GPG_ERROR],
min_gpg_error_version=ifelse([$1], ,1.33,$1)
ok=no
- use_gpgrt_config=""
- if test "$GPG_ERROR_CONFIG" = "no"; then
+ if test "$prefix" = NONE ; then
+ prefix_option_expanded=/usr/local
+ else
+ prefix_option_expanded="$prefix"
+ fi
+ if test "$exec_prefix" = NONE ; then
+ exec_prefix_option_expanded=$prefix_option_expanded
+ else
+ exec_prefix_option_expanded=$(prefix=$prefix_option_expanded eval echo $exec_prefix)
+ fi
+ libdir_option_expanded=$(prefix=$prefix_option_expanded exec_prefix=$exec_prefix_option_expanded eval echo $libdir)
+
+ if test -f $libdir_option_expanded/pkgconfig/gpg-error.pc; then
+ gpgrt_libdir=$libdir_option_expanded
+ else
+ if crt1_path=$(${CC:-cc} -print-file-name=crt1.o 2>/dev/null); then
+ if possible_libdir=$(cd ${crt1_path%/*} && pwd 2>/dev/null); then
+ if test -f $possible_libdir/pkgconfig/gpg-error.pc; then
+ gpgrt_libdir=$possible_libdir
+ fi
+ fi
+ fi
+ fi
+
+ if test "$GPG_ERROR_CONFIG" = "no" -a -n "$gpgrt_libdir"; then
AC_PATH_PROG(GPGRT_CONFIG, gpgrt-config, no)
- if test "$GPGRT_CONFIG" != "no"; then
- GPGRT_CONFIG="$GPGRT_CONFIG --prefix=$prefix --exec-prefix=$exec_prefix --libdir=$libdir"
+ if test "$GPGRT_CONFIG" = "no"; then
+ unset GPGRT_CONFIG
+ else
+ GPGRT_CONFIG="$GPGRT_CONFIG --libdir=$gpgrt_libdir"
if $GPGRT_CONFIG gpg-error >/dev/null 2>&1; then
GPG_ERROR_CONFIG="$GPGRT_CONFIG gpg-error"
- use_gpgrt_config=yes
+ AC_MSG_NOTICE([Use gpgrt-config with $gpgrt_libdir as gpg-error-config])
gpg_error_config_version=`$GPG_ERROR_CONFIG --modversion`
+ else
+ unset GPGRT_CONFIG
fi
fi
else
@@ -96,13 +123,19 @@ AC_DEFUN([AM_PATH_GPG_ERROR],
fi
fi
fi
- if test -z "$GPGRT_CONFIG"; then
+ if test -z "$GPGRT_CONFIG" -a -n "$gpgrt_libdir"; then
if test "$major" -gt 1 -o "$major" -eq 1 -a "$minor" -ge 33; then
AC_PATH_PROG(GPGRT_CONFIG, gpgrt-config, no)
- 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
+ if test "$GPGRT_CONFIG" = "no"; then
+ unset GPGRT_CONFIG
+ else
+ GPGRT_CONFIG="$GPGRT_CONFIG --libdir=$gpgrt_libdir"
+ if $GPGRT_CONFIG gpg-error >/dev/null 2>&1; then
+ GPG_ERROR_CONFIG="$GPGRT_CONFIG gpg-error"
+ AC_MSG_NOTICE([Use gpgrt-config with $gpgrt_libdir as gpg-error-config])
+ else
+ unset GPGRT_CONFIG
+ fi
fi
fi
fi
@@ -111,7 +144,7 @@ AC_DEFUN([AM_PATH_GPG_ERROR],
if test $ok = yes; then
GPG_ERROR_CFLAGS=`$GPG_ERROR_CONFIG --cflags`
GPG_ERROR_LIBS=`$GPG_ERROR_CONFIG --libs`
- if test -z "$use_gpgrt_config"; then
+ if test -z "$GPGRT_CONFIG"; then
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
@@ -122,7 +155,7 @@ AC_DEFUN([AM_PATH_GPG_ERROR],
fi
AC_MSG_RESULT([yes ($gpg_error_config_version)])
ifelse([$2], , :, [$2])
- if test -z "$use_gpgrt_config"; then
+ if test -z "$GPGRT_CONFIG"; then
gpg_error_config_host=`$GPG_ERROR_CONFIG --host 2>/dev/null || echo none`
else
gpg_error_config_host=`$GPG_ERROR_CONFIG --variable=host 2>/dev/null || echo none`
diff --git a/src/libassuan.m4 b/src/libassuan.m4
index 52058ea..4af2d04 100644
--- a/src/libassuan.m4
+++ b/src/libassuan.m4
@@ -30,6 +30,7 @@ AC_DEFUN([_AM_PATH_LIBASSUAN_COMMON],
if test x"${LIBASSUAN_CONFIG}" = x -a x"$GPGRT_CONFIG" != x -a "$GPGRT_CONFIG" != "no"; then
if $GPGRT_CONFIG libassuan --exists; then
LIBASSUAN_CONFIG="$GPGRT_CONFIG libassuan"
+ AC_MSG_NOTICE([Use gpgrt-config as libassuan-config])
use_gpgrt_config=yes
fi
fi