Skip to content
Snippets Groups Projects
Commit cbd6bada authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

Fixed GDBM bugs.

parent 721a62af
No related branches found
No related tags found
No related merge requests found
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
** instructions in this file before attempting to build the software.
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"
section near the end of this file. If you are planning to run slapd,
you should read the "SLAPD and SLURPD Administrator's Guide", found in
the doc/guides/ directory within the distribution.
section near the end of this file.
If you simply want to build LDAP for a single machine platform, follow
these steps:
1. untar the distribution and cd to the top:
% zcat ldap-3.3.tar.Z | tar xf -
% cd ldap-3.3
% tar xfz ldap-stable.tgz
% cd ldap
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
the software for your site (the files are well-commented):
to list available configuration options.
% vi Make-common
% vi include/ldapconfig.h.edit
The configure script will also use your environmental
variables for determining compiler/linker options.
Note that you should NOT need to edit the Makefile located at the
top of the distribution.
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)
If you just want to see if things will build, you can leave the
configuration alone and change it later.
3. edit the file include/ldapconfig.h.edit to configure
the software for your site (the files are well-commented):
If you have the ISODE package built and want to build the
LDAP-to-X.500 server (ldapd), be sure to uncomment the appropriate
lines near the end of the Make-common file. By default only the
stand-alone server, LDAP libraries and client software are built.
% vi include/ldapconfig.h.edit
3. make the software:
4. Configure the build system
% make
% [env settings] ./configure [options]
If all goes well, then make will figure out what platform you are on,
pick a compiler to use, construct Makefiles, and build everything.
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
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 all goes well, the configure script with auto-detect the
appropriate settings. Use configure enable/with options and/or
environment variables to obtain desired results.
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:
5. Build dependencies
% cd build/platforms/sunos4-cc
% make
% make depend
If you want to run some simple tests after the build is complete, you
can do this:
6. Build the system
% make test
% make
4. install the binaries and man pages. You may need to be superuser to
If all goes well, the system will build as configured. If not,
return to step 4 after reviewing the enable/with options settings.
7. install the binaries and man pages. You may need to be superuser to
do this (depending on where you are installing things):
% su
......@@ -103,34 +77,26 @@ these steps:
Building LDAP For More Than One Platform
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
create a shadow (linked) directory tree where the binaries are placed.
source tree. This is accomplished by using make(1) VPATH support. If
your make(1) program is old and doesn't have VPATH support, install GNU
Make.
Follow these steps for each different platform:
1. move to the directory that matches the platform and compiler you
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:
1. Create a directory for the platform object files.
% cd build/platforms/sunos4-cc
% make links
% mkdir obj-platform
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
1-4 above to accomplish this. For example:
3. Configure the build system
% cd obj-sunos4-cc
% make
% [env settings] ../configure --src-dir=.. [options]
That's all there is to it. You can also create the linked source area(s)
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.
( replace ".." with the appropriate path )
4. Continue as above (starting at step 5).
End of LDAP INSTALL file.
End of OpenLDAP INSTALL file.
UM-LDAP 3.3 README file
OpenLDAP 1.0 README
This is the UM-LDAP version 3.3 distribution. For a description of
what this distribution contains, see the ANNOUNCEMENT file in this
directory. For a description of changes from previous releases,
see the CHANGES file in this directory. For a more detailed
description of how to make and install the distribution, see the
INSTALL file in this directory. For more information on making and
installing slapd, see the "SLAPD and SLURPD Administrator's Guide"
in the doc/guides/ directory.
This is the OpenLDAP version 1.0 distribution.
For a description of what this distribution contains, see the
ANNOUNCEMENT file in this directory. For a description of
changes from previous releases, see the CHANGES file in this
directory. For a more detailed description of how to make an
install the distribution, see the INSTALL file in this directory.
For more information:
http://www.OpenLDAP.org/
MAKING AND INSTALLING THE DISTRIBUTION
You should be able to make and install the distribution with a pretty
standard default configuration by typing the following commands
% make
% ./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
this will build the system
% su
# make install
......@@ -22,18 +42,11 @@ MAKING AND INSTALLING THE DISTRIBUTION
works.
You will probably want to do a little configuration to suit your
site, though. There are two files you might want to edit:
Make-common This file contains definitions for
where things will be installed, where
to find various things, etc. If you
want to build an ldap server, you'll
definitely need to edit this file
site, though. There are one file you might want to edit:
include/ldapconfig.h.edit This file contains #defines used
by many parts of the distribution.
You'll at least want to change
DEFAULT_BASE.
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.
......@@ -42,18 +55,16 @@ DOCUMENTATION
There are man pages for most programs in the distribution and
routines in the various libraries. See ldap(3) for details.
There is a postscript version of an administrator's guide for
slapd in doc/guides/slapd.ps.
There is an LDAP homepage available that contains the latest
There is an OpenLDAP homepage available that contains the latest
LDAP news, releases announcements, pointers to other LDAP resources,
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
problems, report them to this address:
ldap-support@umich.edu
OpenLDAP-bugs@OpenLDAP.org
......@@ -20,6 +20,12 @@
/* define this for LDAP referrals support */
#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 */
#undef SLAPD_PHONETIC
......
This diff is collapsed.
......@@ -221,7 +221,7 @@ if test $ol_with_threads = auto -o $ol_with_threads = posix ; then
fi
# consider threads found
ol_with_threads="posix"
ol_with_threads=found
OL_LINUX_THREADS
......@@ -233,7 +233,7 @@ dnl AC_DEFINE(HAVE_LINUX_THREADS,1)
dnl Now the hard part, how to link
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
dnl try -pthread
......@@ -252,7 +252,7 @@ dnl AC_DEFINE(HAVE_LINUX_THREADS,1)
if test $ol_cv_pthread_flag = yes ; then
LTHREAD_LIBS="$LTHREAD_LIBS -pthread"
ol_link_threads=yes
ol_link_threads=posix
fi
fi
......@@ -260,7 +260,7 @@ dnl AC_DEFINE(HAVE_LINUX_THREADS,1)
dnl try -lpthread
save_LIBS="$LIBS"
AC_CHECK_LIB(pthread, pthread_create, [
ol_link_threads=yes
ol_link_threads=posix
LTHREAD_LIBS="$LTHREAD_LIBS -lpthread"])
LIBS="$save_LIBS"
fi
......@@ -269,7 +269,7 @@ dnl AC_DEFINE(HAVE_LINUX_THREADS,1)
dnl try -lc_r
save_LIBS="$LIBS"
AC_CHECK_LIB(c_r, pthread_create, [
ol_link_threads=yes
ol_link_threads=posix
LTHREAD_LIBS="$LTHREAD_LIBS -lc_r"])
LIBS="$save_LIBS"
fi
......@@ -278,17 +278,22 @@ dnl AC_DEFINE(HAVE_LINUX_THREADS,1)
dnl try DEC Threads
save_LIBS="$LIBS"
AC_CHECK_LIB(pthread, pthread_create, [
ol_link_threads=yes
ol_link_threads=posix
LTHREAD_DEFS="$LTHREAD_DEFS -DDEC_THREADS"
LTHREAD_LIBS="$LTHREAD_LIBS -lpthread -lmach -lexc -lc"],,
[-lmach -lexc -lc])
LIBS="$save_LIBS"
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])
fi
elif test $ol_with_threads = posix ; then
fi
if test $ol_with_threads = posix ; then
AC_MSG_ERROR([could not locate POSIX Threads])
fi
fi
......@@ -307,25 +312,6 @@ if test $ol_link_threads = no ; then
LTHREAD_LIBS=""
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
if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then
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"
if test $ol_cv_lib_db != yes ; then
if test $ol_cv_lib_gdbm != yes ; then
LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
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"
if test $ol_cv_lib_db != yes ; then
if test $ol_cv_lib_ndbm != yes ; then
LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
fi
fi
......
......@@ -73,11 +73,11 @@
/* define this if sys_errlist is not defined in stdio.h or errno.h */
#undef DECL_SYS_ERRLIST
/* define this for connectionless LDAP support */
#undef LDAP_CONNECTIONLESS
/* define this for ACL Group support */
#undef SLAPD_ACLGROUPS
/* define this to remove -lldap cache support */
#undef LDAP_NOCACHE
/* define this for Reverse Lookup support */
#undef SLAPD_RLOOKUPS
/* define this for phonetic support */
#undef SLAPD_PHONETIC
......@@ -94,9 +94,6 @@
/* Define if you have the mktime function. */
#undef HAVE_MKTIME
/* Define if you have the sched_yield function. */
#undef HAVE_SCHED_YIELD
/* Define if you have the select function. */
#undef HAVE_SELECT
......@@ -121,15 +118,15 @@
/* Define if you have the strtod function. */
#undef HAVE_STRTOD
/* Define if you have the strtok_r function. */
#undef HAVE_STRTOK_R
/* Define if you have the strtol function. */
#undef HAVE_STRTOL
/* Define if you have the strtoul function. */
#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. */
#undef HAVE_DB_185_H
......@@ -139,12 +136,18 @@
/* Define if you have the <fcntl.h> header file. */
#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. */
#undef HAVE_LIMITS_H
/* Define if you have the <malloc.h> header file. */
#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. */
#undef HAVE_NDIR_H
......@@ -184,12 +187,6 @@
/* Define if you have the <unistd.h> header file. */
#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
# include <stddef.h>
#endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment