]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fix escaping leading regex dashes in ./configure sources (#1152)
authorAlex Rousskov <rousskov@measurement-factory.com>
Wed, 21 Sep 2022 13:53:22 +0000 (13:53 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Wed, 21 Sep 2022 18:26:26 +0000 (18:26 +0000)
    grep: invalid option -- 't'
    Usage: grep [OPTION]... PATTERNS [FILE]...
    Try 'grep --help' for more information.

    Usage: grep [OPTION]... PATTERNS [FILE]...
    Try 'grep --help' for more information.
    ./configure: line 27524: test: too many arguments

    Usage: grep [OPTION]... PATTERNS [FILE]...
    Try 'grep --help' for more information.
    ./configure: line 27698: test: too many arguments

Configure scripts are written in m4, not shell. M4 treats [square
brackets] specially. We could use quadrigraphs instead (as documented in
autoconf manual) but `(-)` looks a lot simpler than `@<:@-@:>@`!

acinclude/krb5.m4
configure.ac

index 462383e0514506104e5c9cb80d3b69c15339c685..ca06a5a4dbb03168e2844f3820942d2901d9373f 100644 (file)
@@ -192,7 +192,7 @@ main(void)
         return 0;
 }
   ]])],  [ squid_cv_working_gssapi=yes ], [ squid_cv_working_gssapi=no ], [:])])
-  AS_IF([test "x$squid_cv_working_gssapi" = "xno" -a `echo $LIBS | grep -i -c "[-]L"` -gt 0],[
+  AS_IF([test "x$squid_cv_working_gssapi" = "xno" -a `echo $LIBS | grep -i -c "(-)L"` -gt 0],[
     AC_MSG_NOTICE([Check Runtime library path !])
   ])
 ])
@@ -284,7 +284,7 @@ main(void)
         return 0;
 }
   ]])], [ squid_cv_working_krb5=yes ], [ squid_cv_working_krb5=no ],[:])])
-  AS_IF([test "x$squid_cv_working_krb5" = "xno" -a `echo $LIBS | grep -i -c "[-]L"` -gt 0],[
+  AS_IF([test "x$squid_cv_working_krb5" = "xno" -a `echo $LIBS | grep -i -c "(-)L"` -gt 0],[
     AC_MSG_NOTICE([Check Runtime library path !])
   ])
 ])
index e504f2681fa9f6aeec7f3619951cf5b3c0c2483f..32d374a7be434df75cc8dcda5c8da2851a69af7e 100644 (file)
@@ -92,7 +92,7 @@ AS_IF([test "x$BUILDCXX" = "x"],[
 AC_SUBST(BUILDCXX)
 
 # If the user did not specify a C++ version.
-user_cxx=`echo "$PRESET_CXXFLAGS" | grep -o -E "[-]std="`
+user_cxx=`echo "$PRESET_CXXFLAGS" | grep -o -E "(-)std="`
 AS_IF([test "x$user_cxx" = "x"],[
   # Check for C++11 compiler support
   AX_CXX_COMPILE_STDCXX_11([noext],[mandatory])