Move libdb2 makefile stuff down into db2 module subtree.
authorKen Raeburn <raeburn@mit.edu>
Wed, 5 Oct 2005 01:29:58 +0000 (01:29 +0000)
committerKen Raeburn <raeburn@mit.edu>
Wed, 5 Oct 2005 01:29:58 +0000 (01:29 +0000)
Some steps towards making module build on Darwin, not there yet.

* aclocal.m4 (KRB5_BUILD_LIBRARY_WITH_DEPS): Substitute DYNOBJEXT and
MAKE_DYNOBJ_COMMAND.
(KRB5_LIB_AUX): Don't define _KDB5_STATIC_LINK.

* config/libnover.in (darwin.exports): New target.
($(LIBBASE)$(DYNOBJEXT)): New target, instead of $(LIBBASE)$(SHLIBVEXT).
(all-libs): Build $(LIBBASE)$(DYNOBJEXT).
(install-shared): Use DYNOBJEXT.

* config/pre.in (DYNOBJEXT, MAKE_DYNOBJ_COMMAND): New variables.
* config/shlib.conf: Set DYNOBJEXT, MAKE_DYNOBJ_COMMAND to the SHLIB versions.
For Darwin, set them to create a .so bundle, and set SHLIB_EXPORT_FILE_DEP to
darwin.exports.

* config/pre.in (DB_DEPLIB, DB_DEPLIB-k5, DB_DEPLIB-sys, DB_VERSION, DB_DEPS,
DB_DEPS-sys, DB_DEPS-k5, DB_DEPS-redirect, DB_LIB, KDB5_DB_LIB): Variables
deleted.
(KDB5_LIBS): Set to just $(KDB5_LIB).

* modules/kdb/db2/Makefile.in (DB_VERSION, DB_DEPS, DB_DEPS-sys, DB_DEPS-k5,
DB_DEPS-redirect, DB_LIB, KDB5_DB_LIB, DB_DEPLIB, DB_DEPLIB-k5, DB_DEPLIB-sys):
Variable definitions moved here from config/pre.in.
(SHLIB_EXPLIBS): Only use gssrpc and KDB5_DB_LIB.

* modules/kdb/db2/libdb2/test/Makefile.in (DB_LIB, DB_DEPLIB): Define here now.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17408 dc483132-0cff-0310-8789-dd5450dbe970

src/ChangeLog
src/aclocal.m4
src/config/ChangeLog
src/config/libnover.in
src/config/pre.in
src/config/shlib.conf
src/modules/kdb/db2/ChangeLog
src/modules/kdb/db2/Makefile.in
src/modules/kdb/db2/libdb2/test/ChangeLog
src/modules/kdb/db2/libdb2/test/Makefile.in

index 15ed1e29b5976214ff225528bcb0ac420adf52c0..7bba21c6062275649355390a509de2ca8342b9c8 100644 (file)
@@ -1,5 +1,9 @@
 2005-10-04  Ken Raeburn  <raeburn@mit.edu>
 
+       * aclocal.m4 (KRB5_BUILD_LIBRARY_WITH_DEPS): Substitute DYNOBJEXT
+       and MAKE_DYNOBJ_COMMAND.
+       (KRB5_LIB_AUX): Don't define _KDB5_STATIC_LINK.
+
        * configure.in: Don't configure util/db2.
 
 2005-09-26  Ken Raeburn  <raeburn@mit.edu>
index 77d876aa09a761bbfeceb4e08e1c83253e71ff80..dfcbdca1feef3c9316cd1b7f8977384e8b45a8e5 100644 (file)
@@ -1209,7 +1209,10 @@ AC_SUBST(SHLIBVEXT)
 AC_SUBST(SHLIBSEXT)
 AC_SUBST(DEPLIBEXT)
 AC_SUBST(PFLIBEXT)
