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
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
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
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"
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])
$(BUILDTOP)/include/autoconf.h: $(SRCTOP)/include/autoconf.h.in
(cd $(BUILDTOP)/include; $(MAKE) autoconf.h)
-
+@libpriv_frag@
@lib_frag@
@libobj_frag@
enc_des.o: misc-proto.h
install::
+@libpriv_frag@
@lib_frag@
@libobj_frag@
--- /dev/null
+# 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=
--- /dev/null
+# 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)
## 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@
# 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@
# 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!
SRCS= $(srcdir)/daemon.c \
$(srcdir)/dummy.c
+@libpriv_frag@
@lib_frag@
@libobj_frag@
clean-includes::
$(RM) $(HDRS) include/*.stmp
+@libnodeps_frag@
@lib_frag@
ss.ar ss.tar \
TAGS test_ss
-
+@libpriv_frag@
@lib_frag@
@libobj_frag@