]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fix ./configure tests (#1151)
authorAlex Rousskov <rousskov@measurement-factory.com>
Wed, 21 Sep 2022 23:53:12 +0000 (23:53 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Wed, 21 Sep 2022 23:53:22 +0000 (23:53 +0000)
Many tests broken by recent commit a1c2236 supplying empty input to
AC_LINK_IFELSE() macro in SQUID_CC_CHECK_ARGUMENT. Empty input results
in no test file created by the macro (and, presumably, a failed linking
test). Observable symptoms (in some environments) include many repeated
errors on ./configure stderr:

    sed: can't read conftest.cpp: No such file or directory

Also fixed a similar SQUID_SEARCH_LIBS() bug. That macro was broken
since inception (commit 391f0ba). It is currently only used for the
mingw-specific SQUID_CHECK_WINSOCK_LIB check. This change is untested.

acinclude/compiler-flags.m4
acinclude/squid-util.m4

index 4b0f7142b3775f3de4cfbd1990c85d7ff50952e6..ce485888bade129a09a3b0d0178f9757830ed743 100644 (file)
@@ -17,7 +17,7 @@ AC_DEFUN([SQUID_CC_CHECK_ARGUMENT],[
     SQUID_STATE_SAVE([ARGCHECK])
     CFLAGS="$CFLAGS $2"
     CXXFLAGS="$CXXFLAGS $2"
-    AC_LINK_IFELSE([],[$1=yes],[$1=no])
+    AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],[$1=yes],[$1=no])
     SQUID_STATE_ROLLBACK([ARGCHECK])
   ])
 ])
index c7149a3fcd4e3d0eae1f8a357fdf511d211de451..59c0c6670317a07babfc389cf9c1d73e06346111 100644 (file)
@@ -292,7 +292,7 @@ for ac_lib in '' $2; do
     ac_res=-l$ac_lib
     LIBS="-l$ac_lib $5 $ac_func_search_save_LIBS"
   ])
-  AC_LINK_IFELSE([], [AS_VAR_SET([ac_Search], [$ac_res])])
+  AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [AS_VAR_SET([ac_Search], [$ac_res])])
   AS_VAR_SET_IF([ac_Search], [break])
 done
 AS_VAR_SET_IF([ac_Search], , [AS_VAR_SET([ac_Search], [no])])