util/cracklib-check < test-data
dict: all
- PATH="./util:$$PATH" ./util/create-cracklib-dict dicts/*
+ if test "x$(CROSS_COMPILING)" = "xno" ; then \
+ export PATH="$(top_builddir)/util:$$PATH" ; \
+ export LD_LIBRARY_PATH="$(top_builddir)/lib/.libs:$$LD_LIBRARY_PATH" ; \
+ fi ; \
+ create-cracklib-dict "$(srcdir)"/dicts/*
+
+dict-local: all
+ if test "x$(CROSS_COMPILING)" = "xno" ; then \
+ export PATH="$(top_builddir)/util:$$PATH" ; \
+ export LD_LIBRARY_PATH="$(top_builddir)/lib/.libs:$$LD_LIBRARY_PATH" ; \
+ fi ; \
+ cracklib-format "$(srcdir)"/dicts/* | cracklib-packer $(DESTDIR)/$(DEFAULT_CRACKLIB_DICT)
ACLOCAL_AMFLAGS = -I m4
v2.8.5 Add some sanity checkng to auto* script calls. (Mike Frysinger)
+ Add support for cross compiling with a local dictionary
+ Add a configure option to control default dictionary path
v2.8.4 Patches for mod_php build issues
Full localization of strings thanks to Thorsten Kukuk.
Patches for python binding support thanks to Nalin Dahyabhai
AM_GNU_GETTEXT_VERSION
AM_GNU_GETTEXT([external])
+dnl Control default dictname
+AC_MSG_CHECKING(default dict filename)
+AC_ARG_WITH(default-dict,
+AC_HELP_STRING(--with-default-dict,[Specify default dict filename]),
+default_cracklib_dict=$withval,
+default_cracklib_dict='$(pkgdatadir)/pw_dict')
+AC_SUBST(DEFAULT_CRACKLIB_DICT, $default_cracklib_dict)
+AC_MSG_RESULT($default_cracklib_dict)
+
dnl Check for python, unless we were told to not try to build a python module
AC_ARG_WITH(python,
-AC_HELP_STRING(--without-python,[Build a python module (default auto)]),
+AC_HELP_STRING(--without-python,[Build a python module @<:@default=auto@:>@]),
build_python=$withval,build_python=auto)
if test "$build_python" != no ; then
AM_PATH_PYTHON(,,
fi
AM_CONDITIONAL(BUILD_PYTHON,[test "$build_python" = "yes"])
+dnl Handle local dict compiling properly
+AC_SUBST(CROSS_COMPILING, $cross_compiling)
+
AC_OUTPUT(util/Makefile lib/Makefile doc/Makefile python/Makefile Makefile \
po/Makefile.in m4/Makefile cracklib.spec)
#
libcrack_la_LDFLAGS = -version-info 10:0:8
-AM_CPPFLAGS = -I. -I.. -I$(top_srcdir)/lib -DIN_CRACKLIB '-DDEFAULT_CRACKLIB_DICT="$(pkgdatadir)/pw_dict"'
+AM_CPPFLAGS = -I. -I.. -I$(top_srcdir)/lib -DIN_CRACKLIB '-DDEFAULT_CRACKLIB_DICT="$(DEFAULT_CRACKLIB_DICT)"'
if BUILD_PYTHON
pyexec_LTLIBRARIES = cracklibmodule.la
cracklibmodule_la_LDFLAGS = -module -avoid-version -L$(top_builddir)/lib -lcrack
-DEFS += '-DDEFAULT_CRACKLIB_DICT="$(pkgdatadir)/pw_dict"'
+DEFS += '-DDEFAULT_CRACKLIB_DICT="$(DEFAULT_CRACKLIB_DICT)"'
DEFS += '-DPYTHON_H="python@PYTHON_VERSION@/Python.h"'
endif
LDADD = ../lib/libcrack.la
-AM_CPPFLAGS = -I. -I.. -I$(top_srcdir)/lib '-DDEFAULT_CRACKLIB_DICT="$(pkgdatadir)/pw_dict"'
+AM_CPPFLAGS = -I. -I.. -I$(top_srcdir)/lib '-DDEFAULT_CRACKLIB_DICT="$(DEFAULT_CRACKLIB_DICT)"'
cracklib_check_SOURCES = check.c
cracklib_check_LDADD = $(LDADD)