# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
-# Last-changed: 2024-05-14
+# Last-changed: 2024-06-13
dnl
fi
if test -n "$gpgrt_libdir"; then
+ # Add the --libdir option to GPGRT_CONFIG
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])
- gpg_error_config_version=`$GPG_ERROR_CONFIG --modversion`
- else
- gpg_error_config_version=`$GPG_ERROR_CONFIG --version`
+ # Make sure if gpgrt-config really works, by testing config gpg-error
+ if ! $GPGRT_CONFIG gpg-error --exists; then
+ # If it doesn't work, clear the GPGRT_CONFIG variable.
unset GPGRT_CONFIG
fi
- elif test "$GPG_ERROR_CONFIG" != "no"; then
- gpg_error_config_version=`$GPG_ERROR_CONFIG --version`
+ else
+ # GPGRT_CONFIG found but no suitable dir for --libdir found.
+ # This is a failure. Clear the GPGRT_CONFIG variable.
unset GPGRT_CONFIG
fi
])