Permit building against either the in-tree version of db2 or a system version
authorKen Raeburn <raeburn@mit.edu>
Fri, 13 Sep 2002 23:06:15 +0000 (23:06 +0000)
committerKen Raeburn <raeburn@mit.edu>
Fri, 13 Sep 2002 23:06:15 +0000 (23:06 +0000)
specified at configure time.

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

src/ChangeLog
src/config/ChangeLog
src/config/pre.in
src/configure.in
src/include/ChangeLog
src/include/Makefile.in
src/util/ChangeLog
src/util/Makefile.in

index a451755e8b1dbe23343b3b7cb7d9ad869f40d099..c8b1cd4651b24da4420f8d9f0013dd451ac7302b 100644 (file)
@@ -3,6 +3,8 @@
        * aclocal.m4 (KRB5_AC_CHOOSE_DB): New macro.
        (CONFIG_RULES): Invoke it.
 
+       * configure.in: Configure util/db2 only if we're going to use it.
+
 2002-09-03  Ken Raeburn  <raeburn@mit.edu>
 
        * aclocal.m4 (KRB_INCLUDE): Put in-tree include dirs before
index 761a0deace9249f7c9272f6e3041c30f8c481935..922a62ca0a6eeeef89f3cde087af2a5a2feafa18 100644 (file)
@@ -1,3 +1,11 @@
+2002-09-13  Ken Raeburn  <raeburn@mit.edu>
+
+       * pre.in (DB_DEPLIB-k5, DB_DEPLIB-sys, DB_DEPS-sys, DB_DEPS-k5,
+       DB_DEPS-redirect): New variables.
+       (DB_DEPLIB, DB_DEPS): Select from them.
+       (DB_LIB): Substitute from configure script.
+       (COM_ERR_VERSION, SS_VERSION, DB_VERSION): New variables.
+
 2002-09-10  Ken Raeburn  <raeburn@mit.edu>
 
        * post.in (depfix2.sed): Pass srcdir and BUILDTOP as additional
index b9237ffdea119094b23067b1c45bda4e5aade8ef..3ce05bda03271909b345483ca3aa9ff1e959246b 100644 (file)
@@ -203,7 +203,9 @@ DEPLIBEXT=@DEPLIBEXT@
 KADMCLNT_DEPLIB        = $(TOPLIBD)/libkadm5clnt$(DEPLIBEXT)
 KADMSRV_DEPLIB = $(TOPLIBD)/libkadm5srv$(DEPLIBEXT)
 KDB5_DEPLIB    = $(TOPLIBD)/libkdb5$(DEPLIBEXT)
-DB_DEPLIB      = $(TOPLIBD)/libdb$(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)
@@ -231,14 +233,23 @@ KADM_COMM_DEPLIBS = $(GSSRPC_DEPLIBS) $(KDB5_DEPLIBS) $(GSSRPC_DEPLIBS)
 KADMSRV_DEPLIBS                = $(KADMSRV_DEPLIB) $(KDB5_DEPLIBS) $(KADM_COMM_DEPLIBS)
 KADMCLNT_DEPLIBS       = $(KADMCLNT_DEPLIB) $(KADM_COMM_DEPLIBS)
 
-# Header file dependencies we might override someday.
+# Header file dependencies we might override.
 # See util/depfix.sed.
+# Also see depend-verify-* in post.in, which wants to confirm that we're using
+# the in-tree versions.
+COM_ERR_VERSION = @COM_ERR_VERSION@
 COM_ERR_DEPS   = $(COM_ERR_DEPS-@COM_ERR_VERSION@)
-COM_ERR_DEPS-sys = # empty
+COM_ERR_DEPS-sys =
 COM_ERR_DEPS-k5        = $(BUILDTOP)/include/com_err.h
+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
 
 # LIBS gets substituted in... e.g. -lnsl -lsocket
 
@@ -249,7 +260,7 @@ SS_LIB              = $(SS_LIB-@SS_VERSION@)
 SS_LIB-sys     = @SS_LIB@
 SS_LIB-k5      = $(TOPLIBD)/libss.a
 KDB5_LIB       = -lkdb5
-DB_LIB         = -ldb
+DB_LIB         = @DB_LIB@
 
 KRB5_LIB                       = $(KRB5_LIB_@LIB_LINK_OPT@)
 KRB5_LIB_libopt                        = -lkrb5
