1 ##### http://autoconf-archive.cryp.to/ac_python_module.html
5 # AC_PYTHON_MODULE(modname[, fatal])
9 # Checks for Python module.
11 # If fatal is non-empty then absence of a module will trigger an
20 # Copyright (c) 2007 Andrew Collier <colliera@ukzn.ac.za>
22 # Copying and distribution of this file, with or without
23 # modification, are permitted in any medium without royalty provided
24 # the copyright notice and this notice are preserved.
26 AC_DEFUN([AC_PYTHON_MODULE],[
31 PYTHON_NAME=`basename $PYTHON`
32 AC_MSG_CHECKING($PYTHON_NAME module: $1)
33 $PYTHON -c "import $1" 2>/dev/null
37 eval AS_TR_CPP(HAVE_PYMOD_$1)=yes
40 eval AS_TR_CPP(HAVE_PYMOD_$1)=no
44 AC_MSG_ERROR(failed to find required module $1)