mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Fix build issues with static libraries on Ubuntu 11.10
Specifically, add BLAS and LAPACK routines into
${LIBS} and add checks for UMFPACK and
UMFPACK-related libraries. OPM-Core might be
installed and fully functional, but if it depends
on UMFPACK, the AC_SEARCH_LIBS call might still fail.
See also: dune-cornerpoint commit 3a6be2aa9a45.
This commit is contained in:
39
configure.ac
39
configure.ac
@@ -29,6 +29,9 @@ AC_PROG_F77
|
||||
AC_F77_WRAPPERS
|
||||
|
||||
# Checks for libraries.
|
||||
AC_SEARCH_LIBS([sqrt], [m])
|
||||
AC_CHECK_FUNCS([sqrt])
|
||||
|
||||
AX_LAPACK
|
||||
AX_BOOST_BASE([1.37])
|
||||
AX_BOOST_SYSTEM
|
||||
@@ -36,13 +39,6 @@ AX_BOOST_DATE_TIME
|
||||
AX_BOOST_FILESYSTEM
|
||||
AX_BOOST_UNIT_TEST_FRAMEWORK
|
||||
|
||||
AC_SEARCH_LIBS([process_grdecl], [opmcore],
|
||||
[opmcore_lib=yes],
|
||||
[opmcore_lib=no],
|
||||
[$BOOST_LDFLAGS $BOOST_SYSTEM_LIB
|
||||
$LAPACK_LIBS $BLAS_LIBS $LIBS $FLIBS])
|
||||
|
||||
|
||||
# Checks for header files.
|
||||
AC_CHECK_HEADERS([opm/core/grid.h], [],
|
||||
[AC_MSG_ERROR(
|
||||
@@ -57,21 +53,20 @@ AC_CHECK_HEADERS([suitesparse/umfpack.h],
|
||||
# Checks for typedefs, structures, and compiler characteristics.
|
||||
|
||||
# Checks for library functions.
|
||||
|
||||
AC_F77_FUNC(dgetrf)
|
||||
AC_SEARCH_LIBS($dgemm, [blas])
|
||||
AC_SEARCH_LIBS($dgetrf, [lapack])
|
||||
|
||||
AC_SEARCH_LIBS([amd_free], [amd])
|
||||
AC_SEARCH_LIBS([camd_free], [camd])
|
||||
AC_SEARCH_LIBS([colamd_set_defaults], [colamd])
|
||||
AC_SEARCH_LIBS([ccolamd_set_defaults], [ccolamd])
|
||||
AC_SEARCH_LIBS([cholmod_l_start], [cholmod])
|
||||
|
||||
AC_SEARCH_LIBS([umfpack_dl_solve], [umfpack],
|
||||
[umfpack_lib=yes], [umfpack_lib=no])
|
||||
|
||||
AC_SEARCH_LIBS([preprocess], [opmcore], [],
|
||||
[AC_MSG_ERROR(
|
||||
[cannot proceed without CPGPreprocess library.
|
||||
*** Update LDFLAGS and try again. ***])],
|
||||
[$BOOST_SYSTEM_LIB $LAPACK_LIBS $BLAS_LIBS])
|
||||
|
||||
AC_SEARCH_LIBS([csrmatrix_elm_index], [opmcore], [],
|
||||
[AC_MSG_ERROR(
|
||||
[cannot proceed without opmpressure library.
|
||||
*** Update LDFLAGS and try again. ***])],
|
||||
[$BOOST_SYSTEM_LIB $LAPACK_LIBS $BLAS_LIBS])
|
||||
|
||||
AM_CONDITIONAL([UMFPACK],
|
||||
[test "x$umfpack_header" != "xno" -a "x$umfpack_lib" != "xno"])
|
||||
|
||||
@@ -81,6 +76,12 @@ m4_ifdef([AM_COND_IF],
|
||||
UMFPACK support is disabled.])])
|
||||
])
|
||||
|
||||
AC_SEARCH_LIBS([process_grdecl], [opmcore],
|
||||
[opmcore_lib=yes],
|
||||
[opmcore_lib=no],
|
||||
[$BOOST_LDFLAGS $BOOST_SYSTEM_LIB
|
||||
$LAPACK_LIBS $BLAS_LIBS $LIBS $FLIBS])
|
||||
|
||||
AC_CONFIG_FILES([
|
||||
Makefile
|
||||
examples/Makefile
|
||||
|
||||
Reference in New Issue
Block a user