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
75538b6b
Commit
75538b6b
authored
18 years ago
by
Christian Engwer
Browse files
Options
Downloads
Patches
Plain Diff
configure supports usage of '-' in the project name
[[Imported from SVN: r4610]]
parent
f03262af
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/dune.m4
+51
-30
51 additions, 30 deletions
m4/dune.m4
m4/dune_all.m4
+15
-6
15 additions, 6 deletions
m4/dune_all.m4
m4/dune_mpi.m4
+14
-1
14 additions, 1 deletion
m4/dune_mpi.m4
with
80 additions
and
37 deletions
m4/dune.m4
+
51
−
30
View file @
75538b6b
...
...
@@ -17,19 +17,24 @@ AC_DEFUN([DUNE_CHECK_MODULES],[
echo
checking
for
$1
AC_DEFUN
([
_dune_module],
[
$1
])
AC_DEFUN
([
_dune_header],
[
$2
])
AC_DEFUN
([
_dune_ldpath],
[
$3
])
AC_DEFUN
([
_dune_lib],
[
$4
])
AC_DEFUN
([
_dune_symbol],
[
$5
])
AC_DEFUN
([
_DUNE_MODULE],
[
m4_toupper
(
_dune_module
)])
m4_pushdef
([
_dune_module_plain],
[
$1
])
m4_pushdef
([
_dune_module],
[
m4_translit
(
_dune_module_plain,
[
-],
[
_]
)])
m4_pushdef
([
_dune_header],
[
$2
])
m4_pushdef
([
_dune_ldpath],
[
$3
])
m4_pushdef
([
_dune_lib],
[
$4
])
m4_pushdef
([
_dune_symbol],
[
$5
])
m4_pushdef
([
_DUNE_MODULE],
[
m4_toupper
(
_dune_module
)])
echo
Module _dune_module_plain mapps to _DUNE_MODULE
# switch tests to c++
AC_LANG_PUSH
([
C++]
)
# the usual option...
AC_ARG_WITH
([
_dune_module],
AC_HELP_STRING
([
--with-_dune_module
=
PATH],[_dune_module directory]
))
withval
=
""
AC_ARG_WITH
(
_dune_module_plain,
AC_HELP_STRING
([
--with-_dune_module_plain
=
PATH],[_dune_module directory]
))
withval
=
$with_
[]
_dune_module
# backup of flags
ac_save_CPPFLAGS
=
"
$CPPFLAGS
"
...
...
@@ -43,20 +48,25 @@ AC_DEFUN([DUNE_CHECK_MODULES],[
# expand tilde
if
test
-d
$withval
;
then
# expand tilde / other stuff
_DUNE_MODULE[]ROOT
=
`
cd
$withval
&&
pwd
`
_DUNE_MODULE[]
_
ROOT
=
`
cd
$withval
&&
pwd
`
# expand search path (otherwise empty CPPFLAGS)
if
test
-d
$_DUNE_MODULE
[]
ROOT/include/dune
;
then
if
test
-d
$_DUNE_MODULE
[]
_
ROOT/include/dune
;
then
# Dune was installed into directory given by with-dunecommon
LINSTALL
=
1
_DUNE_MODULE[]_CPPFLAGS
=
"-I
$_DUNE_MODULE
[]ROOT/include"
LDFLAGS
=
"
$LDFLAGS
-L
$_DUNE_MODULE
[]ROOT/lib"
_DUNE_MODULE[]_CPPFLAGS
=
"-I
$_DUNE_MODULE
[]
_
ROOT/include"
LDFLAGS
=
"
$LDFLAGS
-L
$_DUNE_MODULE
[]
_
ROOT/lib"
else
_DUNE_MODULE[]_CPPFLAGS
=
"-I
$_DUNE_MODULE
[]ROOT"
_DUNE_MODULE[]_CPPFLAGS
=
"-I
$_DUNE_MODULE
[]
_
ROOT"
fi
else
AC_MSG_ERROR
([
_dune_module-directory
$withval
does not exist]
)
fi
# set correct dune path
with_[]_dune_module
=
"
$withval
"
else
# set correct dune path
with_[]_dune_module
=
"global installation"
fi
CPPFLAGS
=
"
$DUNE_CPPFLAGS
$_DUNE_MODULE
[]_CPPFLAGS"
...
...
@@ -66,7 +76,7 @@ AC_DEFUN([DUNE_CHECK_MODULES],[
_DUNE_MODULE[]_CPPFLAGS
=
"
$CPPFLAGS
"
]
,
[
HAVE_[]_DUNE_MODULE
=
0
_DUNE_MODULE[]_CPPFLAGS
=
""
AC_MSG_ERROR
([
$with
val
does not seem to contain a valid _dune_module
(
dune/[]_dune_header not found
)])]
AC_MSG_ERROR
([
$with
_
[]
_dune_module
does not seem to contain a valid _dune_module
(
dune/[]_dune_header not found
)])]
)
## check for lib (if lib name was provided)
...
...
@@ -78,20 +88,20 @@ AC_DEFUN([DUNE_CHECK_MODULES],[
HAVE_[]_DUNE_MODULE
=
0
## special test for a local installation
if
test
x
$_DUNE_MODULE
[]
ROOT
!=
x
&&
test
!
$LINSTALL
;
then
if
test
x
$_DUNE_MODULE
[]
_
ROOT
!=
x
&&
test
!
$LINSTALL
;
then
# have a look into the dune module directory
LDFLAGS
=
"
$LDFLAGS
-L
$_DUNE_MODULE
[]ROOT/dune/_dune_ldpath"
LDFLAGS
=
"
$LDFLAGS
-L
$_DUNE_MODULE
[]
_
ROOT/dune/_dune_ldpath"
# only check for a .la-file
if
test
-s
$_DUNE_MODULE
[]
ROOT/_dune_ldpath/lib[]_dune_lib[].la
;
then
_DUNE_MODULE[]_LDFLAGS
=
"-L
$_DUNE_MODULE
[]ROOT/_dune_ldpath"
if
test
-s
$_DUNE_MODULE
[]
_
ROOT/_dune_ldpath/lib[]_dune_lib[].la
;
then
_DUNE_MODULE[]_LDFLAGS
=
"-L
$_DUNE_MODULE
[]
_
ROOT/_dune_ldpath"
echo
found lib[]_dune_lib.la, setting LDFLAGS to
$_DUNE_MODULE
[]
_LDFLAGS
# provide arguments like normal lib-check
_DUNE_MODULE[]_LIBS
=
"-l[]_dune_lib"
HAVE_[]_DUNE_MODULE
=
1
else
AC_MSG_ERROR
([
$with
val
does not seem to contain a valid _dune_module
(
lib[]_dune_lib[].la not found
)])
AC_MSG_ERROR
([
$with
_
[]
_dune_module
does not seem to contain a valid _dune_module
(
lib[]_dune_lib[].la not found
)])
fi
fi
...
...
@@ -132,7 +142,7 @@ AC_DEFUN([DUNE_CHECK_MODULES],[
AC_SUBST
(
_DUNE_MODULE[]_CPPFLAGS,
"
$_DUNE_MODULE
[]_CPPFLAGS"
)
AC_SUBST
(
_DUNE_MODULE[]_LDFLAGS,
"
$_DUNE_MODULE
[]_LDFLAGS"
)
AC_SUBST
(
_DUNE_MODULE[]_LIBS,
"
$_DUNE_MODULE
[]_LIBS"
)
AC_SUBST
(
_DUNE_MODULE[]ROOT,
"
$_DUNE_MODULE
[]ROOT"
)
AC_SUBST
(
_DUNE_MODULE[]
_
ROOT,
"
$_DUNE_MODULE
[]
_
ROOT"
)
AC_DEFINE
(
HAVE_[]_DUNE_MODULE, 1,
[
Define to 1
if
_dune_module was found]
)
# set DUNE_* variables
...
...
@@ -144,6 +154,8 @@ AC_DEFUN([DUNE_CHECK_MODULES],[
DUNE_PKG_CPPFLAGS
=
"
$DUNE_PKG_CPPFLAGS
$DUNE_CPPFLAGS
"
DUNE_PKG_LIBS
=
"
$DUNE_PKG_LIBS
$LIBS
"
DUNE_PKG_LDFLAGS
=
"
$DUNE_PKG_LDFLAGS
$DUNE_LDFLAGS
"
with_[]_dune_module
=
"yes"
else
AC_MSG_ERROR
([
could not find required module _dune_module]
)
fi
...
...
@@ -152,22 +164,31 @@ AC_DEFUN([DUNE_CHECK_MODULES],[
CPPFLAGS
=
"
$ac_save_CPPFLAGS
"
LIBS
=
"
$ac_save_LIBS
"
# remove local variables
m4_popdef
([
_dune_module_plain]
)
m4_popdef
([
_dune_module]
)
m4_popdef
([
_dune_header]
)
m4_popdef
([
_dune_ldpath]
)
m4_popdef
([
_dune_lib]
)
m4_popdef
([
_dune_symbol]
)
m4_popdef
([
_DUNE_MODULE]
)
# restore previous language settings (leave C++)
AC_LANG_POP
([
C++]
)
])
AC_DEFUN
([
DUNE_CHECK_DISPATCH],[
ifelse
([
$1
]
,
[]
,
[]
,
[
$1
]
,
[
dunecommon],[
DUNE_CHECK_MODULES
([
dunecommon],
[
common/stdstreams.hh],
[
common],
[
common],
[
Dune::derr.active
()
;
])]
,
[
$1
]
,
[
dunegrid],[
DUNE_CHECK_MODULES
([
dunegrid],
[
grid/common/grid.hh],
[
grid],
[
grid],
[
Dune::PartitionName]
)]
,
[
$1
]
,
[
dunefem],[
DUNE_CHECK_MODULES
([
dunefem],
[
fem/basefunctions/common/storageinterface.hh],
[]
,
[]
,
[])]
,
[
$1
]
,
[
duneistl],[
DUNE_CHECK_MODULES
([
duneistl],
[
istl/allocator.hh],,,
)]
,
[
$1
]
,
[
dunedisc],[
DUNE_CHECK_MODULES
([
dunedisc],
[
disc/functions/functions.hh],
[
disc],
[
disc],
[
Dune::LagrangeShapeFunctions<double, double, 3>::general]
)]
,
[
$1
]
,
[
dune
-
common],[
DUNE_CHECK_MODULES
([
dune
-
common],
[
common/stdstreams.hh],
[
common],
[
common],
[
Dune::derr.active
()
;
])]
,
[
$1
]
,
[
dune
-
grid],[
DUNE_CHECK_MODULES
([
dune
-
grid],
[
grid/common/grid.hh],
[
grid],
[
grid],
[
Dune::PartitionName]
)]
,
[
$1
]
,
[
dune
-
fem],[
DUNE_CHECK_MODULES
([
dune
-
fem],
[
fem/basefunctions/common/storageinterface.hh],
[]
,
[]
,
[])]
,
[
$1
]
,
[
dune
-
istl],[
DUNE_CHECK_MODULES
([
dune
-
istl],
[
istl/allocator.hh],,,
)]
,
[
$1
]
,
[
dune
-
disc],[
DUNE_CHECK_MODULES
([
dune
-
disc],
[
disc/functions/functions.hh],
[
disc],
[
disc],
[
Dune::LagrangeShapeFunctions<double, double, 3>::general]
)]
,
[
AC_MSG_ERROR
([
Unknown module
$1
])])
])
...
...
This diff is collapsed.
Click to expand it.
m4/dune_all.m4
+
15
−
6
View file @
75538b6b
...
...
@@ -109,6 +109,15 @@ AC_SUBST(DUNEWEBDIR, $with_duneweb)
AC_SUBST(am_dir, $DUNECOMMONROOT/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
...
...
@@ -117,11 +126,11 @@ AC_DEFUN([DUNE_SUMMARY_ALL],[
echo
echo "-----------------------------"
echo
echo "
Dune-common......: $with_dunecommon
"
echo "
Dune-grid........: $with_dunegrid
"
echo "
Dune-istl........: $with_duneistl
"
echo "
Dune-disc........: $with_dunedisc
"
echo "
Dune-fem........
.
: $with_dunefem
"
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])
echo "Alberta..........: $with_alberta"
echo "ALUGrid..........: $with_alugrid"
echo "AmiraMesh........: $with_amiramesh"
...
...
@@ -169,7 +178,7 @@ if test "x$with_revision" = "xno" ; then with_revision=bar; fi
AC_SUBST(revision, $with_revision)
AC_LANG_PUSH([C++])
echo "
Resolving Dependencies: $@
"
AC_MSG_NOTICE([
Resolving Dependencies: $@
])
DUNE_MODULE_DEPENDENCIES($@)
AC_REQUIRE([DUNE_CHECK_ALL])
AC_REQUIRE([DUNE_DEV_MODE])
...
...
This diff is collapsed.
Click to expand it.
m4/dune_mpi.m4
+
14
−
1
View file @
75538b6b
...
...
@@ -108,7 +108,20 @@ AC_DEFUN([DUNE_MPI],[
## do nothing if --disable-parallel is used
if test x$with_parallel == xyes ; then
# is the mpi compilation script already specified?
AC_LANG_CASE([C],[
MPICOMP="$MPICC"
],
[C++],[
MPICOMP="$MPICXX"
])
AC_MSG_NOTICE([user specific mpi compiler would be ... $MPICC])
# implicitly sets the HAVE_MPI-define and the MPICXX-substitution
if test x == x"$MPICOMP"; then
ACX_MPI()
else
AC_MSG_NOTICE([using user specific mpi compiler... $MPICC])
fi
ACX_MPI()
# remove HAVE_MPI from confdefs.h
cp confdefs.h confdefs.h.tmp
...
...
@@ -127,7 +140,7 @@ AC_DEFUN([DUNE_MPI],[
# taken from acx_mpi: test succeeded if MPILIBS is not empty
if test x != x"$MPICOMP" ; then
AC_MSG_CHECKING([MPI
-
package])
AC_MSG_CHECKING([
for a known
MPI
package])
# the LAM mpiCC knows a -showme parameter
dune_mpi_getflags "-showme"
if test x"$retval" != x ; then
...
...
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