+ AC_ARG_WITH(python-include,
+ [ --with-python-include=DIR
+ location of the python include dir],[
+ if test "$withval" = "yes" -o "$withval" = "no"; then
+ AC_MSG_WARN(Usage: --with-python-include=includedir)
+ else
+ PYTHON_CFLAGS="-I${withval}"
+ fi
+ ])
+
+ AC_ARG_WITH(python-lib,
+ [ --with-python-lib=NAME name of the python lib],[
+ if test "$withval" = "yes" -o "$withval" = "no"; then
+ AC_MSG_WARN(Usage: --with-python-lib=name)
+ else
+ LDFLAGS="$LDFLAGS -l${withval}"
+ fi
+ ])
+
+ AC_CHECK_PROGS(PYTHON_CONFIG, python-config, no)
+
+ if test -z "$PYTHON_CFLAGS" -a "$PYTHON_CONFIG" != "no"; then
+ # Clean out junk: http://bugs.python.org/issue3290
+ # Python headers may need some -f* flags, leave them in.
+ PYTHON_CFLAGS=`$PYTHON_CONFIG --cflags | sed -e 's/ -\(W\|D\|O\)\(\w\|-\)\+//g'`
+ PYTHON_LDFLAGS=`$PYTHON_CONFIG --ldflags`
+ fi
+
+ if test -z "$PYTHON_CFLAGS" -a "$cross_compiling" = "no"; then