Import latest from -devel:

build environment changes (for VPATH, lib orderring)
	test script changes (for VPATH)
	doc updates
This commit is contained in:
Kurt Zeilenga 1999-01-14 02:02:03 +00:00
parent 51c2c98b48
commit 17b4826d52
42 changed files with 883 additions and 522 deletions

View file

@ -37,7 +37,8 @@ these steps:
CC C Compiler (cc, ecgs)
CFLAGS C Flags (-ansi)
CPPFLAGS CPP Flags (-I/path/include -Ddef)
LDFLAGS LDFLAGS (-L/path/lib -llib)
LDFLAGS LDFLAGS (-L/path/lib)
LIBS LIBS (-llib)
See the 'USING ENVIRONMENT VARIABLES' section for information
on how to use the variables.
@ -154,8 +155,8 @@ Supported Environmental Variables
CC C compiler (cc, egcc)
CFLAGS C flags (-ansi)
CPPFLAGS cpp flags (-I/path/include -Ddef)
LDFLAGS ld flags (-s)
LIBS libraries (-L/usr/local/lib -llib)
LDFLAGS ld flags (-L/usr/local/lib)
LIBS libraries (-llib)
PATH command path /usr/local/bin:/usr/bin:/bin
* Including alternative compilers

View file

@ -46,3 +46,5 @@ clean-local: FORCE
veryclean-local: FORCE
$(RM) config.cache config.status libtool stamp-h stamp-h.in
distclean: veryclean FORCE

View file

@ -10,14 +10,26 @@
/* define this if needed to get reentrant functions */
#ifndef REENTRANT
#undef REENTRANT
#endif
#ifndef _REENTRANT
#undef _REENTRANT
#endif
/* define this if needed to get threadsafe functions */
#ifndef THREADSAFE
#undef THREADSAFE
#endif
#ifndef _THREADSAFE
#undef _THREADSAFE
#endif
#ifndef THREAD_SAFE
#undef THREAD_SAFE
#endif
#ifndef _THREAD_SAFE
#undef _THREAD_SAFE
#endif
/* define this if cross compiling */
#undef CROSS_COMPILING
@ -85,6 +97,12 @@
/* define if you have ptrdiff_t */
#undef HAVE_PTRDIFF_T
/* define if you have res_search() */
#ifdef __notdef__
/* see second res_search define */
#undef HAVE_RES_SEARCH
#endif
/* define if you have sched_yield() */
#ifdef __notdef__
/* see second sched_yield define */

View file

