Fix memory leak in gss_krb5int_copy_ccache
[krb5.git] / src / configure.in
index ef9cd7ce4a5e6d234908fc11dfeb73b441754b96..8777e20def46532f2c192835a2a8f5f67b59e2a7 100644 (file)
@@ -115,6 +115,16 @@ if test "$withval" = yes; then
        AC_DEFINE(KRBCONF_VAGUE_ERRORS,1,[Define if the KDC should return only vague error codes to clients])
 fi
 dnl
+dnl WITH_CRYPTO_IMPL
+dnl
+CRYPTO_IMPL="builtin"
+AC_ARG_WITH([crypto-impl],
+AC_HELP_STRING([--with-crypto-impl=IMPL], [use specified crypto implementation @<:@builtin@:>@]),
+[CRYPTO_IMPL=$withval
+AC_MSG_RESULT("k5crypto will use \'$withval\'")
+], withval=builtin)dnl
+AC_SUBST(CRYPTO_IMPL)
+dnl
 dnl --with-kdc-kdb-update makes the KDC update the database with last request
 dnl information and failure information.
 dnl
@@ -144,14 +154,6 @@ if test "$enableval" = yes ; then
 else
        AC_DEFINE(NOCACHE,1,[Define if the KDC should use no replay cache])
 fi
-AC_ARG_ENABLE([fakeka],
-AC_HELP_STRING([--enable-fakeka],[build the Fake KA server (emulates an AFS kaserver) @<:@default: don't build@:>@]), , enableval=no)dnl
-if test "$enableval" = yes; then
-       FAKEKA=fakeka
-else
-       FAKEKA=
-fi
-AC_SUBST(FAKEKA)
 KRB5_RUN_FLAGS
 dnl
 AC_TYPE_SIGNAL
@@ -892,8 +894,8 @@ AC_SUBST(PASS)
 dnl for pkinit
 AC_ARG_ENABLE([pkinit],
 [  --disable-pkinit        disable PKINIT plugin support],,
-enable_pkinit=yes)
-if test "$enable_pkinit" = yes; then
+enable_pkinit=try)
+if test "$enable_pkinit" = yes || test "$enable_pkinit" = try; then
   AC_CACHE_CHECK(for a recent enough OpenSSL, k5_cv_openssl_version_okay,
 [AC_COMPILE_IFELSE([#include <openssl/opensslv.h>
 #if OPENSSL_VERSION_NUMBER < 0x00908000L
@@ -905,8 +907,10 @@ int i = 1;
   AC_CHECK_LIB(crypto, PKCS7_get_signer_info)
   LIBS="$old_LIBS"
 fi
-if test "$k5_cv_openssl_version_okay" = yes && test "$enable_pkinit" = yes; then
+if test "$k5_cv_openssl_version_okay" = yes && (test "$enable_pkinit" = yes || test "$enable_pkinit" = try); then
   K5_GEN_MAKEFILE(plugins/preauth/pkinit)
+elif test "$k5_cv_openssl_version_okay" = no && test "$enable_pkinit" = yes; then
+  AC_MSG_ERROR([Version of OpenSSL is too old; cannot enable PKINIT.])
 else
   AC_DEFINE([DISABLE_PKINIT], 1, [Define to disable PKINIT plugin support])
   AC_MSG_NOTICE([Disabling PKINIT support.])
@@ -969,9 +973,6 @@ if test "$enable_thread_support" = yes; then
   fi # tsmissing not empty
 fi # enable_thread_support
 dnl
-HOST_TYPE=$krb5_cv_host
-AC_SUBST(HOST_TYPE)
-dnl
 dnl Sadly, we seem to have accidentally committed ourselves in 1.4 to
 dnl an ABI that includes the existence of libkrb5support.0 even
 dnl though random apps should never use anything from it.  And on
@@ -1035,7 +1036,12 @@ fi
 AC_SUBST(ldap_plugin_dir)
 AC_SUBST(LDAP)
 
-AC_CHECK_HEADERS(Python.h python2.3/Python.h)
+dnl We really should look for and use python-config.
+PYTHON_LIB=
+AC_CHECK_HEADERS(Python.h python2.3/Python.h python2.5/Python.h)
+AC_CHECK_LIB(python2.3,main,[PYTHON_LIB=-lpython2.3],
+  AC_CHECK_LIB(python2.5,main,[PYTHON_LIB=-lpython2.5]))
+AC_SUBST(PYTHON_LIB)
 
 dnl
 dnl Kludge for simple server --- FIXME is this the best way to do this?
@@ -1053,17 +1059,21 @@ V5_AC_OUTPUT_MAKEFILE(.
 
        lib lib/kdb
 
-       lib/crypto lib/crypto/crc32 lib/crypto/des lib/crypto/dk
-       lib/crypto/enc_provider lib/crypto/hash_provider
-       lib/crypto/keyhash_provider lib/crypto/md4 lib/crypto/md5
-       lib/crypto/old lib/crypto/raw lib/crypto/sha1
-       lib/crypto/arcfour lib/crypto/yarrow lib/crypto/aes
+       lib/crypto lib/crypto/krb lib/crypto/krb/crc32 lib/crypto/builtin/des
+       lib/crypto/krb/dk lib/crypto/builtin/enc_provider
+       lib/crypto/krb/hash_provider lib/crypto/krb/keyhash_provider
+       lib/crypto/builtin lib/crypto/builtin/md4 lib/crypto/builtin/md5
+       lib/crypto/krb/old lib/crypto/krb/raw lib/crypto/builtin/sha1
+       lib/crypto/builtin/arcfour lib/crypto/krb/yarrow lib/crypto/builtin/aes
+       lib/crypto/crypto_tests
 
        lib/krb5 lib/krb5/error_tables lib/krb5/asn.1 lib/krb5/ccache
+dnl    lib/krb5/ccache/ccapi
        lib/krb5/keytab lib/krb5/krb lib/krb5/rcache lib/krb5/os
+       lib/krb5/unicode
 
-       lib/gssapi lib/gssapi/generic lib/gssapi/krb5
-       lib/gssapi/mechglue lib/gssapi/spnego
+       lib/gssapi lib/gssapi/generic lib/gssapi/krb5 lib/gssapi/spnego
+       lib/gssapi/mechglue
 
        lib/rpc lib/rpc/unit-test
 
@@ -1071,6 +1081,8 @@ V5_AC_OUTPUT_MAKEFILE(.
 
        lib/apputils
 
+dnl    ccapi ccapi/lib ccapi/lib/unix ccapi/server ccapi/server/unix ccapi/test
+
        kdc slave config-files gen-manpages include
 
        plugins/locate/python
@@ -1082,15 +1094,14 @@ V5_AC_OUTPUT_MAKEFILE(.
        plugins/kdb/db2/libdb2/mpool
        plugins/kdb/db2/libdb2/recno
        plugins/kdb/db2/libdb2/test
-       plugins/preauth/cksum_body
+       plugins/preauth/cksum_body plugins/preauth/encrypted_challenge
        plugins/preauth/wpse
        plugins/authdata/greet
 
        clients clients/klist clients/kinit clients/kvno
        clients/kdestroy clients/kpasswd clients/ksu
 
-       kadmin kadmin/cli kadmin/dbutil kadmin/passwd
-       kadmin/passwd/unit-test kadmin/ktutil kadmin/server
+       kadmin kadmin/cli kadmin/dbutil kadmin/ktutil kadmin/server
        kadmin/testing kadmin/testing/scripts kadmin/testing/util
 
        appl