Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 1f09a85

Browse files
committed
Make --with-ldap build on Unixware, per Olivier Prenant.
1 parent 0bc8a5b commit 1f09a85

File tree

3 files changed

+16
-11
lines changed

3 files changed

+16
-11
lines changed

configure

+5-5
Original file line numberDiff line numberDiff line change
@@ -17185,7 +17185,7 @@ if test "${ac_cv_lib_ldap_ldap_bind+set}" = set; then
1718517185
echo $ECHO_N "(cached) $ECHO_C" >&6
1718617186
else
1718717187
ac_check_lib_save_LIBS=$LIBS
17188-
LIBS="-lldap $LIBS"
17188+
LIBS="-lldap $EXTRA_LDAP_LIBS $LIBS"
1718917189
cat >conftest.$ac_ext <<_ACEOF
1719017190
/* confdefs.h. */
1719117191
_ACEOF
@@ -17256,7 +17256,7 @@ echo "$as_me: error: library 'ldap' is required for LDAP" >&2;}
1725617256
{ (exit 1); exit 1; }; }
1725717257
fi
1725817258

17259-
LDAP_LIBS_BE="-lldap"
17259+
LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
1726017260
if test "$enable_thread_safety" = yes; then
1726117261
# on some platforms ldap_r fails to link without PTHREAD_LIBS
1726217262

@@ -17266,7 +17266,7 @@ if test "${ac_cv_lib_ldap_r_ldap_simple_bind+set}" = set; then
1726617266
echo $ECHO_N "(cached) $ECHO_C" >&6
1726717267
else
1726817268
ac_check_lib_save_LIBS=$LIBS
17269-
LIBS="-lldap_r $PTHREAD_LIBS $LIBS"
17269+
LIBS="-lldap_r $PTHREAD_LIBS $EXTRA_LDAP_LIBS $LIBS"
1727017270
cat >conftest.$ac_ext <<_ACEOF
1727117271
/* confdefs.h. */
1727217272
_ACEOF
@@ -17337,9 +17337,9 @@ echo "$as_me: error: library 'ldap_r' is required for LDAP" >&2;}
1733717337
{ (exit 1); exit 1; }; }
1733817338
fi
1733917339

17340-
LDAP_LIBS_FE="-lldap_r"
17340+
LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
1734117341
else
17342-
LDAP_LIBS_FE="-lldap"
17342+
LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
1734317343
fi
1734417344
else
1734517345

configure.in

+8-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
dnl Process this file with autoconf to produce a configure script.
2-
dnl $PostgreSQL: pgsql/configure.in,v 1.491 2006/12/02 16:43:12 tgl Exp $
2+
dnl $PostgreSQL: pgsql/configure.in,v 1.492 2006/12/14 21:49:54 tgl Exp $
33
dnl
44
dnl Developers, please strive to achieve this order:
55
dnl
@@ -1122,16 +1122,18 @@ AC_SUBST(PTHREAD_LIBS)
11221122
if test "$with_ldap" = yes ; then
11231123
_LIBS="$LIBS"
11241124
if test "$PORTNAME" != "win32"; then
1125-
AC_CHECK_LIB(ldap, ldap_bind, [], [AC_MSG_ERROR([library 'ldap' is required for LDAP])])
1126-
LDAP_LIBS_BE="-lldap"
1125+
AC_CHECK_LIB(ldap, ldap_bind, [],
1126+
[AC_MSG_ERROR([library 'ldap' is required for LDAP])],
1127+
[$EXTRA_LDAP_LIBS])
1128+
LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
11271129
if test "$enable_thread_safety" = yes; then
11281130
# on some platforms ldap_r fails to link without PTHREAD_LIBS
11291131
AC_CHECK_LIB(ldap_r, ldap_simple_bind, [],
11301132
[AC_MSG_ERROR([library 'ldap_r' is required for LDAP])],
1131-
[$PTHREAD_LIBS])
1132-
LDAP_LIBS_FE="-lldap_r"
1133+
[$PTHREAD_LIBS $EXTRA_LDAP_LIBS])
1134+
LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
11331135
else
1134-
LDAP_LIBS_FE="-lldap"
1136+
LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
11351137
fi
11361138
else
11371139
AC_CHECK_LIB(wldap32, ldap_bind, [], [AC_MSG_ERROR([library 'wldap32' is required for LDAP])])

src/template/unixware

+3
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,6 @@ __EOF__
3232
# per report from Olivier PRENANT <ohp@pyrenet.fr>
3333

3434
fi
35+
36+
# Unixware's ldap library reportedly needs these too
37+
EXTRA_LDAP_LIBS="-llber -lresolv"

0 commit comments

Comments
 (0)