Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-common
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Timo Koch
dune-common
Commits
b1b05200
Commit
b1b05200
authored
21 years ago
by
Thimo Neubauer
Browse files
Options
Downloads
Patches
Plain Diff
rewrote large parts of the tests, they seem to work together quite nice
[[Imported from SVN: r104]]
parent
a4bf11d2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
m4/albert.m4
+38
-19
38 additions, 19 deletions
m4/albert.m4
m4/dune.m4
+44
-12
44 additions, 12 deletions
m4/dune.m4
m4/grape.m4
+11
-6
11 additions, 6 deletions
m4/grape.m4
with
93 additions
and
37 deletions
m4/albert.m4
+
38
−
19
View file @
b1b05200
# $Id$
# searches for albert-headers and libs
# TODO:
#
# - albert kann wahlweise GRAPE oder gltools
# (http://www.wias-berlin.de/software/gltools/) verwenden, die sollten
# vorher getestet werden
# - debug-Ziffer
# EL_INDEX=1: the element indices should be precomputed instead of
# generated on the fly => default value
AC_DEFUN(DUNE_PATH_ALBERT,
[
AC_REQUIRE([AC_PROG_CC])
...
...
@@ -21,11 +31,9 @@ dnl eval with_albert=`cd $with_albert ; pwd`
# store old values
ac_save_LDFLAGS="$LDFLAGS"
ac_save_CFLAGS="$CFLAGS"
ac_save_CPPFLAGS="$CPPFLAGS"
ac_save_CXXFLAGS="$CXXFLAGS"
ac_save_LIBS="$LIBS"
LIBS=""
#
LIBS=""
# is --with-albert=bla used?
if test x$with_albert != x ; then
...
...
@@ -35,45 +43,58 @@ else
ALBERTROOT="/usr/local/albert"
fi
# Albert needs special defined symbols
ALBERTDEF="-DDIM_OF_WORLD=$with_world_dim -DDIM=$with_problem_dim -DEL_INDEX=$with_albert_elindex"
# set variables so that tests can use them
LDFLAGS="$LDFLAGS -L$ALBERTROOT/lib"
CPPFLAGS="$CPPFLAGS -I$ALBERTROOT/include"
CPPFLAGS="$CPPFLAGS
$ALBERTDEF
-I$ALBERTROOT/include"
# check for header
AC_CHECK_HEADER([albert.h],
[ALBERT_CFLAGS="-I$ALBERTROOT/include"
[ALBERT_C
PP
FLAGS="
$ALBERTDEF
-I$ALBERTROOT/include"
HAVE_ALBERT="1"],
AC_MSG_WARN([albert.h not found in $ALBERTROOT]))
# if header is found...
if test x$HAVE_ALBERT = x1 ; then
# construct libname
albertlibname="ALBERT${with_world_dim}${with_problem_dim}_0${with_albert_elindex}
"
AC_CHECK_LIB($albertlibname,[albert],
[$ALBERT_LIBS="-l$albertlibname
"],
AC_CHECK_LIB(albert_util,[albert_calloc],
[ALBERT_LIBS="-lalbert_util
"
ALBERT_LDFLAGS="-L$ALBERTROOT/lib"
LIBS="$LIBS $ALBERT_LIBS
"],
[HAVE_ALBERT="0"
AC_MSG_WARN(lib
$
albert
libname
not found!)])
AC_MSG_WARN(libalbert
_util
not found!)])
fi
# still everything found?
if test x$HAVE_ALBERT = x1 ; then
AC_CHECK_LIB(albert_util,[albert_util],
[$ALBERT_LIBS="$ALBERT_LIBS -lalbert_util"],
# construct libname
# the zero is the sign of the no-debug-lib
albertlibname="ALBERT${with_world_dim}${with_problem_dim}_0${with_albert_elindex}"
AC_CHECK_LIB($albertlibname,[get_dof_index],
[ALBERT_LIBS="$ALBERT_LIBS -l$albertlibname"],
[HAVE_ALBERT="0"
AC_MSG_WARN(libalbert
_util
not found!)])
AC_MSG_WARN(lib
$
albert
libname
not found!)])
fi
# survived all tests?
if test x$HAVE_ALBERT = x1 ; then
AC_SUBST(ALBERT_LIBS, $ALBERT_LIBS)
AC_SUBST(ALBERT_LDFLAGS, $LDFLAGS)
AC_SUBST(ALBERT_CFLAGS,
"$ALBERT_CFLAGS -DEL_INDEX=$with_albert_elindex -DMYDIM=$with_problem_dim -DMYDOW=$with_world_dim")
AC_SUBST(ALBERT_LDFLAGS, $ALBERT_LDFLAGS)
AC_SUBST(ALBERT_CPPFLAGS, $ALBERT_CPPFLAGS)
AC_DEFINE(HAVE_ALBERT, 1, [Define to 1 if albert-library is found])
# add to global list
DUNE_PKG_LDFLAGS="$DUNE_PKG_LDFLAGS $ALBERT_LDFLAGS"
DUNE_PKG_LIBS="$DUNE_PKG_LIBS $ALBERT_LIBS"
DUNE_PKG_CPPFLAGS="$DUNE_PKG_CPPFLAGS $ALBERT_CPPFLAGS"
else
echo no albert found...
AC_SUBST(ALBERT_LIBS, "")
AC_SUBST(ALBERT_LDFLAGS, "")
AC_SUBST(ALBERT_CFLAGS, "")
AC_SUBST(ALBERT_C
PP
FLAGS, "")
fi
# also tell automake
...
...
@@ -81,9 +102,7 @@ AM_CONDITIONAL(ALBERT, test x$HAVE_ALBERT = x1)
# reset old values
LIBS="$ac_save_LIBS"
CFLAGS="$ac_save_CFLAGS"
CPPFLAGS="$ac_save_CPPFLAGS"
CXXFLAGS="$ac_save_CXXFLAGS"
LDFLAGS="$ac_save_LDFLAGS"
])
\ No newline at end of file
This diff is collapsed.
Click to expand it.
m4/dune.m4
+
44
−
12
View file @
b1b05200
# $Id$
# checks for dune-headers and everything they need
dnl AM_PATH_DUNE([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
# TODO
#
# use pkg-config later? Maybe not really worth it, because only ojne -I is
# needed...
AC_DEFUN(AM_PATH_DUNE,
# #export PKG_CONFIG_LIBDIR=$with_dune/dune
# #PKG_CHECK_MODULES(DUNE, dune)
AC_DEFUN(DUNE_PATH_DUNE,
[
AC_REQUIRE([AC_PROG_CXX])
AC_REQUIRE([AC_PROG_CXXCPP])
# switch tests to c++
AC_LANG_PUSH([C++])
#
ch
#
the usual option...
AC_ARG_WITH(dune,
AC_HELP_STRING([--with-dune=PATH],[directory with Dune inside]),
dnl
expand tilde / other stuff
#
expand tilde / other stuff
eval with_dune=$with_dune)
dnl try with pkg-config
# is a directory set?
if test "x$with_dune" != x ; then
dnl retry with dune-dir
export PKG_CONFIG_PATH=$with_dune
DUNEROOT=$with_dune
else
# set default path
DUNEROOT=/usr/local/include/
fi
PKG_CHECK_MODULES(DUNE, dune,
ifelse([$2], , :, [$2]), ifelse([$3], , :, [$3]))
dnl call ACTION-IF-NOT-FOUND
dnl ifelse([$3], , :, [$3])
ac_save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS -I$DUNEROOT"
# test for an arbitrary header
AC_CHECK_HEADER([dune/common/misc.hh],
[DUNE_CPPFLAGS="-I$DUNEROOT"
HAVE_DUNE=1],
[HAVE_DUNE=0]
)
# did we succeed?
if test x$HAVE_DUNE = x1 ; then
AC_SUBST(DUNE_CPPFLAGS, $DUNE_CPPFLAGS)
AC_DEFINE(HAVE_DUNE, 1, [Define to 1 if dune-headers were found])
# add to global list
DUNE_PKG_CPPFLAGS="$DUNE_PKG_CPPFLAGS $DUNE_CPPFLAGS"
fi
# reset previous flags
CPPFLAGS="$ac_save_CPPFLAGS"
# restore previous language settings (leave C++)
AC_LANG_POP([C++])
])
\ No newline at end of file
This diff is collapsed.
Click to expand it.
m4/grape.m4
+
11
−
6
View file @
b1b05200
...
...
@@ -43,11 +43,9 @@ if test "x$X_LIBS" != x ; then
GRAPEROOT="/usr/local/grape/"
fi
CFLAGS="$CFLAGS -I$GRAPEROOT"
CPPFLAGS="$CPPFLAGS -I$GRAPEROOT"
LDFLAGS="$LDFLAGS -L$GRAPEROOT"
# append OpenGL-options if needed
if test x$have_gl != xno ; then
LIBS="$LIBS $GL_LIBS"
...
...
@@ -56,23 +54,30 @@ if test "x$X_LIBS" != x ; then
# check for header
# we have to use CC for checking the header!!
AC_CHECK_HEADER([grape.h],
[GRAPE_CFLAGS="-I$GRAPEROOT"
[GRAPE_C
PP
FLAGS="-I$GRAPEROOT"
HAVE_GRAPE="1"],
AC_MSG_WARN([grape.h not found in $GRAPEROOT!]))
# check for lib if header was found
if test x$HAVE_GRAPE = x1 ; then
AC_CHECK_LIB(gr, grape,
[LIBS="$LIBS -L$GRAPEROOT -lgr"],
[GRAPE_LDFLAGS="-L$GRAPEROOT"
GRAPE_LIBS="-lgr"],
[HAVE_GRAPE="0"
AC_MSG_WARN([libgr not found in $GRAPEROOT!])])
fi
# did it work?
if test x$HAVE_GRAPE = x1 ; then
AC_SUBST(GRAPE_LIBS, $LIBS)
AC_SUBST(GRAPE_CFLAGS, $GRAPE_CFLAGS)
AC_SUBST(GRAPE_LIBS, "$LIBS $GRAPE_LIBS")
AC_SUBST(GRAPE_LDFLAGS, $GRAPE_LDFLAGS)
AC_SUBST(GRAPE_CPPFLAGS, $GRAPE_CPPFLAGS)
AC_DEFINE(HAVE_GRAPE, 1, [Define to 1 if grape-library is found])
# add to global list
DUNE_PKG_LDFLAGS="$DUNE_PKG_LDFLAGS $GRAPE_LDFLAGS"
DUNE_PKG_LIBS="$DUNE_PKG_LIBS $GRAPE_LIBS"
DUNE_PKG_CPPFLAGS="$DUNE_PKG_CPPFLAGS $GRAPE_CPPFLAGS"
fi
# also tell automake
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment