diff options
Diffstat (limited to 'm4/ksba.m4')
-rw-r--r-- | m4/ksba.m4 | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/m4/ksba.m4 b/m4/ksba.m4 index 110038755..73b2e26d1 100644 --- a/m4/ksba.m4 +++ b/m4/ksba.m4 @@ -15,13 +15,14 @@ dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]]) dnl Test for libksba and define KSBA_CFLAGS and KSBA_LIBS dnl MINIMUN-VERSION is a string with the version number optionalliy prefixed dnl with the API version to also check the API compatibility. Example: -dnl a MINIMUN-VERSION of 1:1.0.7 won't pass the test unless the installed +dnl a MINIMUN-VERSION of 1:1.0.7 won't pass the test unless the installed dnl version of libksba is at least 1.0.7 *and* the API number is 1. Using dnl this features allows to prevent build against newer versions of libksba dnl with a changed API. dnl AC_DEFUN([AM_PATH_KSBA], -[ AC_ARG_WITH(ksba-prefix, +[AC_REQUIRE([AC_CANONICAL_HOST]) + AC_ARG_WITH(ksba-prefix, AC_HELP_STRING([--with-ksba-prefix=PFX], [prefix where KSBA is installed (optional)]), ksba_config_prefix="$withval", ksba_config_prefix="") @@ -60,7 +61,7 @@ AC_DEFUN([AM_PATH_KSBA], sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\3/'` if test "$major" -gt "$req_major"; then ok=yes - else + else if test "$major" -eq "$req_major"; then if test "$minor" -gt "$req_minor"; then ok=yes @@ -99,6 +100,19 @@ AC_DEFUN([AM_PATH_KSBA], KSBA_CFLAGS=`$KSBA_CONFIG $ksba_config_args --cflags` KSBA_LIBS=`$KSBA_CONFIG $ksba_config_args --libs` ifelse([$2], , :, [$2]) + libksba_config_host=`$LIBKSBA_CONFIG $ksba_config_args --host 2>/dev/null || echo none` + if test x"$libksba_config_host" != xnone ; then + if test x"$libksba_config_host" != x"$host" ; then + AC_MSG_WARN([[ +*** +*** The config script $LIBKSBA_CONFIG was +*** built for $libksba_config_host and thus may not match the +*** used host $host. +*** You may want to use the configure option --with-libksba-prefix +*** to specify a matching config script. +***]]) + fi + fi else KSBA_CFLAGS="" KSBA_LIBS="" |