Commit d6efd698 authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

Replace build templates and related files with Autoconf

parent 58dada6f
Copyright (c) 1992-1996 Regents of the University of Michigan.
Copyright 1998 Net Boolean Incorporated
All rights reserved.
Redistribution and use in source and binary forms are permitted
provided that this notice is preserved and that due credit is given
to the University of Michigan at Ann Arbor. The name of the University
may not be used to endorse or promote products derived from this
software without specific prior written permission. This software
is provided ``as is'' without express or implied warranty.
to the authors. The name of the Net Boolean Incorporated may not be
used to endorse or promote products derived from this software
without specific prior written permission. This software is
provided ``as is'' without express or implied warranty.
This work is derived, in part, from University of Michigan LDAPv3.3.
Please see the file UM-Copyright for details.
This work also contains patches and fixes from public sources
(primarily the Internet Community).
#-----------------------------------------------------------------------------
# Copyright (c) 1994 Regents of the University of Michigan.
# All rights reserved.
#
# Redistribution and use in source and binary forms are permitted
# provided that this notice is preserved and that due credit is given
# to the University of Michigan at Ann Arbor. The name of the University
# may not be used to endorse or promote products derived from this
# software without specific prior written permission. This software
# is provided ``as is'' without express or implied warranty.
#
# LDAP common Make defines (included in all but top-level Makefile)
#
#-----------------------------------------------------------------------------
#############################################################################
## Edit the following variables to have appropriate values for your system ##
#############################################################################
#############################################################################
## LDAP install paths ##
#############################################################################
#
# by default, everything is installed below INSTROOT
# servers, config files, etc. are put in ETCDIR
# include files get put in INCLUDEDIR
# libraries are put in LIBDIR
# man pages are put under MANDIR
# programs end-users will run are put in BINDIR
#
INSTROOT=/usr/local
ETCDIR= $(INSTROOT)/etc
INCLUDEDIR= $(INSTROOT)/include
LIBDIR= $(INSTROOT)/lib
MANDIR= $(INSTROOT)/man
BINDIR= $(INSTROOT)/bin
#
# if you want things to run in a different directory from where they
# are installed, set this accordingly (this path gets compiled into a
# few binaries). otherwise, leave it alone.
RUNTIMEETCDIR= $(ETCDIR)
#############################################################################
## General compiler options ##
#############################################################################
# Passed to every compile (cc or gcc). This is where you put -O or -g, etc.
#EXTRACFLAGS=-g
# Passed to every link (ld). Include -g here if you did in EXTRACFLAGS.
#EXTRALDFLAGS=-g
#############################################################################
## If you are NOT using Kerberos authentication, you can skip this section.##
#############################################################################
#
# Otherwise, to enable kerberos authentication, uncomment KERBEROS (and
# AFSKERBEROS if you are running the AFS version of kerberos). Also
# uncomment and change the various KRB* lines to point to where the
# kerberos libraries and include files are installed at your site.
#
#KERBEROS=-DKERBEROS
#AFSKERBEROS=-DAFSKERBEROS
#KRBINCLUDEFLAG = -I/usr/local/kerberos/include
#KRBLIBFLAG = -L/usr/local/kerberos/lib
#KRBLIBS = -lkrb -ldes
#############################################################################
## ISODE is required ONLY to build the ldap <-> X.500 server (ldapd) ##
## If you don't want to build it, you can skip this section. ##
#############################################################################
#
# To build the ldap server, uncomment the HAVEISODE line,
# and the section describing build settings for your version of isode.
#
#HAVEISODE = yes
# If you compiled ISODE with TURBO_DISK defined, uncomment this
#ISODETURBOLIBS = -lgdbm
# uncomment these to have ldapd "pretty print" protocol elements w/debugging
#PEPSY_DUMP=-DPEPSY_DUMP
#PEPSY=/usr/local/ic/bin/pepsy
# uncommment this line to have ldapd load PP syntax handlers
# you'll also need to add -lpp to ISODEBASELIBS below
#LDAP_USE_PP=-DLDAP_USE_PP
# uncomment NO_SETPROCTITLE to have ldapd NOT change its title
#NO_SETPROCTITLE=-DNOSETPROCTITLE
#
# ISODE Consortium release build settings
# You should change the next line so that ICRELEASE matches the (integer)
# version number of whatever IC release you have, e.g. 1, 2, or 3 and
# also uncomment the next 5 lines.
#ICRELEASE=-DICRELEASE=1
#ISODEPACKAGE=-DISODEPACKAGE=IC
#ISODEINCLUDEFLAG= -I/usr/local/ic/include/isode -I/usr/local/ic/include
#ISODELIBFLAG = -L/usr/local/ic/lib
#ISODEBASELIBS = -lisode
#
# Freely available ISODE 8.0 release build settings (uncomment the next 4 lines)
#ISODEPACKAGE=-DISODEPACKAGE
#ISODEINCLUDEFLAG= -I/usr/local/isode/include
#ISODELIBFLAG = -L/usr/local/isode/lib
#ISODEBASELIBS = -ldsap -lisode
#
# NEXOR ISODE release build settings (uncomment the next 4 lines)
#ISODEPACKAGE=-DISODEPACKAGE=XT
#ISODEINCLUDEFLAG= -I/usr/include/isode
#ISODELIBFLAG = -L/usr/local/lib -L/usr/sunlink/osi/lib
#ISODEBASELIBS = -lxtpp -lresolv -lxtdsap -lxtisode -losi
#############################################################################
## If you don't want to run slapd, skip this section. ##
#############################################################################
#
# To build slapd (the stand-alone ldap daemon), uncomment the MAKESLAPD
# line and select the SLAPD_BACKENDS you want to use. If you enable the
# LDBM backend, also select one of the LDBM backends.
MAKESLAPD= yes
#
# remove the defines for backends you don't want to enable
SLAPD_BACKENDS= -DLDAP_LDBM -DLDAP_SHELL -DLDAP_PASSWD
#
# If you have included -DLDAP_LDBM in the SLAPD_BACKENDS line you need
# to specify which low-level database package to use. There are
# four choices: Berkeley db b-tree, Berkeley db hash, GNU dbm, or ndbm.
#
# berkeley db btree package
#LDBMBACKEND=-DLDBM_USE_DBBTREE
#LDBMINCLUDE=-I/usr/local/db/include
#LDBMLIB=-ldb
# berkeley db hash package
#LDBMBACKEND=-DLDBM_USE_DBHASH
#LDBMINCLUDE=-I/usr/local/db/include
#LDBMLIB=-ldb
# gnu dbm (gdbm)
#LDBMBACKEND=-DLDBM_USE_GDBM
#LDBMINCLUDE=-I/usr/local/gdbm/include
#LDBMLIB=-lgdbm
# standard unix ndbm
LDBMBACKEND=-DLDBM_USE_NDBM
#
# if you want to use a non-default threads package change these lines
#THREADS=-DNO_THREADS
#THREADSLIB=
#############################################################################
## The following options are used by the xax500 client. If you haven't ##
## retrieved the xax500 source and dropped it into the "clients" ##
## directory, you can skip this section. ##
#############################################################################
#
# location of your X include files
#XINCLUDES= -I/usr/X11/include
#
# location of your X libraries
#XLIBDIRS=-L/usr/X11/lib
#
# include any extra X libraries you need here
# the following works with sunos 4 and X11R5
#XLIBS = $(XLIBDIRS) -lXm -lXt -lX11
# the following has been known to work with Solaris 2.4 and X11R6
#XLIBS = $(XLIBDIRS) -lXm -lXext -lSM -lICE -lXpm -lXt -lX11
#############################################################################
## If you don't want to do auto-translation of character sets, skip this ##
#############################################################################
#
# Otherwise, uncomment this line and set the following options.
#STR_TRANSLATION=-DSTR_TRANSLATION
#
# remove the defines for LDAP client library T.61 character translation
# you do not need. If you use LDAP_CHARSET_8859, replace the '1' in "88591"
# with the number of the particular character set you use. E.g., use "88594"
# if you use the ISO 8859-4 chracter set.
#LIBLDAP_CHARSETS=-DLDAP_CHARSET_8859="88591"
#
# uncomment one these lines to enable automatic T.61 translation by default
#LIBLDAP_DEF_CHARSET=-DLDAP_DEFAULT_CHARSET=LDAP_CHARSET_8859
#############################################################################
## General options ##
#############################################################################
# uncomment this line to enable debugging code (a good idea)
LDAP_DEBUG=-DLDAP_DEBUG
# uncomment this line to turn on a few U of Michigan specific things
#UOFM=-DUOFM
# uncomment this line to delete a few printfs in the lber and ldap libraries.
#NO_USERINTERFACE=-DNO_USERINTERFACE
# uncomment this line to include Connectionless LDAP support
#CLDAP=-DCLDAP
# uncomment this line to eliminate local caching support in the libldap
#NO_CACHE=-DNO_CACHE
# uncomment this line to enable support for LDAP referrals in libldap
LDAP_REFERRALS=-DLDAP_REFERRALS
# uncomment this line to use soundex for approximate matches in slapd.
# the default is to use the metaphone algorithm.
#PHONETIC=-DSOUNDEX
#
# You will usually NOT need to edit this file at all: instead, edit the
# Make-common file. See the LDAP INSTALL file for more information.
#
#-----------------------------------------------------------------------------
# Copyright (c) 1994 Regents of the University of Michigan.
# All rights reserved.
#
# Redistribution and use in source and binary forms are permitted
# provided that this notice is preserved and that due credit is given
# to the University of Michigan at Ann Arbor. The name of the University
# may not be used to endorse or promote products derived from this
# software without specific prior written permission. This software
# is provided ``as is'' without express or implied warranty.
#
# LDAP lightweight X.500 Directory access top level makefile
#
#-----------------------------------------------------------------------------
#
############################################################################
# #
# Usually you will not need to edit anything in this file #
# #
############################################################################
#
# Note that these definitions of standard Unix utilities are only used
# in this Makefile. The Make-common (and .make-platform) files have a
# similar set of definitions that are used in all the other LDAP Makefiles.
#
RM=rm -f
MV=mv -f
CP=cp
CAT=cat
PWD=pwd
TAIL=tail
CHMOD=chmod
FIND=find
SED=sed
LN=ln -s
MKDIR=mkdir
GREP=grep
DIRNAME=dirname
BASENAME=basename
TAR=tar
COMPRESS=compress
CO=co
CI=ci
SRCDIRS= include libraries clients servers doc
TESTDIR= tests
#
# LDAPSRC is used by the links rule
#
LDAPSRC= ..
#
# rules to make the software
#
all: makeconfig
@echo "making all"
@for i in $(SRCDIRS); do \
echo; echo " cd $$i; $(MAKE) $(MFLAGS) all"; \
( cd $$i; $(MAKE) $(MFLAGS) all ); \
done
lib-only: makeconfig
@echo "making libraries only"
@echo " cd include; $(MAKE) $(MFLAGS) all"; \
cd include; $(MAKE) $(MFLAGS) all
@echo " cd libraries; $(MAKE) $(MFLAGS) all"; \
cd libraries; $(MAKE) $(MFLAGS) all
#
# rules to install the software
#
install: makeconfig
@for i in $(SRCDIRS); do \
echo; echo "cd $$i; $(MAKE) $(MFLAGS) install"; \
( cd $$i; $(MAKE) $(MFLAGS) install ); \
done
inst-lib: makeconfig
@echo "cd libraries; $(MAKE) $(MFLAGS) install"
@( cd libraries; $(MAKE) $(MFLAGS) install )
#
# rules to test the LDAP software
#
test: all
@echo " cd $(TESTDIR); $(MAKE) $(MFLAGS) all"; \
( cd $(TESTDIR); $(MAKE) $(MFLAGS) all );
#
# rules to make clean
#
clean: FORCE
@if [ -f .makefiles ]; then \
for i in $(SRCDIRS) $(TESTDIR); do \
echo; echo "cd $$i; $(MAKE) $(MFLAGS) clean"; \
( cd $$i; $(MAKE) $(MFLAGS) clean ); \
done; \
fi; \
( for d in ./obj-*; do \
if [ $$d != "./obj-*" ]; then \
( echo "making clean in $$d..."; \
cd $$d; $(MAKE) $(MFLAGS) clean; ) \
else \
exit 0; \
fi; \
done )
veryclean: FORCE
@echo; echo "cd build; $(MAKE) $(MFLAGS) -f Make-template veryclean"; \
( cd build; $(MAKE) $(MFLAGS) -f Make-template veryclean ); \
if [ -f .makefiles ]; then \
for i in $(SRCDIRS) $(TESTDIR); do \
echo; echo "cd $$i; $(MAKE) $(MFLAGS) veryclean"; \
( cd $$i; $(MAKE) $(MFLAGS) veryclean ); \
done; \
echo "finding and removing Makefiles..."; \
for i in `$(FIND) . -type d -print`; do \
if [ -f $$i/Make-template ]; then \
echo "removing file $$i/Makefile"; \
$(RM) $$i/Makefile; \
fi; \
done; \
echo "removing file .makefiles"; \
$(RM) .makefiles; \
fi; \
( for d in ./obj-*; do \
if [ $$d != "./obj-*" ]; then \
echo "removing $$d..."; $(RM) -r $$d; \
else \
exit 0; \
fi; \
done ); \
if [ -f .make-platform ]; then \
echo "removing link .make-platform"; \
$(RM) .make-platform; \
else \
exit 0; \
fi
#
# rules to make depend
#
#
depend: makeconfig
@echo "making depend everywhere"; \
echo " cd include; $(MAKE) $(MFLAGS) all"; \
( cd include; $(MAKE) $(MFLAGS) all ); \
for i in $(SRCDIRS); do \
echo; echo "cd $$i; $(MAKE) $(MFLAGS) depend"; \
( cd $$i; $(MAKE) $(MFLAGS) depend ); \
done; \
$(MAKE) $(MFLAGS) makefiles
#
# rules to check out and in Make-template files
#
co-mktmpls: FORCE
@echo "checking out Make-template files..."; \
for mkfile in `$(FIND) . -name Make-template -type f -print`; do \
$(CO) -l $$mkfile; \
done
ci-mktmpls: FORCE
@echo "enter a one-word log message:"; \
read logmsg; \
echo "checking in Make-template files..."; \
for mkfile in `$(FIND) . -name Make-template -type f -print`; do \
$(CI) -m$$logmsg -u $$mkfile; \
done
lib-depend: makeconfig
@echo "cd libraries; $(MAKE) $(MFLAGS) depend"
@( cd libraries; $(MAKE) $(MFLAGS) depend )"
#
# rules to cut a new ldap distribution
#
distribution: makeconfig checkin tar
checkin: FORCE
@-VERSION=V`cat ./build/version | $(SED) -e 's/\.//'` ; \
echo "Checking in version $$VERSION"; \
for i in `$(FIND) . -name \*,v -print | \
$(SED) -e 's%RCS/%%' -e 's%,v%%'`; \
do ( \
ci -m"pre-version $$VERSION check-in" -u $$i; \
rcs -N$$VERSION: $$i ) \
done
tar: veryclean
@PWD=`pwd`; \
$(RM) ./Make-common; \
$(CP) ./Make-common.dist ./Make-common; \
$(CHMOD) 644 ./Make-common; \
$(RM) ./include/ldapconfig.h.edit; \
$(CP) ./include/ldapconfig.h.dist ./include/ldapconfig.h.edit; \
$(CHMOD) 644 ./include/ldapconfig.h.edit; \
BASE=`$(BASENAME) $$PWD`; XFILE=/tmp/ldap-x.$$$$; \
( cd .. ; $(CAT) $$BASE/exclude >$$XFILE; \
$(FIND) $$BASE -name RCS -print >> $$XFILE ; \
$(FIND) $$BASE -name obj-\* -print >> $$XFILE ; \
$(FIND) $$BASE -name tags -print >> $$XFILE ; \
$(TAR) cvfX ./$$BASE.tar $$XFILE $$BASE; \
); \
$(RM) $$XFILE; \
echo "compressing ../$$BASE.tar..."; \
$(COMPRESS) ../$$BASE.tar
#
# rule to force check for change of platform
#
platform: FORCE
@if [ -f .make-platform ]; then \
echo "removing old link .make-platform"; \
$(RM) .make-platform; \
fi; \
$(MAKE) $(MFLAGS) .make-platform
makeconfig: .makefiles buildtools
.make-platform:
@if [ -f /usr/bin/swconfig ]; then \
UNAME=./build/uname.sh; \
elif [ -f /bin/uname ]; then \
UNAME=/bin/uname; \
elif [ -f /usr/bin/uname ]; then \
UNAME=/usr/bin/uname; \
else \
UNAME=./build/uname.sh; \
fi; \
if [ -z "$$UNAME" ]; then \
echo "unknown platform (no $$UNAME or /usr/bin/uname)"; \
echo "see the file build/PORTS for more information."; \
exit 1; \
else \
OS=`$$UNAME -s` ; OSRELEASE=`$$UNAME -r` ; \
OSVERSION=`$$UNAME -v` ; \
case $$OS in \
SunOS) \
if [ $$OSRELEASE -gt "5" -o $$OSRELEASE -lt "4" ]; then \
echo "SunOS release $$OSRELEASE unknown..."; exit 1; \
fi; \
if [ $$OSRELEASE -ge "5" ]; then \
PLATFORM="sunos5"; \
else \
PLATFORM="sunos4"; \
fi; \
;; \
ULTRIX) \
PLATFORM="ultrix" \
;; \
OSF1) \
PLATFORM="osf1" \
;; \
AIX) \
PLATFORM="aix" \
;; \
HP-UX) \
PLATFORM="hpux" \
;; \
Linux) \
PLATFORM="linux" \
;; \
NetBSD) \
PLATFORM="netbsd" \
;; \
FreeBSD) \
PLATFORM="freebsd" \
;; \
NeXTSTEP) \
PLATFORM="nextstep" \
;; \
SCO) \
PLATFORM="sco" \
;; \
IRIX|IRIX64) \
PLATFORM="irix" \
;; \
*) echo "unknown platform ($$OS $$OSVERSION $$OSRELEASE)..."; \
echo "see the file build/PORTS for more information."; \
exit 1; \
;; \
esac; \
fi; \
CC=$(CC); \
OLDIFS="$$IFS"; \
IFS=":"; \
for dir in $$PATH; do \
if [ -f $$dir/gcc ]; then \
CC=gcc; \
break; \
fi; \
done; \
IFS="$$OLDIFS"; \
$(LN) ./build/platforms/$$PLATFORM-$$CC/Make-platform .make-platform; \
echo ""; \
echo "** Set platform to $$PLATFORM with compiler $$CC..."; \
echo ""
#
# rule to build Makefiles by concatenating Make-template file in each
# subdirectory with global Make-common, .make-platform, and
# build/Make-append files
#
.makefiles: Make-common .make-platform build/Make-append
@echo "making Makefiles..."; \
HDRFILE=/tmp/Makehdr.$$$$; \
DEFSFILE=/tmp/Makedefs.$$$$; \
$(CAT) build/Make-append ./.make-platform ./Make-common > $$DEFSFILE; \
echo "# --------------------------------------------------------" > $$HDRFILE; \
echo "# This file was automatically generated. Do not edit it." >> $$HDRFILE; \
echo "# Instead, edit the Make-common file (located in the root" >> $$HDRFILE; \
echo "# (of the LDAP distribution). See the LDAP INSTALL file" >> $$HDRFILE; \
echo "# for more information." >> $$HDRFILE; \
echo "# --------------------------------------------------------" >> $$HDRFILE; \
echo "#" >> $$HDRFILE; \
for i in `$(FIND) . -type d -print`; do \
if [ -f $$i/Make-template ]; then \
echo " creating $$i/Makefile"; \
$(RM) $$i/Makefile; \
$(CAT) $$HDRFILE $$i/Make-template $$DEFSFILE > $$i/Makefile; \
$(CHMOD) 444 $$i/Makefile; \
fi; \
done; \
$(RM) .makefiles; \
touch .makefiles; \
$(RM) $$HDRFILE $$DEFSFILE
#
# rule to always build makefiles
#
makefiles: FORCE
$(RM) .makefiles
$(MAKE) $(MFLAGS) .makefiles
#
# rule to create any tools we need to build everything else
#
buildtools: FORCE
@echo "making buildtools"
@echo " cd build; $(MAKE) $(MFLAGS)"
@( cd build; $(MAKE) $(MFLAGS) )
#
# rule to make a shadow (linked) build area
#
links: FORCE
@if [ -f /usr/bin/swconfig ]; then \
UNAME=./build/uname.sh; \
elif [ -f /bin/uname ]; then \
UNAME=/bin/uname; \
elif [ -f /usr/bin/uname ]; then \
UNAME=/usr/bin/uname; \
else \
UNAME=./build/uname.sh; \
fi; \
if [ ! -z "$(DEST)" ]; then \
DEST="$(DEST)"; \
else \
DEST=./obj-`$$UNAME -s`-`$$UNAME -r` ; \
fi; \
echo "making links in $$DEST..."; \
LINKLIST=/tmp/ldaplinklist.$$$$; \
$(RM) $$LINKLIST; \
$(MKDIR) $$DEST; \
cd $$DEST; $(LN) $(LDAPSRC) .src; \
$(LN) .src/Makefile . ; \
$(CP) .src/Make-common . ; $(CHMOD) 644 ./Make-common; \
for d in build $(SRCDIRS) $(TESTDIR); do \
( $(MKDIR) $$d; cd $$d; $(LN) ../.src/$$d .src; \
$(LN) .src/Make-template . ; \
$(MAKE) $(MFLAGS) MKDIR="$(MKDIR)" LN="$(LN)" \
-f Make-template links ) ; \
done; \
echo ""; echo "Now type:"; echo " cd $$DEST"; echo "and make there"
FORCE:
# Master Makefile for Net Boolean LDAP
# Copyright 1998 Net Boolean Incorporated
# COPYING RESTRICTIONS APPLY, See COPYING file
SUBDIRS= include libraries clients servers
/* acconfig.h
This file is in the public domain.
Descriptive text for the C preprocessor macros that
the distributed Autoconf macros can define.
No software package will use all of them; autoheader copies the ones
your configure.in uses into your configuration header file templates.
The entries are in sort -df order: alphabetical, case insensitive,
ignoring punctuation (such as underscores). Although this order
can split up related entries, it makes it easier to check whether
a given entry is in the file.
Leave the following blank line there!! Autoheader needs it. */