From: Alex Rousskov Date: Wed, 21 Sep 2022 13:53:22 +0000 (+0000) Subject: Fix escaping leading regex dashes in ./configure sources (#1152) X-Git-Tag: SQUID_6_0_1~100 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=55b3303d6fb2dec513a5db5d2dce9db1fd05423b;p=thirdparty%2Fsquid.git Fix escaping leading regex dashes in ./configure sources (#1152) 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 `@<:@-@:>@`! --- diff --git a/acinclude/krb5.m4 b/acinclude/krb5.m4 index 462383e051..ca06a5a4db 100644 --- a/acinclude/krb5.m4 +++ b/acinclude/krb5.m4 @@ -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 !]) ]) ]) diff --git a/configure.ac b/configure.ac index e504f2681f..32d374a7be 100644 --- a/configure.ac +++ b/configure.ac @@ -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])