diff --git a/configure.ac b/configure.ac index 29c6321b..31688e78 100644 --- a/configure.ac +++ b/configure.ac @@ -145,6 +145,15 @@ AC_ARG_ENABLE([mkl], [if test "$enableval" = yes; then mklon=true; else mklon=false; fi] ) + +pythonon=false +AC_ARG_ENABLE([python], + [AS_HELP_STRING([--enable-python],[link boost python, necessary for ngsolve])], + [if test "$enableval" = yes; then pythonon=true; else pythonon=false; fi] + ) + + + # only for GUI version if test a$ngguion = atrue ; then @@ -202,6 +211,7 @@ fi AM_CONDITIONAL([NGLIB], [test x$nglibon = xtrue]) AM_CONDITIONAL([NGGUI], [test x$ngguion = xtrue]) AM_CONDITIONAL([NGMKL], [test x$mklon = xtrue]) +AM_CONDITIONAL([NGPYTHON], [test x$pythonon = xtrue]) AC_CHECK_HEADER(pthread.h) diff --git a/ng/Makefile.am b/ng/Makefile.am index 1bec48c6..2992f072 100644 --- a/ng/Makefile.am +++ b/ng/Makefile.am @@ -1,6 +1,7 @@ include_HEADERS = -AM_CPPFLAGS = -I$(top_srcdir)/libsrc/include -I$(top_srcdir)/libsrc/interface -DOPENGL -D$(TOGL_WINDOWINGSYSTEM) $(TCL_INCLUDES) $(MPI_INCLUDES) $(FFMPEG_INCLUDES) $(JPEGLIB_INCLUDES) -I/usr/include/python3.4 +AM_CPPFLAGS = -I$(top_srcdir)/libsrc/include -I$(top_srcdir)/libsrc/interface -DOPENGL -D$(TOGL_WINDOWINGSYSTEM) $(TCL_INCLUDES) $(MPI_INCLUDES) $(FFMPEG_INCLUDES) $(JPEGLIB_INCLUDES) + if NGGUI bin_PROGRAMS = netgen @@ -44,7 +45,15 @@ ngtesting.tcl parameters.tcl variables.tcl csgeom.tcl stlgeom.tcl \ occgeom.tcl acisgeom.tcl netgen.ocf -netgen_LDFLAGS = -export-dynamic -lboost_python-py34 -lpython3.4m +netgen_LDFLAGS = -export-dynamic + +if NGPYTHON +AM_CPPFLAGS += -I/usr/include/python3.2 -DNGPYTHON +# netgen_LDFLAGS += -lboost_python-py34 -lpython3.4m +netgen_LDFLAGS += -lboost_python-py32 -lpython3.2mu +endif + + # netgen_LDFLAGS = -rdynamic # -static diff --git a/ng/ngappinit.cpp b/ng/ngappinit.cpp index f64d57a2..1cb553ce 100644 --- a/ng/ngappinit.cpp +++ b/ng/ngappinit.cpp @@ -7,8 +7,9 @@ #include "incvis.hpp" #include +#ifdef NGPYTHON #include - +#endif namespace netgen {