-AC_SUBST(LIBINSTLIST)])
+AC_SUBST(LIBINSTLIST)
+AC_SUBST(DYNOBJEXT)
+AC_SUBST(MAKE_DYNOBJ_COMMAND)
+])
 
 dnl
 dnl KRB5_BUILD_LIBOBJS
@@ -1272,7 +1275,7 @@ else
        OBJLISTS=OBJS.ST
        LIBINSTLIST=install-static
        DEPLIBEXT=$STLIBEXT
-       CFLAGS="$CFLAGS -D_KDB5_STATIC_LINK"
+#      CFLAGS="$CFLAGS -D_KDB5_STATIC_LINK"
 fi
 
 # Check whether to build shared libraries.
index 7d15d0b504a3d0bd321cff8eacce275550859ffa..42fcc1e88cb90802a32311af4b6df74ea7a95151 100644 (file)
@@ -1,3 +1,21 @@
+2005-10-04  Ken Raeburn  <raeburn@mit.edu>
+
+       * libnover.in (darwin.exports): New target.
+       ($(LIBBASE)$(DYNOBJEXT)): New target, instead of
+       $(LIBBASE)$(SHLIBVEXT).
+       (all-libs): Build $(LIBBASE)$(DYNOBJEXT).
+       (install-shared): Use DYNOBJEXT.
+
+       * pre.in (DYNOBJEXT, MAKE_DYNOBJ_COMMAND): New variables.
+       * shlib.conf: Set DYNOBJEXT, MAKE_DYNOBJ_COMMAND to the SHLIB
+       versions.  For Darwin, set them to create a .so bundle, and set
+       SHLIB_EXPORT_FILE_DEP to darwin.exports.
+
+       * pre.in (DB_DEPLIB, DB_DEPLIB-k5, DB_DEPLIB-sys, DB_VERSION,
+       DB_DEPS, DB_DEPS-sys, DB_DEPS-k5, DB_DEPS-redirect, DB_LIB,
+       KDB5_DB_LIB): Variables deleted.
+       (KDB5_LIBS): Set to just $(KDB5_LIB).
+
 2005-09-01  Marc Aurele La France  <tsi@ualberta.ca>
 
        * shlib.conf (case *-*-aix5.3*):  Generate proper shared libraries
index 45db93623e90adee0e9f877c6d29bbc4d163f3d3..d063a48f2459f92ad321c0b447d28c639ebd50aa 100644 (file)
@@ -37,10 +37,10 @@ SHLIBVEXT=$(SHLIBEXT)
 LIBLIST=$(LIBBASE)$(SHLIBEXT)
 LIBINSTLIST=install-shared
 
-$(LIBBASE)$(SHLIBVEXT): $(SHOBJLISTS) $(SHLIB_EXPDEPS) $(SHLIB_EXPORT_FILE_DEP)
+$(LIBBASE)$(DYNOBJEXT): $(SHOBJLISTS) $(SHLIB_EXPDEPS) $(SHLIB_EXPORT_FILE_DEP)
        $(RM) $@
-       @echo "building shared $(LIBBASE) library"
-       set -x; objlist=`$(PARSE_OBJLISTS) $(SHOBJLISTS)` && $(MAKE_SHLIB_COMMAND)
+       @echo "building dynamic $(LIBBASE) object"
+       set -x; objlist=`$(PARSE_OBJLISTS) $(SHOBJLISTS)` && $(MAKE_DYNOBJ_COMMAND)
 
 binutils.versions: $(SHLIB_EXPORT_FILE) Makefile
        echo >  binutils.versions "HIDDEN { local: __*; _rest*; _save*; *; };"
@@ -76,11 +76,15 @@ hpux10.exports: $(SHLIB_EXPORT_FILE) Makefile
        echo "+e errno" >> hpux10.tmp
        mv -f hpux10.tmp hpux10.exports
 
