On 9/8/22 19:56, ThomasReim wrote:
From: Thomas Reim <reimth@xxxxxxxxx>
Wrong CFLAGS: gcc handles implicit function declaration as warning with current
flag settings. Missing functions in libldap will not be identified.
Another good catch.
Ian
Signed-off-by: Thomas Reim <reimth@xxxxxxxxx>
---
aclocal.m4 | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/aclocal.m4 b/aclocal.m4
index 91b22da..9fc20bf 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -379,6 +379,8 @@ AC_DEFUN([AF_CHECK_FUNC_LDAP_CREATE_PAGE_CONTROL],
# save current libs
af_check_ldap_create_page_control_save_libs="$LIBS"
LIBS="$LIBS -lldap"
+af_check_ldap_create_page_control_save_cflags="$CFLAGS"
+CFLAGS="$CFLAGS -Werror=implicit-function-declaration"
AC_TRY_LINK(
[ #include <ldap.h> ],
@@ -399,6 +401,7 @@ fi
# restore libs
LIBS="$af_check_ldap_create_page_control_save_libs"
+CFLAGS="$af_check_ldap_create_page_control_save_cflags"
])
dnl --------------------------------------------------------------------------
@@ -412,6 +415,8 @@ AC_DEFUN([AF_CHECK_FUNC_LDAP_PARSE_PAGE_CONTROL],
# save current libs
af_check_ldap_parse_page_control_save_libs="$LIBS"
LIBS="$LIBS -lldap"
+af_check_ldap_parse_page_control_save_cflags="$CFLAGS"
+CFLAGS="$CFLAGS -Werror=implicit-function-declaration"
AC_TRY_LINK(
[ #include <ldap.h> ],
@@ -432,6 +437,7 @@ fi
# restore libs
LIBS="$af_check_ldap_parse_page_control_save_libs"
+CFLAGS="$af_check_ldap_parse_page_control_save_cflags"
])
dnl --------------------------------------------------------------------------