New drop with windows code from Secure Endpoints/Asanka
[abartlet/lorikeet-heimdal.git/.git] / configure.ac
index 33631f4cca843c3ddcb967bb35ec6c2a70fea82b..e91bc79f91fcc901458d304883d9be986a5c2a74 100644 (file)
@@ -2,12 +2,12 @@ dnl Process this file with autoconf to produce a configure script.
 AC_REVISION($Revision$)
 AC_PREREQ(2.62)
 test -z "$CFLAGS" && CFLAGS="-g"
-AC_INIT([Heimdal],[1.3.99],[heimdal-bugs@h5l.org])
+AC_INIT([Heimdal],[1.4.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 1.10])
+AM_INIT_AUTOMAKE([foreign 1.10.3])
 AM_MAINTAINER_MODE
 
 dnl Checks for programs.
@@ -25,9 +25,6 @@ AC_CANONICAL_HOST
 CANONICAL_HOST=$host
 AC_SUBST(CANONICAL_HOST)
 
-dnl Hints for autobuild
-AB_INIT
-
 rk_SYS_LARGEFILE
 
 rk_AIX
@@ -149,6 +146,24 @@ if test "$enable_krb4" != no ;then
        AC_DEFINE([KRB4], 1, [Define to enable Kerberos 4.])
 fi
 
+dnl Need to test if pkg-config exists
+PKG_PROG_PKG_CONFIG
+
+dnl libcap-ng
+AC_ARG_WITH([capng],
+  AC_HELP_STRING([--with-capng], [use libcap-ng to drop KDC privileges @<:@default=check@:>@]),
+  [],
+  [with_capng=check])
+if test "$with_capng" != "no"; then
+  PKG_CHECK_MODULES([CAPNG], [libcap-ng >= 0.4.0],
+                   [with_capng=yes],[with_capng=no])
+fi
+if test "$with_capng" = "yes"; then
+  AC_DEFINE_UNQUOTED([HAVE_CAPNG], 1, [whether capng is available for privilege reduction])
+fi
+AM_CONDITIONAL([HAVE_CAPNG], [test "$with_capng" != "no"])
+AC_SUBST([CAPNG_CFLAGS])
+AC_SUBST([CAPNG_LIBS])
 
 dnl Check for sqlite
 rk_TEST_PACKAGE(sqlite3,
@@ -231,6 +246,7 @@ AC_ARG_ENABLE([afs-support],
 if test "$enable_afs_support" = no; then
        AC_DEFINE(NO_AFS, 1, [Define if you don't wan't support for AFS.])
 fi
+AC_SUBST(NO_AFS)dnl
 
 rk_DB
 
@@ -295,6 +311,8 @@ dnl Checks for header files.
 AC_HEADER_STDC
 
 AC_CHECK_HEADERS([\
+       CommonCrypto/CommonDigest.h             \
+       CommonCrypto/CommonCryptor.h            \
        arpa/ftp.h                              \
        arpa/telnet.h                           \
        bind/bitypes.h                          \
@@ -542,6 +560,10 @@ rk_DESTDIRS
 rk_WFLAGS([-Wall -Wmissing-prototypes -Wpointer-arith -Wbad-function-cast -Wmissing-declarations -Wnested-externs])
 
 
+AH_BOTTOM([#ifdef __APPLE__
+#include <AvailabilityMacros.h>
+#endif])
+
 AH_BOTTOM([#ifdef ROKEN_RENAME
 #include "roken_rename.h"
 #endif])
@@ -628,8 +650,11 @@ dnl This is the release version name-number[beta]
 dnl
 
 cat > include/newversion.h.in <<EOF
-const char *heimdal_long_version = "@([#])\$Version: $PACKAGE_STRING by @USER@ on @HOST@ ($host) @DATE@ \$";
-const char *heimdal_version = "AC_PACKAGE_STRING";
+#ifndef VERSION_HIDDEN
+#define VERSION_HIDDEN
+#endif
+VERSION_HIDDEN const char *heimdal_long_version = "@([#])\$Version: $PACKAGE_STRING by @USER@ on @HOST@ ($host) @DATE@ \$";
+VERSION_HIDDEN const char *heimdal_version = "AC_PACKAGE_STRING";
 EOF
 
 if test -f include/version.h && cmp -s include/newversion.h.in include/version.h.in; then