@ -1,36 +0,0 @@
*** db/db.c.sleepy Sun Jan 3 20:02:51 1999
--- db/db.c Sun Jan 3 20:28:25 1999
*************** db_open(fname, type, flags, mode, dbenv,
*** 106,112 ****
DB_PGINFO pginfo;
HASHHDR *hashm;
size_t cachesize;
! ssize_t nr;
u_int32_t iopsize;
int fd, ftype, need_fileid, restore, ret, retry_cnt, swapped;
char *real_name, mbuf[512];
--- 106,112 ----
DB_PGINFO pginfo;
HASHHDR *hashm;
size_t cachesize;
! ssize_t nr = (ssize_t) 0;
u_int32_t iopsize;
int fd, ftype, need_fileid, restore, ret, retry_cnt, swapped;
char *real_name, mbuf[512];
*************** open_retry: if (LF_ISSET(DB_CREATE)) {
*** 337,343 ****
if (nr != sizeof(mbuf)) {
if (nr != 0) {
__db_err(dbenv,
! "%s: unexpected file format", fname);
goto einval;
}
/*
--- 337,343 ----
if (nr != sizeof(mbuf)) {
if (nr != 0) {
__db_err(dbenv,
! "%s: unexpected file format, %d bytes read", fname, nr);
goto einval;
}
/*

View file

@ -1,18 +0,0 @@
A bug in Sleepycat´s Berkeley DB (version 2.3.16 up to 2.6.4 beta),
was detected, that caused failure during opening of database files
when running a threaded slapd on a linux box, kernel version 2.0.35,
gcc 2.7.2.1, linux threads via libpthreads.so.1.60.4.
THE BUG OCCURS ONLY WHEN SLAPD IS RUN WITH THREADS ENABLED AND MAY
ONLY OCCUR ON THE PLATFORM SPECIFIED.
SINCE THE CODE OF DB_OPEN() IS THE SAME IN VERSION 2.3.16 AND 2.6.4
WITH REPECT TO THE BUG DETECTED, DB 2.3.16 SHOULD BE PATCHED AS WELL.
Apply the supported patch at the root directory of Sleepycat´s code.
Since the bug was reported to Sleepycat, it may not appear in DB
versions, later than 2.6.4 beta.
Jan 7 1999, /KSp (ksp@openldap.org)

30
build/db.2.x.README Normal file
View file

@ -0,0 +1,30 @@
Berkeley DB version 2.x and OpenLDAP running threads
====================================================
Special care has to be taken when building Berkeley DB 2.x
for use with OpenLDAP as an slapd backend. If OpenLDAP is with
threads, so must Berkeley DB. If OpenLDAP is built without
threads, so must Berkeley DB.
The configuration tool of Sleepycat's Berkeley DB will automatically
set appropriate options on IRIX, OSF/1, and SUN Solaris platforms
(version 2.3.16), as well as FreeBSD (version 2.6.4). The options
must be manually defined on other plaforms, e.g. on LINUX.
On PC-LINUX (kernel version 2.0.35, linux kernel threads as imple-
mented by libpthreads.so.1.60.4) with gcc as the standard compiler
the environment variable CPPFLAGS must define -D_REENTRANT, while
building the Berkeley DB package.
DO NOT USE THE -ansi CFLAG, SINCE THEN THE DB PACKAGE'S CONFIGURE
CANNOT FIND THE X86/GCC SPINLOCKS, WHICH ARE NEEDED FOR THREAD-
SUPPORT WITH THE BERKELEY DB.
Please check carefully if your platform is not mentioned above.
The OpenLDAP configure tool will most probably find the correct
configuration itself. No special action has to be taken
while building the OpenLDAP package.
Jan, 9th, 1999, /KSp (ksp@openldap.org)

View file

@ -12,9 +12,11 @@ install-common: FORCE
-$(MKDIR) -p $(MANDIR)
@TMPMAN=/tmp/ldapman.$$$$$(MANCOMPRESSSUFFIX); \
VERSION=`$(CAT) $(VERSIONFILE)`; \
cd $(srcdir); \
for page in *.$(MANSECT); do \
$(SED) -e "s%LDVERSION%$$VERSION%" \
-e 's%ETCDIR%$(sysconfdir)%' \
-e 's%LOCALSTATEDIR%$(localstatedir)%' \
-e 's%SYSCONFDIR%$(sysconfdir)%' \
-e 's%DATADIR%$(datadir)%' \
-e 's%SBINDIR%$(sbindir)%' \

View file

@ -26,14 +26,26 @@ set -e # exit immediately if any errors occur
MAKE=Makefile # default makefile name is "Makefile"
NOSLASH="no" # by default, / dependencies are included
CC=${CC-cc} # default compiler is cc
SRCDIR=""
SED=cat
while :
do case "$1" in
# the -s flag removes dependencies to files that begin with /
-s)
NOSLASH=yes;
shift ;;
# -f allows you to select a makefile name
-f)
MAKE=$2
shift; shift ;;
# -d allows you to select a VPATH directory
-d)
SRCDIR=$2
shift; shift ;;
# -c allows you to select a compiler to use (default is cc)
-c)
CC=$2
@ -42,18 +54,13 @@ while :
# the -p flag produces "program: program.c" style dependencies
# so .o's don't get produced
-p)
SED='s;\.o;;'
SED='sed -e s;\.o;;'
shift ;;
# the -l flag produces libtool compatible dependencies
-l)
SED='s;\.o:;.lo:;'
shift ;;
# the -s flag removes dependencies to files that begin with /
-s)
NOSLASH=yes;
SED='sed -e s;\.o:;.lo:;'
shift ;;
# -*) shift ;;
@ -64,7 +71,7 @@ while :
done
if [ $# = 0 ] ; then
echo 'usage: mkdep [-p] [-s] [-c cc] [-f makefile] [flags] file ...'
echo 'usage: mkdep [-p] [-s] [-c cc] [-f makefile] [-d srcdir] [flags] file ...'
exit 1
fi
@ -95,10 +102,34 @@ _EOF_
# egrep '^#include[ ]*".*"' /dev/null $* |
# sed -e 's/:[^"]*"\([^"]*\)".*/: \1/' -e 's/\.c/.o/' |
$CC -M $* |
sed "
s; \./; ;g
$SED" |
if test "x$SRCDIR" = "x" ; then
files=$*
else
files=
for i in $* ; do
if test -f $i ; then
files="$files $i"
elif test -f $SRCDIR/$i ; then
files="$files $SRCDIR/$i"
else
files="$files $i"
fi
done
CC="$CC -I$SRCDIR"
fi
cat << _EOF_ >> $TMP
#
# files: $*
# command: $CC -M $files
#
_EOF_
$CC -M $files | \
sed -e 's; \./; ;g' | \
$SED | \
awk '
$1 ~ /:/ {
filenm=$1
@ -108,25 +139,13 @@ $1 !~ /:/ {
dep=$1
}
/.*/ {
if ( noslash = "yes" && dep ~ /^\// ) next
if (filenm != prev) {
if (rec != "")
print rec;
rec = filenm " " dep;
prev = filenm;
}
else {
if (length(rec dep) > 78) {
print rec;
rec = filenm " " dep;
}
else
rec = rec " " dep
}
if (( noslash == "yes") && (dep ~ /^\// )) next
if ( length(dep) < 2 ) next
rec = filenm " " dep;
print rec;
}
END {
print rec
}' noslash="$NOSLASH" >> $TMP
' noslash="$NOSLASH" >> $TMP
cat << _EOF_ >> $TMP

View file

@ -49,11 +49,11 @@ AR = ar
LINT = lint
5LINT = 5lint
MKDEP = $(top_srcdir)/build/mkdep $(MKDEPFLAG) -c "$(CC)"
MKDEP = $(top_srcdir)/build/mkdep $(MKDEPFLAG) -d "$(srcdir)" -c "$(CC)"
LIBTOOL = @LIBTOOL@
LIBVERSION = 1:0:0
LTLINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LFLAGS) $(LTVERSION)
LTLINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) $(LTVERSION)
LTINSTALL = $(LIBTOOL) --mode=install $(INSTALL)
# Misc UNIX commands used in makefiles
@ -85,32 +85,40 @@ LDAP_INCPATH= -I$(LDAP_INCDIR) -I$(INCLUDEDIR)
LDAP_LIBADIR= $(top_builddir)/libraries
LDAP_LIBPATH= -L$(LDAP_LIBADIR)
LDAP_LIBLBER = $(LDAP_LIBADIR)/liblber/liblber.la
LDAP_LIBLDAP = $(LDAP_LIBADIR)/libldap/libldap.la
LUTIL_LIBS = @LUTIL_LIBS@
LDBM_LIBS = @LDBM_LIBS@
LTHREAD_LIBS = @LTHREAD_LIBS@
LDAP_LIBLBER_DEPEND = $(LDAP_LIBDIR)/liblber/liblber.la
LDAP_LIBLDAP_DEPEND = $(LDAP_LIBDIR)/libldap/libldap.la
LDAP_LIBLDIF_DEPEND = $(LDAP_LIBDIR)/libldif/libldif.a
LDAP_LIBLUTIL_DEPEND = $(LDAP_LIBDIR)/liblutil/liblutil.a
LDAP_LIBLDBM_DEPEND = $(LDAP_LIBDIR)/libldbm/libldbm.a
LDAP_LIBLTHREAD_DEPEND = $(LDAP_LIBDIR)/liblthread/liblthread.a
LDAP_LIBS = $(LDAP_LIBPATH) -lldif $(LDAP_LIBLDAP) $(LDAP_LIBLBER)
LDAP_LIBDEPEND = $(LDAP_LIBDIR)/libldif.a $(LDAP_LIBLDAP) $(LDAP_LIBLBER)
LDAP_LIBDEPEND = $(LDAP_LIBLDAP_DEPEND) $(LDAP_LIBLBER_DEPEND) \
$(LDAP_LIBLDIF_DEPEND) $(LDAP_LIBLUTIL_DEPEND)
# AutoConfig generated
AC_CC = @CC@
AC_DEFS = @CPPFLAGS@ @DEFS@
AC_LIBS = @LDFLAGS@ @LIBS@
AC_CFLAGS = @CFLAGS@
AC_LDFLAGS =
AC_DEFS = @CPPFLAGS@ @DEFS@
AC_LDFLAGS = @LDFLAGS@
AC_LIBS = @LIBS@
KRB_LIBS = @KRB_LIBS@
TERMCAP_LIBS = @TERMCAP_LIBS@
LDAPD_LIBS = @LDAPD_LIBS@
SLAPD_LIBS = @SLAPD_LIBS@
SLURPD_LIBS = @SLURPD_LIBS@
# Our Defaults
CC = $(AC_CC)
DEFS = $(LDAP_INCPATH) $(XINCPATH) $(XDEFS) $(AC_DEFS)
LIBS = $(LDAP_LIBS) $(XLIBS) $(AC_LIBS)
CFLAGS = $(AC_CFLAGS) $(DEFS) $(DEFINES)
LDFLAGS = $(AC_LDFLAGS)
DEFS = $(LDAP_INCPATH) $(XINCPATH) $(XDEFS) $(AC_DEFS) $(DEFINES)
LIBS = $(LDAP_LIBPATH) $(XLIBS) $(XXLIBS) $(AC_LIBS) $(XXXLIBS)
CFLAGS = $(AC_CFLAGS) $(DEFS)
LDFLAGS = $(AC_LDFLAGS) $(XLDFLAGS)
all: all-common all-local FORCE
install: install-common install-local FORCE

View file

@ -9,6 +9,9 @@ RPOBJS = rp500.o faxtotpc.o
LDAP_INCDIR= ../../include
LDAP_LIBDIR= ../../libraries
XLIBS = -lldap -llber -llutil
XXLIBS = $(KRB_LIBS) $(LUTIL_LIBS)
rp500 : rpversion.o
$(LTLINK) -o $@ $(RPOBJS) rpversion.o $(LIBS)

View file

@ -6,6 +6,9 @@ PROGRAMS= in.xfingerd
LDAP_INCDIR= ../../include
LDAP_LIBDIR= ../../libraries
XLIBS = -lldap -llber -llutil
XXLIBS = $(KRB_LIBS) $(LUTIL_LIBS)
in.xfingerd : version.o
$(LTLINK) -o $@ version.o $(OBJS) $(LIBS)

View file

@ -11,7 +11,8 @@ GWOBJS = go500gw.o
LDAP_INCDIR= ../../include
LDAP_LIBDIR= ../../libraries
XLIBS = -llutil @LUTIL_LIBS@
XLIBS = -lldap -llber -llutil
XXLIBS = $(KRB_LIBS) $(LUTIL_LIBS)
go500 : goversion.o
$(LTLINK) -o $@ $(GOOBJS) goversion.o $(LIBS)
@ -40,4 +41,4 @@ install-local: $(PROGRAMS) go500gw.help FORCE
$(LTINSTALL) $(INSTALLFLAGS) -m 755 go500 $(libexecdir)
$(LTINSTALL) $(INSTALLFLAGS) -m 755 go500gw $(libexecdir)
-$(MV) $(datadir)/go500gw.help $(datadir)/go500gw.help-
$(INSTALL) $(INSTALLFLAGS) -m 644 go500gw.help $(datadir)
$(INSTALL) $(INSTALLFLAGS) -m 644 $(srcdir)/go500gw.help $(datadir)

View file

@ -7,6 +7,9 @@ OBJS= main.o
LDAP_INCDIR= ../../include
LDAP_LIBDIR= ../../libraries
XLIBS = -lldap -llber -llutil
XXLIBS = $(KRB_LIBS) $(LUTIL_LIBS)
mail500 : version.o
$(LTLINK) -o $@ version.o $(OBJS) $(LIBS)

View file

@ -7,6 +7,9 @@ HDRS= rcpt500.h
LDAP_INCDIR= ../../include
LDAP_LIBDIR= ../../libraries
XLIBS = -lldap -llber -llutil
XXLIBS = $(KRB_LIBS) $(LUTIL_LIBS)
rcpt500 : version.o
$(LTLINK) -o $@ version.o $(OBJS) $(LIBS)
@ -22,4 +25,4 @@ install-local: $(PROGRAMS) rcpt500.help FORCE
-$(MKDIR) $(libexecdir) $(datadir)
$(LTINSTALL) $(INSTALLFLAGS) -m 755 rcpt500 $(libexecdir)
-$(MV) $(datadir)/rcpt500.help $(datadir)/rcpt500.help-
$(INSTALL) $(INSTALLFLAGS) -m 644 rcpt500.help $(datadir)
$(INSTALL) $(INSTALLFLAGS) -m 644 $(srcdir)/rcpt500.help $(datadir)

View file

@ -4,11 +4,12 @@
SRCS = ldapsearch.c ldapmodify.c ldapdelete.c ldapmodrdn.c
OBJS = ldapsearch.o ldapmodify.o ldapdelete.o ldapmodrdn.o
XLIBS = $(KRB_LIBS)
LDAP_INCDIR= ../../include
LDAP_LIBDIR= ../../libraries
XLIBS = -lldif -lldap -llber -llutil
XXLIBS = $(KRB_LIBS) $(LUTIL_LIBS)
XSRCS = ldsversion.c ldmversion.c lddversion.c ldrversion.c
PROGRAMS = ldapsearch ldapmodify ldapdelete ldapmodrdn ldapadd

View file

@ -9,7 +9,8 @@ PROGRAMS= ud
LDAP_INCDIR= ../../include
LDAP_LIBDIR= ../../libraries
XLIBS = $(TERMCAP_LIBS) $(KRB_LIBS)
XLIBS = -lldif -lldap -llber -llutil
XXLIBS = $(TERMCAP_LIBS) $(KRB_LIBS) $(LUTIL_LIBS)
ud : version.o
$(LTLINK) -o $@ version.o $(OBJS) $(LIBS)

834
configure vendored

File diff suppressed because it is too large Load diff

View file

@ -270,8 +270,19 @@ dnl
AC_CHECK_LIB(gen, main)
])
dnl Check for resolv
AC_CHECK_LIB(resolv, res_search)
dnl Check for resolver routines
AC_CHECK_FUNCS(res_search)
if test $ac_cv_func_res_search = "no" ; then
AC_CHECK_LIB(bind, res_search)
if test $ac_cv_libac_cv_lib_bind_res_search = "yes" ; then
AC_DEFINE(HAVE_RES_SEARCH,1)
else
AC_CHECK_LIB(resolv, res_search)
if test $ac_cv_libac_cv_lib_resolv_res_search = "yes" ; then
AC_DEFINE(HAVE_RES_SEARCH,1)
fi
fi
fi
dnl HP-UX requires -lV3
AC_CHECK_LIB(V3, sigset)
@ -445,7 +456,7 @@ if test $ol_with_threads = auto -o $ol_with_threads = yes \
if test $ol_link_threads = no ; then
dnl try DEC Threads -lpthread -lexc
save_LIBS="$LIBS"
AC_CHECK_LIB(pthread, pthread_join, [
AC_CHECK_LIB(pthread, pthread_mutex_lock, [
ol_link_threads=posix
LTHREAD_LIBS="$LTHREAD_LIBS -lpthread -lexc"
if test $ol_with_yielding_select = auto ; then
@ -458,7 +469,7 @@ if test $ol_with_threads = auto -o $ol_with_threads = yes \
if test $ol_link_threads = no ; then
dnl try DEC Threads -lpthreads -lmach -lexc -lc_r
save_LIBS="$LIBS"
AC_CHECK_LIB(pthreads, pthread_join, [
AC_CHECK_LIB(pthreads, pthread_mutex_unlock, [
ol_link_threads=posix
LTHREAD_LIBS="$LTHREAD_LIBS -lpthreads -lmach -lexc -lc_r"
if test $ol_with_yielding_select = auto ; then
@ -495,7 +506,18 @@ if test $ol_with_threads = auto -o $ol_with_threads = yes \
LIBS="$save_LIBS"
fi
dnl HP-UX 11 check
dnl IRIX Pthread check
if test $ol_link_threads = no ; then
dnl try IRIX Pthreads -Wl,-woff,85 -lpthreads
save_LIBS="$LIBS"
AC_CHECK_LIB(pthreads, pthread_join, [
ol_link_threads=posix
LTHREAD_LIBS="$LTHREAD_LIBS -lpthreads"
],[-Wl,-woff,85])
LIBS="$save_LIBS"
fi
dnl HP-UX 11 Pthread check
if test $ol_link_threads = no; then
save_LIBS="$LIBS"
LIBS="$LIBS -lpthread"
@ -1144,7 +1166,6 @@ AC_CHECK_FUNCS( \
memcpy \
memmove \
mkstemp \
res_search \
select \
setpwfile \
setsid \
@ -1251,7 +1272,6 @@ AC_SUBST(BUILD_SLAPD)
AC_SUBST(BUILD_SHELL)
AC_SUBST(BUILD_SLURPD)
AC_SUBST(LDAP_LIBS)
AC_SUBST(LDAPD_LIBS)
AC_SUBST(SLAPD_LIBS)

View file

@ -41,6 +41,7 @@ Modify -llthread to hide thread implementation <bart@openldap.org>
Modify libraries to use application specified logging routines
Modify libraries to use application specified memory allocation routines
Modify servers to use reentrant library functions
Extend slapd to support identd (RFC1413) information in ACLs.
Extend configure.in to support autodetect of ISODE features.
Remove ldapconfig.h.edit dependencies.
Update SLAPD/SLURD Admin Guide
@ -51,7 +52,10 @@ Small projects
--------------
Create ldapurl (from ldapsearch?) to support searching by URL
Create ldapquery (from ldapsearch?) to support searching using ldap_getfilter(3)
Extend gateways to support tcp_wrappers.
Extend slapd/tcp_wrapper to support identd.
Extend configure.in to support autodetect of Kerberos features.
Extend mail500 (and other daemons) to use ldap_getfilter(3)
Update back-passwd (see ITS#40)
Add useful information to our FAQ http://www.openldap.org/faq/
Update any manual page

4
doc/install/hints/Linux Normal file
View file

@ -0,0 +1,4 @@
If Berkeley DB 2.x should be used with thread support activated, read the
file build/db.2.x.README carefully. The Berkeley package must be build
appropriately to support threaded applications as expected.

View file

@ -7,11 +7,11 @@ all-local: ldapconfig.h FORCE
install-local: FORCE
-$(MKDIR) -p $(includedir)
$(INSTALL) $(INSTALLFLAGS) -m 644 ldap.h $(includedir)
$(INSTALL) $(INSTALLFLAGS) -m 644 lber.h $(includedir)
$(INSTALL) $(INSTALLFLAGS) -m 644 ldap_cdefs.h $(includedir)
$(INSTALL) $(INSTALLFLAGS) -m 644 disptmpl.h $(includedir)
$(INSTALL) $(INSTALLFLAGS) -m 644 srchpref.h $(includedir)
$(INSTALL) $(INSTALLFLAGS) -m 644 $(srcdir)/ldap.h $(includedir)
$(INSTALL) $(INSTALLFLAGS) -m 644 $(srcdir)/lber.h $(includedir)
$(INSTALL) $(INSTALLFLAGS) -m 644 $(srcdir)/ldap_cdefs.h $(includedir)
$(INSTALL) $(INSTALLFLAGS) -m 644 $(srcdir)/disptmpl.h $(includedir)
$(INSTALL) $(INSTALLFLAGS) -m 644 $(srcdir)/srchpref.h $(includedir)
clean-local: FORCE
$(RM) ldapconfig.h

View file

@ -92,14 +92,26 @@
#undef WORDS_BIGENDIAN
/* define this if needed to get reentrant functions */
#ifndef REENTRANT
#undef REENTRANT
#endif
#ifndef _REENTRANT
#undef _REENTRANT
#endif
/* define this if needed to get threadsafe functions */
#ifndef THREADSAFE
#undef THREADSAFE
#endif
#ifndef _THREADSAFE
#undef _THREADSAFE
#endif
#ifndef THREAD_SAFE
#undef THREAD_SAFE
#endif
#ifndef _THREAD_SAFE
#undef _THREAD_SAFE
#endif
/* define this if cross compiling */
#undef CROSS_COMPILING
@ -167,6 +179,12 @@
/* define if you have ptrdiff_t */
#undef HAVE_PTRDIFF_T
/* define if you have res_search() */
#ifdef __notdef__
/* see second res_search define */
#undef HAVE_RES_SEARCH
#endif
/* define if you have sched_yield() */
#ifdef __notdef__
/* see second sched_yield define */
@ -572,6 +590,9 @@
/* Define if you have the V3 library (-lV3). */
#undef HAVE_LIBV3
/* Define if you have the bind library (-lbind). */
#undef HAVE_LIBBIND
/* Define if you have the gen library (-lgen). */
#undef HAVE_LIBGEN

7
libraries/Makefile.in Normal file
View file

@ -0,0 +1,7 @@
## Copyright 1998 The OpenLDAP Foundation, All Rights Reserved.
## COPYING RESTRICTIONS APPLY, see COPYRIGHT file
##
## Libraries Makefile for OpenLDAP
SUBDIRS= liblutil libavl libldif liblber libldap libldbm liblthread

View file

@ -11,6 +11,7 @@ LDAP_LIBDIR= ../../libraries
LIBRARY = libavl.a
PROGRAMS = testavl
XLIBS = -lavl
testavl: $(LIBRARY) testavl.o
$(LTLINK) $(LDFLAGS) -o $@ testavl.o $(LDAP_LIBPATH) -lavl
$(LTLINK) $(LDFLAGS) -o $@ testavl.o $(LIBS)

View file

@ -16,7 +16,8 @@ PROGRAMS= dtest etest idtest
LDAP_INCDIR= ../../include
LDAP_LIBDIR= ../../libraries
LIBS = $(LDAP_LIBPATH) $(LDAP_LIBLBER) $(AC_LIBS)
XLIBS = -llber
XXLIBS =
dtest: $(LIBRARY) dtest.o
$(LTLINK) $(LDFLAGS) -o $@ dtest.o $(LIBS)

View file

@ -25,7 +25,8 @@ OBJS = bind.lo open.lo result.lo error.lo compare.lo search.lo \
LDAP_INCDIR= ../../include
LDAP_LIBDIR= ../../libraries
LIBS = $(LDAP_LIBPATH) $(LDAP_LIBLDAP) $(LDAP_LIBLBER) $(AC_LIBS)
XLIBS = -lldap -llber
XXLIBS =
ltest: $(LIBRARY) test.o $(LDAP_LIBLBER_DEPEND)
$(LTLINK) $(LDFLAGS) -o $@ test.o $(LIBS)
@ -41,14 +42,14 @@ install-local: $(CFFILES) FORCE
@for i in $(CFFILES); do \
if test ! -f $(sysconfdir)/$$i; then \
echo "installing $$i in $(sysconfdir)"; \
echo "$(INSTALL) $(INSTALLFLAGS) -m 644 $$i $(sysconfdir)/$$i"; \
$(INSTALL) $(INSTALLFLAGS) -m 644 $$i $(sysconfdir)/$$i; \
echo "$(INSTALL) $(INSTALLFLAGS) -m 644 $(srcdir)/$$i $(sysconfdir)/$$i"; \
$(INSTALL) $(INSTALLFLAGS) -m 644 $(srcdir)/$$i $(sysconfdir)/$$i; \
else \
echo "PRESERVING EXISTING CONFIGURATION FILE $(sysconfdir)/$$i" ; \
fi; \
$(INSTALL) $(INSTALLFLAGS) -m 644 $$i $(sysconfdir)/$$i.default; \
$(INSTALL) $(INSTALLFLAGS) -m 644 $(srcdir)/$$i $(sysconfdir)/$$i.default; \
done
-$(MKDIR) $(datadir)
-$(MV) $(datadir)/ldapfriendly $(datadir)/ldapfriendly-
$(INSTALL) $(INSTALLFLAGS) -m 644 ldapfriendly $(datadir)/ldapfriendly
$(INSTALL) $(INSTALLFLAGS) -m 644 $(srcdir)/ldapfriendly $(datadir)/ldapfriendly

View file

@ -0,0 +1,17 @@
##
## Makefile for -lldbm
##
LIBRARY = libldbm.a
XPROGRAMS = testldbm
SRCS = ldbm.c
OBJS = ldbm.o
LDAP_INCDIR= ../../include
LDAP_LIBDIR= ../../libraries
XLIBS = -lldbm -lavl
XXLIBS = $(LDBM_LIBS)
testldbm: libldbm.a testldbm.o
$(CC) $(LDFLAGS) -o $@ testldbm.o $(LIBS)

View file

@ -0,0 +1,15 @@
##
## Makefile for -llthread
##
LIBRARY = liblthread.a
XSRCS = version.c
SRCS = rdwr.c thread.c stack.c
OBJS = rdwr.o thread.o stack.o
LDAP_INCDIR= ../../include
LDAP_LIBDIR= ../../libraries
XLIBS = -lthread
XXLIBS = $(LTHREAD_LIBS)

View file

@ -18,15 +18,16 @@ LDAP_LIBDIR= ../../libraries
BUILD_OPT = "--enable-ldapd"
BUILD_SRV = @BUILD_LDAPD@
XLIBS= @LDAPD_LIBS@ $(KRB_LIBS) -llutil @LUTIL_LIBS@
XLIBS= -llber -llutil
XXLIBS= $(LDAPD_LIBS) $(KRB_LIBS) $(LUTIL_LIBS)
ldapd: version.o
$(LDLINK) -o $@ $(OBJS) version.o $(LIBS)
sldapd: version.o
$(LDLINK) -static -o $@ $(OBJS) version.o $(LDFLAGS) $(LIBS) -lresolv
$(LDLINK) -static -o $@ $(OBJS) version.o $(LIBS)
version.c: $(OBJS) $(LDAP_LIBDIR)/liblber/liblber.a
version.c: $(OBJS) $(LDAP_LIBLBER_DEPEND)
$(RM) $@
(u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \
t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \

View file

@ -22,6 +22,12 @@ OBJS = main.o daemon.o connection.o search.o filter.o add.o charray.o \
LDAP_INCDIR= ../../include
LDAP_LIBDIR= ../../libraries
# $(LTHREAD_LIBS) must be last
XLIBS = libbackends.a -lavl -lldbm -lldif -lldap -llber -llthread -llutil
XXLIBS = $(LDBM_LIBS) $(SLAPD_LIBS) \
$(KRB_LIBS) $(LUTIL_LIBS)
XXXLIBS = $(LTHREAD_LIBS)
BUILD_OPT = "--enable-slapd"
BUILD_SRV = @BUILD_SLAPD@
@ -30,10 +36,6 @@ all-local-srv: FORCE
$(MAKE) $(MFLAGS) slapd
(cd tools; $(MAKE) $(MFLAGS) all)
XLIBS = @SLAPD_LIBS@ libbackends.a \
-lavl -lldbm @LDBM_LIBS@ -llthread @LTHREAD_LIBS@ \
$(KRB_LIBS) -llutil @LUTIL_LIBS@
slapd: version.o
$(LTLINK) -o $@ $(OBJS) version.o $(LIBS)
@ -115,7 +117,7 @@ install-conf: FORCE
@-$(MKDIR) $(sysconfdir)
@for i in $(CFFILES); do \
tmpcf=/tmp/$$i.$$ ; \
$(SED) -e 's;%SYSCONFDIR%;$(sysconfdir);' $$i > $$tmpcf ; \
$(SED) -e 's;%SYSCONFDIR%;$(sysconfdir);' $(srcdir)/$$i > $$tmpcf ; \
if test ! -f $(sysconfdir)/$$i; then \
echo "installing $$i in $(sysconfdir)"; \
echo "$(INSTALL) $(INSTALLFLAGS) -m 644 $$tmpcf $(sysconfdir)/$$i"; \
@ -124,7 +126,7 @@ install-conf: FORCE
echo "PRESERVING EXISTING CONFIGURATION FILE $(sysconfdir)/$$i" ; \
fi; \
$(INSTALL) $(INSTALLFLAGS) -m 644 $$tmpcf $(sysconfdir)/$$i.default; \
$(RM) -f /tmp/slapd.$$ ; \
$(RM) -f $$tmpcf ; \
done
install-tools: FORCE

View file

@ -18,6 +18,11 @@ BUILD_LDBM = @BUILD_LDBM@
LDAP_INCDIR= ../../../include
LDAP_LIBDIR= ../../../libraries
XLIBS = -lavl -lldif -lldap -llber -lldbm -llthread -llutil
XXLIBS = $(LDAPD_LIBS) $(SLAPD_LIBS) \
$(LDBM_LIBS) $(KRB_LIBS) $(LUTIL_LIBS)
XXXLIBS = $(LTHREAD_LIBS)
PROGRAMS=ldif2index ldif2ldbm ldbmcat ldif2id2entry \
ldif2id2children centipede ldbmtest ldif
@ -46,9 +51,6 @@ build-ldbm: FORCE
ldbm-tools: $(PROGRAMS)
XLIBS = @SLAPD_LIBS@ -lavl -lldbm @LDBM_LIBS@ -llthread @LTHREAD_LIBS@ \
$(KRB_LIBS) -llutil @LUTIL_LIBS@
build-edb2ldif: FORCE
@if [ "$(HAVE_ISODE)" = "yes" ]; then \
$(MAKE) $(MFLAGS) edb2ldif; \
@ -93,14 +95,13 @@ ldbmcat: ldbmcat.o
$(LTLINK) -o $@ ldbmcat.o $(LIBS)
ldif: ldif.o
$(LTLINK) -o $@ ldif.o $(LIBS) $(LIBS2)
$(LTLINK) -o $@ ldif.o $(LIBS)
centipede: centipede.o
$(LTLINK) -o $@ centipede.o $(LIBS) $(KRBLIBFLAG) $(KRBLIBS)
$(LTLINK) -o $@ centipede.o $(LIBS)
sizecount: sizecount.o ../phonetic.o ../ch_malloc.o
$(LTLINK) -o $@ sizecount.o ../phonetic.o ../ch_malloc.o \
$(LIBS) $(KRBLIBFLAG) $(KRBLIBS)
$(LTLINK) -o $@ sizecount.o ../phonetic.o ../ch_malloc.o $(LIBS)
ldbmtest: ldbmtest.o ../libbackends.a $(OBJS2)
$(LTLINK) -o ldbmtest ldbmtest.o $(OBJS2) ../libbackends.a $(LIBS)

View file

@ -24,7 +24,10 @@ BUILD_SRV = @BUILD_SLURPD@
all-local-srv: slurpd
XLIBS = @SLURPD_LIBS@ -llthread @LTHREAD_LIBS@ $(KRB_LIBS) -llutil @LUTIL_LIBS@
# $(LTHREAD_LIBS) must be last!
XLIBS = -lldif -lldap -llber -llthread -llutil
XXLIBS = $(SLURPD_LIBS) $(KRB_LIBS) $(LUTIL_LIBS)
XXXLIBS = $(LTHREAD_LIBS)
slurpd: version.o
$(LTLINK) -o $@ $(OBJS) version.o $(LIBS)
@ -32,7 +35,7 @@ slurpd: version.o
sslurpd: version.o
$(LTLINK) -static -o $@ $(OBJS) version.o $(LIBS)
version.c: $(OBJS) $(LDAP_LIBDEPEND)
version.c: $(OBJS) $(LDAP_LIBDEPEND) $(LDAP_LIBTHREAD_DEPEND)
$(RM) $@
(u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \
t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \

View file

@ -3,17 +3,16 @@
##
## tests Makefile.in for OpenLDAP
SCRIPTSDIR=./scripts
all-local: FORCE
@-$(LN_S) $(srcdir)/data .
@echo "Initiating LDAP tests..."; \
$(MKDIR) -p test-db test-repl ; \
$(SCRIPTSDIR)/all $(SCRIPTSDIR)
$(MKDIR) test-db test-repl ; \
$(srcdir)/scripts/all $(srcdir)
clean-local: FORCE
$(RM) test-db/[!C]* test-repl/[!C]* *core
veryclean-local: FORCE
$(RM) -f data
$(RM) -r test-db test-repl

View file

@ -3,15 +3,16 @@
echo ">>>>> Executing all LDAP tests..."
if [ $# -eq 0 ]; then
SCRIPTDIR="."
SRCDIR="."
else
SCRIPTDIR=$1; shift
SRCDIR=$1; shift
fi
for i in $SCRIPTDIR/test*; do
CMD=$i $*
echo ">>>>> Starting $CMD ..."
$CMD
echo ">>>>> Test Directory: $SRCDIR"
for CMD in $SRCDIR/scripts/test*; do
echo ">>>>> Starting `basename $CMD` ..."
$CMD $SRCDIR
RC=$?
if [ $RC -eq 0 ]; then
echo ">>>>> $CMD completed OK."
@ -19,5 +20,7 @@ for i in $SCRIPTDIR/test*; do
echo ">>>>> $CMD failed (exit $RC)"
exit $RC
fi
echo ">>>>> waiting 5 seconds for things to exit"
sleep 5
echo
done

View file

@ -1,3 +1,5 @@
DATADIR=$SRCDIR/data
LDIF2LDBM=../servers/slapd/tools/ldif2ldbm
SLAPD=../servers/slapd/slapd
SLURPD=../servers/slurpd/slurpd
@ -8,26 +10,31 @@ PORT=9009
SLAVEPORT=9010
DBDIR=./test-db
REPLDIR=./test-repl
CONF=./data/slapd-master.conf
ACLCONF=./data/slapd-acl.conf
MASTERCONF=./data/slapd-repl-master.conf
SLAVECONF=./data/slapd-repl-slave.conf
LDIF=./data/test.ldif
LDIFORDERED=./data/test-ordered.ldif
CONF=$DATADIR/slapd-master.conf
ACLCONF=$DATADIR/slapd-acl.conf
MASTERCONF=$DATADIR/slapd-repl-master.conf
SLAVECONF=$DATADIR/slapd-repl-slave.conf
LDIF=$DATADIR/test.ldif
LDIFORDERED=$DATADIR/test-ordered.ldif
BASEDN="o=University of Michigan, c=US"
MANAGERDN="cn=Manager, o=University of Michigan, c=US"
PASSWD=secret
BABSDN="cn=Barbara Jensen, ou=Information Technology Division, ou=People, o=University of Michigan, c=US"
BJORNSDN="cn=Bjorn Jensen, ou=Information Technology Division, ou=People, o=University of Michigan, c=US"
JAJDN="cn=James A Jones 1, ou=Alumni Association, ou=People, o=University of Michigan, c=US"
MASTERLOG=$DBDIR/master.log
SLAVELOG=$DBDIR/slave.log
SLURPLOG=$DBDIR/slurp.log
SEARCHOUT=$DBDIR/ldapsearch.out
SEARCHFLT=$DBDIR/ldapsearch.flt
LDIFFLT=$DBDIR/ldif.flt
MASTEROUT=$DBDIR/master.out
SLAVEOUT=$DBDIR/slave.out
TESTOUT=$DBDIR/ldapsearch.out
SEARCHOUTMASTER=./data/search.out.master
MODIFYOUTMASTER=./data/modify.out.master
ADDDELOUTMASTER=./data/adddel.out.master
MODRDNOUTMASTER=./data/modrdn.out.master
ACLOUTMASTER=./data/acl.out.master
REPLOUTMASTER=./data/repl.out.master
MODSRCHFILTERS=./data/modify.search.filters
SEARCHOUTMASTER=$DATADIR/search.out.master
MODIFYOUTMASTER=$DATADIR/modify.out.master
ADDDELOUTMASTER=$DATADIR/adddel.out.master
MODRDNOUTMASTER=$DATADIR/modrdn.out.master
ACLOUTMASTER=$DATADIR/acl.out.master
REPLOUTMASTER=$DATADIR/repl.out.master
MODSRCHFILTERS=$DATADIR/modify.search.filters

View file

@ -1,7 +1,16 @@
#!/bin/sh
. scripts/defines.sh
if [ $# -eq 0 ]; then
SRCDIR="."
else
SRCDIR=$1; shift
fi
echo "running defines.sh $SRCDIR"
. $SRCDIR/scripts/defines.sh $SRCDIR
echo "Datadir is $DATADIR"
echo "Cleaning up in $DBDIR..."

View file

@ -1,14 +1,19 @@
#!/bin/sh
. scripts/defines.sh
if [ $# -eq 0 ]; then
SRCDIR="."
else
SRCDIR=$1; shift
fi
. $SRCDIR/scripts/defines.sh $SRCDIR
echo "Cleaning up in $DBDIR..."
rm -f $DBDIR/*
rm -f $DBDIR/[!C]*
echo "Starting slapd on TCP/IP port $PORT..."
$SLAPD -f $CONF -p $PORT -d 1 > /dev/null 2>&1 &
$SLAPD -f $CONF -p $PORT -d 1 > $MASTERLOG 2>&1 &
PID=$!
echo "Using ldapsearch to check that slapd is running..."
@ -44,8 +49,13 @@ if [ $RC != 0 ]; then
exit $RC
fi
echo "Comparing retrieved entries to LDIF file used to create database"
cmp $SEARCHOUT $LDIF
echo "Filtering ldapsearch results..."
. $SRCDIR/scripts/acfilter.sh < $SEARCHOUT > $SEARCHFLT
echo "Filtering original ldif used to create database..."
. $SRCDIR/scripts/acfilter.sh < $LDIF > $LDIFFLT
echo "Comparing filter output..."
cmp $SEARCHFLT $LDIFFLT
if [ $? != 0 ]; then
echo "comparison failed - database was not created correctly"
exit 1

View file

@ -1,10 +1,16 @@
#!/bin/sh
. scripts/defines.sh
if [ $# -eq 0 ]; then
SRCDIR="."
else
SRCDIR=$1; shift
fi
. $SRCDIR/scripts/defines.sh $SRCDIR
echo "Cleaning up in $DBDIR..."
rm -f $DBDIR/*
rm -f $DBDIR/[!C]*
echo "Running ldif2ldbm to build slapd database..."
$LDIF2LDBM -f $CONF -i $LDIF -e ../servers/slapd/tools
@ -15,7 +21,7 @@ if [ $RC != 0 ]; then
fi
echo "Starting slapd on TCP/IP port $PORT..."
$SLAPD -f $CONF -p $PORT -d 1 > /dev/null 2>&1 &
$SLAPD -f $CONF -p $PORT -d 1 > $MASTERLOG 2>&1 &
PID=$!
echo "Testing slapd searching..."

View file

@ -1,10 +1,16 @@
#!/bin/sh
. scripts/defines.sh
if [ $# -eq 0 ]; then
SRCDIR="."
else
SRCDIR=$1; shift
fi
. $SRCDIR/scripts/defines.sh $SRCDIR
echo "Cleaning up in $DBDIR..."
rm -f $DBDIR/*
rm -f $DBDIR/[!C]*
echo "Running ldif2ldbm to build slapd database..."
$LDIF2LDBM -f $CONF -i $LDIF -e ../servers/slapd/tools
@ -15,7 +21,7 @@ if [ $RC != 0 ]; then
fi
echo "Starting slapd on TCP/IP port $PORT..."
$SLAPD -f $CONF -p $PORT -d 1 > /dev/null 2>&1 &
$SLAPD -f $CONF -p $PORT -d 1 > $MASTERLOG 2>&1 &
PID=$!
echo "Testing slapd modify operations..."

View file

@ -1,5 +1,12 @@
#!/bin/sh
echo "modrdn test not yet written"
if [ $# -eq 0 ]; then
SRCDIR="."
else
SRCDIR=$1; shift
fi
. $SRCDIR/scripts/defines.sh $SRCDIR
echo "modrdn test not yet written"
exit 0

View file

@ -1,10 +1,16 @@
#!/bin/sh
. scripts/defines.sh
if [ $# -eq 0 ]; then
SRCDIR="."
else
SRCDIR=$1; shift
fi
. $SRCDIR/scripts/defines.sh $SRCDIR
echo "Cleaning up in $DBDIR..."
rm -f $DBDIR/*
rm -f $DBDIR/[!C]*
echo "Running ldif2ldbm to build slapd database..."
$LDIF2LDBM -f $CONF -i $LDIF -e ../servers/slapd/tools
@ -15,7 +21,7 @@ if [ $RC != 0 ]; then
fi
echo "Starting slapd on TCP/IP port $PORT..."
$SLAPD -f $ACLCONF -p $PORT -d 1 > /dev/null 2>&1 &
$SLAPD -f $ACLCONF -p $PORT -d 1 > $MASTERLOG 2>&1 &
PID=$!
echo "Testing slapd access control..."
@ -96,8 +102,7 @@ EOMODS4
echo "Using ldapsearch to retrieve all the entries..."
$LDAPSEARCH -L -S "" -b "$BASEDN" -h localhost -p $PORT \
'objectClass=*' | egrep -iv '^modifytimestamp|^modifiersname' \
>> $SEARCHOUT 2>&1
'objectClass=*' | . $SRCDIR/scripts/acfilter.sh >> $SEARCHOUT 2>&1
RC=$?
kill -HUP $PID
if [ $RC != 0 ]; then

View file

@ -10,7 +10,13 @@
# - retrieve database over ldap and compare against expected results
#
. scripts/defines.sh
if [ $# -eq 0 ]; then
SRCDIR="."
else
SRCDIR=$1; shift
fi
. $SRCDIR/scripts/defines.sh $SRCDIR
if test ! -x $SLURPD ; then
echo ">>>>> $SLURPD is not executable or do not exist."