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, 2020 Russ Allbery <eagle@eyrie.org>
5 dnl Copyright 2006-2007, 2009-2010, 2012-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.1], [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_CHECK_FUNCS([krb5_appdefault_string], [],
56 [AC_CHECK_FUNCS([krb5_get_profile])
57 AC_CHECK_HEADERS([k5profile.h profile.h])
58 AC_LIBOBJ([krb5-profile])])
59 AC_LIBOBJ([krb5-extra])
60 AC_CHECK_HEADERS([kadm5/kadm5-pwcheck.h kadm5/kadm5_err.h], [], [],
63 RRA_LIB_SQLITE_OPTIONAL
65 dnl Probe for libdl, which is used for the test suite.
67 AC_SEARCH_LIBS([dlopen], [dl], [DL_LIBS="$LIBS"])
71 dnl Checks for basic C functionality.
73 AC_CHECK_HEADERS([strings.h sys/bittypes.h sys/select.h sys/time.h syslog.h])
74 AC_CHECK_DECLS([snprintf, vsnprintf])
81 AC_CHECK_TYPES([ssize_t], [], [],
82 [#include <sys/types.h>])
84 AC_CHECK_FUNCS([explicit_bzero setrlimit])
85 AC_REPLACE_FUNCS([asprintf mkstemp reallocarray strndup])
87 dnl Write out the results.
88 AC_CONFIG_FILES([Makefile])
89 AC_CONFIG_HEADER([config.h])