2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-09-02 06:55:16 +00:00

[1640_2] switch order of botan tests

config script tests are now done before pkg-config tests
This commit is contained in:
Jelte Jansen
2012-03-09 21:59:59 +01:00
parent 717c10a44c
commit b78153aae5

View File

@@ -512,38 +512,38 @@ if test "${botan_config}" != "yes" ; then
BOTAN_CONFIG="${botan_config}" BOTAN_CONFIG="${botan_config}"
fi fi
else else
AC_MSG_ERROR([${botan_config} not found or not executable]) AC_MSG_ERROR([--with-botan-config should point to a botan-config program and not a directory (${botan_config})])
fi fi
else else
# First see if pkg-config knows of it.
# Unfortunately, the botan.pc files have their minor version in them
# too, so we need to try them one by one
BOTAN_CONFIG="" BOTAN_CONFIG=""
AC_PATH_PROG([PKG_CONFIG], [pkg-config]) # first try several possible names of the config script
if test "$PKG_CONFIG" != "" ; then # (1.8 is there just in case)
BOTAN_VERSIONS="botan-1.10 botan-1.9 botan-1.8" BOTAN_CONFIG_VERSIONS="botan-config-1.10 botan-config-1.9 botan-config-1.8 botan-config"
for version in $BOTAN_VERSIONS; do for botan_config in $BOTAN_CONFIG_VERSIONS; do
AC_MSG_CHECKING([Checking botan version with pkg-config $version]) AC_PATH_PROG([BOTAN_CONFIG], [${botan_config}])
if test -x "${BOTAN_CONFIG}" ; then
if [ $PKG_CONFIG --exists ${version} ]; then break
AC_MSG_RESULT([found]) fi
BOTAN_CONFIG="$PKG_CONFIG ${version}" done
break
else
AC_MSG_RESULT([not found])
fi
done
fi
# If we had no pkg-config, or it didn't know about botan, use botan-config
# Of course, botan-config can have several different names as well...
if test "$BOTAN_CONFIG" = "" ; then if test "$BOTAN_CONFIG" = "" ; then
BOTAN_CONFIG_VERSIONS="botan-config-1.10 botan-config-1.9 botan-config-1.8 botan-config" AC_PATH_PROG([PKG_CONFIG], [pkg-config])
for botan_config in $BOTAN_CONFIG_VERSIONS; do if test "$PKG_CONFIG" != "" ; then
AC_PATH_PROG([BOTAN_CONFIG], [${botan_config}]) # Ok so no script found, see if pkg-config knows of it.
if test -x "${BOTAN_CONFIG}" ; then # Unfortunately, the botan.pc files also have their minor version
break # in their name, so we need to try them one by one
fi BOTAN_VERSIONS="botan-1.10 botan-1.9 botan-1.8"
done for version in $BOTAN_VERSIONS; do
AC_MSG_CHECKING([Checking botan version with pkg-config $version])
if [ $PKG_CONFIG --exists ${version} ]; then
AC_MSG_RESULT([found])
BOTAN_CONFIG="$PKG_CONFIG ${version}"
break
else
AC_MSG_RESULT([not found])
fi
done
fi
fi fi
fi fi
if test "x${BOTAN_CONFIG}" != "x" if test "x${BOTAN_CONFIG}" != "x"