From c2a3f5c149037819f9a1fea58e15d0efe9d21391 Mon Sep 17 00:00:00 2001 From: Joachim Schoeberl Date: Wed, 29 Aug 2012 18:49:42 +0000 Subject: [PATCH] --disable-gui configuration flag --- configure.ac | 52 +++++++++++++++++++---------- libsrc/csg/Makefile.am | 6 +++- libsrc/geom2d/Makefile.am | 9 ++++- libsrc/interface/nginterface.cpp | 3 +- libsrc/interface/nginterface_v2.cpp | 3 +- libsrc/stlgeom/Makefile.am | 6 +++- libsrc/visualization/Makefile.am | 5 +++ ng/Makefile.am | 3 ++ 8 files changed, 65 insertions(+), 22 deletions(-) diff --git a/configure.ac b/configure.ac index 7f39555a..0bbbd4af 100644 --- a/configure.ac +++ b/configure.ac @@ -6,13 +6,6 @@ AC_CONFIG_MACRO_DIR([m4]) AC_PREFIX_DEFAULT(["/opt/netgen"]) -# Tcl/Tk configuration: -TEA_INIT([3.9]) -TEA_PATH_TCLCONFIG -TEA_LOAD_TCLCONFIG -TEA_PATH_TKCONFIG -TEA_LOAD_TKCONFIG -TEA_PUBLIC_TCL_HEADERS @@ -27,6 +20,7 @@ LT_INIT # OpenCASCADE configuration +occon=false AC_ARG_ENABLE([occ], [AC_HELP_STRING([--enable-occ],[compile with OpenCascade geometry kernel])], [occon=true]) @@ -84,6 +78,11 @@ AC_ARG_ENABLE([nglib], [AC_HELP_STRING([--enable-nglib],[generate shared library nglib])], [if test "$enableval" = yes; then nglibon=true; else nglibon=false; fi]) +ngguion=true +AC_ARG_ENABLE([gui], + [AC_HELP_STRING([--disable-gui],[don't build netgen with GUI])], + [if test "$enableval" = yes; then ngguion=true; else ngguion=false; fi]) + AC_ARG_ENABLE([parallel], [AC_HELP_STRING([--enable-parallel],[enable mpi parallelization])], @@ -128,21 +127,23 @@ AC_ARG_ENABLE([ffmpeg], ) -AM_CONDITIONAL([NGLIB], [test x$nglibon = xtrue]) + + +# only for GUI version + +if test a$ngguion = atrue ; then +# Tcl/Tk configuration: +TEA_INIT([3.9]) +TEA_PATH_TCLCONFIG +TEA_LOAD_TCLCONFIG +TEA_PATH_TKCONFIG +TEA_LOAD_TKCONFIG +TEA_PUBLIC_TCL_HEADERS AC_SUBST([TOGLLIBDIR], ["$togllibfl"]) - -AC_CHECK_HEADER(pthread.h) AC_CHECK_HEADER([togl.h]) AC_CHECK_HEADER([GL/gl.h]) -AC_CHECK_FUNCS([pow]) -AC_CHECK_FUNCS([floor]) -AC_CHECK_FUNCS([matherr]) -AC_CHECK_HEADERS([limits.h]) - -AC_CHECK_LIB(pthread, pthread_create) - #-------------------------------------------------------------------- @@ -177,6 +178,22 @@ case "${TEA_WINDOWINGSYSTEM}" in esac AC_SUBST(LIBGLU) +fi + + + +AM_CONDITIONAL([NGLIB], [test x$nglibon = xtrue]) +AM_CONDITIONAL([NGGUI], [test x$ngguion = xtrue]) + +AC_CHECK_HEADER(pthread.h) + +AC_CHECK_FUNCS([pow]) +AC_CHECK_FUNCS([floor]) +AC_CHECK_FUNCS([matherr]) +AC_CHECK_HEADERS([limits.h]) + +AC_CHECK_LIB(pthread, pthread_create) + @@ -207,6 +224,7 @@ AC_MSG_RESULT([ JPEGlib: ........... $jpeglibon FFMPEG: ............ $ffmpegon NGLIB: ............. $nglibon + GUI: ............... $ngguion Building: diff --git a/libsrc/csg/Makefile.am b/libsrc/csg/Makefile.am index 745a4650..2c9f9b75 100644 --- a/libsrc/csg/Makefile.am +++ b/libsrc/csg/Makefile.am @@ -8,7 +8,11 @@ revolution.hpp spline3d.hpp vscsg.hpp AM_CPPFLAGS = -I$(top_srcdir)/libsrc/include $(TCL_INCLUDES) METASOURCES = AUTO -lib_LTLIBRARIES = libcsg.la libcsgvis.la +lib_LTLIBRARIES = libcsg.la + +if NGGUI +lib_LTLIBRARIES += libcsgvis.la +endif libcsg_la_SOURCES = algprim.cpp brick.cpp \ diff --git a/libsrc/geom2d/Makefile.am b/libsrc/geom2d/Makefile.am index 82d95667..5e0b326b 100644 --- a/libsrc/geom2d/Makefile.am +++ b/libsrc/geom2d/Makefile.am @@ -3,7 +3,14 @@ noinst_HEADERS = geom2dmesh.hpp geometry2d.hpp vsgeom2d.hpp AM_CPPFLAGS = -I$(top_srcdir)/libsrc/include $(TCL_INCLUDES) METASOURCES = AUTO -lib_LTLIBRARIES = libgeom2d.la libgeom2dvis.la + +lib_LTLIBRARIES = libgeom2d.la + +if NGGUI +lib_LTLIBRARIES += libgeom2dvis.la +endif + + libgeom2d_la_SOURCES = genmesh2d.cpp geom2dmesh.cpp geometry2d.cpp libgeom2d_la_LIBADD = $(top_builddir)/libsrc/meshing/libmesh.la diff --git a/libsrc/interface/nginterface.cpp b/libsrc/interface/nginterface.cpp index dc69aa40..2d7afc65 100644 --- a/libsrc/interface/nginterface.cpp +++ b/libsrc/interface/nginterface.cpp @@ -8,10 +8,11 @@ #include "../sockets/sockets.hpp" #endif +/* #ifndef NOTCL #include #endif - +*/ #include "nginterface.h" #include "../visualization/soldata.hpp" diff --git a/libsrc/interface/nginterface_v2.cpp b/libsrc/interface/nginterface_v2.cpp index 3391fc09..a347f94d 100644 --- a/libsrc/interface/nginterface_v2.cpp +++ b/libsrc/interface/nginterface_v2.cpp @@ -7,10 +7,11 @@ #include "../sockets/sockets.hpp" #endif +/* #ifndef NOTCL #include #endif - +*/ #include "nginterface.h" #include "nginterface_v2.hpp" diff --git a/libsrc/stlgeom/Makefile.am b/libsrc/stlgeom/Makefile.am index cb1fd3cb..04e598cf 100644 --- a/libsrc/stlgeom/Makefile.am +++ b/libsrc/stlgeom/Makefile.am @@ -4,7 +4,11 @@ stltool.hpp stltopology.hpp vsstl.hpp AM_CPPFLAGS = -I$(top_srcdir)/libsrc/include $(TCL_INCLUDES) METASOURCES = AUTO -lib_LTLIBRARIES = libstl.la libstlvis.la +lib_LTLIBRARIES = libstl.la + +if NGGUI +lib_LTLIBRARIES += libstlvis.la +endif libstl_la_SOURCES = meshstlsurface.cpp stlgeom.cpp stlgeomchart.cpp \ stlgeommesh.cpp stlline.cpp stltool.cpp stltopology.cpp diff --git a/libsrc/visualization/Makefile.am b/libsrc/visualization/Makefile.am index 5f2dff7e..57c64b21 100644 --- a/libsrc/visualization/Makefile.am +++ b/libsrc/visualization/Makefile.am @@ -5,7 +5,12 @@ include_HEADERS = soldata.hpp AM_CPPFLAGS = $(MPI_INCLUDES) -I$(top_srcdir)/libsrc/include -DOPENGL -D$(TOGL_WINDOWINGSYSTEM) $(OCCFLAGS) $(TCL_INCLUDES) METASOURCES = AUTO + +if NGGUI noinst_LIBRARIES = libvisual.a +endif + + libvisual_a_SOURCES = meshdoc.cpp mvdraw.cpp \ vsfieldlines.cpp vsmesh.cpp vssolution.cpp importsolution.cpp AM_CXXFLAGS = -DOPENGL diff --git a/ng/Makefile.am b/ng/Makefile.am index eac459d3..5b86fd0c 100644 --- a/ng/Makefile.am +++ b/ng/Makefile.am @@ -2,7 +2,10 @@ 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) +if NGGUI bin_PROGRAMS = netgen +endif + netgen_SOURCES = demoview.cpp ngappinit.cpp onetcl.cpp parallelfunc.cpp ngpkg.cpp demoview.hpp parallelfunc.hpp togl_1_7.h # nginterface.cpp nginterface_v2.cpp