diff options
author | NIIBE Yutaka <gniibe@fsij.org> | 2018-10-26 09:09:51 +0900 |
---|---|---|
committer | NIIBE Yutaka <gniibe@fsij.org> | 2018-10-26 09:09:51 +0900 |
commit | 8e5641ed65f86783542d5caccdeeee42eeb9457c (patch) | |
tree | 1da4dc376fc5fa646f712f88cc8e0aec325c3a0c /m4 | |
parent | 3b271079d52978e5507ef71476f169332d4fd2e5 (diff) | |
download | libgcrypt-8e5641ed65f86783542d5caccdeeee42eeb9457c.tar.gz |
build: Relax build requirements.
* m4/gpg-error.m4: Update from libgpg-error 1.33.
* src/libgcrypt.m4: Don't require AM_PATH_GPG_ERROR. Use GPGRT_CONFIG
instead of libgcrypt-config when it is confirmed that it is available
and working well.
* configure.ac (AM_PATH_GPG_ERROR): No requirement for newer version
(It was because of new gpgrt-config which supports *.pc files).
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
Diffstat (limited to 'm4')
-rw-r--r-- | m4/gpg-error.m4 | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/m4/gpg-error.m4 b/m4/gpg-error.m4 index 0f46cd61..f89a4eea 100644 --- a/m4/gpg-error.m4 +++ b/m4/gpg-error.m4 @@ -62,15 +62,21 @@ AC_DEFUN([AM_PATH_GPG_ERROR], AC_PATH_PROG(GPG_ERROR_CONFIG, gpg-error-config, no) 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" \ - && test -f "$GPG_ERROR_CONFIG" ; then + 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" + gpg_error_config_version=`CC=$CC $GPG_ERROR_CONFIG --modversion` + fi + else + gpg_error_config_version=`CC=$CC $GPG_ERROR_CONFIG --version` + fi + if test "$GPG_ERROR_CONFIG" != "no"; then req_major=`echo $min_gpg_error_version | \ 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 --version` major=`echo $gpg_error_config_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` minor=`echo $gpg_error_config_version | \ @@ -84,7 +90,14 @@ AC_DEFUN([AM_PATH_GPG_ERROR], fi fi fi + 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" + 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` |