[MOAB-dev] r4412 - MOAB/trunk

kraftche at cae.wisc.edu kraftche at cae.wisc.edu
Wed Dec 22 17:06:49 CST 2010


Author: kraftche
Date: 2010-12-22 17:06:49 -0600 (Wed, 22 Dec 2010)
New Revision: 4412

Modified:
   MOAB/trunk/configure.ac
Log:
Clean up VTK configuration:

o Remove duplicate VTK detection logic (qvdual & vtkMOABReader)
o Make --enable-vtkMOABReader imply --with-vtk
o Make --enable-qvdual imply --with-vtk
o Make --with-vtk imply --enable-vtkMOABReader
o Do not check for VTK unless --with-vtk is specified (or implied)
o Check for VTK headers in additional default directories
o Fail early if --with-vtk is specified (or implied) and not found
o Remove bogus warnings about build failing if VTK is not found
   when neither vtkMOABReader nor qvdual is going to be built



Modified: MOAB/trunk/configure.ac
===================================================================
--- MOAB/trunk/configure.ac	2010-12-22 21:52:09 UTC (rev 4411)
+++ MOAB/trunk/configure.ac	2010-12-22 23:06:49 UTC (rev 4412)
@@ -505,6 +505,26 @@
                esac] )
 
 
+
+################################################################################
+#                            Optional Libraries
+################################################################################
+
+AC_ARG_WITH([vtk],
+  [AC_HELP_STRING([--with-vtk@<:@=DIR@:>@], [Enable VTK support, and specify VTK location])],
+  [WITH_VTK=$withval
+   DISTCHECK_CONFIGURE_FLAGS="$DISTCHECK_CONFIGURE_FLAGS --with-vtk=\"${withval}\""
+  ],[WITH_VTK=])
+
+VTKMOAB_DEFAULT=no
+if test "x$WITH_VTK" != "xno" -a "x$WITH_VTK" != "x"; then
+  VTKMOAB_DEFAULT=yes
+fi
+
+echo "WITH_VTK=$WITH_VTK"
+echo "VTKMOAB_DEFAULT=$VTKMOAB_DEFAULT"
+  
+
 ###############################################################################
 #                           Optional Tools
 ###############################################################################
@@ -539,7 +559,7 @@
 MB_OPTIONAL_TOOL([mbconvert],    [yes])
 MB_OPTIONAL_TOOL([hexmodops],    [yes])
 MB_OPTIONAL_TOOL([qvdual],       [no] )
-MB_OPTIONAL_TOOL([vtkMOABReader],[no] )
+MB_OPTIONAL_TOOL([vtkMOABReader],[${VTKMOAB_DEFAULT}] )
 MB_OPTIONAL_TOOL([mbsize],       [yes])
 MB_OPTIONAL_TOOL([mbskin],       [yes])
 MB_OPTIONAL_TOOL([mbtagprop],    [yes])
@@ -560,7 +580,26 @@
   fi
 fi
 
+if test "xyes" = "x$ENABLE_vtkMOABReader"; then
+  if test "xno" == "x$WITH_VTK"; then
+    AC_MSG_ERROR([vtkMOABReader requires VTK])
+  elif test "x" == "x$WITH_VTK"; then 
+    WITH_VTK=yes
+  fi
+fi


More information about the moab-dev mailing list