+darwin.exports: $(SHLIB_EXPORT_FILE) Makefile
+       $(RM) darwin.exports
+       sed "s/^/_/" < $(SHLIB_EXPORT_FILE) > darwin.exports
+
 $(TOPLIBD)/$(LIBBASE)$(SHLIBEXT): $(LIBBASE)$(SHLIBEXT)
        $(RM) $@
        (cd $(TOPLIBD) && $(LN_S) $(RELDIR)/$(LIBBASE)$(SHLIBEXT) .)
 
-all-libs: $(LIBLIST)
+all-libs: $(LIBBASE)$(DYNOBJEXT) # $(LIBLIST)
 
 clean-libs:
        $(RM) $(LIBBASE)$(SHLIBEXT)
@@ -88,8 +92,8 @@ clean-libs:
 
 install-libs: $(LIBINSTLIST)
 install-shared:
-       $(RM) $(DESTDIR)$(KRB5_DB_MODULE_DIR)/$(LIBBASE)$(SHLIBEXT)
-       $(INSTALL_SHLIB) $(LIBBASE)$(SHLIBEXT) $(DESTDIR)$(KRB5_DB_MODULE_DIR)
+       $(RM) $(DESTDIR)$(KRB5_DB_MODULE_DIR)/$(LIBBASE)$(DYNOBJEXT)
+       $(INSTALL_SHLIB) $(LIBBASE)$(DYNOBJEXT) $(DESTDIR)$(KRB5_DB_MODULE_DIR)
 
 Makefile: $(SRCTOP)/config/libnover.in
 $(thisconfigdir)/config.status: $(SRCTOP)/config/shlib.conf
index 9ab4f65d8c84652d55c14bc7357440e6529be250..d4e270e344876c39e9f0bd4b87c82c6c8405f6f3 100644 (file)
@@ -304,9 +304,6 @@ DEPLIBEXT=@DEPLIBEXT@
 KADMCLNT_DEPLIB        = $(TOPLIBD)/libkadm5clnt$(DEPLIBEXT)
 KADMSRV_DEPLIB = $(TOPLIBD)/libkadm5srv$(DEPLIBEXT)
 KDB5_DEPLIB    = $(TOPLIBD)/libkdb5$(DEPLIBEXT)
-DB_DEPLIB      = $(DB_DEPLIB-@DB_VERSION@)
-DB_DEPLIB-k5   = $(TOPLIBD)/libdb$(DEPLIBEXT)
-DB_DEPLIB-sys  =
 GSSRPC_DEPLIB  = $(TOPLIBD)/libgssrpc$(DEPLIBEXT)
 GSS_DEPLIB     = $(TOPLIBD)/libgssapi_krb5$(DEPLIBEXT)
 KRB4_DEPLIB    = @KRB4_DEPLIB@         # $(TOPLIBD)/libkrb4$(DEPLIBEXT)
@@ -348,11 +345,6 @@ SS_VERSION = @SS_VERSION@
 SS_DEPS                = $(SS_DEPS-@SS_VERSION@)
 SS_DEPS-sys    =
 SS_DEPS-k5     = $(BUILDTOP)/include/ss/ss.h $(BUILDTOP)/include/ss/ss_err.h
-DB_VERSION     = @DB_VERSION@
-DB_DEPS                = $(DB_DEPS-@DB_HEADER_VERSION@)
-DB_DEPS-sys    =
-DB_DEPS-k5     = $(BUILDTOP)/include/db.h $(BUILDTOP)/include/db-config.h
-DB_DEPS-redirect = $(BUILDTOP)/include/db.h
 
 # Header file dependencies that might depend on whether krb4 support
 # is compiled.
@@ -368,8 +360,6 @@ SS_LIB              = $(SS_LIB-@SS_VERSION@)
 SS_LIB-sys     = @SS_LIB@
 SS_LIB-k5      = $(TOPLIBD)/libss.a
 KDB5_LIB       = -lkdb5
