Skip to content
Snippets Groups Projects
Commit 45332c8a authored by Markus Blatt's avatar Markus Blatt
Browse files

Configure now does not abort even if fortran compiler is not available.

[[Imported from SVN: r4552]]
parent 21ecd478
No related branches found
No related tags found
No related merge requests found
# overwrite an internal function of autoconf
#
# The function below caused configure to abort if no fortran was available.
# Changed it to just report a warning that we cannot compile
# fortran programms.
# __AC_FC_NAME_MANGLING
# ---------------------
# Test for the name mangling scheme used by the Fortran compiler.
#
# Sets ac_cv_{f77,fc}_mangling. The value contains three fields, separated
# by commas:
#
# lower case / upper case:
# case translation of the Fortran symbols
# underscore / no underscore:
# whether the compiler appends "_" to symbol names
# extra underscore / no extra underscore:
# whether the compiler appends an extra "_" to symbol names already
# containing at least one underscore
#
AC_DEFUN([__AC_FC_NAME_MANGLING],
[_AC_FORTRAN_ASSERT()dnl
AC_CACHE_CHECK([for Fortran name-mangling scheme],
ac_cv_[]_AC_LANG_ABBREV[]_mangling,
[AC_COMPILE_IFELSE(
[ subroutine foobar()
return
end
subroutine foo_bar()
return
end],
[mv conftest.$ac_objext cfortran_test.$ac_objext
ac_save_LIBS=$LIBS
LIBS="cfortran_test.$ac_objext $LIBS $[]_AC_LANG_PREFIX[]LIBS"
AC_LANG_PUSH(C)dnl
ac_success=no
for ac_foobar in foobar FOOBAR; do
for ac_underscore in "" "_"; do
ac_func="$ac_foobar$ac_underscore"
AC_LINK_IFELSE([AC_LANG_CALL([], [$ac_func])],
[ac_success=yes; break 2])
done
done
AC_LANG_POP(C)dnl
if test "$ac_success" = "yes"; then
case $ac_foobar in
foobar)
ac_case=lower
ac_foo_bar=foo_bar
;;
FOOBAR)
ac_case=upper
ac_foo_bar=FOO_BAR
;;
esac
AC_LANG_PUSH(C)dnl
ac_success_extra=no
for ac_extra in "" "_"; do
ac_func="$ac_foo_bar$ac_underscore$ac_extra"
AC_LINK_IFELSE([AC_LANG_CALL([], [$ac_func])],
[ac_success_extra=yes; break])
done
AC_LANG_POP(C)dnl
if test "$ac_success_extra" = "yes"; then
ac_cv_[]_AC_LANG_ABBREV[]_mangling="$ac_case case"
if test -z "$ac_underscore"; then
ac_cv_[]_AC_LANG_ABBREV[]_mangling="$ac_cv_[]_AC_LANG_ABBREV[]_mangling, no underscore"
else
ac_cv_[]_AC_LANG_ABBREV[]_mangling="$ac_cv_[]_AC_LANG_ABBREV[]_mangling, underscore"
fi
if test -z "$ac_extra"; then
ac_cv_[]_AC_LANG_ABBREV[]_mangling="$ac_cv_[]_AC_LANG_ABBREV[]_mangling, no extra underscore"
else
ac_cv_[]_AC_LANG_ABBREV[]_mangling="$ac_cv_[]_AC_LANG_ABBREV[]_mangling, extra underscore"
fi
else
ac_cv_[]_AC_LANG_ABBREV[]_mangling="unknown"
fi
else
ac_cv_[]_AC_LANG_ABBREV[]_mangling="unknown"
fi
LIBS=$ac_save_LIBS
rm -f cfortran_test* conftest*],
[AC_MSG_WARN([cannot compile a simple Fortran program])])
])
])# __AC_FC_NAME_MANGLING
......@@ -5,8 +5,6 @@
AC_DEFUN([DUNE_PATH_SUPERLU_DIST],[
AC_MSG_CHECKING(for SuperLUDist library)
AC_REQUIRE([AC_PROG_CC])
AC_REQUIRE([AC_PATH_XTRA])
AC_REQUIRE([AC_F77_LIBRARY_LDFLAGS])
AC_REQUIRE([ACX_BLAS])
AC_REQUIRE([DUNE_MPI])
......
......@@ -5,7 +5,6 @@
AC_DEFUN([DUNE_PATH_SUPERLU],[
AC_MSG_CHECKING(for SuperLU library)
AC_REQUIRE([AC_PROG_CC])
AC_REQUIRE([AC_PATH_XTRA])
#AC_REQUIRE([AC_F77_LIBRARY_LDFLAGS])
AC_REQUIRE([ACX_BLAS])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment