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, 2023 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.2], [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.
43 AC_CHECK_HEADERS([krb5/pwqual_plugin.h], [], [], [RRA_INCLUDES_KRB5])
44 AC_CHECK_TYPES([krb5_realm], [], [], [RRA_INCLUDES_KRB5])
45 AC_CHECK_FUNCS([krb5_free_default_realm \
47 krb5_get_init_creds_opt_alloc \
48 krb5_get_init_creds_opt_set_default_flags \
49 krb5_principal_get_realm \
51 AC_CHECK_FUNCS([krb5_get_init_creds_opt_free],
52 [RRA_FUNC_KRB5_GET_INIT_CREDS_OPT_FREE_ARGS])
53 AC_CHECK_DECLS([krb5_kt_free_entry], [], [], [RRA_INCLUDES_KRB5])
54 AC_CHECK_FUNCS([krb5_appdefault_string], [],
55 [AC_CHECK_FUNCS([krb5_get_profile])
56 AC_CHECK_HEADERS([k5profile.h profile.h])
57 AC_LIBOBJ([krb5-profile])])
58 AC_LIBOBJ([krb5-extra])
59 AC_CHECK_HEADERS([kadm5/kadm5-pwcheck.h kadm5/kadm5_err.h], [], [],
62 RRA_LIB_SQLITE3_OPTIONAL
64 dnl Probe for libdl, which is used for the test suite.
66 AC_SEARCH_LIBS([dlopen], [dl], [DL_LIBS="$LIBS"])
70 dnl Checks for basic C functionality.
72 AC_CHECK_HEADERS([strings.h sys/bittypes.h sys/select.h sys/time.h syslog.h])
73 AC_CHECK_DECLS([reallocarray])
80 AC_CHECK_TYPES([ssize_t], [], [],
81 [#include <sys/types.h>])
82 AC_CHECK_FUNCS([explicit_bzero setrlimit])
83 AC_REPLACE_FUNCS([asprintf mkstemp reallocarray strndup])
85 dnl Write out the results.
86 AC_CONFIG_FILES([Makefile])
87 AC_CONFIG_HEADERS([config.h])