index e08bbffcbb8be4817d912f5e86f3d1df0adc5a2e..45f1bd5bdff5e02ed0e488d6b1c408fc2adb37e0 100644 (file)
@@ -86,7 +86,11 @@ fi
 if test "$SS_VERSION" = k5 ; then
   AC_CONFIG_SUBDIRS(util/ss)
 fi
-AC_CONFIG_SUBDIRS(util/profile util/pty util/db2 include lib/crypto lib/krb5 lib/des425)
+AC_CONFIG_SUBDIRS(util/profile util/pty)
+if test "$DB_VERSION" = k5 ; then
+  AC_CONFIG_SUBDIRS(util/db2)
+fi
+AC_CONFIG_SUBDIRS(include lib/crypto lib/krb5 lib/des425)
 if test -n "$KRB4_LIB"; then
   AC_CONFIG_SUBDIRS(lib/krb4)
 fi
index ef9ff2685d4047f2396e210f131e32577d683c53..0dec7e62d27aa17a4c70aee2d3891033b2ad96e6 100644 (file)
@@ -1,3 +1,11 @@
+2002-09-13  Ken Raeburn  <raeburn@mit.edu>
+
+       * Makefile.in (maybe-make-db.h-sys, maybe-make-db.h-k5): New
+       targets, doing nothing.
+       (maybe-make-db.h-redirect): New target, creates db.h using
+       @DB_HEADER@.
+       (all-unix): Depend on maybe-make-db.h-@DB_HEADER_VERSION@.
+
 2002-09-03  Ken Raeburn  <raeburn@mit.edu>
 
        * fake-addrinfo.h (gaiptr, faiptr, gniptr): Delete duplicate
index 9f067fff5c3655ed3a04c7a1dd915f1fb9539d46..6c6efa06fff5f1fb989c595ca01183c305a519c2 100644 (file)
@@ -15,6 +15,15 @@ all-windows::
        $(MAKE) -$(MFLAGS)
        cd ..
 
+all-unix:: maybe-make-db.h-@DB_HEADER_VERSION@
+
+maybe-make-db.h-k5:
+       : db.h will be installed by util/db2
+maybe-make-db.h-sys:
+       : fall back to system db.h 
+maybe-make-db.h-redirect:
+       test -r db.h || echo '#include <@DB_HEADER@>' > db.h
+
 krb5/autoconf.h: $(srcdir)/krb5/autoconf.h.in
        (cd krb5; $(MAKE) autoconf.h)
 $(srcdir)/krb5/autoconf.h.in: $(srcdir)/krb5/autoconf.stmp
index 69dddcce9736a5f45308a3dbeb935bd9f4ce3418..5eb494bdf2d9137bf5036e0bdf0b5c46a95ce910 100644 (file)
@@ -1,5 +1,8 @@
 2002-09-13  Ken Raeburn  <raeburn@mit.edu>
 
+       * Makefile.in (MY_SUBDIRS): Use MAYBE_DB_@DB_VERSION@.
+       (MAYBE_DB_k5, MAYBE_DB_sys): New variables.
+
        * depfix.sed: Replace db2 headers with $(DB_DEPS).
 
 2002-09-10  Ken Raeburn  <raeburn@mit.edu>
index 28280135e321a6ca051e4fcf9a404873d863145e..1176f2a38f4a2a9cff3ea3631f7eaac1bb0edced 100644 (file)
@@ -7,14 +7,16 @@ mydir=util
 ##WIN32### below in the 'all-windows' target anyways, so just hide this.
 ##WIN32##!if 0
 MY_SUBDIRS=$(MAYBE_ET_@COM_ERR_VERSION@) $(MAYBE_SS_@SS_VERSION@) \
-       profile pty db2 send-pr
+       profile pty $(MAYBE_DB_@DB_VERSION@) send-pr
 ##WIN32##!endif
 BUILDTOP=$(REL)..
 
 MAYBE_ET_k5 = et
 MAYBE_SS_k5 = ss
+MAYBE_DB_k5 = db2
 MAYBE_ET_sys =
 MAYBE_SS_sys =
+MAYBE_DB_sys =
 
 MAC_SUBDIRS = profile et