Commit 6f92e197 authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

Add libtool support based upon patch by Bart Hartgers <Hartgers@kfm1.phys.tue.nl>

  Updated to use libtool 1.2 (with FreeBSD3.0 a.out v. elf detection).
  Updated autoconf to 1.12 with sed patch (don't use stock 1.12).
  aclocal.m4 is built using automake's aclocal, v1.3.
  Updated mkdep to support libtool .lo files.
Updated automake provided macros for TERMIOS, STRTOD, MKTIME, PTRDIFF_T
Autoconf now checks to ensure C compiler supports ANSI C prototypes.
Updated make files templates.
parent 1941422b
......@@ -29,3 +29,13 @@ Makefile: Makefile.in config.status
config.status: configure
./config.status --recheck
# force a make all before make install
# only done at the top-level
install-common: all FORCE
clean-local: FORCE
$(RM) config.log
veryclean-local: FORCE
$(RM) config.cache config.status libtool stamp-h stamp-h.in
......@@ -24,6 +24,9 @@
/* define this if sys_errlist is not defined in stdio.h or errno.h */
#undef DECL_SYS_ERRLIST
/* define this if TIOCGWINSZ is defined in sys/ioctl.h */
#undef GWINSZ_IN_SYS_IOCTL
/* define if you have berkeley db */
#undef HAVE_BERKELEY_DB
......@@ -60,6 +63,9 @@
/* define if you have Mach CThreads */
#undef HAVE_MACH_CTHREADS
/* define if you have POSIX termios */
#undef HAVE_POSIX_TERMIOS
/* define if you have PP */
#undef HAVE_PP
......@@ -75,6 +81,9 @@
/* define if your POSIX Threads implementation is circa Draft 4 */
#undef HAVE_PTHREADS_D4
/* define if you have ptrdiff_t */
#undef HAVE_PTRDIFF_T
/* define if you have sched_yield() */
#ifdef __notdef__
/* see second sched_yield define */
......
dnl
dnl OpenLDAP Autoconf Macros
dnl
builtin(include, build/openldap.m4)dnl
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -4,7 +4,7 @@
##
all-common: all-local FORCE
all-common: FORCE
@echo "Making all in `$(PWD)`"
@for i in $(SUBDIRS) $(ALLDIRS); do \
echo " Entering subdirectory $$i"; \
......@@ -12,7 +12,7 @@ all-common: all-local FORCE
echo " "; \
done
install-common: install-local FORCE
install-common: FORCE
@echo "Making install in `$(PWD)`"
@for i in $(SUBDIRS) $(INSTALLDIRS); do \
echo " Entering subdirectory $$i"; \
......@@ -20,7 +20,7 @@ install-common: install-local FORCE
echo " "; \
done
clean-common: clean-local FORCE
clean-common: FORCE
@echo "Making clean in `$(PWD)`"
@for i in $(SUBDIRS) $(CLEANDIRS); do \
echo " Entering subdirectory $$i"; \
......@@ -28,7 +28,7 @@ clean-common: clean-local FORCE
echo " "; \
done
veryclean-common: veryclean-local FORCE
veryclean-common: FORCE
@echo "Making veryclean in `$(PWD)`"
@for i in $(SUBDIRS) $(CLEANDIRS); do \
echo " Entering subdirectory $$i"; \
......@@ -36,7 +36,7 @@ veryclean-common: veryclean-local FORCE
echo " "; \
done
depend-common: depend-local FORCE
depend-common: FORCE
@echo "Making depend in `$(PWD)`"
@for i in $(SUBDIRS) $(DEPENDDIRS); do \
echo " Entering subdirectory $$i"; \
......
##---------------------------------------------------------------------------
##
## Makefile Template for Shared Libraries
##
LINK = $(LTLINK) -version-info $(LIBVERSION)
COMPILE = $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c
MKDEPFLAG = -l
.SUFFIXES: .c .o .lo
.c.lo:
$(COMPILE) $<
$(LIBRARY): version.lo
$(LINK) -rpath $(libdir) -o $@ $(OBJS) version.lo
@$(RM) ../$@; \
(d=`$(PWD)` ; $(LN_S) `$(BASENAME) $$d`/$@ ../$@)
Makefile: $(top_srcdir)/build/lib-shared.mk
##---------------------------------------------------------------------------
##
## Makefile Template for Static Libraries
##
$(LIBRARY): version.o
$(AR) ru $@ $(OBJS) version.o
@$(RANLIB) $@; \
$(RM) ../$@; \
(d=`$(PWD)` ; $(LN_S) `$(BASENAME) $$d`/$@ ../$@)
Makefile: $(top_srcdir)/build/lib-static.mk
......@@ -5,12 +5,6 @@
all-common: $(LIBRARY) $(PROGRAMS)
$(LIBRARY): version.o
$(AR) ru $@ $(OBJS) version.o
@$(RANLIB) $@; \
$(RM) ../$@; \
(d=`$(PWD)` ; $(LN_S) `$(BASENAME) $$d`/$@ ../$@)
version.c: $(OBJS) $(srcdir)/Version.c
$(RM) $@
(u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` \
......@@ -19,7 +13,7 @@ version.c: $(OBJS) $(srcdir)/Version.c
-e "s|%VERSION%|$${v}|" \
< $(srcdir)/Version.c > $@)
install-common: all-common install-local
install-common: FORCE
lint: lint-local FORCE
$(LINT) $(DEFS) $(DEFINES) $(SRCS)
......@@ -27,15 +21,13 @@ lint: lint-local FORCE
lint5: lint5-local FORCE
$(5LINT) $(DEFS) $(DEFINES) $(SRCS)
clean-common: clean-local
clean-common: FORCE
$(RM) $(LIBRARY) ../$(LIBRARY) $(PROGRAMS) $(XPROGRAMS) $(XSRCS) \
*.o a.out core version.c
*.o a.out core version.c *.lo .libs/*
depend-common: depend-local
depend-common: FORCE
$(MKDEP) $(DEFS) $(DEFINES) $(SRCS)
veryclean-common: veryclean-local clean-common
lint-local: FORCE
lint5-local: FORCE
......
This diff is collapsed.
This diff is collapsed.
......@@ -5,7 +5,7 @@
MANDIR=$(mandir)/man$(MANSECT)
install-common: all-common install-local
install-common: FORCE
-$(MKDIR) -p $(MANDIR)
@TMPMAN=/tmp/ldapman.$$$$$(MANCOMPRESSSUFFIX); \
VERSION=`$(CAT) $(VERSIONFILE)`; \
......@@ -31,15 +31,5 @@ install-common: all-common install-local
done; \
$(RM) $$TMPMAN
all-common: all-local
clean-common: clean-local
veryclean-common: veryclean-local clean-local
depend-common: depend-local
lint: lint-local
lint5: lint5-local
# these could be empty
lint-local: FORCE
lint5-local: FORCE
Makefile: $(top_srcdir)/build/lib.mk
......@@ -45,6 +45,12 @@ while :
SED='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;
......
This diff is collapsed.
......@@ -3,26 +3,19 @@
## Makefile Template for Programs
##
all-common: all-local $(PROGRAMS)
all-common: $(PROGRAMS) FORCE
install-common: all-common install-local
clean-common: FORCE
$(RM) $(PROGRAMS) $(XPROGRAMS) $(XSRCS) *.o a.out core .libs/*
clean-common: clean-local
$(RM) $(PROGRAMS) $(XPROGRAMS) $(XSRCS) *.o a.out core
veryclean-common: veryclean-local clean-local
depend-common: depend-local
depend-common: FORCE
$(MKDEP) $(DEFS) $(DEFINES) $(SRCS)
lint: lint-local
lint: FORCE
$(LINT) $(DEFS) $(DEFINES) $(SRCS)
lint5: lint5-local
lint5: FORCE
$(5LINT) $(DEFS) $(DEFINES) $(SRCS)
# these could be empty
lint-local: FORCE
lint5-local: FORCE
Makefile: $(top_srcdir)/build/rules.mk
......@@ -52,22 +52,22 @@ install-common: FORCE
echo "run configure with $(BUILD_OPT) to install $(PROGRAMS)"; \
fi
all-srv: all-local
all-srv: FORCE
install-srv: all-srv install-local
install-srv: FORCE
lint-srv: lint-local
lint-srv: FORCE
$(LINT) $(DEFS) $(DEFINES) $(SRCS)
5lint-srv: lint5-local
5lint-srv: FORCE
$(5LINT) $(DEFS) $(DEFINES) $(SRCS)
clean-srv: clean-local
$(RM) $(PROGRAMS) $(XPROGRAMS) $(XSRCS) *.o a.out core
clean-srv: FORCE
$(RM) $(PROGRAMS) $(XPROGRAMS) $(XSRCS) *.o a.out core .libs/*
depend-srv: depend-local
depend-srv: FORCE
$(MKDEP) $(DEFS) $(DEFINES) $(SRCS)
veryclean-srv: clean-srv veryclean-local
veryclean-srv: clean-srv
Makefile: $(top_srcdir)/build/srv.mk
......@@ -3,10 +3,14 @@
## COPYING RESTRICTIONS APPLY. See COPYRIGHT File in top level directory
## of this package for details.
##
@SET_MAKE@
PACKAGE= @PACKAGE@
VERSION= @VERSION@
@SET_MAKE@
SHELL = /bin/sh
top_builddir = @top_builddir@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
......@@ -40,7 +44,12 @@ AR = ar
LINT = lint
5LINT = 5lint
MKDEP = $(top_srcdir)/build/mkdep -c "$(CC)"
MKDEP = $(top_srcdir)/build/mkdep $(MKDEPFLAG) -c "$(CC)"
LIBTOOL = @LIBTOOL@
LIBVERSION = 0:0:0
LTLINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LFLAGS)
LTINSTALL = $(LIBTOOL) --mode=install $(INSTALL)
# Misc UNIX commands used in makefiles
SED = sed
......@@ -66,12 +75,19 @@ MANCOMPRESSSUFFIX=
# Version
VERSIONFILE = $(top_srcdir)/build/version
INCLUDEDIR = $(top_srcdir)/include
LDAP_INCPATH = -I$(LDAP_INCDIR) -I$(INCLUDEDIR)
LDAP_LIBPATH = -L$(LDAP_LIBDIR)
INCLUDEDIR= $(top_srcdir)/include
LDAP_INCPATH= -I$(LDAP_INCDIR) -I$(INCLUDEDIR)
LDAP_LIBADIR= $(top_builddir)/libraries
LDAP_LIBPATH= -L$(LDAP_LIBADIR)
LDAP_LIBS = $(LDAP_LIBPATH) -lldif -lldap -llber
LDAP_LIBDEPEND = $(LDAP_LIBDIR)/libldif.a $(LDAP_LIBDIR)/libldap.a $(LDAP_LIBDIR)/liblber.a
LDAP_LIBLBER = $(LDAP_LIBADIR)/liblber/liblber.la
LDAP_LIBLDAP = $(LDAP_LIBADIR)/libldap/libldap.la
LDAP_LIBLBER_DEPEND = $(LDAP_LIBDIR)/liblber/liblber.la
LDAP_LIBLDAP_DEPEND = $(LDAP_LIBDIR)/libldap/libldap.la
LDAP_LIBS = $(LDAP_LIBPATH) -lldif $(LDAP_LIBLDAP) $(LDAP_LIBLBER)
LDAP_LIBDEPEND = $(LDAP_LIBDIR)/libldif.a $(LDAP_LIBLDAP) $(LDAP_LIBLBER)
# AutoConfig generated
AC_CC = @CC@
......@@ -91,21 +107,33 @@ LIBS = $(LDAP_LIBS) $(XLIBS) $(AC_LIBS)
CFLAGS = $(AC_CFLAGS) $(DEFS) $(DEFINES)
LDFLAGS = $(AC_LDFLAGS)
all: all-common FORCE
install: install-common FORCE
clean: clean-common FORCE
veryclean: veryclean-common FORCE
depend: depend-common FORCE
all: all-common all-local FORCE
install: install-common install-local FORCE
clean: clean-common clean-local FORCE
veryclean: veryclean-common veryclean-local FORCE
depend: depend-common depend-local FORCE
# empty common rules
all-common:
install-common:
clean-common:
veryclean-common: clean-common FORCE
depend-common:
lint-common:
lint5-common:
# empty local rules
all-local:
install-local:
clean-local:
veryclean-local:
veryclean-local: clean-local FORCE
depend-local:
lint-local:
lint5-local:
veryclean: FORCE
$(RM) Makefile
Makefile: Makefile.in $(top_srcdir)/build/top.mk
# empty rule for forcing rules
......
......@@ -10,10 +10,10 @@ LDAP_INCDIR= ../../include
LDAP_LIBDIR= ../../libraries
rp500 : rpversion.o
$(CC) $(LDFLAGS) -o $@ $(RPOBJS) rpversion.o $(LIBS)
$(LTLINK) -o $@ $(RPOBJS) rpversion.o $(LIBS)
fax500 : fax5version.o
$(CC) $(LDFLAGS) -o $@ $(RPOBJS) fax5version.o $(LIBS)
$(LTLINK) -o $@ $(RPOBJS) fax5version.o $(LIBS)
rpversion.c: ${RPOBJS} $(LDAP_LIBDEPEND)
$(RM) $@
......@@ -31,10 +31,10 @@ fax5version.c: ${FAX5OBJS} $(LDAP_LIBDEPEND)
-e "s|%VERSION%|$${v}|" \
< $(srcdir)/Version.c > $@)
install: $(PROGRAMS) xrpcomp FORCE
install-local: $(PROGRAMS) xrpcomp FORCE
-$(MKDIR) -p $(libexecdir)
$(INSTALL) $(INSTALLFLAGS) -m 755 rp500 $(libexecdir)
$(INSTALL) $(INSTALLFLAGS) -m 755 fax500 $(libexecdir)
$(LTINSTALL) $(INSTALLFLAGS) -m 755 rp500 $(libexecdir)
$(LTINSTALL) $(INSTALLFLAGS) -m 755 fax500 $(libexecdir)
$(SED) -e 's%LIBEXECDIR%$(libexecdir)%' $(srcdir)/xrpcomp > /tmp/xrpcomp.tmp
$(INSTALL) $(INSTALLFLAGS) -m 755 /tmp/xrpcomp.tmp $(libexecdir)/xrpcomp
$(RM) /tmp/xrpcomp.tmp
......@@ -7,7 +7,7 @@ LDAP_INCDIR= ../../include
LDAP_LIBDIR= ../../libraries
in.xfingerd : version.o
$(CC) $(LDFLAGS) -o $@ version.o $(OBJS) $(LIBS)
$(LTLINK) -o $@ version.o $(OBJS) $(LIBS)
version.c: ${OBJS} ${LDAP_LIBDEPEND}
$(RM) $@
......@@ -17,6 +17,6 @@ version.c: ${OBJS} ${LDAP_LIBDEPEND}
-e "s|%VERSION%|$${v}|" \
< $(srcdir)/Version.c > $@)
install: $(PROGRAMS) FORCE
install-local: $(PROGRAMS) FORCE
-$(MKDIR) -p $(libexecdir)
$(INSTALL) $(INSTALLFLAGS) -m 755 in.xfingerd $(libexecdir)
$(LTINSTALL) $(INSTALLFLAGS) -m 755 in.xfingerd $(libexecdir)
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