Commit 17b4826d authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

Import latest from -devel:

	build environment changes (for VPATH, lib orderring)
	test script changes (for VPATH)
	doc updates
parent 51c2c98b
......@@ -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
......
......@@ -46,3 +46,5 @@ clean-local: FORCE
veryclean-local: FORCE
$(RM) config.cache config.status libtool stamp-h stamp-h.in
distclean: veryclean FORCE
......@@ -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 */
......
*** 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;
}
/*
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)
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)
......@@ -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)%' \
......
......@@ -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
......
......@@ -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
......
......@@ -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)
......
......@@ -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)
......
......@@ -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)
......@@ -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)
......
......@@ -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)
......@@ -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
......
......@@ -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)
......
This diff is collapsed.
......@@ -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)
......
......@@ -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
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.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment