diff options
author | Greg Hudson <ghudson@mit.edu> | 2009-06-08 10:01:57 +0000 |
---|---|---|
committer | Greg Hudson <ghudson@mit.edu> | 2009-06-08 10:01:57 +0000 |
commit | af44e8dee9b5bfffb05eb5a9b89c79c02ab7c2ff (patch) | |
tree | 80783e20aa0a982df33d64b6fbba75f63c03ab18 /src/config/pre.in | |
parent | 2bb6a5e140cb3d53ff454e624b5fe8aa1d53409f (diff) | |
download | krb5-af44e8dee9b5bfffb05eb5a9b89c79c02ab7c2ff.tar.gz krb5-af44e8dee9b5bfffb05eb5a9b89c79c02ab7c2ff.tar.xz krb5-af44e8dee9b5bfffb05eb5a9b89c79c02ab7c2ff.zip |
Restore limited support for static linking
Add enough static linking support to run the test suite without shared
libraries, to facilitate gcov and other kinds of instrumentation. The
necessary changes include:
* Undo some of the changes which removed static linking support,
and cannibalize the defunct krb5_force_static conditional block
in aclocal.m4.
* Add --enable-static-only configure option.
* For plugins, use a different symbol name for static and dynamic
builds, via a macro in k5plugin.h.
* Add build machinery for building static libraries for plugins
(somewhat grotty due to the difference in names).
* Move plugin subdirs earlier in SUBDIRS in src/Makefile.in.
* Make the in-tree KDB5 plugins dependencies of libkdb5 in a static
build (aclocal.m4 has to know what they are).
* In kdb5.c, cannibalize the broken _KDB5_STATIC_LINK support to
allow "loading" of statically linked plugin libraries.
Preauth, authdata, locate, and GSSAPI plugins are not handled by this
change, as they are not currently necessary to the test suite.
Supporting GSSAPI plugins may be a bit tricky but the others should be
straightforward if they become needed.
$(STLIBEXT) changes from .a-nobuild to .a in a normal shared build as
a result of these changes (except on AIX where aclocal.m4 changes it).
This does not seem to be important as we avoid selecting the static
library for building via other means.
ticket: 6510
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22406 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/config/pre.in')
-rw-r--r-- | src/config/pre.in | 35 |
1 files changed, 20 insertions, 15 deletions
diff --git a/src/config/pre.in b/src/config/pre.in index 6923ade7d..fa766190f 100644 --- a/src/config/pre.in +++ b/src/config/pre.in @@ -315,6 +315,9 @@ PROG_RPATH_FLAGS=@PROG_RPATH_FLAGS@ # depending on whether we're building with shared libraries. DEPLIBEXT=@DEPLIBEXT@ +KDB5_PLUGIN_DEPLIBS = @KDB5_PLUGIN_DEPLIBS@ +KDB5_PLUGIN_LIBS = @KDB5_PLUGIN_LIBS@ + KADMCLNT_DEPLIB = $(TOPLIBD)/libkadm5clnt$(DEPLIBEXT) KADMSRV_DEPLIB = $(TOPLIBD)/libkadm5srv$(DEPLIBEXT) KDB5_DEPLIB = $(TOPLIBD)/libkdb5$(DEPLIBEXT) @@ -337,7 +340,7 @@ PTY_DEPLIB = $(TOPLIBD)/libpty.a APPUTILS_DEPLIB = $(TOPLIBD)/libapputils.a KRB5_BASE_DEPLIBS = $(KRB5_DEPLIB) $(CRYPTO_DEPLIB) $(COM_ERR_DEPLIB) $(SUPPORT_DEPLIB) -KDB5_DEPLIBS = $(KDB5_DEPLIB) +KDB5_DEPLIBS = $(KDB5_DEPLIB) $(KDB5_PLUGIN_DEPLIBS) GSS_DEPLIBS = $(GSS_DEPLIB) GSSRPC_DEPLIBS = $(GSSRPC_DEPLIB) $(GSS_DEPLIBS) KADM_COMM_DEPLIBS = $(GSSRPC_DEPLIBS) $(KDB5_DEPLIBS) $(GSSRPC_DEPLIBS) @@ -365,7 +368,7 @@ GEN_LIB = @GEN_LIB@ SS_LIB = $(SS_LIB-@SS_VERSION@) SS_LIB-sys = @SS_LIB@ SS_LIB-k5 = $(TOPLIBD)/libss.a -KDB5_LIB = -lkdb5 +KDB5_LIB = -lkdb5 $(KDB5_PLUGIN_LIBS) DL_LIB = @DL_LIB@ @@ -471,26 +474,28 @@ 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_@SHLIB_HAVE_MINOR_VERS@) -LIBLIST_yes=lib$(LIBBASE)$(SHLIBEXT) lib$(LIBBASE)$(SHLIBSEXT) -LIBLIST_no=lib$(LIBBASE)$(SHLIBEXT) +LIBLIST=@LIBLIST@ # Set by configure; list of library symlinks to make to $(TOPLIBD) -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) +LIBLINKS=@LIBLINKS@ + +# Set by configure; name of plugin module to build (libfoo.a or foo.so) +PLUGIN=@PLUGIN@ + +# Set by configure; symlink for plugin module for static plugin linking +PLUGINLINK=@PLUGINLINK@ + +# Set by configure; list of install targets for libraries +LIBINSTLIST=@LIBINSTLIST@ -# Set by configure; list of install targets -LIBINSTLIST=$(LIBINSTLIST_@SHLIB_HAVE_MINOR_VERS@) -LIBINSTLIST_yes=install-shlib-soname -LIBINSTLIST_no=install-shared +# Set by configure; install target +PLUGININST=@PLUGININST@ # 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_if_static=@STLIBEXT@ -STLIBEXT=.a-nobuild +STLIBEXT=@STLIBEXT@ # usually .so.$(LIBMAJOR).$(LIBMINOR) SHLIBVEXT=@SHLIBVEXT@ @@ -536,7 +541,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=OBJS.SH +OBJLISTS=@OBJLISTS@ # Note that $(LIBSRCS) *cannot* contain any variable references, or # the suffix substitution will break on some platforms! |