Blob Blame History Raw
Allow static libraries to be built.  Force plugins to only be built as
shared objects.  This doesn't *really* fix static linking, but it should
parallel glibc and its nsswitch modules -- applications can pull in
static copies of this library, but they'll still try to use any
available plugins.  The current set of plugin interfaces include KDC
location (used by clients), preauthentication plugins (used by clients
and KDCs), and KDB plugins (used by KDCs).

N.B. This is only a stop-gap for systems which used to include krb5 1.5
(which we packaged with static libraries enabled) and are now being
upgraded to 1.6, and I expect to stop bothering for future releases.

--- krb5-1.6/src/plugins/kdb/db2/configure.in	2005-10-27 05:38:05.000000000 -0400
+++ krb5-1.6/src/plugins/kdb/db2/configure.in	2007-02-28 14:51:14.000000000 -0500
@@ -1,5 +1,6 @@
 K5_AC_INIT(configure.in)
 enable_shared=yes
+enable_static=no
 build_dynobj=yes
 CONFIG_RULES
 AC_CHECK_HEADERS(unistd.h)
--- krb5-1.6/src/plugins/kdb/db2/libdb2/configure.in	2006-04-24 20:29:56.000000000 -0400
+++ krb5-1.6/src/plugins/kdb/db2/libdb2/configure.in	2007-02-28 14:51:14.000000000 -0500
@@ -1,5 +1,7 @@
 K5_AC_INIT(db/db.c)
 AC_CONFIG_HEADER(include/config.h include/db-config.h)
+enable_shared=yes
+enable_static=no
 build_dynobj=yes
 CONFIG_RULES
 
--- krb5-1.6/src/plugins/kdb/ldap/libkdb_ldap/configure.in	2006-08-31 17:17:34.000000000 -0400
+++ krb5-1.6/src/plugins/kdb/ldap/libkdb_ldap/configure.in	2007-02-28 14:51:14.000000000 -0500
@@ -1,4 +1,7 @@
 K5_AC_INIT(configure.in)
+enable_shared=yes
+enable_static=no
+build_dynobj=yes
 CONFIG_RULES
 AC_CHECK_HEADERS(unistd.h)
 AC_TYPE_MODE_T
--- krb5-1.6/src/plugins/locate/python/configure.in	2006-01-10 19:36:36.000000000 -0500
+++ krb5-1.6/src/plugins/locate/python/configure.in	2007-02-28 14:51:14.000000000 -0500
@@ -1,5 +1,6 @@
 K5_AC_INIT(configure.in)
 enable_shared=yes
+enable_static=no
 build_dynobj=yes
 CONFIG_RULES
 AC_CHECK_HEADERS(Python.h python2.3/Python.h)
--- krb5-1.6/src/plugins/preauth/wpse/configure.in	2006-10-03 15:07:17.000000000 -0400
+++ krb5-1.6/src/plugins/preauth/wpse/configure.in	2007-02-28 14:51:14.000000000 -0500
@@ -1,5 +1,6 @@
 K5_AC_INIT(configure.in)
 enable_shared=yes
+enable_static=no
 build_dynobj=yes
 CONFIG_RULES
 
--- krb5-1.6/src/plugins/preauth/cksum_body/configure.in	2006-10-03 15:07:17.000000000 -0400
+++ krb5-1.6/src/plugins/preauth/cksum_body/configure.in	2007-02-28 14:51:14.000000000 -0500
@@ -1,5 +1,6 @@
 K5_AC_INIT(configure.in)
 enable_shared=yes
+enable_static=no
 build_dynobj=yes
 CONFIG_RULES
 
--- krb5-1.6/src/aclocal.m4	2006-10-02 18:50:10.000000000 -0400
+++ krb5-1.6/src/aclocal.m4	2007-02-28 14:51:14.000000000 -0500
@@ -1226,10 +1226,6 @@
 AC_ARG_ENABLE([static],, ,
 [enable_static=$default_static])
 
-if test "$enable_static" = yes; then
-  AC_MSG_ERROR([Sorry, static libraries do not work in this release.])
-fi
-
 if test "$enable_static" = no && test "$krb5_force_static" != yes; then
 	AC_MSG_NOTICE([disabling static libraries])
 	LIBLINKS=
@@ -1254,10 +1250,6 @@
 , ,
 [enable_shared=$default_shared])
 
-if test "$enable_shared" != yes; then
-  AC_MSG_ERROR([Sorry, this release builds only shared libraries, cannot disable them.])
-fi
-
 if test "$enable_shared" = yes; then
 	case "$SHLIBEXT" in
 	.so-nobuild)