From 42c575184d6cb47ee99bc4c93709be47299d8207 Mon Sep 17 00:00:00 2001 From: upstream svn Date: Mon, 25 Jan 2016 18:04:16 +0000 Subject: [PATCH] Fix Crypto++ detection The original detection code was flawed in several aspects. When it came to cross-compiling, it used to find the build system's cryptopp installation unless a prefix was given. Then it screwed up everything, by including build flags for host. The current approach doesn't use any hard-coded directories. It lets the compiler find cryptopp, and then we ask the compiler where it found it, to let us check the version number (as cryptopp still doesn't have any compile-time or run-time version information). If a prefix was given, then we test the given prefix for something that looks like cryptopp, and live with that if that seems to be ok. We don't anymore set CPPFLAGS nor LDFLAGS for cryptopp installations found in system directories (i.e. reachable for the compiler without extra flags), we set them only if --with-crypto-prefix was given and it points to an installed version of the library. --- .svn-revision | 2 +- configure | 135 ++++++++++++++++++++++++++------------------------------- configure.in | 9 ++-- docs/Changelog | 2 + m4/cryptopp.m4 | 132 +++++++++++++++++++++++++------------------------------ 5 files changed, 129 insertions(+), 151 deletions(-) diff --git a/.svn-revision b/.svn-revision index c21bb857..7242244b 100644 --- a/.svn-revision +++ b/.svn-revision @@ -1 +1 @@ -10896 +10897 diff --git a/configure b/configure index 5d10c4d5..143cbb00 100755 --- a/configure +++ b/configure @@ -9243,7 +9243,7 @@ fi fi -# Check for Crypto++ +# Check for Crypto++ (requires C++) if test ${enable_monolithic:-yes} = yes -o ${enable_amule_daemon:-no} = yes -o ${enable_amule_gui:-no} = yes -o ${enable_fileview:-no} = yes ; then : @@ -9256,90 +9256,91 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypto++ version >= 5.1" >&5 $as_echo_n "checking for crypto++ version >= 5.1... " >&6; } - cryptopp_file_with_version="cryptlib.h" - - CRYPTOPP_STYLE="unknown" - CRYPTOPP_LIB_NAME="unknown" - cryptopp_includedir="unknown" - CRYPTOPP_INCLUDE_PREFIX="unknown" - cryptopp_libdir="unknown" + cryptopp_found=false if test -n "$with_crypto_prefix"; then : CRYPTOPP_PREFIX="$with_crypto_prefix" # Find the Cryptopp header in the user-provided location - if test -f $CRYPTOPP_PREFIX/$cryptopp_file_with_version; then + if test -f $CRYPTOPP_PREFIX/cryptlib.h; then - CRYPTOPP_STYLE="sources" + cryptopp_found=true CRYPTOPP_LIB_NAME="cryptopp" - cryptopp_includedir= CRYPTOPP_INCLUDE_PREFIX="$CRYPTOPP_PREFIX" - cryptopp_libdir= + CRYPTOPP_CPPFLAGS= + CRYPTOPP_LDFLAGS= + CRYPTOPP_LIBS="${CRYPTOPP_PREFIX}/lib${CRYPTOPP_LIB_NAME}.a" -elif test -f $CRYPTOPP_PREFIX/include/cryptopp/$cryptopp_file_with_version; then +else - CRYPTOPP_STYLE="installed" - CRYPTOPP_LIB_NAME="cryptopp" - cryptopp_includedir="$CRYPTOPP_PREFIX/include" - CRYPTOPP_INCLUDE_PREFIX="$CRYPTOPP_LIB_NAME" - cryptopp_libdir="$CRYPTOPP_PREFIX/lib" + for CRYPTOPP_LIB_NAME in "cryptopp" "crypto++"; do + if test -f $CRYPTOPP_PREFIX/include/$CRYPTOPP_LIB_NAME/cryptlib.h; then : -elif test -f $CRYPTOPP_PREFIX/include/crypto++/$cryptopp_file_with_version; then + cryptopp_found=true + CRYPTOPP_INCLUDE_PREFIX="$CRYPTOPP_LIB_NAME" + CRYPTOPP_CPPFLAGS="-I$CRYPTOPP_PREFIX/include" + CRYPTOPP_LDFLAGS="-L$CRYPTOPP_PREFIX/lib" + CRYPTOPP_LIBS="-l$CRYPTOPP_LIB_NAME" + break - # Debian uses libcrypto++5.1 - it's not my fault, please soda patch the package - CRYPTOPP_STYLE="gentoo_debian" - CRYPTOPP_LIB_NAME="crypto++" - cryptopp_includedir="$CRYPTOPP_PREFIX/include" - CRYPTOPP_INCLUDE_PREFIX="$CRYPTOPP_LIB_NAME" - cryptopp_libdir="$CRYPTOPP_PREFIX/lib" +fi + done fi else - for CRYPTOPP_PREFIX in /usr /usr/local /opt /opt/local /usr/pkg /mingw ; do - # Find the Cryptopp header in system locations - if test -f $CRYPTOPP_PREFIX/$cryptopp_file_with_version; then + # Check whether the compiler can find it + for CRYPTOPP_LIB_NAME in "cryptopp" "crypto++"; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - CRYPTOPP_STYLE="sources" - CRYPTOPP_LIB_NAME="cryptopp" - cryptopp_includedir= - CRYPTOPP_INCLUDE_PREFIX="$CRYPTOPP_PREFIX" - cryptopp_libdir= - break + #include <$CRYPTOPP_LIB_NAME/cryptlib.h> -elif test -f $CRYPTOPP_PREFIX/include/cryptopp/$cryptopp_file_with_version; then +int +main () +{ - CRYPTOPP_STYLE="installed" - CRYPTOPP_LIB_NAME="cryptopp" - cryptopp_includedir="$CRYPTOPP_PREFIX/include" - CRYPTOPP_INCLUDE_PREFIX="$CRYPTOPP_LIB_NAME" - cryptopp_libdir="$CRYPTOPP_PREFIX/lib" - break + ; + return 0; +} -elif test -f $CRYPTOPP_PREFIX/include/crypto++/$cryptopp_file_with_version; then +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : - # Debian uses libcrypto++5.1 - it's not my fault, please soda patch the package - CRYPTOPP_STYLE="gentoo_debian" - CRYPTOPP_LIB_NAME="crypto++" - cryptopp_includedir="$CRYPTOPP_PREFIX/include" + cryptopp_found=true CRYPTOPP_INCLUDE_PREFIX="$CRYPTOPP_LIB_NAME" - cryptopp_libdir="$CRYPTOPP_PREFIX/lib" + CRYPTOPP_CPPFLAGS= + CRYPTOPP_LDFLAGS= + CRYPTOPP_LIBS="-l$CRYPTOPP_LIB_NAME" break fi - +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done fi - if test $CRYPTOPP_STYLE = "unknown"; then : - result=no; resultstr="" -else + if $cryptopp_found; then : # Find out the crypto++ version and check against the minimum required - cryptopp_header_path="${cryptopp_includedir+$cryptopp_includedir/}$CRYPTOPP_INCLUDE_PREFIX/$cryptopp_file_with_version" + # Ask the compiler where are the crypto++ files + mule_backup_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $CRYPTOPP_CPPFLAGS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include <$CRYPTOPP_INCLUDE_PREFIX/cryptlib.h> + +_ACEOF + cryptopp_header_path=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | sed -e '/^#.*cryptlib.h/{s/.*"\(.*\)".*/\1/;q;};d'` + rm -f conftest* + CPPFLAGS="$mule_backup_CPPFLAGS" + # Set a prefix suitable for --with-crypto-prefix + CRYPTOPP_PREFIX="${cryptopp_header_path%/*}" + CRYPTOPP_PREFIX="${CRYPTOPP_PREFIX%/include/${CRYPTOPP_LIB_NAME}}" + # Now check the version CRYPTOPP_VERSION_STRING=`$EGREP "Reference Manual|API Reference" $cryptopp_header_path | sed -e 's/[^0-9]*\([0-9.]*\).*/\1/'` CRYPTOPP_VERSION_NUMBER=`echo $CRYPTOPP_VERSION_STRING | $AWK 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'` minvers=`echo 5.1 | $AWK 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'` @@ -9347,23 +9348,7 @@ else if test -n "$CRYPTOPP_VERSION_NUMBER" && test "$CRYPTOPP_VERSION_NUMBER" -ge $minvers; then : result=yes - resultstr=" (version $CRYPTOPP_VERSION_STRING, $CRYPTOPP_STYLE)" - if test -n "$cryptopp_includedir"; then : - CRYPTOPP_CPPFLAGS="-I$cryptopp_includedir" -else - CRYPTOPP_CPPFLAGS= -fi - if test -n "$cryptopp_libdir"; then : - - CRYPTOPP_LDFLAGS="-L$cryptopp_libdir" - CRYPTOPP_LIBS="-l$CRYPTOPP_LIB_NAME" - -else - - CRYPTOPP_LDFLAGS= - CRYPTOPP_LIBS="${CRYPTOPP_INCLUDE_PREFIX}/lib${CRYPTOPP_LIB_NAME}.a" - -fi + resultstr=" (version $CRYPTOPP_VERSION_STRING)" cat >>confdefs.h <<_ACEOF #define CRYPTOPP_INCLUDE_PREFIX $CRYPTOPP_INCLUDE_PREFIX @@ -9374,9 +9359,14 @@ else result=no resultstr=" (version $CRYPTOPP_VERSION_STRING is not new enough)" + CRYPTOPP_CPPFLAGS= + CRYPTOPP_LDFLAGS= + CRYPTOPP_LIBS= fi +else + result="no"; resultstr= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $result$resultstr" >&5 @@ -9392,10 +9382,10 @@ fi else as_fn_error " - Could not find crypto++ header file \"$cryptopp_file_with_version\". + Could not find crypto++ installation or sources. Please try again with --with-crypto-prefix=/my_crypto_prefix (replace /my_crypto_prefix with a valid path to your crypto++ - installation directory)." "$LINENO" 5 + installation or source directory)." "$LINENO" 5 fi @@ -17999,7 +17989,6 @@ echo " Should aMule be compiled with IP2country support? ${enable_geoi echo " Should aMule monolithic application be built? ${enable_monolithic:-yes}" echo " Should aMule daemon version be built? ${enable_amule_daemon:-no}" echo " Should aMule remote gui be built? ${enable_amule_gui:-no}" -echo " Crypto++ library/headers style? ${CRYPTOPP_STYLE:-not found}" echo echo " **** aMule TextClient ****" @@ -18050,7 +18039,7 @@ fi fi if test ${enable_monolithic:-yes} = yes -o ${enable_amule_daemon:-no} = yes -o ${enable_amule_gui:-no} = yes -o ${enable_fileview:-no} = yes ; then : - echo " crypto++ ${CRYPTOPP_VERSION_STRING} (${CRYPTOPP_STYLE}, in ${CRYPTOPP_PREFIX})" + echo " crypto++ ${CRYPTOPP_VERSION_STRING} (in ${CRYPTOPP_PREFIX})" fi if test ${enable_upnp:-yes} = yes; then : diff --git a/configure.in b/configure.in index 466a6a1e..31669f20 100644 --- a/configure.in +++ b/configure.in @@ -228,17 +228,17 @@ MULE_IF_ENABLED([upnp], [ ])dnl -# Check for Crypto++ +# Check for Crypto++ (requires C++) MULE_IF_ENABLED_ANY([monolithic, amule-daemon, amule-gui, fileview], [MULE_CHECK_CRYPTOPP([5.1], [ # Check for CryptoPP >= 5.5 AS_IF([test $CRYPTOPP_VERSION_NUMBER -ge "5005000"], [MULE_APPEND([CRYPTOPP_CPPFLAGS], [-D__WEAK_CRYPTO__])]) ], [ AC_MSG_ERROR([ - Could not find crypto++ header file "$cryptopp_file_with_version". + Could not find crypto++ installation or sources. Please try again with --with-crypto-prefix=/my_crypto_prefix (replace /my_crypto_prefix with a valid path to your crypto++ - installation directory).]) + installation or source directory).]) ])]) @@ -520,7 +520,6 @@ echo " Should aMule be compiled with IP2country support? MULE_STATUSOF echo " Should aMule monolithic application be built? MULE_STATUSOF([monolithic])" echo " Should aMule daemon version be built? MULE_STATUSOF([amule-daemon])" echo " Should aMule remote gui be built? MULE_STATUSOF([amule-gui])" -echo " Crypto++ library/headers style? ${CRYPTOPP_STYLE:-not found}" echo echo " **** aMule TextClient ****" @@ -561,7 +560,7 @@ AS_IF([test ${with_boost:-no} != no], [echo " boost `echo ${boost_cv_lib_version} | sed -e 's/_/./g'`"], )]) MULE_IF_ENABLED_ANY([monolithic, amule-daemon, amule-gui, fileview], - [echo " crypto++ ${CRYPTOPP_VERSION_STRING} (${CRYPTOPP_STYLE}, in ${CRYPTOPP_PREFIX})"]) + [echo " crypto++ ${CRYPTOPP_VERSION_STRING} (in ${CRYPTOPP_PREFIX})"]) MULE_IF_ENABLED([upnp], [ AS_IF([test -n "$with_libupnp_prefix"], [libupnp_place=" (in $with_libupnp_prefix)"]) echo " libupnp ${LIBUPNP_VERSION:-Not detected}${libupnp_place:-}" diff --git a/docs/Changelog b/docs/Changelog index 03f8825e..1b53b405 100644 --- a/docs/Changelog +++ b/docs/Changelog @@ -23,6 +23,8 @@ Version 2.4.0 - The river knows. * Implemented the missing 'show shared' command in amulecmd * Fix check for a valid locale config entry being done *after* the locale has been set + * Fix Crypto++ detection routine happily using build library + for host when cross-compiling iz0bbz: * Fix WinSock library version detection with MinGW-w64 diff --git a/m4/cryptopp.m4 b/m4/cryptopp.m4 index db62f58a..5797d8be 100644 --- a/m4/cryptopp.m4 +++ b/m4/cryptopp.m4 @@ -30,17 +30,20 @@ dnl -------------------------------------------------------------------------- dnl dnl This macro sets these variables: dnl - CRYPTOPP_PREFIX -dnl This is the user or system directory where crypto++ is installed or sources +dnl This is the directory where crypto++ is located, if found. The format +dnl is suitable to be passed to --with-crypto-prefix. dnl - CRYPTOPP_VERSION_STRING dnl Something like "5.5.2" dnl - CRYPTOPP_VERSION_NUMBER dnl Something like 5005002 -dnl - CRYPTOPP_STYLE -dnl "sources", "installed" or "gentoo_debian" dnl - CRYPTOPP_LIB_NAME dnl "cryptopp" or "crypto++" +dnl +dnl Exported variables (to config.h, to be used in C++ source files): dnl - CRYPTOPP_INCLUDE_PREFIX -dnl The string that goes here: #include <@CRYPTOPP_INCLUDE_PREFIX@/rsa.h> +dnl The string that goes here: #include +dnl +dnl Substituted variables (to be used in Makefiles): dnl - CRYPTOPP_CPPFLAGS dnl Flags to be added to CPPFLAGS dnl - CRYPTOPP_LDFLAGS @@ -48,111 +51,95 @@ dnl Flags to be added to LDFLAGS dnl - CRYPTOPP_LIBS dnl Library to be added to LIBS dnl -dnl The CRYPTOPP_CPPFLAGS, CRYPTOPP_LDFLAGS and CRYPTOPP_LIBS variables are also substituted. -dnl -dnl Worth notice: -dnl - cryptopp_includedir -dnl The string that goes in -I on CPPFLAGS -dnl - cryptopp_libdir -dnl The string that goes in -L on LDFLAGS -dnl - cryptopp_header_path -dnl The file we use to discover the version of cryptopp -dnl AC_DEFUN([MULE_CHECK_CRYPTOPP], [dnl AC_REQUIRE([AC_PROG_EGREP])dnl +AC_LANG_ASSERT([C++])dnl m4_define([MIN_CRYPTO_VERSION], [m4_ifval([$1], [$1], [5.1])])dnl +m4_define([cryptopp_file_with_version], [cryptlib.h])dnl AC_ARG_WITH([crypto-prefix], [AS_HELP_STRING([--with-crypto-prefix=PREFIX], [prefix where crypto++ is installed])]) AC_MSG_CHECKING([for crypto++ version >= MIN_CRYPTO_VERSION]) - cryptopp_file_with_version="cryptlib.h" - - CRYPTOPP_STYLE="unknown" - CRYPTOPP_LIB_NAME="unknown" - cryptopp_includedir="unknown" - CRYPTOPP_INCLUDE_PREFIX="unknown" - cryptopp_libdir="unknown" + cryptopp_found=false AS_IF([test -n "$with_crypto_prefix"], [ CRYPTOPP_PREFIX="$with_crypto_prefix" # Find the Cryptopp header in the user-provided location - MULE_IF([test -f $CRYPTOPP_PREFIX/$cryptopp_file_with_version], [ - CRYPTOPP_STYLE="sources" + MULE_IF([test -f $CRYPTOPP_PREFIX/cryptopp_file_with_version], [ + cryptopp_found=true CRYPTOPP_LIB_NAME="cryptopp" - cryptopp_includedir= CRYPTOPP_INCLUDE_PREFIX="$CRYPTOPP_PREFIX" - cryptopp_libdir= - ], [test -f $CRYPTOPP_PREFIX/include/cryptopp/$cryptopp_file_with_version], [ - CRYPTOPP_STYLE="installed" - CRYPTOPP_LIB_NAME="cryptopp" - cryptopp_includedir="$CRYPTOPP_PREFIX/include" - CRYPTOPP_INCLUDE_PREFIX="$CRYPTOPP_LIB_NAME" - cryptopp_libdir="$CRYPTOPP_PREFIX/lib" - ], [test -f $CRYPTOPP_PREFIX/include/crypto++/$cryptopp_file_with_version], [ - # Debian uses libcrypto++5.1 - it's not my fault, please soda patch the package - CRYPTOPP_STYLE="gentoo_debian" - CRYPTOPP_LIB_NAME="crypto++" - cryptopp_includedir="$CRYPTOPP_PREFIX/include" - CRYPTOPP_INCLUDE_PREFIX="$CRYPTOPP_LIB_NAME" - cryptopp_libdir="$CRYPTOPP_PREFIX/lib" + CRYPTOPP_CPPFLAGS= + CRYPTOPP_LDFLAGS= + CRYPTOPP_LIBS="${CRYPTOPP_PREFIX}/lib${CRYPTOPP_LIB_NAME}.a" + ], [ + for CRYPTOPP_LIB_NAME in "cryptopp" "crypto++"; do + AS_IF([test -f $CRYPTOPP_PREFIX/include/$CRYPTOPP_LIB_NAME/cryptopp_file_with_version], [ + cryptopp_found=true + CRYPTOPP_INCLUDE_PREFIX="$CRYPTOPP_LIB_NAME" + CRYPTOPP_CPPFLAGS="-I$CRYPTOPP_PREFIX/include" + CRYPTOPP_LDFLAGS="-L$CRYPTOPP_PREFIX/lib" + CRYPTOPP_LIBS="-l$CRYPTOPP_LIB_NAME" + break + ]) + done ]) ], [ - for CRYPTOPP_PREFIX in /usr /usr/local /opt /opt/local /usr/pkg /mingw ; do - # Find the Cryptopp header in system locations - MULE_IF([test -f $CRYPTOPP_PREFIX/$cryptopp_file_with_version], [ - CRYPTOPP_STYLE="sources" - CRYPTOPP_LIB_NAME="cryptopp" - cryptopp_includedir= - CRYPTOPP_INCLUDE_PREFIX="$CRYPTOPP_PREFIX" - cryptopp_libdir= - break - ], [test -f $CRYPTOPP_PREFIX/include/cryptopp/$cryptopp_file_with_version], [ - CRYPTOPP_STYLE="installed" - CRYPTOPP_LIB_NAME="cryptopp" - cryptopp_includedir="$CRYPTOPP_PREFIX/include" - CRYPTOPP_INCLUDE_PREFIX="$CRYPTOPP_LIB_NAME" - cryptopp_libdir="$CRYPTOPP_PREFIX/lib" - break - ], [test -f $CRYPTOPP_PREFIX/include/crypto++/$cryptopp_file_with_version], [ - # Debian uses libcrypto++5.1 - it's not my fault, please soda patch the package - CRYPTOPP_STYLE="gentoo_debian" - CRYPTOPP_LIB_NAME="crypto++" - cryptopp_includedir="$CRYPTOPP_PREFIX/include" + # Check whether the compiler can find it + for CRYPTOPP_LIB_NAME in "cryptopp" "crypto++"; do + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ + #include <$CRYPTOPP_LIB_NAME/]cryptopp_file_with_version[> + ]) + ], [ + cryptopp_found=true CRYPTOPP_INCLUDE_PREFIX="$CRYPTOPP_LIB_NAME" - cryptopp_libdir="$CRYPTOPP_PREFIX/lib" + CRYPTOPP_CPPFLAGS= + CRYPTOPP_LDFLAGS= + CRYPTOPP_LIBS="-l$CRYPTOPP_LIB_NAME" break ]) done ]) - AS_IF([test $CRYPTOPP_STYLE = "unknown"], [result=no; resultstr=""], [ + AS_IF([$cryptopp_found], [ # Find out the crypto++ version and check against the minimum required - cryptopp_header_path="${cryptopp_includedir+$cryptopp_includedir/}$CRYPTOPP_INCLUDE_PREFIX/$cryptopp_file_with_version" + # Ask the compiler where are the crypto++ files + MULE_BACKUP([CPPFLAGS]) + MULE_APPEND([CPPFLAGS], [$CRYPTOPP_CPPFLAGS]) +dnl Hack begin! +dnl To be able to preprocess the file but scan the preprocessed results +dnl ourselves, we need to use undocumented features of autoconf. + AC_LANG_CONFTEST([AC_LANG_SOURCE([ + #include <$CRYPTOPP_INCLUDE_PREFIX/]cryptopp_file_with_version[> + ])]) + [cryptopp_header_path=`(eval "$ac_cpp conftest.$ac_ext") 2>&]AS_MESSAGE_LOG_FD[ | sed -e '/^#.*]cryptopp_file_with_version[/{s/.*"\(.*\)".*/\1/;q;};d'`] + rm -f conftest* +dnl Hack end! + MULE_RESTORE([CPPFLAGS]) + # Set a prefix suitable for --with-crypto-prefix + CRYPTOPP_PREFIX="${cryptopp_header_path%/*}" + CRYPTOPP_PREFIX="${CRYPTOPP_PREFIX%/include/${CRYPTOPP_LIB_NAME}}" + # Now check the version CRYPTOPP_VERSION_STRING=`$EGREP "Reference Manual|API Reference" $cryptopp_header_path | sed -e ['s/[^0-9]*\([0-9.]*\).*/\1/']` CRYPTOPP_VERSION_NUMBER=`echo $CRYPTOPP_VERSION_STRING | $AWK 'BEGIN { FS = "."; } { printf "%d", ([$]1 * 1000 + [$]2) * 1000 + [$]3;}'` minvers=`echo MIN_CRYPTO_VERSION | $AWK 'BEGIN { FS = "."; } { printf "%d", ([$]1 * 1000 + [$]2) * 1000 + [$]3;}'` AS_IF([test -n "$CRYPTOPP_VERSION_NUMBER" && test "$CRYPTOPP_VERSION_NUMBER" -ge $minvers], [ result=yes - resultstr=" (version $CRYPTOPP_VERSION_STRING, $CRYPTOPP_STYLE)" - AS_IF([test -n "$cryptopp_includedir"], [CRYPTOPP_CPPFLAGS="-I$cryptopp_includedir"], [CRYPTOPP_CPPFLAGS=]) - AS_IF([test -n "$cryptopp_libdir"], [ - CRYPTOPP_LDFLAGS="-L$cryptopp_libdir" - CRYPTOPP_LIBS="-l$CRYPTOPP_LIB_NAME" - ], [ - CRYPTOPP_LDFLAGS= - CRYPTOPP_LIBS="${CRYPTOPP_INCLUDE_PREFIX}/lib${CRYPTOPP_LIB_NAME}.a" - ]) + resultstr=" (version $CRYPTOPP_VERSION_STRING)" AH_TEMPLATE([CRYPTOPP_INCLUDE_PREFIX], [Define this to the include prefix of crypto++]) AC_DEFINE_UNQUOTED([CRYPTOPP_INCLUDE_PREFIX], $CRYPTOPP_INCLUDE_PREFIX) ], [ result=no resultstr=" (version $CRYPTOPP_VERSION_STRING is not new enough)" + CRYPTOPP_CPPFLAGS= + CRYPTOPP_LDFLAGS= + CRYPTOPP_LIBS= ]) - ]) + ], [result="no"; resultstr=]) AC_MSG_RESULT([$result$resultstr]) @@ -162,5 +149,6 @@ dnl Exported symbols AC_SUBST([CRYPTOPP_CPPFLAGS])dnl AC_SUBST([CRYPTOPP_LDFLAGS])dnl AC_SUBST([CRYPTOPP_LIBS])dnl +m4_undefine([cryptopp_file_with_version])dnl m4_undefine([MIN_CRYPTO_VERSION])dnl ]) -- 2.11.4.GIT