Remove useless configure probe for <lz4/lz4.h>.
authorTom Lane <[email protected]>
Mon, 22 Mar 2021 15:20:44 +0000 (11:20 -0400)
committerTom Lane <[email protected]>
Mon, 22 Mar 2021 15:20:44 +0000 (11:20 -0400)
This seems to have been just copied-and-pasted from some other
header checks.  But our C code is entirely unprepared to support
such a header name, so it's only wasting cycles to look for it.
If we did need to support it, some #ifdefs would be required.

(A quick trawl at codesearch.debian.net finds some packages that
reference lz4/lz4.h; but they use *only* that spelling, and
appear to be intending to reference their own copy rather than
a system-level installation of liblz4.  There's no evidence of
freestanding installations that require this spelling.)

Discussion: https://postgr.es/m/457962.1616362509@sss.pgh.pa.us

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

index fe66b79d69ae4094a71cbb7be69de0292018f883..06ad9aeb714702940348b36aadfb70a99dc790b4 100755 (executable)
--- a/configure
+++ b/configure
 fi
 
 if test "$with_lz4" = yes; then
-  for ac_header in lz4/lz4.h
-do :
-  ac_fn_c_check_header_mongrel "$LINENO" "lz4/lz4.h" "ac_cv_header_lz4_lz4_h" "$ac_includes_default"
-if test "x$ac_cv_header_lz4_lz4_h" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LZ4_LZ4_H 1
-_ACEOF
-
-else
   for ac_header in lz4.h
 do :
   ac_fn_c_check_header_mongrel "$LINENO" "lz4.h" "ac_cv_header_lz4_h" "$ac_includes_default"
@@ -13607,10 +13598,6 @@ done
 
 fi
 
-done
-
-fi
-
 if test "$with_gssapi" = yes ; then
   for ac_header in gssapi/gssapi.h
 do :
index 76568d1e4b0477b9adc3b597ec3fe45af9d86f7b..92193f35fb21f68cfb046d5c26f8199d3392903e 100644 (file)
@@ -1440,8 +1440,7 @@ Use --without-zlib to disable zlib support.])])
 fi
 
 if test "$with_lz4" = yes; then
-  AC_CHECK_HEADERS(lz4/lz4.h, [],
-       [AC_CHECK_HEADERS(lz4.h, [], [AC_MSG_ERROR([lz4.h header file is required for LZ4])])])
+  AC_CHECK_HEADERS(lz4.h, [], [AC_MSG_ERROR([lz4.h header file is required for LZ4])])
 fi
 
 if test "$with_gssapi" = yes ; then
index fcbf33670484bb350c5d6f7c217f8f0c35e530ac..5e2255a2f53d40123840f1c39cb114db09a5250e 100644 (file)
 /* Define to 1 if you have the <lz4.h> header file. */
 #undef HAVE_LZ4_H
 
-/* Define to 1 if you have the <lz4/lz4.h> header file. */
-#undef HAVE_LZ4_LZ4_H
-
 /* Define to 1 if you have the <mbarrier.h> header file. */
 #undef HAVE_MBARRIER_H
 
index 9342347c9e532a9b57a707b6a2aa41c9c50f2b88..710f26f8ab35d36c2730d44925ad8162dbc3c1b7 100644 (file)
@@ -313,7 +313,6 @@ sub GenerateFiles
        HAVE_LONG_INT_64            => undef,
        HAVE_LONG_LONG_INT_64       => 1,
        HAVE_LZ4_H                  => undef,
-       HAVE_LZ4_LZ4_H              => undef,
        HAVE_MBARRIER_H             => undef,
        HAVE_MBSTOWCS_L             => 1,
        HAVE_MEMORY_H               => 1,