dnl Process this file with autoconf to produce a configure script.
AC_REVISION($Revision$)
-AC_PREREQ([2.59])
+AC_PREREQ(2.62)
test -z "$CFLAGS" && CFLAGS="-g"
-AC_INIT([Heimdal],[0.8pre],[heimdal-bugs@pdc.kth.se])
+AC_INIT([Heimdal],[1.2.99],[heimdal-bugs@h5l.org])
AC_CONFIG_SRCDIR([kuser/kinit.c])
AC_CONFIG_HEADERS(include/config.h)
+AC_CONFIG_MACRO_DIR([cf])
-AM_INIT_AUTOMAKE([foreign no-dependencies 1.8])
+AM_INIT_AUTOMAKE([foreign 1.10])
AM_MAINTAINER_MODE
dnl Checks for programs.
rk_SYS_LARGEFILE
+rk_AIX
+rk_IRIX
+rk_SUNOS
+
dnl
dnl this is needed to run the configure tests against glibc
dnl
AC_C___ATTRIBUTE__
-AC_PROG_LIBTOOL
+LT_PREREQ([2.2])
+LT_INIT([shared static win32-dll])
-rk_WFLAGS(-Wall -Wmissing-prototypes -Wpointer-arith -Wbad-function-cast -Wmissing-declarations -Wnested-externs)
+AM_CONDITIONAL(ENABLE_SHARED, test "$enable_shared" = "yes")
+rk_VERSIONSCRIPT
rk_TEST_PACKAGE(openldap,
[#include <lber.h>
fi
AM_CONDITIONAL(OPENLDAP_MODULE, test "$enable_hdb_openldap_module" = yes -a "$with_openldap" = yes)
+dnl
+dnl Optional modules, pk-init, digest, kx509
+dnl
+
AC_ARG_ENABLE(pk-init,
AS_HELP_STRING([--disable-pk-init],
[if you want disable to PK-INIT support]))
fi
AM_CONDITIONAL(PKINIT, test "$enable_pk_init" != no)
+AC_ARG_ENABLE(digest,
+ AS_HELP_STRING([--disable-digest],
+ [if you want disable to DIGEST support]))
+if test "$enable_digest" != no ;then
+ AC_DEFINE([DIGEST], 1, [Define to enable DIGEST.])
+fi
+
+AC_ARG_ENABLE(kx509,
+ AS_HELP_STRING([--disable-kx509],
+ [if you want disable to kx509 support]))
+if test "$enable_kx509" != no ;then
+ AC_DEFINE([KX509], 1, [Define to enable kx509.])
+fi
-rk_TEST_PACKAGE(krb4,[#include <krb.h>],-lkrb,-ldes,/usr/athena, KRB4, krb4-config)
-
-LIB_kdb=
-if test "$with_krb4" != "no"; then
- save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $INCLUDE_krb4"
- save_LIBS="$LIBS"
- LIBS="$LIB_krb4 $LIBS"
- EXTRA_LIB45=lib45.a
- AC_SUBST(EXTRA_LIB45)
- AC_CACHE_CHECK(for four valued krb_put_int, ac_cv_func_krb_put_int_four,
- [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <krb.h>]], [[
- char tmp[4];
- krb_put_int(17, tmp, 4, sizeof(tmp));]])],
- [ac_cv_func_krb_put_int_four=yes],
- [ac_cv_func_krb_put_int_four=no])
- ])
- if test "$ac_cv_func_krb_put_int_four" = yes; then
- AC_DEFINE(HAVE_FOUR_VALUED_KRB_PUT_INT, 1,
- [define if krb_put_int takes four arguments.])
- fi
- AH_BOTTOM([#if defined(HAVE_FOUR_VALUED_KRB_PUT_INT) || !defined(KRB4)
-#define KRB_PUT_INT(F, T, L, S) krb_put_int((F), (T), (L), (S))
-#else
-#define KRB_PUT_INT(F, T, L, S) krb_put_int((F), (T), (S))
-#endif
-])
- AC_CACHE_CHECK(for KRB_VERIFY_SECURE, ac_cv_func_krb_verify_secure,
- [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <krb.h>]], [[
- int x = KRB_VERIFY_SECURE]])],
- [ac_cv_func_krb_verify_secure=yes],
- [ac_cv_func_krb_verify_secure=no])
- ])
- if test "$ac_cv_func_krb_verify_secure" != yes; then
- AC_DEFINE(KRB_VERIFY_SECURE, 1,
- [Define to one if your krb.h doesn't])
- AC_DEFINE(KRB_VERIFY_SECURE_FAIL, 2,
- [Define to two if your krb.h doesn't])
- fi
- AC_CACHE_CHECK(for KRB_VERIFY_NOT_SECURE,
- ac_cv_func_krb_verify_not_secure,
- [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <krb.h>]], [[
- int x = KRB_VERIFY_NOT_SECURE]])],
- [ac_cv_func_krb_verify_not_secure=yes],
- [ac_cv_func_krb_verify_not_secure=no])
- ])
- if test "$ac_cv_func_krb_verify_not_secure" != yes; then
- AC_DEFINE(KRB_VERIFY_NOT_SECURE, 0,
- [Define to zero if your krb.h doesn't])
- fi
- AC_FIND_FUNC(krb_enable_debug)
- AC_FIND_FUNC(krb_disable_debug)
- AC_FIND_FUNC(krb_get_our_ip_for_realm)
- AC_FIND_FUNC(krb_kdctimeofday)
- AH_BOTTOM(
- [#ifndef HAVE_KRB_KDCTIMEOFDAY
-#define krb_kdctimeofday(X) gettimeofday((X), NULL)
-#endif])
- AC_FIND_FUNC(krb_get_kdc_time_diff)
- AH_BOTTOM(
- [#ifndef HAVE_KRB_GET_KDC_TIME_DIFF
-#define krb_get_kdc_time_diff() (0)
-#endif])
- AC_CACHE_CHECK([for KRB_SENDAUTH_VERS],
- ac_cv_func_krb_sendauth_vers,
- [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <krb.h>
- #include <prot.h>]], [[
- char *x = KRB_SENDAUTH_VERS]])],
- [ac_cv_func_krb_sendauth_vers=yes],
- [ac_cv_func_krb_sendauth_vers=no])
- ])
- if test "$ac_cv_func_krb_sendauth_vers" != yes; then
- AC_DEFINE(KRB_SENDAUTH_VERS, ["AUTHV0.1"],
- [This is the krb4 sendauth version.])
- fi
- AC_CACHE_CHECK(for krb_mk_req with const arguments,
- ac_cv_func_krb_mk_req_const,
- [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <krb.h>
- int krb_mk_req(KTEXT a, const char *s, const char *i,
- const char *r, int32_t checksum)
- { return 17; }]], [[]])],
- [ac_cv_func_krb_mk_req_const=yes],
- [ac_cv_func_krb_mk_req_const=no])
- ])
- if test "$ac_cv_func_krb_mk_req_const" = "yes"; then
- AC_DEFINE(KRB_MK_REQ_CONST, 1,
- [Define if krb_mk_req takes const char *])
- fi
-
- LIBS="$save_LIBS"
- CFLAGS="$save_CFLAGS"
- LIB_kdb="-lkdb -lkrb"
+AC_ARG_ENABLE(krb4,
+ AS_HELP_STRING([--disable-krb4],
+ [if you want disable to krb4 support]))
+if test "$enable_krb4" != no ;then
+ AC_DEFINE([KRB4], 1, [Define to enable Kerberos 4.])
+fi
+
+
+dnl Check for sqlite
+rk_TEST_PACKAGE(sqlite3,
+[#include <sqlite3.h>
+#ifndef SQLITE_OPEN_CREATE
+#error "old version"
+#endif],
+[-lsqlite3],,,SQLITE3)
+
+if test "X$with_sqlite3" != Xyes ; then
+ INCLUDE_sqlite3="-I\$(top_srcdir)/lib/sqlite"
+ LIB_sqlite3="\$(top_builddir)/lib/sqlite/libheimsqlite.la"
fi
-AM_CONDITIONAL(KRB4, test "$with_krb4" != "no")
+AM_CONDITIONAL(SQLITE3, test "X$with_sqlite3" = Xyes)
+
+dnl check for libintl
+rk_TEST_PACKAGE(libintl,
+[#include <libintl.h>],
+[-lintl],,,LIBINTL)
+
+dnl path where the hdb directory is stored
+AC_ARG_WITH([hdbdir],
+ [AS_HELP_STRING([--with-hdbdir],[Default location for KDC database @<:@default=/var/heimdal@:>@])],
+ [],
+ [with_hdbdir=/var/heimdal])
+DIR_hdbdir="$with_hdbdir"
+AC_SUBST([DIR_hdbdir])
+
+
+dnl no kerberos4 any more
+with_krb4=no
+AC_SUBST(INCLUDE_krb4)
+AC_SUBST(LIB_krb4)
+AM_CONDITIONAL(KRB4, false)
+
AM_CONDITIONAL(KRB5, true)
AM_CONDITIONAL(do_roken_rename, true)
AC_SUBST(dpagaix_ldflags)
AC_ARG_ENABLE([afs-support],
- AC_HELP_STRING([--disable-afs-support],
- [if you don't want support for AFS]))
+ AS_HELP_STRING([--disable-afs-support],[if you don't want support for AFS]))
if test "$enable_afs_support" = no; then
AC_DEFINE(NO_AFS, 1, [Define if you don't wan't support for AFS.])
fi
dnl AC_ROKEN(10,[/usr/heimdal /usr/athena],[lib/roken],[$(top_builddir)/lib/roken/libroken.la],[-I$(top_builddir)/lib/roken -I$(top_srcdir)/lib/roken])
rk_ROKEN(lib/roken)
+LIBADD_roken="$LIB_roken"
+AC_SUBST(LIBADD_roken)dnl
LIB_roken="\$(top_builddir)/lib/vers/libvers.la $LIB_roken"
rk_OTP
KRB_C_BIGENDIAN
AC_C_INLINE
-rk_AIX
-rk_IRIX
-rk_SUNOS
-
KRB_CHECK_X
AM_CONDITIONAL(HAVE_X, test "$no_x" != yes)
sys/times.h \
sys/types.h \
sys/un.h \
+ locale.h \
termcap.h \
termio.h \
termios.h \
dnl it doesn't define `bool'.
AC_CHECK_HEADERS(term.h, , , -)
+dnl aix have asl.h (A/IX screen library) that we don't want
+AC_CHECK_HEADERS(asl.h, , , [
+#include <asl.h>
+#ifndef ASL_STRING_EMERG
+#error ASL_STRING_EMERG missing
+#endif])
+
AC_CHECK_HEADERS(net/if.h, , , [AC_INCLUDES_DEFAULT
#if HAVE_SYS_SOCKET_H
#include <sys/socket.h>
fi
dnl export symbols
-rk_WIN32_EXPORT(BUILD_KRB5_LIB, KRB5_LIB_FUNCTION)
-rk_WIN32_EXPORT(BUILD_ROKEN_LIB, ROKEN_LIB_FUNCTION)
+rk_WIN32_EXPORT(BUILD_KRB5_LIB, KRB5_LIB)
+rk_WIN32_EXPORT(BUILD_ROKEN_LIB, ROKEN_LIB)
+rk_WIN32_EXPORT(BUILD_GSSAPI_LIB, GSSAPI_LIB)
dnl Checks for libraries.
AC_CHECK_FUNCS([ \
_getpty \
_scrsize \
+ arc4random \
fcntl \
getpeereid \
getpeerucred \
#endif
])
+rk_FRAMEWORK_SECURITY
+
KRB_READLINE
rk_TELNET
rk_DESTDIRS
+rk_WFLAGS([-Wall -Wmissing-prototypes -Wpointer-arith -Wbad-function-cast -Wmissing-declarations -Wnested-externs])
+
+
AH_BOTTOM([#ifdef ROKEN_RENAME
#include "roken_rename.h"
#endif])
AC_CONFIG_FILES(Makefile \
+ etc/Makefile \
include/Makefile \
include/gssapi/Makefile \
include/hcrypto/Makefile \
lib/auth/sia/Makefile \
lib/asn1/Makefile \
lib/com_err/Makefile \
- lib/des/Makefile \
+ lib/hcrypto/Makefile \
lib/editline/Makefile \
lib/hx509/Makefile \
lib/gssapi/Makefile \
+ lib/ntlm/Makefile \
lib/hdb/Makefile \
lib/kadm5/Makefile \
lib/kafs/Makefile \
lib/otp/Makefile \
lib/roken/Makefile \
lib/sl/Makefile \
+ lib/sqlite/Makefile \
lib/vers/Makefile \
+ lib/wind/Makefile \
+ po/Makefile \
kuser/Makefile \
kpasswd/Makefile \
kadmin/Makefile \
appl/kf/Makefile \
appl/dceutils/Makefile \
tests/Makefile \
+ tests/can/Makefile \
tests/db/Makefile \
tests/kdc/Makefile \
+ tests/ldap/Makefile \
tests/gss/Makefile \
+ tests/java/Makefile \
+ tests/plugin/Makefile \
+ packages/Makefile \
+ packages/mac/Makefile \
doc/Makefile \
tools/Makefile \
)