[cig-commits] r12323 - cs/autoconf/trunk

leif at geodynamics.org leif at geodynamics.org
Tue Jun 24 12:11:30 PDT 2008


Author: leif
Date: 2008-06-24 12:11:29 -0700 (Tue, 24 Jun 2008)
New Revision: 12323

Modified:
   cs/autoconf/trunk/cigma_vtk.m4
Log:
Changes to accommodate static VTK libs.


Modified: cs/autoconf/trunk/cigma_vtk.m4
===================================================================
--- cs/autoconf/trunk/cigma_vtk.m4	2008-06-24 17:28:20 UTC (rev 12322)
+++ cs/autoconf/trunk/cigma_vtk.m4	2008-06-24 19:11:29 UTC (rev 12323)
@@ -67,13 +67,15 @@
             AC_MSG_RESULT([yes])
 
             dnl these are the VTK libraries of a default build
-            VTK_LIBS="-lvtkCommon -lvtkIO -lvtkFiltering"
+            dnl vtkCommon, vtkIO, vtkFiltering, plus dependencies (in case VTK libs are static)
+            dnl order is significant
+            VTK_LIBS="-lvtkIO -lvtkDICOMParser -lvtkFiltering -lvtkCommon -lvtktiff -lvtkpng -lvtkjpeg -lvtkzlib -lvtkexpat -lvtksys"
 
             dnl set VTK c,cpp,ld flags
             VTK_CFLAGS="-I$VTK_PREFIX/include/vtk$vtk_suffix"
             VTK_CXXFLAGS="$VTK_CFLAGS"
             VTK_INCLUDES="-I$VTK_PREFIX/include/vtk$vtk_suffix"
-            VTK_LDFLAGS="-L$VTK_PREFIX/lib/vtk$vtk_suffix -L$VTK_PREFIX/lib64/vtk$vtk_suffix $VTK_LIBS"
+            VTK_LDFLAGS="-L$VTK_PREFIX/lib/vtk$vtk_suffix -L$VTK_PREFIX/lib64/vtk$vtk_suffix"
 
             dnl now, eventually check version
             if [[ -n "$1" ]]; then
@@ -89,9 +91,11 @@
                 OLD_CFLAGS=$CFLAGS
                 OLD_CXXFLAGS=$CXXFLAGS
                 OLD_LDFLAGS=$LDFLAGS
+                OLD_LIBS=$LIBS
                 CFLAGS="$VTK_CFLAGS $CFLAGS"
                 CXXFLAGS="$VTK_CXXFLAGS $CXXFLAGS"
                 LDFLAGS="$VTK_LDFLAGS $LDFLAGS"
+                LIBS="$VTK_LIBS $LIBS"
 
                 dnl check if the installed VTK is greater or not
                 AC_COMPILE_IFELSE([
@@ -132,6 +136,7 @@
                     CFLAGS=$OLD_CFLAGS
                     CXXFLAGS=$OLD_CXXFLAGS
                     LDFLAGS=$OLD_LDFLAGS
+                    LIBS=$OLD_LIBS
 
                     $3
                 fi              # if [[ $vtkVersion = "OK ]];



More information about the cig-commits mailing list