Never set krb5_force_static. Instead, set the defaults for building
authorKen Raeburn <raeburn@mit.edu>
Sun, 25 Mar 2007 23:07:09 +0000 (23:07 +0000)
committerKen Raeburn <raeburn@mit.edu>
Sun, 25 Mar 2007 23:07:09 +0000 (23:07 +0000)
shared libraries, and allow a Makefile.in to include a new makefile
fragment for building private (static, not installed) libraries.

Created another makefile fragment to be included to indicate the
shared library has no dependencies.  (Currently this is the case only
for the libdb2 library, which we don't install, but do build for
testing.)  The way we construct the library dependency search path
arguments doesn't work for an empty list on some platforms.

Updated Makefile.in to use @libpriv_frag@ and @libnodeps_frag@ as
necessary.

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

src/aclocal.m4
src/appl/libpty/Makefile.in
src/appl/telnet/libtelnet/Makefile.in
src/config/libnodeps.in [new file with mode: 0644]
src/config/libpriv.in [new file with mode: 0644]
src/config/pre.in
src/lib/apputils/Makefile.in
src/plugins/kdb/db2/libdb2/Makefile.in
src/util/ss/Makefile.in

index aaacac2fffe50dcfd1e980af672e53be7b22441b..c6c6a36bffa0f6f61fe866bd370d5a9a15e3dce0 100644 (file)
@@ -98,6 +98,10 @@ libobj_frag=$srcdir/$ac_config_fragdir/libobj.in
 AC_SUBST_FILE(libobj_frag)
 libnover_frag=$srcdir/$ac_config_fragdir/libnover.in
 AC_SUBST_FILE(libnover_frag)
+libpriv_frag=$srcdir/$ac_config_fragdir/libpriv.in
+AC_SUBST_FILE(libpriv_frag)
+libnodeps_frag=$srcdir/$ac_config_fragdir/libnodeps.in
+AC_SUBST_FILE(libnodeps_frag)
 dnl
 KRB5_AC_PRAGMA_WEAK_REF
 WITH_LDAP
@@ -1119,7 +1123,8 @@ dnl Force static library build.
 
 AC_DEFUN(KRB5_AC_FORCE_STATIC,[dnl
 AC_BEFORE([$0],[KRB5_LIB_AUX])dnl
-krb5_force_static=yes])
+# krb5_force_static=yes
+])
 AC_DEFUN(KRB5_BUILD_LIBRARY_STATIC,
 dnl Use define rather than AC_DEFUN to avoid ordering problems.
 [AC_REQUIRE([KRB5_AC_FORCE_STATIC])dnl
@@ -1244,11 +1249,13 @@ else
        fi
        case "$SHLIBSEXT" in
        .so.s-nobuild)
+               SHLIB_HAVE_MINOR_VERS=no
                LIBLIST='lib$(LIBBASE)$(SHLIBEXT)'
                LIBLINKS='$(TOPLIBD)/lib$(LIBBASE)$(SHLIBEXT) $(TOPLIBD)/lib$(LIBBASE)$(SHLIBVEXT)'
                LIBINSTLIST="install-shared"
                ;;
        *)
+               SHLIB_HAVE_MINOR_VERS=yes
                LIBLIST='lib$(LIBBASE)$(SHLIBEXT) lib$(LIBBASE)$(SHLIBSEXT)'
                LIBLINKS='$(TOPLIBD)/lib$(LIBBASE)$(SHLIBEXT) $(TOPLIBD)/lib$(LIBBASE)$(SHLIBVEXT) $(TOPLIBD)/lib$(LIBBASE)$(SHLIBSEXT)'
                LIBINSTLIST="install-shlib-soname"
@@ -1257,6 +1264,7 @@ else
        OBJLISTS="OBJS.SH"
 fi
 CC_LINK="$CC_LINK_SHARED"
+AC_SUBST(SHLIB_HAVE_MINOR_VERS)
 
 if test -z "$LIBLIST"; then
        AC_MSG_ERROR([must enable one of shared or static libraries])
index 521341db0bacac5aa6402278385d9e74230959c2..92b33f833524b82f3045fb9119c17285a16b3dd2 100644 (file)
@@ -106,7 +106,7 @@ pty_err.c: pty_err.et
 $(BUILDTOP)/include/autoconf.h: $(SRCTOP)/include/autoconf.h.in
        (cd $(BUILDTOP)/include; $(MAKE) autoconf.h)
 
-
+@libpriv_frag@
 @lib_frag@
 @libobj_frag@
 
index 2a6c7dc51771a5d0f10970c64f819f59984d1464..38ff9055f7e32d20b26f01cff538998de1400509 100644 (file)
@@ -89,6 +89,7 @@ enc_des.o: key-proto.h
 enc_des.o: misc-proto.h
 install::
 
+@libpriv_frag@
 @lib_frag@
 @libobj_frag@
 
diff --git a/src/config/libnodeps.in b/src/config/libnodeps.in
new file mode 100644 (file)
index 0000000..6416a30
--- /dev/null
@@ -0,0 +1,4 @@
+# Must override when there are no dependencies, because on some
+# platforms there's a prefix stuck in front of the library path that
+# we won't set (SHLIB_RDIRS).
+SHLIB_EXPFLAGS=
diff --git a/src/config/libpriv.in b/src/config/libpriv.in
new file mode 100644 (file)
index 0000000..c7e3443
--- /dev/null
@@ -0,0 +1,13 @@
+# Additional definitions for private libraries, which we build as archive
+# libraries (or equivalent) and do not install.
+#
+# The defaults (for installed shared libraries) are in pre.in.  We
+# override them here, before lib.in uses them.
+LIBLIST=lib$(LIBBASE)$(STLIBEXT)
+LIBLINKS=$(TOPLIBD)/lib$(LIBBASE)$(STLIBEXT)
+OBJLISTS=OBJS.ST
+LIBINSTLIST=
+SHLIBEXT=.so-nobuild
+SHLIBVEXT=.so.v-nobuild
+SHLIBSEXT=.so.s-nobuild
+STLIBEXT=$(STLIBEXT_if_static)
index 1c151bb0753d9483fca58fe1d22554f7173ecae6..01c083be5ba7c8c0d5e9cf04b166658400ff2c8e 100644 (file)
@@ -472,6 +472,12 @@ MAKE_COMMANDS-k5= $(BUILDTOP)/util/ss/mk_cmds
 
 ## Parameters to be set by configure for use in lib.in:
 ##
+#
+# These settings are for building shared libraries only.  Including
+# libpriv.in will override with values appropriate for static
+# libraries that we don't install.  Some values will depend on whether
+# the platform supports major and minor version number extensions on
+# shared libraries, hence the FOO_@@ settings.
 
 LN_S=@LN_S@
 AR=@AR@
@@ -479,19 +485,26 @@ AR=@AR@
 # Set to "lib$(LIBBASE)$(STEXT) lib$(LIBBASE)$(SHEXT) lib$(LIBBASE)$(PFEXT)" or
 # some subset thereof by configure; determines which types of libs get
 # built.
-LIBLIST=@LIBLIST@
+LIBLIST=$(LIBLIST_@SHLIB_HAVE_MINOR_VERS@)
+LIBLIST_yes=lib$(LIBBASE)$(SHLIBEXT) lib$(LIBBASE)$(SHLIBSEXT)
+LIBLIST_no=lib$(LIBBASE)$(SHLIBEXT)
 
 # Set by configure; list of library symlinks to make to $(TOPLIBD)
-LIBLINKS=@LIBLINKS@
+LIBLINKS=$(LIBLINKS_@SHLIB_HAVE_MINOR_VERS@)
+LIBLINKS_yes=$(TOPLIBD)/lib$(LIBBASE)$(SHLIBEXT) $(TOPLIBD)/lib$(LIBBASE)$(SHLIBVEXT) $(TOPLIBD)/lib$(LIBBASE)$(SHLIBSEXT)
+LIBLINKS_no=$(TOPLIBD)/lib$(LIBBASE)$(SHLIBEXT) $(TOPLIBD)/lib$(LIBBASE)$(SHLIBVEXT)
 
 # Set by configure; list of install targets
-LIBINSTLIST=@LIBINSTLIST@
+LIBINSTLIST=$(LIBINSTLIST_@SHLIB_HAVE_MINOR_VERS@)
+LIBINSTLIST_yes=install-shlib-soname
+LIBINSTLIST_no=install-shared
 
 # Some of these should really move to pre.in, since programs will need
 # it too. (e.g. stuff that has dependencies on the libraries)
 
 # usually .a
-STLIBEXT=@STLIBEXT@
+STLIBEXT_if_static=@STLIBEXT@
+STLIBEXT=.a-nobuild
 
 # usually .so.$(LIBMAJOR).$(LIBMINOR)
 SHLIBVEXT=@SHLIBVEXT@
@@ -533,7 +546,7 @@ SHLIB_EXPFLAGS=@SHLIB_EXPFLAGS@
 
 # Set to "OBJS.ST OBJS.SH OBJS.PF" or some subset thereof by
 # configure; determines which types of object files get built.
-OBJLISTS=@OBJLISTS@
+OBJLISTS=OBJS.SH
 
 # Note that $(LIBSRCS) *cannot* contain any variable references, or
 # the suffix substitution will break on some platforms!
index bc8b8a07ba54bef967ff6d4be3c74b906b74904c..38bb0f0415bf6a7fc9d85603421899bc9dbc4633 100644 (file)
@@ -32,6 +32,7 @@ LIBOBJS=$(OUTPRE)daemon.$(OBJEXT)
 SRCS=  $(srcdir)/daemon.c \
        $(srcdir)/dummy.c
 
+@libpriv_frag@
 @lib_frag@
 @libobj_frag@
 
index c993f34a7abaa5cbd4800734e4bddcf276eabc1c..77326a239247c9431246352c7cb132c2a9997386 100644 (file)
@@ -40,4 +40,5 @@ $(srcdir)/include/autoconf.stmp: $(srcdir)/configure.in $(SRCTOP)/aclocal.m4
 
 clean-includes::
        $(RM) $(HDRS) include/*.stmp
+@libnodeps_frag@
 @lib_frag@
index b719b135f7b409de60d4d7ce2f9f4fd9811c12ad..a11072bac84680c0d7624428aa01de3737a4b8a2 100644 (file)
@@ -166,7 +166,7 @@ clean::
                ss.ar ss.tar \
                TAGS test_ss
 
-
+@libpriv_frag@
 @lib_frag@
 @libobj_frag@