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
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>
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
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.
+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
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*; *; };"
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)
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
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)
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.
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@
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)
# 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
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
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)'
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,
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
$(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)
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>
KRB5_RUN_ENV= @KRB5_RUN_ENV@
+DB_LIB = -ldb
+DB_DEPLIB = $(TOPLIBD)/libdb$(DEPLIBEXT)
+
all::
dbtest: dbtest.o $(DB_DEPLIB)