1 dnl Process this file with autoconf to produce a configure script.
3 dnl Written by Russ Allbery <eagle@eyrie.org>
4 dnl Copyright 2016 Russ Allbery <eagle@eyrie.org>
5 dnl Copyright 2006, 2007, 2009, 2010, 2012, 2013, 2014
6 dnl The Board of Trustees of the Leland Stanford Junior University
8 dnl See LICENSE for licensing terms.
10 dnl Basic Autoconf configuration.
12 AC_INIT([krb5-strength], [3.0], [eagle@eyrie.org])
13 AC_CONFIG_AUX_DIR([build-aux])
14 AC_CONFIG_LIBOBJ_DIR([portable])
15 AC_CONFIG_MACRO_DIR([m4])
16 AM_INIT_AUTOMAKE([1.11 check-news dist-xz foreign silent-rules subdir-objects
20 dnl Detect unexpanded macros.
21 m4_pattern_forbid([^PKG_])
22 m4_pattern_forbid([^_?RRA_])
24 dnl Probe for basic build system tools.
26 AC_USE_SYSTEM_EXTENSIONS
27 RRA_PROG_CC_WARNINGS_FLAGS
30 m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
35 dnl External libraries.
38 AS_IF([test x"$rra_system_cracklib" = xyes],
39 [RRA_LIB_CRACKLIB_SWITCH
40 AC_CHECK_HEADERS([crack.h])
41 RRA_LIB_CRACKLIB_RESTORE])
44 AC_CHECK_HEADERS([krb5/pwqual_plugin.h], [], [], [RRA_INCLUDES_KRB5])
45 AC_CHECK_TYPES([krb5_realm], [], [], [RRA_INCLUDES_KRB5])
46 AC_CHECK_FUNCS([krb5_free_default_realm \
48 krb5_get_init_creds_opt_alloc \
49 krb5_get_init_creds_opt_set_default_flags \
50 krb5_principal_get_realm \
52 AC_CHECK_FUNCS([krb5_get_init_creds_opt_free],
53 [RRA_FUNC_KRB5_GET_INIT_CREDS_OPT_FREE_ARGS])
54 AC_CHECK_DECLS([krb5_kt_free_entry], [], [], [RRA_INCLUDES_KRB5])
55 AC_LIBOBJ([krb5-extra])
56 AC_CHECK_HEADERS([kadm5/kadm5-pwcheck.h kadm5/kadm5_err.h], [], [],
59 RRA_LIB_SQLITE_OPTIONAL
61 dnl Probe for libdl, which is used for the test suite.
63 AC_SEARCH_LIBS([dlopen], [dl], [DL_LIBS="$LIBS"])
67 dnl Checks for basic C functionality.
69 AC_CHECK_HEADERS([sys/bittypes.h sys/select.h sys/time.h syslog.h])
70 AC_CHECK_DECLS([snprintf, vsnprintf])
77 AC_CHECK_TYPES([ssize_t], [], [],
78 [#include <sys/types.h>])
80 AC_CHECK_FUNCS([setrlimit])
81 AC_REPLACE_FUNCS([asprintf mkstemp reallocarray strndup])
83 dnl Write out the results.
84 AC_CONFIG_FILES([Makefile])
85 AC_CONFIG_HEADER([config.h])