From: prascle Date: Mon, 11 Mar 2013 16:16:46 +0000 (+0000) Subject: PR: synchro V7_main tag mergefrom_V6_main_06Mar13 X-Git-Tag: distribGeom_06Mar13 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c4d4d6d3c1f084242963aa5cfd19bdcb1c3cd086;p=plugins%2Fnetgenplugin.git PR: synchro V7_main tag mergefrom_V6_main_06Mar13 --- diff --git a/adm_local/unix/config_files/check_NETGEN.m4 b/adm_local/unix/config_files/check_NETGEN.m4 index 5aa0eeb..9358e49 100644 --- a/adm_local/unix/config_files/check_NETGEN.m4 +++ b/adm_local/unix/config_files/check_NETGEN.m4 @@ -77,7 +77,8 @@ if test "x$NETGEN_HOME" != "x"; then echo ---------------------------------------------------------- NETGEN_INCLUDES="-I${NETGEN_HOME}/include -I${NETGEN_HOME}/share/netgen/include" - NETGEN_LIBS="-L${NETGEN_HOME}/lib -lnglib" + NETGEN_LIBS_OLD="-L${NETGEN_HOME}/lib -lnglib" + NETGEN_LIBS_NEW="-L${NETGEN_HOME}/lib -lnglib -linterface -lgeom2d -lcsg -lstl -locc -lmesh" dnl check Netgen headers availability @@ -92,31 +93,57 @@ if test "x$NETGEN_HOME" != "x"; then dnl check Netgen libraries + NETGEN_LIBS=${NETGEN_LIBS_NEW} + LIBS_old="$LIBS" - LIBS="$NETGEN_LIBS $CAS_LDPATH -lTKernel -lTKMath -lTKG3d -lTKBRep -lTKShHealing -lTKSTEP -lTKXSBase -lTKIGES -lTKSTL -lTKTopAlgo -lTKGeomBase $LIBS" + LIBS="$NETGEN_LIBS $CAS_LDPATH -lTKernel -lTKMath -lTKG3d -lTKBRep -lTKShHealing -lTKSTEP -lTKXSBase -lTKIGES -lTKSTL -lTKTopAlgo -lTKGeomBase $LIBS_old" if test "x$Netgen_ok" = "xyes"; then - AC_MSG_CHECKING([for Netgen libraries]) - - AC_CACHE_VAL([salome_cv_netgen_lib], - [AC_TRY_LINK( - [ - #include - #include - namespace nglib { - #include "nglib.h" - } - ], - [ - nglib::Ng_Init(); - nglib::Ng_Exit(); - ], - [eval "salome_cv_netgen_lib=yes"], - [eval "salome_cv_netgen_lib=no"]) - ]) - - Netgen_ok="$salome_cv_netgen_lib" + AC_MSG_NOTICE([checking for Netgen libraries]) + + AC_MSG_CHECKING([libraries ... try new style ]) + + AC_TRY_LINK( + [ + #include + #include + namespace nglib { + #include "nglib.h" + } + ], + [ + nglib::Ng_Init(); + nglib::Ng_Exit(); + ], + [Netgen_ok=yes], + [Netgen_ok=no]) + + if test "x$Netgen_ok" = "xno" ; then + + AC_MSG_RESULT([no]) + + AC_MSG_CHECKING([libraries ... try old style]) + + NETGEN_LIBS=${NETGEN_LIBS_OLD} + LIBS="$NETGEN_LIBS $CAS_LDPATH -lTKernel -lTKMath -lTKG3d -lTKBRep -lTKShHealing -lTKSTEP -lTKXSBase -lTKIGES -lTKSTL -lTKTopAlgo -lTKGeomBase $LIBS_old" + + AC_TRY_LINK( + [ + #include + #include + namespace nglib { + #include "nglib.h" + } + ], + [ + nglib::Ng_Init(); + nglib::Ng_Exit(); + ], + [Netgen_ok=yes], + [Netgen_ok=no]) + + fi fi @@ -128,30 +155,25 @@ if test "x$NETGEN_HOME" != "x"; then AC_MSG_CHECKING([Netgen version]) - AC_CACHE_VAL([salome_cv_netgen_v5_lib], - [AC_TRY_LINK( - [ - #include - #include - #define OCCGEOMETRY - namespace nglib { - #include "nglib.h" - } - #include - ], - [ - nglib::Ng_Init(); - netgen::Mesh* ngMesh; - ngMesh->CalcLocalH(1.0); - nglib::Ng_Exit(); - ], - [eval "salome_cv_netgen_v5_lib=yes"], - [eval "salome_cv_netgen_v5_lib=no"]) - ]) - - if test "x$salome_cv_netgen_v5_lib" = "xyes" ; then - NETGEN_V5=yes - fi + AC_TRY_LINK( + [ + #include + #include + #define OCCGEOMETRY + namespace nglib { + #include "nglib.h" + } + #include + ], + [ + nglib::Ng_Init(); + netgen::Mesh* ngMesh; + ngMesh->CalcLocalH(1.0); + nglib::Ng_Exit(); + ], + [NETGEN_V5=yes], + [NETGEN_V5=no]) + fi dnl check OCCT support in Netgen @@ -162,26 +184,22 @@ if test "x$NETGEN_HOME" != "x"; then AC_MSG_CHECKING([for OCCT support in Netgen library]) - AC_CACHE_VAL([salome_cv_netgen_occ_lib], - [AC_TRY_LINK( - [ - #include - #include - #define OCCGEOMETRY - namespace nglib { - #include "nglib.h" - } - ], - [ - nglib::Ng_Init(); - nglib::Ng_OCC_Geometry* ng_occ_geom = nglib::Ng_OCC_NewGeometry(); - nglib::Ng_Exit(); - ], - [eval "salome_cv_netgen_occ_lib=yes"], - [eval "salome_cv_netgen_occ_lib=no"]) - ]) - - Netgen_ok="$salome_cv_netgen_occ_lib" + AC_TRY_LINK( + [ + #include + #include + #define OCCGEOMETRY + namespace nglib { + #include "nglib.h" + } + ], + [ + nglib::Ng_Init(); + nglib::Ng_OCC_Geometry* ng_occ_geom = nglib::Ng_OCC_NewGeometry(); + nglib::Ng_Exit(); + ], + [Netgen_ok=yes], + [Netgen_ok=no]) fi @@ -193,28 +211,24 @@ if test "x$NETGEN_HOME" != "x"; then AC_MSG_CHECKING([for SALOME patch in Netgen library]) - AC_CACHE_VAL([salome_cv_netgen_salome_patch_lib], - [AC_TRY_LINK( - [ - #include - #include - #define OCCGEOMETRY - namespace nglib { - #include "nglib.h" - } - #include - ], - [ - nglib::Ng_Init(); - netgen::OCCGeometry occgeo; - nglib::Ng_Exit(); - ], - [eval "salome_cv_netgen_salome_patch_lib=yes"], - [eval "salome_cv_netgen_salome_patch_lib=no"]) - ]) - - Netgen_ok="$salome_cv_netgen_salome_patch_lib" - + AC_TRY_LINK( + [ + #include + #include + #define OCCGEOMETRY + namespace nglib { + #include "nglib.h" + } + #include + ], + [ + nglib::Ng_Init(); + netgen::OCCGeometry occgeo; + nglib::Ng_Exit(); + ], + [Netgen_ok=yes], + [Netgen_ok=no]) + fi LIBS="$LIBS_old"