Skip to content
Snippets Groups Projects
Commit b379fbdc authored by Klaus Rabbertz's avatar Klaus Rabbertz
Browse files

Require Python3 for pyext; add --pythondir option to fnlo-tk-config

parent 748fe297
No related branches found
No related tags found
No related merge requests found
......@@ -605,32 +605,23 @@ fi
AM_CONDITIONAL(HAVE_PDFLATEX, test "x$PDFLATEX" != "x")
AM_CONDITIONAL(HAVE_LATEXDVIPDFM, test "x$LATEX" != "x" && test "x$DVIPDFM" != "x")
# Python extension
# Python extension (requires Python3!)
AC_MSG_NOTICE([******************************************])
AC_MSG_NOTICE([Checking whether Python extension is requested ...])
AC_MSG_NOTICE([******************************************])
AC_ARG_ENABLE([pyext],
[AS_HELP_STRING([--enable-pyext],[Optionally build Python module to interface C++ library. Default is no.])],
[AS_HELP_STRING([--enable-pyext],[Optionally build Python3 module to interface C++ library. Default is no.])],
[],
[enable_pyext="no"])
AC_ARG_ENABLE([pyext3],
[AS_HELP_STRING([--enable-pyext3],[Optionally build Python3 module to interface C++ library. Default is no. Overrides enable_pyext.])],
[],
[enable_pyext3="no"])
# Basic Python checks
if test "x$enable_pyext3" = "xyes"; then
AM_PATH_PYTHON(['3'])
if test "x$enable_pyext" = "xyes"; then
AM_PATH_PYTHON([3])
AX_PYTHON_DEVEL
else
if test "x$enable_pyext" = "xyes"; then
AM_PATH_PYTHON
AX_PYTHON_DEVEL([>='2.3.1'])
fi
fi
# Check on existence of SWIG to interface to Python
if test \( "x$enable_pyext" = "xyes" -o "x$enable_pyext3" = "xyes" \) -a ! -e pyext/FastNLOReader_wrap.cpp; then
if test \( "x$enable_pyext" = "xyes" \) -a ! -e pyext/FastNLOReader_wrap.cpp; then
AC_PATH_PROG(SWIG, swig)
if test "x$SWIG" = "x"; then
AC_MSG_ERROR([swig not found, interfacing to Python not possible! Please install swig first or disable Python extension. Configuration aborted!])
......@@ -641,18 +632,14 @@ fi
AC_MSG_NOTICE([******************************************])
if test "x$enable_pyext3" = "xyes"; then
if test "x$enable_pyext" = "xyes"; then
AC_MSG_NOTICE([All Python3 checks successful. Requested Python3 extension will be built.])
else
if test "x$enable_pyext" = "xyes"; then
AC_MSG_NOTICE([All Python checks successful. Requested Python extension will be built.])
else
AC_MSG_NOTICE([No Python extension requested. Continue without pyext.])
fi
AC_MSG_NOTICE([No Python extension requested. Continue without pyext.])
fi
AC_MSG_NOTICE([******************************************])
AM_CONDITIONAL(ENABLE_PYEXT, [test "x$enable_pyext" = "xyes" -o "x$enable_pyext3" = "xyes"])
AM_CONDITIONAL(ENABLE_PYEXT, [test "x$enable_pyext" = "xyes"])
# Fortran extension
AC_MSG_NOTICE([******************************************])
......
......@@ -21,6 +21,7 @@ if [[ $# -eq 0 || -n $( echo $* | egrep -- "--help|-h" ) ]]; then
echo " --prefix : Show the installation prefix."
echo " --incdir : Show the path to the include directory for fastNLO Toolkit header files."
echo " --libdir : Show the path to the directory for the fastNLO Toolkit libraries."
echo " --pythondir : Show the path to the directory with the python extension if any"
echo
echo " --cppflags : Get compiler flags to use with the C preprocessor stage of C++ compilation"
echo " --ldflags : Get compiler flags to use with the linker stage of any compilation"
......@@ -45,6 +46,9 @@ test -n "$tmp" && OUT="$OUT @libdir@"
tmp=$( echo "$*" | egrep -- '--\<ldflags\>')
test -n "$tmp" && OUT="$OUT -L@libdir@ -lfastnlotoolkit"
tmp=$( echo "$*" | egrep -- '--\<pythondir\>')
test -n "$tmp" && OUT="$OUT @prefix@@pythondir@"
## Version& revision number
tmp=$( echo "$*" | egrep -- '--\<version\>')
test -n "$tmp" && OUT="$OUT @PACKAGE_VERSION@_@GITREV@"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment