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 ab08ec3
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 3 deletions.
23 changes: 22 additions & 1 deletion configure
Original file line number Diff line number Diff line change
Expand Up @@ -732,6 +732,7 @@ infodir
docdir
oldincludedir
includedir
runstatedir
localstatedir
sharedstatedir
sysconfdir
Expand Down Expand Up @@ -847,6 +848,7 @@ datadir='${datarootdir}'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
runstatedir='${localstatedir}/run'
includedir='${prefix}/include'
oldincludedir='/usr/include'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
Expand Down Expand Up @@ -1099,6 +1101,15 @@ 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 @@ -1236,7 +1247,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
libdir localedir mandir runstatedir
do
eval ac_val=\$$ac_var
# Remove trailing slashes.
Expand Down Expand Up @@ -1389,6 +1400,7 @@ 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 @@ -14526,6 +14538,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="$CPPFLAGS"
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 +14598,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="$CPPFLAGS"
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
8 changes: 8 additions & 0 deletions libadaptivity/configure
Original file line number Diff line number Diff line change
Expand Up @@ -9664,6 +9664,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="$CPPFLAGS"
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 +9717,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="$CPPFLAGS"
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 ab08ec3

Please sign in to comment.