From: Ken Raeburn Date: Wed, 5 Oct 2005 01:29:58 +0000 (+0000) Subject: Move libdb2 makefile stuff down into db2 module subtree. X-Git-Tag: ms-bug-test-20060525~125 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=05103f7a0c61dbf937ec7e2264cb6cd966814ed6;p=krb5.git Move libdb2 makefile stuff down into db2 module subtree. 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 --- diff --git a/src/ChangeLog b/src/ChangeLog index 15ed1e29b..7bba21c60 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,9 @@ 2005-10-04 Ken Raeburn + * 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 diff --git a/src/aclocal.m4 b/src/aclocal.m4 index 77d876aa0..dfcbdca1f 100644 --- a/src/aclocal.m4 +++ b/src/aclocal.m4 @@ -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. diff --git a/src/config/ChangeLog b/src/config/ChangeLog index 7d15d0b50..42fcc1e88 100644 --- a/src/config/ChangeLog +++ b/src/config/ChangeLog @@ -1,3 +1,21 @@ +2005-10-04 Ken Raeburn + + * 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 * shlib.conf (case *-*-aix5.3*): Generate proper shared libraries diff --git a/src/config/libnover.in b/src/config/libnover.in index 45db93623..d063a48f2 100644 --- a/src/config/libnover.in +++ b/src/config/libnover.in @@ -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 diff --git a/src/config/pre.in b/src/config/pre.in index 9ab4f65d8..d4e270e34 100644 --- a/src/config/pre.in +++ b/src/config/pre.in @@ -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 diff --git a/src/config/shlib.conf b/src/config/shlib.conf index d0028e2a2..941a33ab5 100644 --- a/src/config/shlib.conf +++ b/src/config/shlib.conf @@ -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)' diff --git a/src/modules/kdb/db2/ChangeLog b/src/modules/kdb/db2/ChangeLog index 23c4afcd7..604408602 100644 --- a/src/modules/kdb/db2/ChangeLog +++ b/src/modules/kdb/db2/ChangeLog @@ -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, diff --git a/src/modules/kdb/db2/Makefile.in b/src/modules/kdb/db2/Makefile.in index cf1763e24..9f6017796 100644 --- a/src/modules/kdb/db2/Makefile.in +++ b/src/modules/kdb/db2/Makefile.in @@ -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) diff --git a/src/modules/kdb/db2/libdb2/test/ChangeLog b/src/modules/kdb/db2/libdb2/test/ChangeLog index aad74b4c7..fbd5dcccb 100644 --- a/src/modules/kdb/db2/libdb2/test/ChangeLog +++ b/src/modules/kdb/db2/libdb2/test/ChangeLog @@ -1,6 +1,7 @@ 2005-10-04 Ken Raeburn * Makefile.in (BUILDTOP, myfulldir): Updated for directory move. + (DB_LIB, DB_DEPLIB): Define here now. 2004-08-27 Ken Raeburn diff --git a/src/modules/kdb/db2/libdb2/test/Makefile.in b/src/modules/kdb/db2/libdb2/test/Makefile.in index 5df1d2f60..3b9253de7 100644 --- a/src/modules/kdb/db2/libdb2/test/Makefile.in +++ b/src/modules/kdb/db2/libdb2/test/Makefile.in @@ -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)