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
6e0406ee
Commit
6e0406ee
authored
19 years ago
by
Markus Blatt
Browse files
Options
Downloads
Patches
Plain Diff
Check for metis added.
[[Imported from SVN: r3437]]
parent
0c5ee3b2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
configure.ac
+3
-0
3 additions, 0 deletions
configure.ac
m4/dune_all.m4
+1
-0
1 addition, 0 deletions
m4/dune_all.m4
m4/immdx_lib_metis.m4
+121
-0
121 additions, 0 deletions
m4/immdx_lib_metis.m4
m4/parmetis.m4
+5
-1
5 additions, 1 deletion
m4/parmetis.m4
with
130 additions
and
1 deletion
configure.ac
+
3
−
0
View file @
6e0406ee
...
...
@@ -97,6 +97,9 @@ DUNE_MPI
# check for ALUGrid (needs MPI to build parallel version)
DUNE_PATH_ALUGRID
# check for Metis
IMMDX_LIB_METIS(,AC_MSG_WARN([METIS not found]))
# check for ParMETIS
DUNE_PATH_PARMETIS
...
...
This diff is collapsed.
Click to expand it.
m4/dune_all.m4
+
1
−
0
View file @
6e0406ee
...
...
@@ -52,6 +52,7 @@ dnl check all components
AC_REQUIRE([DUNE_PATH_F5])
AC_REQUIRE([DUNE_PATH_AMIRAMESH])
AC_REQUIRE([DUNE_MPI])
AC_REQUIRE([IMMDX_LIB_METIS])
AC_REQUIRE([DUNE_PATH_PARMETIS])
AC_REQUIRE([DUNE_PATH_ALUGRID])
...
...
This diff is collapsed.
Click to expand it.
m4/immdx_lib_metis.m4
0 → 100644
+
121
−
0
View file @
6e0406ee
dnl @synopsis IMMDX_LIB_METIS([ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
dnl
dnl This macro searches for the METIS library in the user specified
dnl location. The user may specify the location either by defining the
dnl environment variable METIS or by using the --with-metis option to
dnl configure. If the environment variable is defined it has precedent
dnl over everything else. If no location was specified then it searches
dnl in /usr/lib and /usr/local/lib for the library and in /usr/include
dnl and /usr/local/include for the header files. Upon sucessful
dnl completion the variables METIS_LIB and METIS_INCLUDE are set.
dnl
dnl ACTION-IF-FOUND is a list of shell commands to run if a METIS
dnl library is found, and ACTION-IF-NOT-FOUND is a list of commands to
dnl run it if it is not found. If ACTION-IF-FOUND is not specified, the
dnl default action will define HAVE_METIS. If ACTION-IF-NOT-FOUND is
dnl not specified then an error will be generated halting configure.
dnl
dnl @category InstalledPackages
dnl @author Ben Bergen <ben@cs.fau.de>
dnl @version 2003-01-19
dnl @license AllPermissive
AC_DEFUN([IMMDX_LIB_METIS], [
AC_MSG_CHECKING(for METIS library)
AC_REQUIRE([AC_PROG_CC])
#
# User hints...
#
AC_ARG_VAR([METIS], [METIS library location])
AC_ARG_WITH([metis],
[AC_HELP_STRING([--with-metis],
[user defined path to METIS library])],
[
if test -n "$METIS" ; then
AC_MSG_RESULT(yes)
with_metis=$METIS
elif test "$withval" != no ; then
AC_MSG_RESULT(yes)
with_metis=$withval
else
AC_MSG_RESULT(no)
fi
],
[
if test -n "$METIS" ; then
with_metis=$METIS
AC_MSG_RESULT(yes)
else
with_metis=/usr
if test ! -f "$with_metis/include/metis.h" ; then
with_metis=/usr/local
if test ! -f "$with_metis/include/metis.h" ; then
with_metis=""
AC_MSG_RESULT(failed)
else
AC_MSG_RESULT(yes)
fi
else
AC_MSG_RESULT(yes)
fi
fi
])
#
# locate METIS library
#
if test -n "$with_metis" ; then
old_CFLAGS=$CFLAGS
old_LDFLAGS=$LDFLAGS
if test -f "$with_metis/include/metis.h"; then
lib_path="/lib"
include_path="/include"
fi
if test -f "$with_metis/Lib/metis.h"; then
# catch bad convention in the downloadable metis version
lib_path=""
include_path="/Lib"
fi
CFLAGS="-I$with_metis/$include_path"
LDFLAGS="-L$with_metis/$lib_path"
AC_LANG_SAVE
AC_LANG_C
AC_CHECK_LIB(metis, METIS_PartMeshDual,
[metis_lib=yes], [metis_lib=no], [-lm])
AC_CHECK_HEADER(metis.h, [metis_h=yes],
[metis_h=no], [/* check */])
echo x$metis_h
AC_LANG_RESTORE
CFLAGS=$old_CFLAGS
LDFLAGS=$old_LDFLAGS
AC_MSG_CHECKING(METIS in $with_metis)
if test "$metis_lib" = "yes" -a "$metis_h" = "yes" ; then
AC_SUBST(METIS_INCLUDE, [-I$with_metis$include_path])
AC_SUBST(METIS_LDFLAGS, [-L$with_metis$lib_path])
AC_SUBST(METIS_LIB, [-lmetis])
AC_MSG_RESULT(ok)
else
AC_MSG_RESULT(failed)
fi
fi
#
#
#
if test x = x"$METIS_LIB" ; then
ifelse([$2],,[AC_MSG_ERROR(Failed to find valid METIS library)],[$2])
:
else
ifelse([$1],,[AC_DEFINE(HAVE_METIS,1,[Define if you have METIS library])],[$1])
:
fi
# tell automake
AM_CONDITIONAL(METIS, test x$HAVE_METIS = x1)
])dnl IMMDX_LIB_METIS
This diff is collapsed.
Click to expand it.
m4/parmetis.m4
+
5
−
1
View file @
6e0406ee
...
...
@@ -103,14 +103,16 @@ AC_DEFUN([DUNE_PATH_PARMETIS],[
# AC_LANG_POP([C++])
# pre-set variable for summary
with_parmetis
=
"no"
#
with_parmetis="no"
# did it work?
AC_MSG_CHECKING
(
ParMETIS
in
$with_parmetis
)
if
test
x
$HAVE_PARMETIS
=
x1
;
then
AC_SUBST
(
PARMETIS_LDFLAGS,
$PARMETIS_LDFLAGS
)
AC_SUBST
(
PARMETIS_LIBS,
$PARMETIS_LIBS
)
AC_SUBST
(
PARMETIS_CPPFLAGS,
$PARMETIS_CPPFLAGS
)
AC_DEFINE
(
HAVE_PARMETIS, 1,
[
Define to 1
if
PARMETIS is found]
)
AC_MSG_RESULT
(
ok
)
# add to global list
DUNE_PKG_LDFLAGS
=
"
$DUNE_PKG_LDFLAGS
$PARMETIS_LDFLAGS
"
...
...
@@ -119,6 +121,8 @@ AC_DEFUN([DUNE_PATH_PARMETIS],[
# re-set variable correctly
with_parmetis
=
"yes"
else
AC_MSG_RESULT
(
failed
)
fi
# end of "no --without-parmetis"
...
...
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