-DB_LIB         = @DB_LIB@
-KDB5_DB_LIB    = @KDB5_DB_LIB@
 
 DL_LIB         = @DL_LIB@
 
@@ -392,7 +382,7 @@ HESIOD_LIBS = @HESIOD_LIBS@
 
 KRB5_BASE_LIBS = $(KRB5_LIB) $(K5CRYPTO_LIB) $(COM_ERR_LIB) $(SUPPORT_LIB) $(GEN_LIB) $(LIBS)
 KRB4COMPAT_LIBS        = $(KRB4_LIB) $(DES425_LIB) $(KRB5_BASE_LIBS)
-KDB5_LIBS      = $(KDB5_LIB) $(KDB5_DB_LIB)
+KDB5_LIBS      = $(KDB5_LIB)
 GSS_LIBS       = $(GSS_KRB5_LIB)
 # needs fixing if ever used on Mac OS X!
 GSSRPC_LIBS    = -lgssrpc $(GSS_LIBS)
@@ -499,6 +489,10 @@ SHLIBEXT=@SHLIBEXT@
 # usually _p.a
 PFLIBEXT=@PFLIBEXT@
 
+#
+DYNOBJEXT=@DYNOBJEXT@
+MAKE_DYNOBJ_COMMAND=@MAKE_DYNOBJ_COMMAND@
+
 # File with symbol names to be exported, both functions and data,
 # currently not distinguished.
 SHLIB_EXPORT_FILE=$(srcdir)/$(LIBPREFIX)$(LIBBASE).exports
index d0028e2a27295b81d8d5fd7ff4c29c40370d5fc0..941a33ab5bcd926eee5ee0d04ea69f93bf6ca713 100644 (file)
@@ -10,6 +10,10 @@ SHLIBSEXT=.so.s-nobuild
 PFLIBEXT=_p.a
 # Most systems install shared libs as mode 644, etc. while hpux wants 755
 INSTALL_SHLIB='$(INSTALL_DATA)'
+# Most systems use the same objects for shared libraries and dynamically
+# loadable objects.
+DYNOBJEXT='$(SHLIBEXT)'
+MAKE_DYNOBJ_COMMAND='$(MAKE_SHLIB_COMMAND)'
 #
 use_linker_init_option=no
 use_linker_fini_option=no
@@ -273,6 +277,9 @@ mips-*-netbsd*)
        SHLIBSEXT='.$(LIBMAJOR).dylib'
        SHLIB_EXPFLAGS='$(SHLIB_DIRS) $(SHLIB_EXPLIBS)'
        SHLIBEXT=.dylib
+       DYNOBJEXT=.so
+       SHLIB_EXPORT_FILE_DEP=darwin.exports
+       MAKE_DYNOBJ_COMMAND='$(CC) -bundle $(CFLAGS) -bundle_loader $(BUILDTOP)/kdc/krb5kdc $(LDFLAGS) -o $@ $$objlist $(SHLIB_EXPFLAGS) -exported_symbols_list darwin.exports'
        LDCOMBINE='$(CC) -undefined warning -dynamiclib -compatibility_version $(LIBMAJOR) -current_version $(LIBMAJOR).$(LIBMINOR) -install_name "$(KRB5_LIBDIR)/$(LIBPREFIX)$(LIBBASE)$(SHLIBVEXT)" $(CFLAGS) $(LDFLAGS)'
        CC_LINK_SHARED='$(CC) $(PROG_LIBPATH) -dynamic $(CFLAGS) $(LDFLAGS)'
        CC_LINK_STATIC='$(CC) $(PROG_LIBPATH) $(CFLAGS) $(LDFLAGS)'
index 23c4afcd78f7d4881da469e0978eeab90ffbae06..6044086024eff6d3c39040128c836346f190af24 100644 (file)
@@ -5,8 +5,11 @@
        used.
        * Makefile.in (DBDIR): Updated.
        ($(DB_DEPS)): Depend on all-recurse.
+       (DB_VERSION, DB_DEPS, DB_DEPS-sys, DB_DEPS-k5, DB_DEPS-redirect,
+       DB_LIB, KDB5_DB_LIB, DB_DEPLIB, DB_DEPLIB-k5, DB_DEPLIB-sys):
+       Variable definitions moved here from config/pre.in.
 
-       * Makefile.in (SHLIB_EXPLIBS): Only use gssrpc.
+       * Makefile.in (SHLIB_EXPLIBS): Only use gssrpc and KDB5_DB_LIB.
        * configure.in: Set enable_shared=yes.
 
        * kdb_xdr.c (krb5_dbe_create_key_data, krb5_dbe_update_tl_data,
index cf1763e244c7462f03313cc774652f39e335ef70..9f601779628d58c50a3ea3a91a1bc750075f26ac 100644 (file)
@@ -9,6 +9,17 @@ PROG_RPATH=$(KRB5_LIBDIR)
 
 LOCALINCLUDES = -I../../../lib/kdb -I$(srcdir)/../../../lib/kdb
 
+DB_VERSION     = @DB_VERSION@
+DB_DEPS                = $(DB_DEPS-@DB_HEADER_VERSION@)
+DB_DEPS-sys    =
+DB_DEPS-k5     = $(BUILDTOP)/include/db.h $(BUILDTOP)/include/db-config.h
+DB_DEPS-redirect = $(BUILDTOP)/include/db.h
+DB_LIB         = @DB_LIB@
+KDB5_DB_LIB    = @KDB5_DB_LIB@
+DB_DEPLIB      = $(DB_DEPLIB-@DB_VERSION@)
+DB_DEPLIB-k5   = $(TOPLIBD)/libdb$(DEPLIBEXT)
+DB_DEPLIB-sys  =
+
 LIBBASE=db2
 LIBMAJOR=0
 LIBMINOR=0
@@ -20,8 +31,9 @@ SHLIB_EXPDEPS = \
        $(GSSRPC_DEPLIBS) \
        $(TOPLIBD)/libk5crypto$(SHLIBEXT) \
        $(TOPLIBD)/libkrb5$(SHLIBEXT)
-SHLIB_EXPLIBS= -lgssrpc # $(GSSRPC_LIBS) -lkrb5 -lcom_err -lk5crypto $(KDB5_DB_LIB) \
-       $(SUPPORT_LIB) $(LIBS)
+SHLIB_EXPLIBS= -lgssrpc $(KDB5_DB_LIB)
+# $(GSSRPC_LIBS) -lkrb5 -lcom_err -lk5crypto $(KDB5_DB_LIB) $(SUPPORT_LIB) $(LIBS)
+
 SHLIB_DIRS=-L$(TOPLIBD)
 SHLIB_RDIRS=$(KRB5_LIBDIR)
 
index aad74b4c77fefc838d9569a0531a0ee50c5404df..fbd5dcccb8cbd67095beb95ea3c347fe09e0eb57 100644 (file)
@@ -1,6 +1,7 @@
 2005-10-04  Ken Raeburn  <raeburn@mit.edu>
 
        * Makefile.in (BUILDTOP, myfulldir): Updated for directory move.
+       (DB_LIB, DB_DEPLIB): Define here now.
 
 2004-08-27  Ken Raeburn  <raeburn@mit.edu>
 
index 5df1d2f600ac6b4cf552596ec1cd383734ab11fa..3b9253de76dd05a9a3e0a2c072b1e79033267cc5 100644 (file)
@@ -14,6 +14,9 @@ PROG_RPATH=$(KRB5_LIBDIR)
 
 KRB5_RUN_ENV= @KRB5_RUN_ENV@
 
+DB_LIB         = -ldb
+DB_DEPLIB      = $(TOPLIBD)/libdb$(DEPLIBEXT)
+
 all::
 
 dbtest: dbtest.o $(DB_DEPLIB)