Skip to content

Commit

Permalink
Implementing Stephan's fix for finding VTK.
Browse files Browse the repository at this point in the history
  • Loading branch information
jrper authored and tmbgreaves committed Nov 7, 2016
1 parent 09db3ff commit f8ab3fc
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 15 deletions.
9 changes: 9 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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 \
Expand Down
11 changes: 10 additions & 1 deletion configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -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([[
Expand All @@ -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
Expand Down
22 changes: 9 additions & 13 deletions libadaptivity/configure
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,6 @@ infodir
docdir
oldincludedir
includedir
runstatedir
localstatedir
sharedstatedir
sysconfdir
Expand Down Expand Up @@ -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}'
Expand Down Expand Up @@ -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=* \
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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]
Expand Down Expand Up @@ -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. */
Expand Down Expand Up @@ -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 \
Expand Down
10 changes: 9 additions & 1 deletion libadaptivity/configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -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 <vtkVersion.h>
Expand All @@ -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
Expand Down

0 comments on commit f8ab3fc

Please sign in to comment.