Simplify configure test
authorPeter Eisentraut <peter@eisentraut.org>
Wed, 4 May 2022 11:33:59 +0000 (13:33 +0200)
committerPeter Eisentraut <peter@eisentraut.org>
Wed, 4 May 2022 12:20:36 +0000 (14:20 +0200)
The test for lz4.h used AC_CHECK_HEADERS, but nothing was using the
resulting symbol HAVE_LZ4_H.  Change this to use AC_CHECK_HEADER
instead.  This was probably an oversight, seeing that the nearby
similar tests do this correctly.

configure
configure.ac
src/include/pg_config.h.in
src/tools/msvc/Solution.pm

index a4b654ad94e08006033e931b0625892a0e10c7ed..364f37559d3fac6b4c89c52b127719ea7266fa13 100755 (executable)
--- a/configure
+++ b/configure
@@ -14103,19 +14103,13 @@ $as_echo "$LZ4" >&6; }
 fi
 
 if test "$with_lz4" = yes; then
-  for ac_header in lz4.h
-do :
   ac_fn_c_check_header_mongrel "$LINENO" "lz4.h" "ac_cv_header_lz4_h" "$ac_includes_default"
 if test "x$ac_cv_header_lz4_h" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LZ4_H 1
-_ACEOF
 
 else
   as_fn_error $? "lz4.h header file is required for LZ4" "$LINENO" 5
 fi
 
-done
 
 fi
 
index 44d35e1b5a2f31c5b2920fa97567e8838caa94ee..bfd8b713a945712fe435bc09dfa924b2bc9c3805 100644 (file)
@@ -1525,7 +1525,7 @@ fi
 
 PGAC_PATH_PROGS(LZ4, lz4)
 if test "$with_lz4" = yes; then
-  AC_CHECK_HEADERS(lz4.h, [], [AC_MSG_ERROR([lz4.h header file is required for LZ4])])
+  AC_CHECK_HEADER(lz4.h, [], [AC_MSG_ERROR([lz4.h header file is required for LZ4])])
 fi
 
 PGAC_PATH_PROGS(ZSTD, zstd)
index 13a2049df4b27875f4ed6e1cf1abd855f1ee9aa4..cdd742cb55bf84718754dcc94c8d42008403013a 100644 (file)
 /* Define to 1 if `long long int' works and is 64 bits. */
 #undef HAVE_LONG_LONG_INT_64
 
-/* Define to 1 if you have the <lz4.h> header file. */
-#undef HAVE_LZ4_H
-
 /* Define to 1 if you have the <mbarrier.h> header file. */
 #undef HAVE_MBARRIER_H
 
index cb2ad6cd2987cb3eb5a2c68f9aa3be567a1e0cdd..03357095b20cd5fdc1948d2fbc5f7d34c136c3a0 100644 (file)
@@ -318,7 +318,6 @@ sub GenerateFiles
        HAVE_LOCALE_T               => 1,
        HAVE_LONG_INT_64            => undef,
        HAVE_LONG_LONG_INT_64       => 1,
-       HAVE_LZ4_H                  => undef,
        HAVE_MBARRIER_H             => undef,
        HAVE_MBSTOWCS_L             => 1,
        HAVE_MEMORY_H               => 1,
@@ -541,7 +540,6 @@ sub GenerateFiles
    if ($self->{options}->{lz4})
    {
        $define{HAVE_LIBLZ4} = 1;
-       $define{HAVE_LZ4_H}  = 1;
        $define{USE_LZ4}     = 1;
    }
    if ($self->{options}->{zstd})