1 dnl Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
4 dnl This library is free software; you can redistribute it and/or
5 dnl modify it under the terms of the GNU Lesser General Public
6 dnl License as published by the Free Software Foundation; either
7 dnl version 2.1 of the License.
9 dnl This library is distributed in the hope that it will be useful,
10 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
11 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 dnl Lesser General Public License for more details.
14 dnl You should have received a copy of the GNU Lesser General Public
15 dnl License along with this library; if not, write to the Free Software
16 dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 dnl See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
25 dnl ------------------------------------------------------------------------
26 dnl Adds the --with-paraview=path
28 AC_DEFUN([OPTIONS_PARAVIEW], [
29 AC_ARG_WITH([paraview],
30 [AC_HELP_STRING([--with-paraview], [The prefix where ParaView is located (default "" means taking from PVHOME environment variable)])],
31 [with_paraview=$withval], [with_paraview=""])
36 dnl ------------------------------------------------------------------------
37 dnl a simplified check that assumes VTK is a part of ParaView, separate location
38 dnl for VTK is not supported
40 AC_DEFUN([CHECK_PARAVIEW], [
41 AC_REQUIRE([AC_PROG_CC])dnl
42 AC_REQUIRE([AC_PROG_CXX])dnl
43 AC_REQUIRE([AC_PROG_CPP])dnl
44 AC_REQUIRE([AC_PROG_CXXCPP])dnl
45 AC_REQUIRE([AC_LINKER_OPTIONS])dnl
47 AC_REQUIRE([OPTIONS_PARAVIEW])dnl
49 AC_CHECKING(for ParaView)
54 AC_SUBST(PARAVIEW_INCLUDES)
55 AC_SUBST(PARAVIEW_LIBS)
56 dnl AC_SUBST(VTKPY_MODULES)
64 if test "x$OpenGL_ok" != "xyes" ; then
65 AC_MSG_WARN(ParaView needs OpenGL correct configuration, check configure output)
69 if test "x$qt_ok" != "xyes" ; then
70 AC_MSG_WARN(ParaView needs Qt correct configuration, check configure output)
73 if test "x$hdf5_ok" != "xyes" ; then
74 AC_MSG_WARN(ParaView needs correct HDF5 configuration, check configure output)
78 if test "x$x_libraries" != "x"
80 LXLIB="-L$x_libraries"
85 if test "x$x_libraries" = "x/usr/lib"
90 if test "x$x_libraries" = "x/usr/lib${LIB_LOCATION_SUFFIX}"
95 LOCAL_INCLUDES="$OGL_INCLUDES"
96 LOCAL_LIBS="-lvtksys -lvtkzlib -lvtkpng -lvtkjpeg -lvtktiff -lvtkexpat -lvtksqlite -lvtkmetaio -lvtkverdict -lvtkNetCDF -lvtkDICOMParser -lvtkfreetype -lvtkftgl -lvtkexoIIc -lvtklibxml2 -lvtkCommon -lvtkGraphics -lvtkImaging -lvtkFiltering -lvtkIO -lvtkRendering -lvtkHybrid -lvtkParallel -lvtkWidgets -lvtkClientServer -lvtkCommonCS -lvtkFilteringCS -lvtkIOCS -lvtkImagingCS -lvtkGraphicsCS -lvtkGenericFiltering -lvtkGenericFilteringCS -lvtkRenderingCS -lvtkHybridCS -lvtkParallelCS -lvtkPVCommandOptions -lKWCommon -lvtkInfovis -lvtkInfovisCS -lvtkPVServerCommon -lvtkPVServerCommonCS -lvtkCommonPythonD -lvtkFilteringPythonD -lvtkIOPythonD -lXdmf -lvtkXdmf -lvtkXdmfCS -lvtkWidgetsCS -lvtkVolumeRendering -lvtkVolumeRenderingCS -lvtkPVFilters -lvtkPVFiltersCS -lvtkViews -lvtkPVServerManagerPythonD -lvtkPVServerCommonPythonD -lvtkPVPythonInterpretor -lvtkPVServerManager -lQVTK -lpqWidgets -lQtTesting -lvtkQtChart -lpqCore -lQtPython -lpqApplicationComponents -lpqComponents -lvtkalglib $LXLIB -lX11 -lXt"
99 if test -z $with_paraview ; then
102 if test "x$with_paraview" = "xyes" ; then
103 dnl in case user wrote --with-paraview=yes
106 if test "x$with_paraview" = "xno" ; then
107 dnl in case user wrote --with-paraview=no
109 AC_MSG_WARN(Value "no", specified for option --with-paraview, is not supported)
112 if test "x$with_paraview" != "x" ; then
113 PVHOME="$with_paraview"
116 if test -z $PVHOME ; then
117 AC_MSG_WARN(undefined PVHOME and PVSRCHOME variables which specify where ParaView is located)
120 LOCAL_INCLUDES="-I$PVHOME/include/paraview-$PVVERSION $LOCAL_INCLUDES"
122 LOCAL_LIBS="-L$PVHOME/lib/paraview-$PVVERSION $LOCAL_LIBS"
125 CPPFLAGS_old="$CPPFLAGS"
126 CPPFLAGS="$CPPFLAGS $LOCAL_INCLUDES $QT_INCLUDES"
128 AC_CHECK_HEADER(pqApplicationCore.h,paraview_ok="yes",paraview_ok="no")
130 CPPFLAGS="$CPPFLAGS_old"
132 if test "x$paraview_ok" = "xyes"
134 PARAVIEW_INCLUDES="$LOCAL_INCLUDES"
138 AC_MSG_CHECKING(linking ParaView component library)
141 LIBS="$LIBS $QT_LIBS $LOCAL_LIBS"
142 CPPFLAGS_old="$CPPFLAGS"
143 CPPFLAGS="$CPPFLAGS $QT_INCLUDES $PARAVIEW_INCLUDES"
145 dnl VTKPY_MODULES="$VTKHOME/python"
147 AC_CACHE_VAL(salome_cv_lib_paraview,[
148 AC_TRY_LINK([#include "pqApplicationCore.h"
150 [pqApplicationCore::instance()],
151 [salome_cv_lib_paraview=yes],
152 [salome_cv_lib_paraview=no])
154 paraview_ok="$salome_cv_lib_paraview"
156 CPPFLAGS="$CPPFLAGS_old"
159 if test "x$paraview_ok" = "xno"
162 AC_MSG_WARN(unable to link with ParaView component library)
165 PARAVIEW_LIBS="$LOCAL_LIBS"
168 AC_MSG_RESULT(for ParaView: $paraview_ok)