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
374511ee
Commit
374511ee
authored
17 years ago
by
Robert Klöfkorn
Browse files
Options
Downloads
Patches
Plain Diff
make check also capeable for version 2.0
[[Imported from SVN: r5147]]
parent
1ea2aa4f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
m4/alberta.m4
+23
-13
23 additions, 13 deletions
m4/alberta.m4
with
23 additions
and
13 deletions
m4/alberta.m4
+
23
−
13
View file @
374511ee
...
...
@@ -41,13 +41,20 @@ if test x$with_alberta != x && test x$with_alberta != xno ; then
fi
ALBERTA_LIB_PATH="$ALBERTAROOT/lib"
ALBERTA_INCLUDE_PATH="$ALBERTAROOT/include"
# take both include paths
ALBERTA_INCLUDE_PATH="$ALBERTAROOT/include/alberta"
# if path of version 2.0 not exists take old version
ALBERTA_VERSION="2.0"
if ! test -d $ALBERTA_INCLUDE_PATH ; then
ALBERTA_INCLUDE_PATH="$ALBERTAROOT/include -DALBERTA_VERSION_12"
ALBERTA_VERSION="1.2"
fi
# set variables so that tests can use them
REM_CPPFLAGS=$CPPFLAGS
LDFLAGS="$LDFLAGS -L$ALBERTA_LIB_PATH"
ALBERTADIM="-DDIM=$with_alberta_dim -DDIM_OF_WORLD=$with_alberta_
world_
dim"
ALBERTADIM="-DDIM=$with_alberta_dim -DDIM_OF_WORLD=$with_alberta_dim"
CPPFLAGS="$CPPFLAGS $ALBERTADIM -DEL_INDEX=0 -I$ALBERTA_INCLUDE_PATH"
# check for header
...
...
@@ -79,12 +86,22 @@ if test x$HAVE_ALBERTA = x1 ; then
# the zero is the sign of the no-debug-lib
# define varaible lib name depending on problem and world dim, to change
# afterwards easily
variablealbertalibname="
ALBERTA$``(``ALBERTA_DIM``)``
$``(``ALBERTA_
WORLD_
DIM``)``
_0
"
albertalibname="
ALBERTA${with_
alberta_
dim}
${with_alberta_
world_dim}_${with_alberta_debug}
"
variablealbertalibname="
alberta_
$``(``ALBERTA_DIM``)``
d
"
albertalibname="alberta_${with_alberta_
dim}d
"
AC_CHECK_LIB($albertalibname,[mesh_traverse],
[ALBERTA_LIBS="-l$variablealbertalibname $ALBERTA_LIBS $ALBERTA_EXTRA"],
[
HAVE
_ALBERTA="0"
[
NEW
_ALBERTA
_LIB
="0"
AC_MSG_WARN(-l$albertalibname not found!)])
# if new lib not found check old version
if test x$NEW_ALBERTA_LIB = x0 ; then
variablealbertalibname="ALBERTA$``(``ALBERTA_DIM``)``$``(``ALBERTA_DIM``)``_0"
albertalibname="ALBERTA${with_alberta_dim}${with_alberta_dim}_${with_alberta_debug}"
AC_CHECK_LIB($albertalibname,[mesh_traverse],
[ALBERTA_LIBS="-l$variablealbertalibname $ALBERTA_LIBS $ALBERTA_EXTRA"],
[HAVE_ALBERTA="0"
AC_MSG_WARN(-l$albertalibname not found!)])
fi
fi
## end of alberta check (--without wasn't set)
...
...
@@ -105,7 +122,7 @@ if test x$HAVE_ALBERTA = x1 ; then
DUNE_PKG_CPPFLAGS="$DUNE_PKG_CPPFLAGS $ALBERTA_CPPFLAGS"
# set variable for summary
with_alberta="yes"
with_alberta="yes
(Version $ALBERTA_VERSION)
"
else
AC_SUBST(ALBERTA_LIBS, "")
AC_SUBST(ALBERTA_LDFLAGS, "")
...
...
@@ -129,7 +146,6 @@ LDFLAGS="$ac_save_LDFLAGS"
AC_DEFUN([DUNE_ALBERTA_DIMENSION],[
AC_REQUIRE([DUNE_GRID_DIMENSION])
# default dimension of a problem is 2
AC_ARG_WITH(alberta_dim,
AC_HELP_STRING([--with-alberta-dim=2|3],
[dimension of ALBERTA grid (default=grid-dim if delivered otherwise 2)]),,with_alberta_dim=2)
...
...
@@ -142,19 +158,13 @@ AC_ARG_WITH(alberta_world_dim,
if test x$with_grid_dim != x0 ; then
variablealbertdim="$``(``GRIDDIM``)``"
variablealbertdimworld="$``(``GRIDDIMWORLD``)``"
AC_SUBST(ALBERTA_DIM, $variablealbertdim )
AC_SUBST(ALBERTA_WORLD_DIM, $variablealbertdimworld )
else
variablealbertdim=$with_alberta_dim
variablealbertdimworld=$with_alberta_world_dim
AC_SUBST(ALBERTA_DIM, $variablealbertdim )
AC_SUBST(ALBERTA_WORLD_DIM, $variablealbertdimworld )
fi
AC_DEFINE_UNQUOTED(ALBERTA_DIM, $with_alberta_dim,
[Dimension of ALBERTA grid])
AC_DEFINE_UNQUOTED(ALBERTA_WORLD_DIM, $with_alberta_world_dim,
[Dimension of world enclosing the ALBERTA grid])
])
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