1 dnl Process this file with autoconf to produce a configure script.
3 AM_INIT_AUTOMAKE(cracklib, 2.8.19)
4 AM_CONFIG_HEADER(config.h)
6 dnl Set of available languages.
7 ALL_LINGUAS="as bn_IN cs da de el es fi fr gu hi hu it ja kn ko lt nb nl ml mr or pa pl pt_BR pt ru sl_SI sk ta te tr uk zh_CN zh_TW"
9 dnl Checks for programs.
20 AC_CHECK_HEADERS(unistd.h)
21 AC_CHECK_HEADERS(fcntl.h)
22 AC_CHECK_HEADERS(inttypes.h)
23 AC_CHECK_HEADERS(stdint.h)
24 AC_CHECK_HEADERS(pthread.h)
25 AC_CHECK_HEADERS(zlib.h, AC_DEFINE(HAVE_ZLIB_H, [], [found zlib]))
27 AC_SEARCH_LIBS(gzopen, z)
30 AC_MSG_CHECKING(if LINE_MAX is defined)
36 ], line_max_defined=yes, line_max_defined=no)
37 AC_MSG_RESULT($line_max_defined)
39 if test "$line_max_defined" = "no"; then
40 CFLAGS="$CFLAGS -DLINE_MAX=2048"
43 dnl Checks for typedefs, structures, and compiler characteristics.
46 dnl Check for utility functions that may need to be replaced
47 AC_CHECK_FUNCS(strdup)
48 AC_CHECK_FUNCS(getpwuid_r)
50 dnl internationalization macros
51 AM_GNU_GETTEXT_VERSION([0.17])
52 AM_GNU_GETTEXT([external])
54 dnl Control default dictname
55 AC_MSG_CHECKING(default dict filename)
56 AC_ARG_WITH(default-dict,
57 AC_HELP_STRING(--with-default-dict,[Specify default dict filename]),
58 default_cracklib_dict=$withval,
59 default_cracklib_dict='$(pkgdatadir)/pw_dict')
60 AC_SUBST(DEFAULT_CRACKLIB_DICT, $default_cracklib_dict)
61 AC_MSG_RESULT($default_cracklib_dict)
63 dnl Check for python, unless we were told to not try to build a python module
65 AC_HELP_STRING(--without-python,[Build a python module @<:@default=auto@:>@]),
66 build_python=$withval,build_python=auto)
67 if test "$build_python" != no ; then
69 [if test "$build_python" != yes ; then
70 AC_MSG_WARN([python was not found, continuing])
73 AC_MSG_ERROR([python was required but not found])
75 if test "$build_python" != no ; then
76 AC_CHECK_HEADERS(python${PYTHON_VERSION}/Python.h,,
77 [if test "$build_python" != yes ; then
78 AC_MSG_WARN([python headers not found, continuing])
81 AC_MSG_ERROR([python headers not found])
84 if test "$build_python" != no ; then
88 AM_CONDITIONAL(BUILD_PYTHON,[test "$build_python" = "yes"])
90 dnl Handle local dict compiling properly
91 AC_SUBST(CROSS_COMPILING, $cross_compiling)
93 AC_OUTPUT(util/Makefile lib/Makefile doc/Makefile python/Makefile Makefile \
95 po/Makefile.in m4/Makefile dicts/Makefile cracklib.spec)