Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
nek5000
giraffe
Commits
04600ab4
Commit
04600ab4
authored
Dec 16, 2016
by
Ron Rahaman
Browse files
configure.ac gets compilers & flags from libmesh-config
parent
9f180a3b
Changes
1
Hide whitespace changes
Inline
Side-by-side
configure.ac
View file @
04600ab4
...
@@ -81,7 +81,52 @@ AC_ARG_ENABLE([extbar],
...
@@ -81,7 +81,52 @@ AC_ARG_ENABLE([extbar],
[AS_HELP_STRING([--enable-extbar], [adds underscore to exit call(for BGQ) @<:@default: disabled@:>@])],
[AS_HELP_STRING([--enable-extbar], [adds underscore to exit call(for BGQ) @<:@default: disabled@:>@])],
[extbar=${enableval}], [extbar=no])
[extbar=${enableval}], [extbar=no])
# TODO: Create debug and optimization options
AC_ARG_ENABLE([libmesh],
[AS_HELP_STRING([--enable-libmesh], [configure with compilers and flags from an existing libmesh installation @<:@default: enabled@:>@])],
[libmesh=${enableval}], [libmesh=yes])
AC_ARG_VAR([MOOSE_DIR], [directory of moose installation @<:@default: moon/moose/@:>@])
AC_ARG_VAR([LIBMESH_DIR], [directory of libmesh installation @<:@default: \$MOOSE_DIR/libmesh/installed/@:>@])
###############################################################################
# GET COMPILERS AND FLAGS FROM LIBMESH
###############################################################################
# Default values for $MOOSE_DIR and $LIBMESH_DIR
: "${MOOSE_DIR=$srcdir/moose}"
: "${LIBMESH_DIR=$MOOSE_DIR/libmesh/installed}"
# If libmesh is enabled, get compilers and flags from libmesh-config
# Adapted from moose/framework/build.mk
if test "x$libmesh" = "xyes"; then
# First, see if installed libmesh-config exists
libmesh_config="$LIBMESH_DIR/bin/libmesh-config"
AC_MSG_CHECKING([if $libmesh_config exists])
if test -x $libmesh_config; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
# If not, see if uninstalled libmesh-config exists
libmesh_config="$LIBMESH_DIR/contrib/bin/libmesh-config"
AC_MSG_CHECKING([if $libmesh_config exists])
if test -x $libmesh_config; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
AC_MSG_ERROR([could not find libmesh-config script. Ensure that LIBMESH_DIR and/or MOOSE_DIR are correctly set.])
fi
fi
AC_MSG_NOTICE([getting compilers and flags from $libmesh_config])
CC="$($libmesh_config --cc)"
CFLAGS="$($libmesh_config --cflags) $CFLAGS"
CPPFLAGS="$($libmesh_config --cppflags) $CPPFLAGS"
LDFLAGS="$($libmesh_config --ldflags) $LDFLAGS"
LIBS="$($libmesh_config --libs) $LIBS"
F77="$($libmesh_config --fc)"
FFLAGS="$($libmesh_config --fflags) $FFLAGS"
fi
###############################################################################
###############################################################################
# BUILT-IN CHECKS
# BUILT-IN CHECKS
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment