Fixed GDBM bugs.

This commit is contained in:
Kurt Zeilenga 1998-09-20 08:34:18 +00:00
parent 721a62af38
commit cbd6badaed
6 changed files with 318 additions and 303 deletions

120
INSTALL
View file

@ -1,87 +1,61 @@
Making and Installing the U-M LDAP Distribution Making and Installing the OpenLDAP Distribution
** It is recommended that you read or at least skim through ALL of the ** It is recommended that you read or at least skim through ALL of the
** instructions in this file before attempting to build the software. ** instructions in this file before attempting to build the software.
If you want to build binaries for more than one platform from a single If you want to build binaries for more than one platform from a single
source tree, skip ahead to the "Building LDAP For More Than One Platform" source tree, skip ahead to the "Building LDAP For More Than One Platform"
section near the end of this file. If you are planning to run slapd, section near the end of this file.
you should read the "SLAPD and SLURPD Administrator's Guide", found in
the doc/guides/ directory within the distribution.
If you simply want to build LDAP for a single machine platform, follow If you simply want to build LDAP for a single machine platform, follow
these steps: these steps:
1. untar the distribution and cd to the top: 1. untar the distribution and cd to the top:
% zcat ldap-3.3.tar.Z | tar xf - % tar xfz ldap-stable.tgz
% cd ldap-3.3 % cd ldap
If you are reading this file, you probably have already done this! If you are reading this file, you probably have already done this!
2. Type:
% ./configure --help
2. edit the files Make-common and include/ldapconfig.h.edit to configure to list available configuration options.
The configure script will also use your environmental
variables for determining compiler/linker options.
These environment variables are used:
CC C Compiler (cc, ecgs)
CFLAGS C Flags (-ansi)
CPPFLAGS CPP Flags (-I/path/include -Ddef)
LDFLAGS LDFLAGS (-L/path/lib -llib)
3. edit the file include/ldapconfig.h.edit to configure
the software for your site (the files are well-commented): the software for your site (the files are well-commented):
% vi Make-common
% vi include/ldapconfig.h.edit % vi include/ldapconfig.h.edit
Note that you should NOT need to edit the Makefile located at the 4. Configure the build system
top of the distribution.
If you just want to see if things will build, you can leave the % [env settings] ./configure [options]
configuration alone and change it later.
If you have the ISODE package built and want to build the If all goes well, the configure script with auto-detect the
LDAP-to-X.500 server (ldapd), be sure to uncomment the appropriate appropriate settings. Use configure enable/with options and/or
lines near the end of the Make-common file. By default only the environment variables to obtain desired results.
stand-alone server, LDAP libraries and client software are built.
3. make the software: 5. Build dependencies
% make depend
6. Build the system
% make % make
If all goes well, then make will figure out what platform you are on, If all goes well, the system will build as configured. If not,
pick a compiler to use, construct Makefiles, and build everything. return to step 4 after reviewing the enable/with options settings.
If you see a message like "unknown platform..." LDAP has probably not
been set up to build on your machine. See the file build/PORTS for
hints on what to do in that case.
Note that if your make does not use the Bourne (sh) shell by 7. install the binaries and man pages. You may need to be superuser to
default when executing internal scripts (reportedly the case on SGI
machines at least), you will need to run the make explicitly from
within a Bourne shell. If you a syntax error such as "Missing ]"
when you do the make under your usual shell, try this:
% sh
$ make
If you don't like the some of the platform-specific options chosen
by the automatic build process (such as the compiler to use, etc),
you can intervene and edit them before anything is actually compiled
by explicitly doing a "make platform" step, editing the .make-platform
file (actually a link to the file to be edited), and then doing a
regular make:
% make platform
% vi .make-platform
% make
If you want to choose the build platform yourself from among those that
the distribution supports, cd to the appropriate directory underneath
build/platforms and make from there. For example, if you are on a
machine running SunOS 4.1.4 and you want to force the use of the cc
compiler, you would do this:
% cd build/platforms/sunos4-cc
% make
If you want to run some simple tests after the build is complete, you
can do this:
% make test
4. install the binaries and man pages. You may need to be superuser to
do this (depending on where you are installing things): do this (depending on where you are installing things):
% su % su
@ -103,34 +77,26 @@ these steps:
Building LDAP For More Than One Platform Building LDAP For More Than One Platform
It is now possible to build LDAP for more than one platform from the same It is now possible to build LDAP for more than one platform from the same
source tree. This is accomplished by some rules in the Makefiles that source tree. This is accomplished by using make(1) VPATH support. If
create a shadow (linked) directory tree where the binaries are placed. your make(1) program is old and doesn't have VPATH support, install GNU
Make.
Follow these steps for each different platform: Follow these steps for each different platform:
1. move to the directory that matches the platform and compiler you 1. Create a directory for the platform object files.
want to build for and type make. The directories are all located
underneath the build/platforms directory. If your platform is not
there, you may need to do a port - see the build/PORTS file for
more information. For a Sun running SunOS 4.1.4, you might do
this:
% cd build/platforms/sunos4-cc % mkdir obj-platform
% make links
This will create a linked source area. 2. Change your working directory to the platform object directory.
% cd obj-platform
2. move to the new directory and make as for a single platform. Follow steps 3. Configure the build system
1-4 above to accomplish this. For example:
% cd obj-sunos4-cc % [env settings] ../configure --src-dir=.. [options]
% make
That's all there is to it. You can also create the linked source area(s) ( replace ".." with the appropriate path )
by just typing "make links" at the top of the distribution, in which case
the Makefile will try to automatically determine the platform and
compiler.
4. Continue as above (starting at step 5).
End of LDAP INSTALL file. End of OpenLDAP INSTALL file.

65
README
View file

@ -1,20 +1,40 @@
UM-LDAP 3.3 README file OpenLDAP 1.0 README
This is the UM-LDAP version 3.3 distribution. For a description of This is the OpenLDAP version 1.0 distribution.
what this distribution contains, see the ANNOUNCEMENT file in this
directory. For a description of changes from previous releases, For a description of what this distribution contains, see the
see the CHANGES file in this directory. For a more detailed ANNOUNCEMENT file in this directory. For a description of
description of how to make and install the distribution, see the changes from previous releases, see the CHANGES file in this
INSTALL file in this directory. For more information on making and directory. For a more detailed description of how to make an
installing slapd, see the "SLAPD and SLURPD Administrator's Guide" install the distribution, see the INSTALL file in this directory.
in the doc/guides/ directory.
For more information:
http://www.OpenLDAP.org/
MAKING AND INSTALLING THE DISTRIBUTION MAKING AND INSTALLING THE DISTRIBUTION
You should be able to make and install the distribution with a pretty You should be able to make and install the distribution with a pretty
standard default configuration by typing the following commands standard default configuration by typing the following commands
% ./configure --help
This will list the available options.
The configure script will also use your environmental
variables for determining compiler/linker options.
These environment variables are used:
CC C compiler (cc, ecgs)
CFLAGS C Flags (-ansi)
CPPFLAGS CPP Flags (-I -D)
LDFLAGS LDFLAGS (-L -l)
% [env settings] ./configure [options]
this will configure the build system
% make depend
this will create dependency information
% make % make
this will build the system
% su % su
# make install # make install
@ -22,18 +42,11 @@ MAKING AND INSTALLING THE DISTRIBUTION
works. works.
You will probably want to do a little configuration to suit your You will probably want to do a little configuration to suit your
site, though. There are two files you might want to edit: site, though. There are one file you might want to edit:
Make-common This file contains definitions for include/ldapconfig.h.edit
where things will be installed, where This file contains #defines used by many parts of the
to find various things, etc. If you distribution. You'll at least want to change DEFAULT_BASE.
want to build an ldap server, you'll
definitely need to edit this file
include/ldapconfig.h.edit This file contains #defines used
by many parts of the distribution.
You'll at least want to change
DEFAULT_BASE.
See the INSTALL file in this directory for more information. See the INSTALL file in this directory for more information.
@ -42,18 +55,16 @@ DOCUMENTATION
There are man pages for most programs in the distribution and There are man pages for most programs in the distribution and
routines in the various libraries. See ldap(3) for details. routines in the various libraries. See ldap(3) for details.
There is a postscript version of an administrator's guide for There is an OpenLDAP homepage available that contains the latest
slapd in doc/guides/slapd.ps.
There is an LDAP homepage available that contains the latest
LDAP news, releases announcements, pointers to other LDAP resources, LDAP news, releases announcements, pointers to other LDAP resources,
etc. You can access it at this URL: etc. You can access it at this URL:
http://www.umich.edu/~rsug/ldap/ http://www.OpenLDAP.org/
FEEDBACK / PROBLEM REPORTS FEEDBACK / PROBLEM REPORTS / DISCUSSIONS
We would appreciate any feedback you can provide. If you have We would appreciate any feedback you can provide. If you have
problems, report them to this address: problems, report them to this address:
ldap-support@umich.edu OpenLDAP-bugs@OpenLDAP.org

View file

@ -20,6 +20,12 @@
/* define this for LDAP referrals support */ /* define this for LDAP referrals support */
#undef LDAP_REFERRALS #undef LDAP_REFERRALS
/* define this for ACL Group support */
#undef SLAPD_ACLGROUPS
/* define this for Reverse Lookup support */
#undef SLAPD_RLOOKUPS
/* define this for phonetic support */ /* define this for phonetic support */
#undef SLAPD_PHONETIC #undef SLAPD_PHONETIC

353
configure vendored

File diff suppressed because it is too large Load diff

View file

@ -221,7 +221,7 @@ if test $ol_with_threads = auto -o $ol_with_threads = posix ; then
fi fi
# consider threads found # consider threads found
ol_with_threads="posix" ol_with_threads=found
OL_LINUX_THREADS OL_LINUX_THREADS
@ -233,7 +233,7 @@ dnl AC_DEFINE(HAVE_LINUX_THREADS,1)
dnl Now the hard part, how to link dnl Now the hard part, how to link
dnl A few platforms have pthread support in standard libraries dnl A few platforms have pthread support in standard libraries
AC_CHECK_FUNC(pthread_create,ol_link_threads=yes) AC_CHECK_FUNC(pthread_create,[ol_link_threads=yes])
if test $ol_link_threads = no ; then if test $ol_link_threads = no ; then
dnl try -pthread dnl try -pthread
@ -252,7 +252,7 @@ dnl AC_DEFINE(HAVE_LINUX_THREADS,1)
if test $ol_cv_pthread_flag = yes ; then if test $ol_cv_pthread_flag = yes ; then
LTHREAD_LIBS="$LTHREAD_LIBS -pthread" LTHREAD_LIBS="$LTHREAD_LIBS -pthread"
ol_link_threads=yes ol_link_threads=posix
fi fi
fi fi
@ -260,7 +260,7 @@ dnl AC_DEFINE(HAVE_LINUX_THREADS,1)
dnl try -lpthread dnl try -lpthread
save_LIBS="$LIBS" save_LIBS="$LIBS"
AC_CHECK_LIB(pthread, pthread_create, [ AC_CHECK_LIB(pthread, pthread_create, [
ol_link_threads=yes ol_link_threads=posix
LTHREAD_LIBS="$LTHREAD_LIBS -lpthread"]) LTHREAD_LIBS="$LTHREAD_LIBS -lpthread"])
LIBS="$save_LIBS" LIBS="$save_LIBS"
fi fi
@ -269,7 +269,7 @@ dnl AC_DEFINE(HAVE_LINUX_THREADS,1)
dnl try -lc_r dnl try -lc_r
save_LIBS="$LIBS" save_LIBS="$LIBS"
AC_CHECK_LIB(c_r, pthread_create, [ AC_CHECK_LIB(c_r, pthread_create, [
ol_link_threads=yes ol_link_threads=posix
LTHREAD_LIBS="$LTHREAD_LIBS -lc_r"]) LTHREAD_LIBS="$LTHREAD_LIBS -lc_r"])
LIBS="$save_LIBS" LIBS="$save_LIBS"
fi fi
@ -278,17 +278,22 @@ dnl AC_DEFINE(HAVE_LINUX_THREADS,1)
dnl try DEC Threads dnl try DEC Threads
save_LIBS="$LIBS" save_LIBS="$LIBS"
AC_CHECK_LIB(pthread, pthread_create, [ AC_CHECK_LIB(pthread, pthread_create, [
ol_link_threads=yes ol_link_threads=posix
LTHREAD_DEFS="$LTHREAD_DEFS -DDEC_THREADS" LTHREAD_DEFS="$LTHREAD_DEFS -DDEC_THREADS"
LTHREAD_LIBS="$LTHREAD_LIBS -lpthread -lmach -lexc -lc"],, LTHREAD_LIBS="$LTHREAD_LIBS -lpthread -lmach -lexc -lc"],,
[-lmach -lexc -lc]) [-lmach -lexc -lc])
LIBS="$save_LIBS" LIBS="$save_LIBS"
fi fi
if test $ol_link_threads = no ; then if test $ol_link_threads != no ; then
dnl All POSIX Thread (final) implementations should have sched_yield
AC_CHECK_FUNC(sched_yield)
else
AC_MSG_ERROR([could not link with POSIX Threads]) AC_MSG_ERROR([could not link with POSIX Threads])
fi fi
elif test $ol_with_threads = posix ; then fi
if test $ol_with_threads = posix ; then
AC_MSG_ERROR([could not locate POSIX Threads]) AC_MSG_ERROR([could not locate POSIX Threads])
fi fi
fi fi
@ -307,25 +312,6 @@ if test $ol_link_threads = no ; then
LTHREAD_LIBS="" LTHREAD_LIBS=""
fi fi
dnl # check for strtok_r (and presumely other reentrant functions)
dnl save_LIBS="$LIBS"
dnl LIBS="$save_LIBS $LTHREAD_LIBS"
dnl AC_CHECK_LIB(pthread,strtok_r)
dnl
dnl if test $ac_cv_lib_pthread_strtok_r = no ; then
dnl LIBS="$save_LIBS $LTHREAD_LIBS"
dnl AC_CHECK_LIB(c_r,strtok_r)
dnl AC_CHECK_FUNCS(strtok_r sched_yield)
dnl if test $ac_cv_lib_c_r_strtok_r = yes ; then
dnl LTHREAD_LIBS="$LTHREAD_LIBS -lc_r"
dnl fi
dnl else
dnl AC_CHECK_FUNCS(strtok_r sched_yield)
dnl fi
dnl
dnl LIBS="$save_LIBS"
ol_link_ldbm=no ol_link_ldbm=no
if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then
OL_BERKELEY_DB2 OL_BERKELEY_DB2
@ -385,7 +371,7 @@ if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_GDBM" LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_GDBM"
if test $ol_cv_lib_db != yes ; then if test $ol_cv_lib_gdbm != yes ; then
LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm" LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
fi fi
fi fi
@ -404,7 +390,7 @@ if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = ndbm ; then
LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_NDBM" LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_NDBM"
if test $ol_cv_lib_db != yes ; then if test $ol_cv_lib_ndbm != yes ; then
LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm" LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
fi fi
fi fi

