From f1cc269ff2124f5bd036a27ced623b246389c17a Mon Sep 17 00:00:00 2001 From: Paul Park Date: Fri, 30 Jun 1995 20:22:58 +0000 Subject: [PATCH] Add shared library support git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6215 dc483132-0cff-0310-8789-dd5450dbe970 --- src/util/berk_db/ChangeLog | 8 ++++++++ src/util/berk_db/Makefile.in | 4 ++++ src/util/berk_db/configure.in | 16 ++++++++++++++++ src/util/berk_db/hash/ChangeLog | 5 +++++ src/util/berk_db/hash/Makefile.in | 12 ++++++++++-- src/util/berk_db/hash/configure.in | 1 + 6 files changed, 44 insertions(+), 2 deletions(-) diff --git a/src/util/berk_db/ChangeLog b/src/util/berk_db/ChangeLog index 09ce11de8..eb742538a 100644 --- a/src/util/berk_db/ChangeLog +++ b/src/util/berk_db/ChangeLog @@ -1,3 +1,11 @@ + +Fri Jun 30 14:47:53 EDT 1995 Paul Park (pjpark@mit.edu) + * configure.in - Add --enable-shared check for building libdb shared. + While we won't use libdb shared explicitly, we might as well + build it since we have to go through the trouble of building + the shared objects for libkrb5. + * Makefile.in - Add shared library rules. + Fri Jun 9 18:59:23 1995 * configure.in: Remove standardized set of autoconf macros, which diff --git a/src/util/berk_db/Makefile.in b/src/util/berk_db/Makefile.in index 3d743a00f..a01f73fff 100644 --- a/src/util/berk_db/Makefile.in +++ b/src/util/berk_db/Makefile.in @@ -6,6 +6,10 @@ TST=if test -n "`cat DONE`" ; then LIB_SUBDIRS= hash LIBUPDATE= $(BUILDTOP)/util/libupdate +SHLIB_LIBS= +SHLIB_LDFLAGS= $(LDFLAGS) @SHLIB_RPATH_DIRS@ +SHLIB_LIBDIRS= @SHLIB_LIBDIRS@ +STEXT=@STEXT@ all:: all-$(WHAT) diff --git a/src/util/berk_db/configure.in b/src/util/berk_db/configure.in index 310e77f18..21c702b33 100644 --- a/src/util/berk_db/configure.in +++ b/src/util/berk_db/configure.in @@ -7,4 +7,20 @@ AC_PROG_RANLIB AC_PROG_INSTALL DO_SUBDIRS AppendRule([all:: libdb.a libdb_ranlib]) +V5_SHARED_LIB_OBJS +V5_MAKE_SHARED_LIB(libdb) +AC_ARG_ENABLE([shared], +[ --enable-shared build shared libraries],[ +LinkFileDir([$](TOPLIBD)/libdb.[$](SHEXT), libdb.[$](SHEXT), ../util/berk_db/hash) +AppendRule([all -unix:: [$](TOPLIBD)/libdb.$(SHEXT)]) +AppendRule([install:: libdb.[$](SHEXT) + [$](INSTALL_DATA) libdb.[$](SHEXT) \ + [$](DESTDIR)[$](KRB5_SHLIBDIR)[$](S)libdb.[$](SHEXT)]) +])dnl +if test -n "$krb5_cv_staticlibs_enabled" ; then + AppendRule([install:: libdb.[$](STEXT) + [$](INSTALL_DATA) libdb.[$](STEXT) [$](DESTDIR)[$](KRB5_LIBDIR)[$](S)libdb.[$](STEXT)]) + LinkFileDir([$](TOPLIBD)/libdb.[$](STEXT),libdb.[$](STEXT),../util/berk_db/hash) + AppendRule([all:: [$](TOPLIBD)/libdb.[$](STEXT)]) +fi V5_AC_OUTPUT_MAKEFILE diff --git a/src/util/berk_db/hash/ChangeLog b/src/util/berk_db/hash/ChangeLog index bf0278fca..1817e2d62 100644 --- a/src/util/berk_db/hash/ChangeLog +++ b/src/util/berk_db/hash/ChangeLog @@ -1,3 +1,8 @@ + +Fri Jun 30 14:49:53 EDT 1995 Paul Park (pjpark@mit.edu) + * configure.in - Add shared library object rule. + * Makefile.in - Add shared library object rules. + Wed Jun 28 00:18:16 1995 Mark Eichin * configure.in: use AC_CHECK_FUNCS and check for memmove. diff --git a/src/util/berk_db/hash/Makefile.in b/src/util/berk_db/hash/Makefile.in index 5155a0274..917d5cdc6 100644 --- a/src/util/berk_db/hash/Makefile.in +++ b/src/util/berk_db/hash/Makefile.in @@ -5,6 +5,7 @@ HASH_DEBUGOPTS= .c.o: $(CC) $(CFLAGS) -c $(srcdir)/$*.c +@SHARED_RULE@ CFLAGS = $(CCOPTS) $(DEFS) -D__DBINTERFACE_PRIVATE $(LOCALINCLUDE) $(HASH_DEBUGOPTS) @@ -41,8 +42,15 @@ SRCS= $(srcdir)/hash.c \ $(srcdir)/krb5_ndbm.c \ $(srcdir)/../PORT/clib/mktemp.c -mktemp.o: $(srcdir)/../PORT/clib/mktemp.c +mktemp.o: ../PORT/clib/mktemp.c $(CC) $(CFLAGS) -c $(srcdir)/../PORT/clib/mktemp.c +@SHARED_RULE@ + +all:: all-$(WHAT) + +all-unix:: shared $(OBJS) + +shared: + mkdir shared -all:: $(OBJS) diff --git a/src/util/berk_db/hash/configure.in b/src/util/berk_db/hash/configure.in index e70ffeb43..1eeb404ca 100644 --- a/src/util/berk_db/hash/configure.in +++ b/src/util/berk_db/hash/configure.in @@ -59,4 +59,5 @@ CDEFS_INCLUDE=["-I${srcdir}/../PORT/krb5"] AC_HAVE_HEADERS(sys/cdefs.h, CDEFS_INCLUDE=) AC_SUBST(CDEFS_INCLUDE) SubdirLibraryRule([$(OBJS)]) +V5_SHARED_LIB_OBJS V5_AC_OUTPUT_MAKEFILE -- 2.26.2