gpgme.m4: Fix setting/using GPG_ERROR_CONFIG.

gpgm4.m4 (_AM_PATH_GPGRT_CONFIG): Don't set GPG_ERROR_CONFIG and
gpg_error_config_version.

--

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
NIIBE Yutaka 2024-06-13 14:46:08 +09:00
parent 2187a4de8c
commit 14b035034a
No known key found for this signature in database
GPG Key ID: 640114AF89DE6054

View File

@ -83,17 +83,16 @@ AC_DEFUN([_AM_PATH_GPGRT_CONFIG],[dnl
fi fi
if test -n "$gpgrt_libdir"; then if test -n "$gpgrt_libdir"; then
# Add the --libdir option to GPGRT_CONFIG
GPGRT_CONFIG="$GPGRT_CONFIG --libdir=$gpgrt_libdir" GPGRT_CONFIG="$GPGRT_CONFIG --libdir=$gpgrt_libdir"
if $GPGRT_CONFIG gpg-error >/dev/null 2>&1; then # Make sure if gpgrt-config really works, by testing config gpg-error
GPG_ERROR_CONFIG="$GPGRT_CONFIG gpg-error" if ! $GPGRT_CONFIG gpg-error --exists; then
AC_MSG_NOTICE([Use gpgrt-config with $gpgrt_libdir as gpg-error-config]) # If it doesn't work, clear the GPGRT_CONFIG variable.
gpg_error_config_version=`$GPG_ERROR_CONFIG --modversion`
else
gpg_error_config_version=`$GPG_ERROR_CONFIG --version`
unset GPGRT_CONFIG unset GPGRT_CONFIG
fi fi
elif test "$GPG_ERROR_CONFIG" != "no"; then else
gpg_error_config_version=`$GPG_ERROR_CONFIG --version` # GPGRT_CONFIG found but no suitable dir for --libdir found.
# This is a failure. Clear the GPGRT_CONFIG variable.
unset GPGRT_CONFIG unset GPGRT_CONFIG
fi fi
]) ])