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 SPDX-License-Identifier: MIT
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 Only used for the test suite.
36 AC_PATH_PROG([PATH_VALGRIND], [valgrind])
38 dnl External libraries.
41 AS_IF([test x"$rra_system_cracklib" = xyes],
42 [RRA_LIB_CRACKLIB_SWITCH
43 AC_CHECK_HEADERS([crack.h])
44 RRA_LIB_CRACKLIB_RESTORE])
47 AC_CHECK_HEADERS([krb5/pwqual_plugin.h], [], [], [RRA_INCLUDES_KRB5])
48 AC_CHECK_TYPES([krb5_realm], [], [], [RRA_INCLUDES_KRB5])
49 AC_CHECK_FUNCS([krb5_free_default_realm \
51 krb5_get_init_creds_opt_alloc \
52 krb5_get_init_creds_opt_set_default_flags \
53 krb5_principal_get_realm \
55 AC_CHECK_FUNCS([krb5_get_init_creds_opt_free],
56 [RRA_FUNC_KRB5_GET_INIT_CREDS_OPT_FREE_ARGS])
57 AC_CHECK_DECLS([krb5_kt_free_entry], [], [], [RRA_INCLUDES_KRB5])
58 AC_CHECK_FUNCS([krb5_appdefault_string], [],
59 [AC_CHECK_FUNCS([krb5_get_profile])
60 AC_CHECK_HEADERS([k5profile.h profile.h])
61 AC_LIBOBJ([krb5-profile])])
62 AC_LIBOBJ([krb5-extra])
63 AC_CHECK_HEADERS([kadm5/kadm5-pwcheck.h kadm5/kadm5_err.h], [], [],
66 RRA_LIB_SQLITE_OPTIONAL
68 dnl Probe for libdl, which is used for the test suite.
70 AC_SEARCH_LIBS([dlopen], [dl], [DL_LIBS="$LIBS"])
74 dnl Checks for basic C functionality.
76 AC_CHECK_HEADERS([strings.h sys/bittypes.h sys/select.h sys/time.h syslog.h])
77 AC_CHECK_DECLS([snprintf, vsnprintf])
84 AC_CHECK_TYPES([ssize_t], [], [],
85 [#include <sys/types.h>])
87 AC_CHECK_FUNCS([explicit_bzero setrlimit])
88 AC_REPLACE_FUNCS([asprintf mkstemp reallocarray strndup])
90 dnl Write out the results.
91 AC_CONFIG_FILES([Makefile])
92 AC_CONFIG_HEADER([config.h])