~registry/libpwquality/default

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
dnl Process this file with autoconf to produce a configure script.
AC_INIT([libpwquality], [0.9.9])
AM_INIT_AUTOMAKE([-Wall])
AC_PREREQ(2.61)
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([m4])
AC_CANONICAL_HOST

dnl LT Version numbers, remember to change them *before* a release.
dnl   (Interfaces removed:    CURRENT++, AGE=0, REVISION=0)
dnl   (Interfaces added:      CURRENT++, AGE++, REVISION=0)
dnl   (No interfaces changed:                   REVISION++)
PWQUALITY_LT_CURRENT=1
PWQUALITY_LT_AGE=0
PWQUALITY_LT_REVISION=0

AC_SUBST(PACKAGE)
AC_SUBST(VERSION)
AC_SUBST(PWQUALITY_LT_CURRENT)
AC_SUBST(PWQUALITY_LT_AGE)
AC_SUBST(PWQUALITY_LT_REVISION)

dnl Checks for programs.
AC_USE_SYSTEM_EXTENSIONS
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_LIBTOOL

dnl and some hacks to use /etc
test "${prefix}" = "NONE" && prefix="/usr"
if test ${prefix} = '/usr'
then
dnl If we use /usr as prefix, use /etc for config files
        if test ${sysconfdir} = '${prefix}/etc'
        then
                sysconfdir="/etc"
        fi
dnl If we use /usr as prefix, use /usr/share/man for manual pages
        if test ${mandir} = '${prefix}/man'
        then
                mandir='${prefix}/share/man'
        fi
fi

dnl Localization support
AM_GNU_GETTEXT_VERSION([0.15])
AM_GNU_GETTEXT([external])
AC_CHECK_FUNCS(dngettext)
AH_BOTTOM([#ifdef ENABLE_NLS
#include <libintl.h>
#define _(msgid) dgettext(PACKAGE, msgid)
#define N_(msgid) msgid
#else   
#define _(msgid) (msgid)
#define N_(msgid) msgid
#endif /* ENABLE_NLS */])

dnl Library version scripts

dnl For some systems we know that we have ld_version scripts.
dnl Use it then as default.
have_ld_version_script=no
case "${host}" in
    *-*-linux*)
        have_ld_version_script=yes
        ;;
    *-*-gnu*)
        have_ld_version_script=yes
        ;;
esac

AC_ARG_ENABLE([ld-version-script],
              AC_HELP_STRING([--enable-ld-version-script],
                             [enable/disable use of linker version script.
                              (default is system dependent)]),
              [have_ld_version_script=$enableval],
              [ : ] )
AM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "$have_ld_version_script" = "yes")

dnl options and defaults
AC_ARG_WITH(securedir,
        AS_HELP_STRING([--with-securedir=DIR],[path to location of PAMs @<:@default=$libdir/security@:>@]),
        SECUREDIR=$withval, SECUREDIR=$libdir/security)
AC_SUBST(SECUREDIR)

AC_ARG_WITH(sconfigdir,
	AS_HELP_STRING([--with-sconfigdir=DIR],[path to PAM conf files @<:@default=$sysconfdir/security@:>@]),
	SCONFIGDIR=$enableval, SCONFIGDIR=$sysconfdir/security)
AC_SUBST(SCONFIGDIR)

AC_ARG_WITH(python-rev,
            [  --with-pythonrev=2.7    version of python for which modules should be built],
            PYTHONREV=$withval,[
            AC_MSG_CHECKING([python version])
            [PYTHONREV=`python -c 'import sys;print "%s.%s" % (sys.version_info[0], sys.version_info[1])'`]
            AC_MSG_RESULT($PYTHONREV)
            ])
AC_SUBST(PYTHONREV)

AC_ARG_WITH(pythonsitedir,
            [  --with-pythonsitedir=DIR    directory of the python site packages @<:@default=$libdir/python$PYTHONREV/site-packages@:>@],
            PYTHONSITEDIR=$withval,[
            AC_MSG_CHECKING([python version])
            [PYTHONSITEDIR=$libdir/python$PYTHONREV/site-packages]
            AC_MSG_RESULT($PYTHONSITEDIR)
            ])
AC_SUBST(PYTHONSITEDIR)

dnl Check for cracklib
AC_CHECK_HEADERS([crack.h],
      AC_CHECK_LIB([crack], [FascistCheck], LIBCRACK="-lcrack", LIBCRACK=""))
if test x$LIBCRACK = x ; then
    AC_MSG_ERROR([No or unusable cracklib library])
fi
AC_SUBST([LIBCRACK])

AC_ARG_WITH([randomdev], AS_HELP_STRING([--with-randomdev=(<path>|yes)],[use specified random device instead of /dev/urandom]), opt_randomdev=$withval)
if test "$opt_randomdev" = yes -o -z "$opt_randomdev"; then
       opt_randomdev="/dev/urandom"
fi
AC_DEFINE_UNQUOTED(CONF_PATH_RANDOMDEV, "$opt_randomdev", [Random device path.])

dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_BIGENDIAN
AC_C_CONST

dnl Checks for library functions.
AC_CHECK_FUNCS(strcspn strdup strspn strstr strtol)

dnl Files to be created from when we run configure
AC_CONFIG_FILES([Makefile libpwquality.spec src/Makefile po/Makefile.in python/Makefile
                 doc/Makefile doc/man/Makefile])
AC_OUTPUT