]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fix SQUID_AUTO_LIB portability (#2337)
authorPavel Timofeev <timp87@gmail.com>
Wed, 7 Jan 2026 07:16:41 +0000 (07:16 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Wed, 7 Jan 2026 08:07:07 +0000 (08:07 +0000)
POSIX shell does not recognize `+=` as variable append operator.

    ./configure --with-heimdal-krb5=...
    ./configure: LIBHEIMDAL_KRB5_PATH+=-L/usr/lib: not found
    ./configure: LIBHEIMDAL_KRB5_CFLAGS+=-I/usr/include: not found
    checking for LIBHEIMDAL_KRB5... no
    configure: error: Required library 'heimdal-krb5' not found

Discovered while porting Squid v7 to FreeBSD.

Broken since 2020 commit 24531401.

acinclude/squid-util.m4

index abaa2b0950b502e5eee2202a716cecbf08d72c28..7f02b68848349a4e7d64bb258da743e7c7bee4be 100644 (file)
@@ -257,9 +257,9 @@ AC_DEFUN([SQUID_AUTO_LIB],[
     AS_CASE(["$withval"],[yes|no],,[
       AS_IF([test ! -d "$withval"],AC_MSG_ERROR([--with-$1 path does not point to a directory]))
       m4_translit([with_$1], [-+.], [___])=yes
-      AS_IF([test -d "$withval/lib64"],[$3_PATH+="-L$withval/lib64"])
-      AS_IF([test -d "$withval/lib"],[$3_PATH+="-L$withval/lib"])
-      AS_IF([test -d "$withval/include"],[$3_CFLAGS+="-I$withval/include"])
+      AS_IF([test -d "$withval/lib64"],[$3_PATH="$$3_PATH -L$withval/lib64"])
+      AS_IF([test -d "$withval/lib"],[$3_PATH="$$3_PATH -L$withval/lib"])
+      AS_IF([test -d "$withval/include"],[$3_CFLAGS="$$3_CFLAGS -I$withval/include"])
     ])
   ])
 ])
@@ -269,9 +269,9 @@ AC_DEFUN([SQUID_OPTIONAL_LIB],[
     AS_CASE(["$withval"],[yes|no],,[
       AS_IF([test ! -d "$withval"],AC_MSG_ERROR([--with-$1 path does not point to a directory]))
       m4_translit([with_$1], [-+.], [___])=yes
-      AS_IF([test -d "$withval/lib64"],[$3_PATH+="-L$withval/lib64"])
-      AS_IF([test -d "$withval/lib"],[$3_PATH+="-L$withval/lib"])
-      AS_IF([test -d "$withval/include"],[$3_CFLAGS+="-I$withval/include"])
+      AS_IF([test -d "$withval/lib64"],[$3_PATH="$$3_PATH -L$withval/lib64"])
+      AS_IF([test -d "$withval/lib"],[$3_PATH="$$3_PATH -L$withval/lib"])
+      AS_IF([test -d "$withval/include"],[$3_CFLAGS="$$3_CFLAGS -I$withval/include"])
     ])
   ])
   AS_IF([test "x$withval" = "x"],[m4_translit([with_$1], [-+.], [___])=no])