summaryrefslogtreecommitdiffstats
path: root/ldapaddressbook
diff options
context:
space:
mode:
authorSam Varshavchik2022-05-22 23:52:28 -0400
committerSam Varshavchik2022-05-22 23:52:31 -0400
commit83e37efc8ed785cd095eb585ff747e5702ec49b3 (patch)
tree15aed6da6214e9a03d91be1754cd351175349945 /ldapaddressbook
parent1ce81fa6af52651628a0bffcd8b15fdb459901a5 (diff)
downloadcourier-libs-83e37efc8ed785cd095eb585ff747e5702ec49b3.tar.bz2
gcc 12, autotool updates, sqwebmail fixes.
Diffstat (limited to 'ldapaddressbook')
-rw-r--r--ldapaddressbook/configure.ac23
-rw-r--r--ldapaddressbook/libldapsearch.c11
2 files changed, 12 insertions, 22 deletions
diff --git a/ldapaddressbook/configure.ac b/ldapaddressbook/configure.ac
index b0cea5b..76528ef 100644
--- a/ldapaddressbook/configure.ac
+++ b/ldapaddressbook/configure.ac
@@ -3,7 +3,7 @@ dnl
dnl Copyright 2000 - 2006 Double Precision, Inc. See COPYING for
dnl distribution information.
-AC_INIT(ldapaddressbook, 0.10, [courier-users@lists.sourceforge.net])
+AC_INIT([ldapaddressbook],[0.10],[courier-users@lists.sourceforge.net])
>confdefs.h # Kill PACKAGE_ macros
@@ -16,15 +16,14 @@ AC_CONFIG_HEADERS(config.h)
dnl Checks for programs.
AC_USE_SYSTEM_EXTENSIONS
AC_PROG_CC
-AC_PROG_CC_C99
-AC_PROG_LIBTOOL
+LT_INIT
dnl Checks for libraries.
dnl Checks for header files.
-AC_HEADER_STDC
+
AC_CHECK_HEADERS(stdio.h sys/wait.h sys/time.h)
-AC_HEADER_TIME
+AC_CHECK_HEADERS_ONCE([sys/time.h])
AC_ARG_WITH(ldapaddressbook,
[ --without-ldapaddressbook Disable LDAP address book code ],
@@ -49,20 +48,17 @@ if test "$HAVE_OPENLDAP" = 1
then
save_LIBS="$LIBS"
LIBS="$LIBS -lldap"
- AC_TRY_LINK([
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <stdio.h>
#if HAVE_LBER_H
#include <lber.h>
#endif
#include <ldap.h>
-],
-[
+]], [[
(void)ldap_err2string(0);
-],
-[
+]])],[
:
-],
-[
+],[
AC_MSG_ERROR([ldap.h header found, but a test compile failed -- check ldapaddressbook/config.log for more details])
])
LIBS="$save_LIBS"
@@ -85,4 +81,5 @@ AM_CONDITIONAL(HAVE_SGML, test -d ${srcdir}/../docbook)
dnl Checks for library functions.
-AC_OUTPUT(Makefile)
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
diff --git a/ldapaddressbook/libldapsearch.c b/ldapaddressbook/libldapsearch.c
index 71ef2ed..4bb7a2b 100644
--- a/ldapaddressbook/libldapsearch.c
+++ b/ldapaddressbook/libldapsearch.c
@@ -8,15 +8,8 @@
#include <stdlib.h>
#include <errno.h>
#include <time.h>
-#if TIME_WITH_SYS_TIME
-# include <sys/time.h>
-# include <time.h>
-#else
-# if HAVE_SYS_TIME_H
-# include <sys/time.h>
-# else
-# include <time.h>
-# endif
+#if HAVE_SYS_TIME_H
+#include <sys/time.h>
#endif
/*