diff --git a/configure b/configure index 66ba67e285..5dc5299306 100755 --- a/configure +++ b/configure @@ -14526,6 +14526,13 @@ if test "$enable_VTK" = no ; then enable_vtk=no; fi if test "$enable_vtk" != "no" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: Checking for VTK automagic." >&5 $as_echo "$as_me: Checking for VTK automagic." >&6;} + VTK_FLAGS=`cmake --find-package -DNAME=VTK -DCOMPILER_ID=gcc -DLANGUAGE=Fortran -DMODE=COMPILE` + VTK_LIBS=`cmake --find-package -DNAME=VTK -DCOMPILER_ID=gcc -DLANGUAGE=Fortran -DMODE=LINK` + + OLD_CPPFLAGS="$CPP_FLAGS" + CPPFLAGS="$CPPFLAGS $VTK_FLAGS" + OLD_LIBS="$LIBS" + LIBS="$LIBS $VTK_LIBS" ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -14579,6 +14586,8 @@ else { $as_echo "$as_me:${as_lineno-$LINENO}: No VTK automagic" >&5 $as_echo "$as_me: No VTK automagic" >&6;} search_for_vtk=yes + CPPFLAGS="$OLD_CPPFLAGS" + LIBS="$OLD_LIBS" fi rm -f core conftest.err conftest.$ac_objext \ diff --git a/configure.in b/configure.in index 26ee06fe6b..b68aa40994 100644 --- a/configure.in +++ b/configure.in @@ -1495,6 +1495,13 @@ if test "$with_VTK" = no ; then enable_vtk=no; fi if test "$enable_VTK" = no ; then enable_vtk=no; fi if test "$enable_vtk" != "no" ; then AC_MSG_NOTICE([Checking for VTK automagic.]) + VTK_FLAGS=`cmake --find-package -DNAME=VTK -DCOMPILER_ID=gcc -DLANGUAGE=Fortran -DMODE=COMPILE` + VTK_LIBS=`cmake --find-package -DNAME=VTK -DCOMPILER_ID=gcc -DLANGUAGE=Fortran -DMODE=LINK` + + OLD_CPPFLAGS="$CPP_FLAGS" + CPPFLAGS="$CPPFLAGS $VTK_FLAGS" + OLD_LIBS="$LIBS" + LIBS="$LIBS $VTK_LIBS" AC_LANG_PUSH([C++]) AC_LINK_IFELSE( [AC_LANG_PROGRAM([[ @@ -1514,7 +1521,9 @@ if test "$enable_vtk" != "no" ; then ], [ AC_MSG_NOTICE([No VTK automagic]) - search_for_vtk=yes + search_for_vtk=yes + CPPFLAGS="$OLD_CPPFLAGS" + LIBS="$OLD_LIBS" ]) if test "x$search_for_vtk" = "xyes" ; then diff --git a/libadaptivity/configure b/libadaptivity/configure index 1ce3ec9634..a72ecedc12 100755 --- a/libadaptivity/configure +++ b/libadaptivity/configure @@ -690,7 +690,6 @@ infodir docdir oldincludedir includedir -runstatedir localstatedir sharedstatedir sysconfdir @@ -780,7 +779,6 @@ datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' -runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE}' @@ -1033,15 +1031,6 @@ do | -silent | --silent | --silen | --sile | --sil) silent=yes ;; - -runstatedir | --runstatedir | --runstatedi | --runstated \ - | --runstate | --runstat | --runsta | --runst | --runs \ - | --run | --ru | --r) - ac_prev=runstatedir ;; - -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ - | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ - | --run=* | --ru=* | --r=*) - runstatedir=$ac_optarg ;; - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -1179,7 +1168,7 @@ fi for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir runstatedir + libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1332,7 +1321,6 @@ Fine tuning of the installation directories: --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] @@ -9664,6 +9652,12 @@ fi if test "x$enable_vtk" != "xno" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: Checking for VTK automagic." >&5 $as_echo "$as_me: Checking for VTK automagic." >&6;} + VTK_FLAGS=`cmake --find-package -DNAME=VTK -DCOMPILER_ID=gcc -DLANGUAGE=Fortran -DMODE=COMPILE` + VTK_LIBS=`cmake --find-package -DNAME=VTK -DCOMPILER_ID=gcc -DLANGUAGE=Fortran -DMODE=LINK` + OLD_CPPFLAGS="$CPP_FLAGS" + CPPFLAGS="$CPPFLAGS $VTK_FLAGS" + OLD_LIBS="$LIBS" + LIBS="$LIBS $VTK_LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -9711,6 +9705,8 @@ else { $as_echo "$as_me:${as_lineno-$LINENO}: No VTK automagic" >&5 $as_echo "$as_me: No VTK automagic" >&6;} search_for_vtk=yes + CPPFLAGS="$OLD_CPPFLAGS" + LIBS="$OLD_LIBS" fi rm -f core conftest.err conftest.$ac_objext \ diff --git a/libadaptivity/configure.in b/libadaptivity/configure.in index 87459ad822..3ae7badf35 100644 --- a/libadaptivity/configure.in +++ b/libadaptivity/configure.in @@ -155,6 +155,12 @@ AC_ARG_ENABLE(vtk,[AC_HELP_STRING([--enable-vtk], [Enable VTK support to build and run test cases (default: no).])]) if test "x$enable_vtk" != "xno" ; then AC_MSG_NOTICE([Checking for VTK automagic.]) + VTK_FLAGS=`cmake --find-package -DNAME=VTK -DCOMPILER_ID=gcc -DLANGUAGE=Fortran -DMODE=COMPILE` + VTK_LIBS=`cmake --find-package -DNAME=VTK -DCOMPILER_ID=gcc -DLANGUAGE=Fortran -DMODE=LINK` + OLD_CPPFLAGS="$CPP_FLAGS" + CPPFLAGS="$CPPFLAGS $VTK_FLAGS" + OLD_LIBS="$LIBS" + LIBS="$LIBS $VTK_LIBS" AC_LINK_IFELSE( [AC_LANG_PROGRAM([[ #include @@ -173,7 +179,9 @@ if test "x$enable_vtk" != "xno" ; then ], [ AC_MSG_NOTICE([No VTK automagic]) - search_for_vtk=yes + search_for_vtk=yes + CPPFLAGS="$OLD_CPPFLAGS" + LIBS="$OLD_LIBS" ]) if test "x$search_for_vtk" == "xyes" ; then