]> granicus.if.org Git - cracklib/blob - cracklib/configure.in
remove generated gettext files
[cracklib] / cracklib / configure.in
1 dnl Process this file with autoconf to produce a configure script.
2 AC_INIT([lib/crack.h])
3 AM_INIT_AUTOMAKE(cracklib, 2.8.19)
4 AM_CONFIG_HEADER(config.h)
5
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"
8
9 dnl Checks for programs.
10 AC_PROG_LIBTOOL
11 AC_PROG_CC
12 AC_PROG_CPP
13 AC_PROG_INSTALL
14 AC_PROG_LN_S
15 AC_PROG_MAKE_SET
16 AC_PROG_RANLIB
17
18 AC_PATH_XTRA
19
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]))
26
27 AC_SEARCH_LIBS(gzopen, z)
28
29 dnl Cygwin workaround
30 AC_MSG_CHECKING(if LINE_MAX is defined)
31 AC_EGREP_CPP(yes,
32 [#include <limits.h>
33 #ifdef LINE_MAX
34 yes
35 #endif
36 ], line_max_defined=yes, line_max_defined=no)
37 AC_MSG_RESULT($line_max_defined)
38
39 if test "$line_max_defined" = "no"; then
40    CFLAGS="$CFLAGS -DLINE_MAX=2048"
41 fi
42
43 dnl Checks for typedefs, structures, and compiler characteristics.
44 AC_C_CONST
45
46 dnl Check for utility functions that may need to be replaced
47 AC_CHECK_FUNCS(strdup)
48 AC_CHECK_FUNCS(getpwuid_r)
49
50 dnl internationalization macros
51 AM_GNU_GETTEXT_VERSION([0.17])
52 AM_GNU_GETTEXT([external])
53
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)
62
63 dnl Check for python, unless we were told to not try to build a python module
64 AC_ARG_WITH(python,
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
68    AM_PATH_PYTHON(,,
69                   [if test "$build_python" != yes ; then
70                       AC_MSG_WARN([python was not found, continuing])
71                       build_python=no
72                    else
73                       AC_MSG_ERROR([python was required but not found])
74                    fi])
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])
79                            build_python=no
80                         else
81                            AC_MSG_ERROR([python headers not found])
82                         fi])
83    fi
84    if test "$build_python" != no ; then
85       build_python=yes
86    fi
87 fi
88 AM_CONDITIONAL(BUILD_PYTHON,[test "$build_python" = "yes"])
89
90 dnl Handle local dict compiling properly
91 AC_SUBST(CROSS_COMPILING, $cross_compiling)
92
93 AC_OUTPUT(util/Makefile lib/Makefile doc/Makefile python/Makefile Makefile \
94                 python/setup.py \
95                 po/Makefile.in m4/Makefile dicts/Makefile cracklib.spec)
96