--- a/configure.ac +++ b/configure.ac @@ -68,6 +68,9 @@ 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-incdir, +AC_HELP_STRING([--with-python-incdir=[DIR]],[Location of Python headers]), + [CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I${withval}"]) AC_ARG_WITH(python, AC_HELP_STRING(--without-python,[Build a python module @<:@default=auto@:>@]), build_python=$withval,build_python=auto) --- ./python/Makefile.am~ 2016-01-07 13:51:40.659463722 -0500 +++ -/python/Makefile.am 2016-01-07 13:52:16.739534985 -0500 @@ -1,8 +1,9 @@ if BUILD_PYTHON -python_PYTHON = cracklib.py test_cracklib.py +pyexec_PYTHON = cracklib.py test_cracklib.py pyexec_LTLIBRARIES = _cracklib.la AM_CFLAGS = -I$(top_srcdir)/lib -Wall _cracklib_la_LDFLAGS = -module -avoid-version $(top_builddir)/lib/libcrack.la +_cracklib_la_LIBADD = -lpython@PYTHON_VERSION@ DEFS += '-DDEFAULT_CRACKLIB_DICT="$(DEFAULT_CRACKLIB_DICT)"' DEFS += '-DPYTHON_H="python@PYTHON_VERSION@/Python.h"' endif diff --git a/configure.ac b/configure.ac index 683cfb4..4b64d7e 100644 --- a/configure.ac +++ b/configure.ac @@ -83,7 +83,7 @@ if test "$build_python" != no ; then AC_MSG_ERROR([python was required but not found]) fi]) if test "$build_python" != no ; then - AC_CHECK_HEADERS(python${PYTHON_VERSION}/Python.h,, + AC_CHECK_HEADERS(Python.h,, [if test "$build_python" != yes ; then AC_MSG_WARN([python headers not found, continuing]) build_python=no