From ef286c897006a208f8fd8d77bdf06c545ea66d68 Mon Sep 17 00:00:00 2001 From: upstream svn Date: Sun, 31 Jan 2021 10:23:16 +0000 Subject: [PATCH] Remove do-nothing command and add warning about it Calling MULE_APPEND without a second argument (or with an empty one) should do exactly nothing. The current implementation instead appended a single space, which is anything but expectable. Now fixed this bahaviour and added a warning for such cases. The same stands for MULE_PREPEND, of course. --- .svn-revision | 2 +- acinclude.m4 | 4 ++-- configure | 5 +---- configure.ac | 7 ++----- 4 files changed, 6 insertions(+), 12 deletions(-) diff --git a/.svn-revision b/.svn-revision index 07b3bb1d..616dc10c 100644 --- a/.svn-revision +++ b/.svn-revision @@ -1 +1 @@ -11105 +11106 diff --git a/acinclude.m4 b/acinclude.m4 index bfb38f39..c27d9148 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -32,10 +32,10 @@ m4_pattern_forbid(__mule_)dnl Check for unexpanded internal macros # -------------------- # dnl MULE_APPEND(VARNAME, VALUE) -AC_DEFUN([MULE_APPEND], [$1="$$1 $2"]) +AC_DEFUN([MULE_APPEND], [m4_if([$2],, [m4_warn([syntax], [Appending nothing to $1 is a do-nothing!])], [$1="$$1 $2"])]) dnl MULE_PREPEND(VARNAME, VALUE) -AC_DEFUN([MULE_PREPEND], [$1="$2 $$1"]) +AC_DEFUN([MULE_PREPEND], [m4_if([$2],, [m4_warn([syntax], [Prepending nothing to $1 is a do-nothing!])], [$1="$2 $$1"])]) dnl MULE_ADDFLAG(FLAGTYPE, VALUE) AC_DEFUN([MULE_ADDFLAG], [MULE_APPEND([MULE[]$1[]FLAGS], [$2])]) diff --git a/configure b/configure index 6a55d0f6..10bfd591 100755 --- a/configure +++ b/configure @@ -9361,9 +9361,8 @@ fi fi -# Check for Crypto++ (requires C++) +# Check for Crypto++ (requires C++) >= 5.5 if test ${enable_monolithic:-yes} = yes -o ${enable_amule_daemon:-no} = yes -o ${enable_amule_gui:-no} = yes -o ${enable_fileview:-no} = yes ; then : - # Check for CryptoPP >= 5.5 # Check whether --with-crypto-prefix was given. @@ -9493,8 +9492,6 @@ $as_echo "$result$resultstr" >&6; } if test ${result:-no} = yes; then : - CRYPTOPP_CPPFLAGS="$CRYPTOPP_CPPFLAGS " - else as_fn_error $? " diff --git a/configure.ac b/configure.ac index 6aeaf478..c8ea3e66 100644 --- a/configure.ac +++ b/configure.ac @@ -222,12 +222,9 @@ MULE_IF_ENABLED([upnp], [ ])dnl -# Check for Crypto++ (requires C++) +# Check for Crypto++ (requires C++) >= 5.5 MULE_IF_ENABLED_ANY([monolithic, amule-daemon, amule-gui, fileview], -# Check for CryptoPP >= 5.5 -[MULE_CHECK_CRYPTOPP([5.5], [ - MULE_APPEND([CRYPTOPP_CPPFLAGS]) -], [ +[MULE_CHECK_CRYPTOPP([5.5],, [ AC_MSG_ERROR([ Could not find crypto++ installation or sources. Please try again with --with-crypto-prefix=/my_crypto_prefix -- 2.11.4.GIT