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
b241e75a
Commit
b241e75a
authored
18 years ago
by
Christian Engwer
Browse files
Options
Downloads
Patches
Plain Diff
adjusted buildsystem touse latest ug lib
[[Imported from SVN: r4846]]
parent
1023a930
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/ug.m4
+29
-19
29 additions, 19 deletions
m4/ug.m4
with
29 additions
and
19 deletions
m4/ug.m4
+
29
−
19
View file @
b241e75a
...
...
@@ -46,10 +46,9 @@ AC_DEFUN([DUNE_PATH_UG],[
AC_HELP_STRING
([
--enable-ug-lgmdomain
]
,[use UG LGM domain
(
default is standard domain
)]))
if
test
x
"
$enable_ug_lgmdomain
"
=
xyes
;
then
AC_DEFINE
(
UG_LGMDOMAIN, 1,
[
use UG LGM domain]
)
# TODO: The lgm libraries contain a circular dependency!
UG_LIBS
=
"-lug2 -ldomL2 -lug2 -lgg2 -lug3 -ldomL3 -lug3 -lgg3 -ldevS"
UG_LIBS
=
"-lugL2 -lugL3 -ldevS"
else
UG_LIBS
=
"-lug
2 -ldomS2 -lgg2 -lug3 -ldomS3 -lgg
3 -ldevS"
UG_LIBS
=
"-lug
S2 -lugS
3 -ldevS"
fi
# backup CPPFLAGS so I can add an additional flag just for AC_CHECk_HEADER
...
...
@@ -73,37 +72,45 @@ AC_DEFUN([DUNE_PATH_UG],[
# Currently we only check for libug2
# todo: Check for all the libraries that make up UG
AC_LANG_PUSH
([
C++]
)
if
test
x
$HAVE_UG
=
x1
;
then
CPPFLAGS
=
"
$UG_CPPFLAGS
-D_2"
# define LTCXXCOMPILE like it will be defined in the Makefile
ac_save_CXX
=
"
$CXX
"
LTCXXLINK
=
"
$srcdir
/libtool --tag=CXX --mode=link
$CXX
$CXXFLAGS
$LDFLAGS
"
CXX
=
"
$LTCXXLINK
"
if
test
x
$HAVE_UG
=
x1
;
then
AC_MSG_CHECKING
([
UG libraries
(
without MPI
)])
LIBS
=
"
$UG_LIBS
"
AC_TRY_LINK
(
[
#include "initug.h"],
[
int i
=
UG::D2::InitUg
(
0,0
)]
,
# try again with added MPI-libs
AC_MSG_CHECKING
([
UG libraries
(
parallel
)])
LIBS
=
"
$UG_LIBS
$MPI_LDFLAGS
"
CPPFLAGS
=
"
$UG_CPPFLAGS
-DModelP -D_2"
AC_TRY_LINK
(
[
#include "initug.h"
#include "parallel.h"],
[
int i
=
UG::D2::InitDDD
()]
,
[
UG_LDFLAGS
=
"
$LDFLAGS
"
UG_CPPFLAGS
=
"
$UG_CPPFLAGS
-DModelP"
HAVE_UG
=
"1"
with_ug
=
"yes (sequential)"
UG_LIBS
=
"
$UG_LIBS
$MPI_LDFLAGS
"
with_ug
=
"yes (parallel)"
AC_MSG_RESULT
(
yes
)
]
,
[
AC_MSG_RESULT
(
no
)
HAVE_UG
=
"0"
]
)
#
sequentia
l lib not found/does not work?
#
paralle
l lib not found/does not work?
if
test
x
$HAVE_UG
!=
x1
&&
test
x
"
$MPI_LDFLAGS
"
!=
x
""
;
then
# try again with added MPI-libs
UG_LIBS
=
"
$UG_LIBS
$MPI_LDFLAGS
"
AC_MSG_CHECKING
([
UG libraries
(
with MPI
)])
AC_MSG_CHECKING
([
UG libraries
(
sequential
)])
LIBS
=
"
$UG_LIBS
"
AC_TRY_LINK
(
[
#include "initug.h"],
CPPFLAGS
=
"
$UG_CPPFLAGS
-D_2"
AC_TRY_LINK
(
[
#define _2
#include "initug.h"],
[
int i
=
UG::D2::InitUg
(
0,0
)]
,
[
UG_LDFLAGS
=
"
$LDFLAGS
"
UG_CPPFLAGS
=
"
$UG_CPPFLAGS
-DModelP"
HAVE_UG
=
"1"
with_ug
=
"yes (
paralle
l)"
with_ug
=
"yes (
sequentia
l)"
AC_MSG_RESULT
(
yes
)
]
,
[
AC_MSG_RESULT
(
no
)
...
...
@@ -133,6 +140,8 @@ AC_DEFUN([DUNE_PATH_UG],[
fi
CXX
=
"
$ac_save_CXX
"
AC_LANG_POP
([
C++]
)
# did it work?
...
...
@@ -160,6 +169,7 @@ AC_DEFUN([DUNE_PATH_UG],[
# tell automake
AM_CONDITIONAL
(
UG,
test
x
$HAVE_UG
=
x1
)
AM_CONDITIONAL
(
UG_LGMDOMAIN,
test
x
$UG_LGMDOMAIN
=
x1
)
# restore variables
LDFLAGS
=
"
$ac_save_LDFLAGS
"
...
...
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