Don't add HAVE_LDAP_H HAVE_WINLDAP_H to pg_config.h
authorAndres Freund <[email protected]>
Thu, 18 Aug 2022 17:41:42 +0000 (10:41 -0700)
committerAndres Freund <[email protected]>
Thu, 18 Aug 2022 17:41:42 +0000 (10:41 -0700)
They're not referenced, so we don't need them in in pg_config.h.

Reviewed-by: Peter Eisentraut <[email protected]>
Discussion: http://postgr.es/m/e0c44fb2-8b66-a4b9-b274-7ed3a1a0ab74@enterprisedb.com

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

index 9e8ac510ac0a88b60a740f55190f7b0865ad3308..b28fccbc470f6f9ef32c2ded6d075121f274a318 100755 (executable)
--- a/configure
+++ b/configure
 
 if test "$with_ldap" = yes ; then
   if test "$PORTNAME" != "win32"; then
-     for ac_header in ldap.h
-do :
-  ac_fn_c_check_header_mongrel "$LINENO" "ldap.h" "ac_cv_header_ldap_h" "$ac_includes_default"
+     ac_fn_c_check_header_mongrel "$LINENO" "ldap.h" "ac_cv_header_ldap_h" "$ac_includes_default"
 if test "x$ac_cv_header_ldap_h" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LDAP_H 1
-_ACEOF
 
 else
   as_fn_error $? "header file <ldap.h> is required for LDAP" "$LINENO" 5
 fi
 
-done
 
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compatible LDAP implementation" >&5
 $as_echo_n "checking for compatible LDAP implementation... " >&6; }
@@ -14253,22 +14247,16 @@ $as_echo "$as_me: WARNING:
 *** also uses LDAP will crash on exit." >&2;}
 fi
   else
-     for ac_header in winldap.h
-do :
-  ac_fn_c_check_header_compile "$LINENO" "winldap.h" "ac_cv_header_winldap_h" "$ac_includes_default
+     ac_fn_c_check_header_compile "$LINENO" "winldap.h" "ac_cv_header_winldap_h" "$ac_includes_default
 #include <windows.h>
 
 "
 if test "x$ac_cv_header_winldap_h" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_WINLDAP_H 1
-_ACEOF
 
 else
   as_fn_error $? "header file <winldap.h> is required for LDAP" "$LINENO" 5
 fi
 
-done
 
   fi
 fi
index 67cf317c3b58eec991baa91cd075306111acbde2..dd368290a6289628048518cb991f09034941e2c2 100644 (file)
@@ -1547,15 +1547,15 @@ fi
 
 if test "$with_ldap" = yes ; then
   if test "$PORTNAME" != "win32"; then
-     AC_CHECK_HEADERS(ldap.h, [],
-                      [AC_MSG_ERROR([header file <ldap.h> is required for LDAP])])
+     AC_CHECK_HEADER(ldap.h, [],
+                     [AC_MSG_ERROR([header file <ldap.h> is required for LDAP])])
      PGAC_LDAP_SAFE
   else
-     AC_CHECK_HEADERS(winldap.h, [],
-                      [AC_MSG_ERROR([header file <winldap.h> is required for LDAP])],
-                      [AC_INCLUDES_DEFAULT
+     AC_CHECK_HEADER(winldap.h, [],
+                     [AC_MSG_ERROR([header file <winldap.h> is required for LDAP])],
+                     [AC_INCLUDES_DEFAULT
 #include <windows.h>
-                      ])
+                     ])
   fi
 fi
 
index b8fe2201f49b7a355f35674a3c4e60e19d2d9a70..26eb6a2dfeff89783d6deb32de0ec95699b49799 100644 (file)
 /* Define to 1 if you have the <langinfo.h> header file. */
 #undef HAVE_LANGINFO_H
 
-/* Define to 1 if you have the <ldap.h> header file. */
-#undef HAVE_LDAP_H
-
 /* Define to 1 if you have the `ldap_initialize' function. */
 #undef HAVE_LDAP_INITIALIZE
 
 /* Define to 1 if you have the `wcstombs_l' function. */
 #undef HAVE_WCSTOMBS_L
 
-/* Define to 1 if you have the <winldap.h> header file. */
-#undef HAVE_WINLDAP_H
-
 /* Define to 1 if you have the `X509_get_signature_nid' function. */
 #undef HAVE_X509_GET_SIGNATURE_NID
 
index 55b30090f6e9b504ca116afb9b5197c122496fdd..fead5c2a72f91f1fca6a8c73514a5a6c42721a96 100644 (file)
@@ -281,7 +281,6 @@ sub GenerateFiles
                HAVE_I_CONSTRAINT__BUILTIN_CONSTANT_P       => undef,
                HAVE_KQUEUE                                 => undef,
                HAVE_LANGINFO_H                             => undef,
-               HAVE_LDAP_H                                 => undef,
                HAVE_LDAP_INITIALIZE                        => undef,
                HAVE_LIBCRYPTO                              => undef,
                HAVE_LIBLDAP                                => undef,
@@ -374,7 +373,6 @@ sub GenerateFiles
                HAVE_UUID_OSSP                           => undef,
                HAVE_UUID_H                              => undef,
                HAVE_UUID_UUID_H                         => undef,
-               HAVE_WINLDAP_H                           => undef,
                HAVE_WCSTOMBS_L                          => 1,
                HAVE_VISIBILITY_ATTRIBUTE                => undef,
                HAVE_X509_GET_SIGNATURE_NID              => 1,