Skip to content
Snippets Groups Projects
Commit 044d10cd authored by Christian Engwer's avatar Christian Engwer
Browse files

dynamically construct summary output for dune modules

[[Imported from SVN: r5086]]
parent 4c3cd5a6
No related branches found
No related tags found
No related merge requests found
......@@ -85,7 +85,6 @@ AC_DEFUN([DUNE_CHECK_MODULES],[
_DUNE_MODULE[]_LDFLAGS="-L`$PKG_CONFIG --variable=libdir _dune_name`" 2>/dev/null
_DUNE_MODULE[]_LIBS="-l[]_dune_lib"
])
dune_is_installed=1
AC_MSG_RESULT([
global installation in $_DUNE_MODULE[]_ROOT])
else
......@@ -102,12 +101,11 @@ AC_DEFUN([DUNE_CHECK_MODULES],[
# expand search path (otherwise empty CPPFLAGS)
if test -d $_DUNE_MODULE[]_ROOT/include/dune; then
# Dune was installed into directory given by with-dunecommon
dune_is_installed=1
_DUNE_MODULE[]_CPPFLAGS="-I$_DUNE_MODULE[]_ROOT/include"
_DUNE_MODULE[]_VERSION="`PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$_DUNE_MODULE[]_ROOT/lib/pkgconfig $PKG_CONFIG --modversion _dune_name`" 2>/dev/null
else
_DUNE_MODULE[]_CPPFLAGS="-I$_DUNE_MODULE[]_ROOT"
_DUNE_MODULE[]_VERSION="`PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$_DUNE_MODULE[]_ROOT $PKG_CONFIG --modversion _dune_name`" 2>/dev/null
_DUNE_MODULE[]_VERSION="`grep Version $_DUNE_MODULE[]_ROOT/dune.module | sed -e 's/^Version: *//'`" 2>/dev/null
fi
ifelse(_dune_symbol,,,[
_DUNE_MODULE[]_LDFLAGS="-L$_DUNE_MODULE[]_ROOT/lib"
......@@ -211,6 +209,19 @@ AC_DEFUN([DUNE_CHECK_MODULES],[
CPPFLAGS="$ac_save_CPPFLAGS"
LIBS="$ac_save_LIBS"
# add this module to DUNE_SUMMARY
txt=_dune_name
len=${#txt}
let len=17-$len
txt="$txt`for i in \`seq $len\`; do echo -n '.'; done`: $with_[]_dune_module"
if test "x$_DUNE_MODULE[]_ROOT" != "x"; then
txt="$txt ($_DUNE_MODULE[]_ROOT)"
fi
if test "x$_DUNE_MODULE[]_VERSION" != "x"; then
txt="$txt version $_DUNE_MODULE[]_VERSION"
fi
DUNE_SUMMARY="$DUNE_SUMMARY echo '$txt';"
# remove local variables
m4_popdef([_dune_name])
m4_popdef([_dune_module])
......
......@@ -153,15 +153,6 @@ AC_SUBST(DUNEWEBDIR, $with_duneweb)
AC_SUBST(am_dir, $DUNE_COMMON_ROOT/am)
])
AC_DEFUN([DUNE_SUMMARY],[
if test xyes == x$2 || test xno == x$2; then
echo -n "$1"
echo -n "$2"
if test x$3 != x; then echo " ($3)"
else echo; fi
fi
])
AC_DEFUN([DUNE_SUMMARY_ALL],[
# show search results
......@@ -170,11 +161,7 @@ AC_DEFUN([DUNE_SUMMARY_ALL],[
echo
echo "-----------------------------"
echo
DUNE_SUMMARY([Dune-common......: ], [$with_dune_common], [$DUNE_COMMON_ROOT])
DUNE_SUMMARY([Dune-grid........: ], [$with_dune_grid], [$DUNE_GRID_ROOT])
DUNE_SUMMARY([Dune-istl........: ], [$with_dune_istl], [$DUNE_ISTL_ROOT])
DUNE_SUMMARY([Dune-disc........: ], [$with_dune_disc], [$DUNE_DISC_ROOT])
DUNE_SUMMARY([Dune-fem.........: ], [$with_dune_fem], [$DUNE_FEM_ROOT])
eval $DUNE_SUMMARY
echo "ALBERTA..........: $with_alberta"
echo "ALUGrid..........: $with_alugrid"
echo "AmiraMesh........: $with_amiramesh"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment