mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-30 13:30:57 +08:00
* configure.in: Added better check for libwrap (the old way failed when
libwrap was a dynamic library). Added -lwrap to new subst var WRAP_LIBS so we have more control over where it get's linked (dynamic libwrap causes problems when we link to programs that don't define certains globals that libwrap expects). * build/top.mk: Added placeholder for WRAP_LIBS subst * servers/slapd/Makefile.in: Added $(WRAP_LIBS) to the slapd and sslapd link command line specifically so it doesn't get thrown in with the rest of the LIBS. * configure: rebuilt
This commit is contained in:
parent
5757ffc5d3
commit
7a0523b53d
@ -114,6 +114,7 @@ LDAP_LIBDEPEND = $(LDAP_LIBLDAP_DEPEND) $(LDAP_LIBLBER_DEPEND) \
|
||||
SLAPD_LIBDEPEND = $(LDAP_LIBDEPEND) $(LDAP_LIBAVL_DEPEND) \
|
||||
$(LDAP_LIBLDBM_DEPEND) $(LDAP_LIBLTHREAD_DEPEND)
|
||||
|
||||
WRAP_LIBS = @WRAP_LIBS@
|
||||
# AutoConfig generated
|
||||
AC_CC = @CC@
|
||||
AC_CFLAGS = @CFLAGS@
|
||||
|
@ -1606,13 +1606,15 @@ if test $ol_enable_wrappers != no ; then
|
||||
if test $ac_cv_header_tcpd_h != yes ; then
|
||||
have_wrappers=no
|
||||
else
|
||||
AC_CHECK_LIB(wrap, main,
|
||||
[have_wrappers=yes], [have_wrappers=no])
|
||||
AC_TRY_COMPILE([
|
||||
int allow_severity = 0;
|
||||
int deny_severity = 0;
|
||||
],[hosts_access()],[have_wrappers=yes],[have_wrappers=no])
|
||||
fi
|
||||
|
||||
if test $have_wrappers = yes ; then
|
||||
AC_DEFINE(HAVE_TCPD,1, [define if you have -lwrap])
|
||||
SLAPD_LIBS="$SLAPD_LIBS -lwrap"
|
||||
WRAP_LIBS="-lwrap"
|
||||
|
||||
dnl We add another check for -lnsl since some libwrap's
|
||||
dnl need it, but it isn't always included from above
|
||||
@ -1625,6 +1627,7 @@ if test $ol_enable_wrappers != no ; then
|
||||
|
||||
AC_MSG_WARN(disabling wrappers support)
|
||||
ol_enable_wrappers=no
|
||||
WRAP_LIBS=""
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -43,11 +43,11 @@ BUILD_SRV = @BUILD_SLAPD@
|
||||
all-local-srv: all-cffiles
|
||||
|
||||
slapd: libbackends.a version.o
|
||||
$(LTLINK) -o $@ $(OBJS) version.o $(LIBS)
|
||||
$(LTLINK) -o $@ $(OBJS) version.o $(LIBS) $(WRAP_LIBS)
|
||||
(cd tools; $(MAKE) $(MFLAGS) all)
|
||||
|
||||
sslapd: version.o
|
||||
$(LTLINK) -static -o $@ $(OBJS) version.o $(LIBS)
|
||||
$(LTLINK) -static -o $@ $(OBJS) version.o $(LIBS) $(WRAP_LIBS)
|
||||
|
||||
.backend: FORCE
|
||||
@for i in back-*; do \
|
||||
|
Loading…
Reference in New Issue
Block a user