]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
fix detection of zstd
authorCorey Hickey <bugfood-c@fatooh.org>
Mon, 19 May 2025 02:17:33 +0000 (19:17 -0700)
committerEric Bollengier <eric@baculasystems.com>
Mon, 19 May 2025 06:32:41 +0000 (08:32 +0200)
This fixes an issue where if the curl lib is not found, then zstd will
not be supported.

The detection method for both curl and zstd uses a shell variable 'error'.
Unless we unset the variable afterward, the results of the curl check
carry over to the zstd check.

bacula/autoconf/configure.in

index 5660f69b1c520134bcf731457d0928751178ac69..24ec76a2953c2aa92d545451c52b1bc47e7d626f 100644 (file)
@@ -982,7 +982,9 @@ AC_CHECK_LIB(curl,curl_version_info,,[error="Can't find CURL library."])
 
 if test x"${error}" == "x"; then
    support_curl=yes
-fi 
+fi
+
+unset error
 
 AC_MSG_RESULT([$support_curl])
 if test "$support_curl" = "yes"; then
@@ -1043,6 +1045,8 @@ else
     ZSTD_INC=""
 fi
 
+unset error
+
 AC_MSG_RESULT([$support_zstd])
 if test "$support_zstd" = "yes"; then
    AC_DEFINE(HAVE_ZSTD, 1, [Define if ZSTD library is available])