2011-12-08 07:49:09 -06:00
|
|
|
# -*- Autoconf -*-
|
|
|
|
# Process this file with autoconf to produce a configure script.
|
|
|
|
|
2011-12-12 07:57:09 -06:00
|
|
|
AC_PREREQ([2.59])
|
2011-12-08 07:49:09 -06:00
|
|
|
AC_INIT([OPM Core Library], [0.1], [atgeirr@sintef.no],dnl
|
|
|
|
[opmcore], [https://public.ict.sintef.no/opm/hg/opmcore])
|
|
|
|
AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects])
|
|
|
|
|
|
|
|
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
|
|
|
|
|
|
|
|
AC_CONFIG_MACRO_DIR([m4])
|
2011-12-12 04:29:14 -06:00
|
|
|
AC_CONFIG_SRCDIR([opm/core/grid.h])
|
2011-12-08 07:49:09 -06:00
|
|
|
AC_CONFIG_HEADERS([config.h])
|
|
|
|
|
|
|
|
# Checks for programs.
|
|
|
|
AC_PROG_CC
|
2012-01-06 04:22:35 -06:00
|
|
|
AM_PROG_CC_C_O
|
2011-12-08 07:49:09 -06:00
|
|
|
|
2012-06-05 11:40:36 -05:00
|
|
|
m4_ifdef([LT_INIT],
|
|
|
|
[LT_INIT[]dnl
|
|
|
|
LT_LANG([C++])dnl
|
|
|
|
LT_LANG([Fortran 77])dnl
|
|
|
|
LT_LANG([Fortran])dnl
|
|
|
|
],dnl
|
|
|
|
[AC_PROG_LIBTOOL[]dnl
|
|
|
|
AC_PROG_CXX[]dnl
|
|
|
|
AC_PROG_F77[]dnl
|
|
|
|
AC_PROG_FC[]dnl
|
|
|
|
])[]dnl
|
2011-12-08 07:49:09 -06:00
|
|
|
|
|
|
|
# Checks for libraries.
|
2012-02-10 07:59:40 -06:00
|
|
|
|
|
|
|
# Bring in numerics support (standard library component)
|
|
|
|
AC_SEARCH_LIBS([sqrt], [m])
|
|
|
|
|
2012-06-05 11:40:36 -05:00
|
|
|
OPM_LAPACK
|
|
|
|
|
2011-12-19 08:26:26 -06:00
|
|
|
AX_BOOST_BASE([1.37])
|
|
|
|
AX_BOOST_SYSTEM
|
|
|
|
AX_BOOST_DATE_TIME
|
|
|
|
AX_BOOST_FILESYSTEM
|
|
|
|
AX_BOOST_UNIT_TEST_FRAMEWORK
|
2011-12-08 07:49:09 -06:00
|
|
|
|
2012-04-13 08:35:19 -05:00
|
|
|
AX_DUNE_ISTL
|
2012-06-05 12:44:18 -05:00
|
|
|
OPM_AGMG
|
2012-04-13 08:35:19 -05:00
|
|
|
|
2011-12-08 07:49:09 -06:00
|
|
|
# Checks for header files.
|
|
|
|
AC_CHECK_HEADERS([float.h limits.h stddef.h stdlib.h string.h])
|
|
|
|
|
2012-01-03 03:02:06 -06:00
|
|
|
AC_CHECK_HEADERS([suitesparse/umfpack.h],
|
|
|
|
[umfpack_header=yes],
|
|
|
|
[umfpack_header=no])
|
|
|
|
|
2011-12-08 07:49:09 -06:00
|
|
|
# Checks for typedefs, structures, and compiler characteristics.
|
|
|
|
AC_HEADER_STDBOOL
|
|
|
|
AC_TYPE_SIZE_T
|
|
|
|
AC_CHECK_TYPES([ptrdiff_t])
|
|
|
|
|
|
|
|
# Checks for library functions.
|
2012-02-10 07:59:40 -06:00
|
|
|
AC_CHECK_FUNCS([floor memset memmove strchr strtol sqrt pow])
|
2012-01-03 13:38:31 -06:00
|
|
|
AC_FUNC_STRTOD
|
2011-12-08 07:49:09 -06:00
|
|
|
|
2012-05-23 03:39:21 -05:00
|
|
|
# Search for UMFPACK direct sparse solver.
|
|
|
|
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],dnl
|
|
|
|
[umfpack_lib=yes], [umfpack_lib=no])
|
2011-12-08 09:15:14 -06:00
|
|
|
|
|
|
|
AM_CONDITIONAL([UMFPACK],
|
|
|
|
[test "x$umfpack_header" != "xno" -a "x$umfpack_lib" != "xno"])
|
|
|
|
|
2012-01-03 13:20:16 -06:00
|
|
|
m4_ifdef([AM_COND_IF],
|
|
|
|
[AM_COND_IF([UMFPACK], [],
|
|
|
|
[AC_MSG_NOTICE([Found no working installation of UMFPACK.
|
|
|
|
UMFPACK support is disabled.])])
|
|
|
|
])
|
|
|
|
|
2011-12-08 09:15:14 -06:00
|
|
|
|
2011-12-08 07:49:09 -06:00
|
|
|
AC_CONFIG_FILES([
|
|
|
|
Makefile
|
|
|
|
tests/Makefile
|
|
|
|
examples/Makefile
|
2012-04-10 10:46:52 -05:00
|
|
|
tutorials/Makefile
|
2011-12-08 07:49:09 -06:00
|
|
|
])
|
|
|
|
|
|
|
|
AC_OUTPUT
|