View file

@ -73,11 +73,11 @@
/* define this if sys_errlist is not defined in stdio.h or errno.h */ /* define this if sys_errlist is not defined in stdio.h or errno.h */
#undef DECL_SYS_ERRLIST #undef DECL_SYS_ERRLIST
/* define this for connectionless LDAP support */ /* define this for ACL Group support */
#undef LDAP_CONNECTIONLESS #undef SLAPD_ACLGROUPS
/* define this to remove -lldap cache support */ /* define this for Reverse Lookup support */
#undef LDAP_NOCACHE #undef SLAPD_RLOOKUPS
/* define this for phonetic support */ /* define this for phonetic support */
#undef SLAPD_PHONETIC #undef SLAPD_PHONETIC
@ -94,9 +94,6 @@
/* Define if you have the mktime function. */ /* Define if you have the mktime function. */
#undef HAVE_MKTIME #undef HAVE_MKTIME
/* Define if you have the sched_yield function. */
#undef HAVE_SCHED_YIELD
/* Define if you have the select function. */ /* Define if you have the select function. */
#undef HAVE_SELECT #undef HAVE_SELECT
@ -121,15 +118,15 @@
/* Define if you have the strtod function. */ /* Define if you have the strtod function. */
#undef HAVE_STRTOD #undef HAVE_STRTOD
/* Define if you have the strtok_r function. */
#undef HAVE_STRTOK_R
/* Define if you have the strtol function. */ /* Define if you have the strtol function. */
#undef HAVE_STRTOL #undef HAVE_STRTOL
/* Define if you have the strtoul function. */ /* Define if you have the strtoul function. */
#undef HAVE_STRTOUL #undef HAVE_STRTOUL
/* Define if you have the <db.h> header file. */
#undef HAVE_DB_H
/* Define if you have the <db_185.h> header file. */ /* Define if you have the <db_185.h> header file. */
#undef HAVE_DB_185_H #undef HAVE_DB_185_H
@ -139,12 +136,18 @@
/* Define if you have the <fcntl.h> header file. */ /* Define if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H #undef HAVE_FCNTL_H
/* Define if you have the <gdbm.h> header file. */
#undef HAVE_GDBM_H
/* Define if you have the <limits.h> header file. */ /* Define if you have the <limits.h> header file. */
#undef HAVE_LIMITS_H #undef HAVE_LIMITS_H
/* Define if you have the <malloc.h> header file. */ /* Define if you have the <malloc.h> header file. */
#undef HAVE_MALLOC_H #undef HAVE_MALLOC_H
/* Define if you have the <ndbm.h> header file. */
#undef HAVE_NDBM_H
/* Define if you have the <ndir.h> header file. */ /* Define if you have the <ndir.h> header file. */
#undef HAVE_NDIR_H #undef HAVE_NDIR_H
@ -184,12 +187,6 @@
/* Define if you have the <unistd.h> header file. */ /* Define if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H #undef HAVE_UNISTD_H
/* Define if you have the c_r library (-lc_r). */
#undef HAVE_LIBC_R
/* Define if you have the pthread library (-lpthread). */
#undef HAVE_LIBPTHREAD
#ifdef HAVE_STDDEF_H #ifdef HAVE_STDDEF_H
# include <stddef.h> # include <stddef.h>
#endif #endif