From 98dcfea475b3b9dcf0c1e2ee2693be3774581ade Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sat, 21 Sep 2019 13:34:40 +0000 Subject: [PATCH] Fix the SQUID_CC_REQUIRE_ARGUMENT autoconf function (#478) Inside AC_DEFUN(), autoconf replaces `$1` with the first argument of the function. In this case, the first argument is a variable name. To get the _value_ of that variable, one has to use `$$1`. One known effect of this fix (in many build environments) is the disappearance of the following annoying extra error when a build fails for some other reason: unrecognized command line option -Wno-deprecated-register --- acinclude/compiler-flags.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/acinclude/compiler-flags.m4 b/acinclude/compiler-flags.m4 index 360fd00956..8adb6a4593 100644 --- a/acinclude/compiler-flags.m4 +++ b/acinclude/compiler-flags.m4 @@ -41,7 +41,7 @@ AC_DEFUN([SQUID_CC_REQUIRE_ARGUMENT],[ SAVED_CFLAGS="$CFLAGS" SAVED_CXXFLAGS="$CXXFLAGS" AC_COMPILE_IFELSE([AC_LANG_PROGRAM($3,$4)],[$1=no],[],[$1=no]) - if test "x$1" != "xno" ; then + if test "x$$1" != "xno" ; then CFLAGS="$CFLAGS $2" CXXFLAGS="$CXXFLAGS $2" AC_COMPILE_IFELSE([AC_LANG_PROGRAM($3,$4)],[$1=yes],[$1=no],[$1=no]) -- 2.47.3