# HG changeset patch # User Erik Grinaker # Date 1093909043 0 # Node ID 94cc26e5e65d4a4099c503fa2b533e1278ee32d1 # Parent 426b438f42fcd568cab91770b543f36816311965 check for python Crypto module on installation diff -r 426b438f42fcd568cab91770b543f36816311965 -r 94cc26e5e65d4a4099c503fa2b533e1278ee32d1 configure.ac --- a/configure.ac Mon Aug 30 23:22:51 2004 +0000 +++ b/configure.ac Mon Aug 30 23:37:23 2004 +0000 @@ -1,13 +1,34 @@ -# initialize autoconf/automake +dnl initialize autoconf/automake AC_PREREQ(2.53) AC_INIT(src/revelation.in) AM_INIT_AUTOMAKE(revelation, 0.4.0) +dnl some macros +AC_DEFUN([AC_PYTHON_MODULE],[ + AC_MSG_CHECKING(python module: $1) + python -c "import $1" 2>/dev/null + + if test $? -eq 0; then + AC_MSG_RESULT(yes) + eval AS_TR_CPP(HAVE_PYMOD_$1)=yes + else + AC_MSG_RESULT(no) + eval AS_TR_CPP(HAVE_PYMOD_$1)=no + + if test -n "$2"; then + AC_MSG_ERROR(failed to find required module $1) + exit 1 + fi + fi +]) + + dnl check for dependencies AM_PATH_PYTHON(2.3) PKG_CHECK_MODULES(PYGTK, pygtk-2.0 >= 2.3.90) PKG_CHECK_MODULES(GNOME_PYTHON, gnome-python-2.0 >= 2.5.90) +AC_PYTHON_MODULE(Crypto, yes) AC_PATH_PROG(GCONFTOOL, gconftool-2, no) if test x"$GCONFTOOL" = xno; then