3
AC_INIT([dolfin],[0.8.1-hpc])
4
AC_DEFINE_UNQUOTED(DOLFIN_VERSION,["${PACKAGE_VERSION}"],[Version of DOLFIN])
8
AC_CONFIG_MACRO_DIR([m4])
9
LT_INIT([disable-shared])
11
AC_SUBST(PACKAGE_REQUIRES)
16
AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug],[Compile with debug symbols]),
17
[enable_debug=${enableval}],[enable_debug=no])
19
AC_ARG_ENABLE(function-cache, AC_HELP_STRING([--enable-function-cache],
20
[Compile with local data cache in functions]),
21
[enable_function_cache=${enableval}],[enable_function_cache=no])
23
AC_ARG_ENABLE(optimize-p1, AC_HELP_STRING([--enable-optimize-p1],
24
[Compile with optimization for P1 elements]),
25
[enable_optimize_p1=${enableval}],[enable_optimize_p1=no])
27
AC_ARG_ENABLE(progress-bar, AC_HELP_STRING([--disable-progress-bar],[Compile without progress bar]),
28
[enable_progressbar=no],[enable_progressbar=yes])
30
AC_HELP_STRING([--enable-mpi],
31
[Compile with support for MPI]),[enable_mpi=${enableval}], [enable_mpi=no])
33
AC_ARG_ENABLE(mpi-io, AC_HELP_STRING([--enable-mpi-io],
34
[Compile with support for MPI I/O]),
35
[enable_mpiio=yes],[enable_mpiio=no])
38
AC_HELP_STRING([--enable-openmp],
39
[Compile with support for OpenMP]),[enable_openmp=${enableval}], [enable_openmp=no])
41
AC_ARG_ENABLE(boost-tr1, AC_HELP_STRING([--enable-boost-tr1],
42
[Compile with support for Boost TR1 headers]),
43
[enable_boosttr1=yes],[enable_boostr1=no])
50
AC_ARG_WITH(gts, AC_HELP_STRING([--with-gts], [Compile with support for GTS]),
51
[with_gts=${withval}],[with_gts=no])
53
AC_ARG_WITH(janpack, AC_HELP_STRING([--with-janpack], [Compile with support for JANPACK]),
54
[with_janpack=${withval}],[with_janpack=no])
56
AC_ARG_WITH(petsc, AC_HELP_STRING([--with-petsc], [Compile with support for PETSc linear algebra]),
57
[with_petsc=${withval}],[with_petsc=no])
60
if test "x${enable_function_cache}" = xyes; then
61
AC_DEFINE(ENABLE_FUNCTION_CACHE, [1], [Compile with local data cache in functions])
64
if test "x${enable_optimize_p1}" = xyes; then
65
AC_DEFINE(ENABLE_P1_OPTIMIZATIONS, [1], [Compile with optimization for P1 elements])
68
if test "x${enable_progressbar}" != xyes; then
69
AC_DEFINE(NO_PROGRESS_BAR, [1], [Compile without progress bar])
72
if test "x${enable_boosttr1}" = xyes; then
73
AC_DEFINE(ENABLE_BOOST_TR1,[1],[Compile with support for Boost TR1 headers])
78
# Checks for programs.
85
if test "x${enable_mpi}" != xno; then
89
if test "x${ax_cv_cxx_compiler_vendor}" = xsgi; then
93
if test "x${enable_mpiio}" != xno; then
94
AC_DEFINE(ENABLE_MPIIO, 1, [Compile with support for MPI I/O])
100
if test "x${enable_openmp}" != xno; then
102
CXXFLAGS="$CXXFLAGS $OPENMP_CXXFLAGS"
104
if test "x${ax_cv_cxx_compiler_vendor}" = xcray; then
105
CXXFLAGS="-hnoomp $CXXFLAGS"
111
# Checks for header files.
112
AC_CHECK_HEADERS([float.h stdlib.h string.h])
113
AX_CXX_HEADER_TR1_UNORDERED_MAP
114
AX_CXX_HEADER_TR1_UNORDERED_SET
115
PKG_CHECK_MODULES([UFC],[ufc-1 = 1.1])
116
CPPFLAGS="$CPPFLAGS $UFC_CFLAGS"
119
if test "x${need_boost}" = xyes; then
120
AX_BOOST_BASE([1.34],,AC_MSG_ERROR([suitable Boost not found]))
121
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
124
if test "x${enable_boosttr1}" = xyes; then
125
if test "x${ax_cv_cxx_compiler_vendor}" = xsun; then
126
CXXFLAGS="-D_RWSTD_ALLOCATOR $CXXFLAGS"
131
# Checks for libraries.
132
AM_PATH_XML2(,,AC_MSG_ERROR([libxml2 not found]))
133
LIBS="$XML_LIBS $LIBS"
137
if test "${ZLIB_LIBS}"; then
138
LIBS="$ZLIB_LIBS $LIBS"
145
if test "x${enable_mpi}" != xno; then
147
if test "${PARMETIS_LIBS}"; then
148
LIBS="$PARMETIS_LIBS $LIBS"
150
AC_MSG_ERROR([Required library ParMetis not found])
154
if test "x${with_gts}" = xyes; then
155
PKG_CHECK_MODULES([gts], [gts])
156
CPPFLAGS="$CPPFLAGS $gts_CFLAGS"
157
LIBS="$LIBS $gts_LIBS"
158
AC_DEFINE(HAVE_GTS,[1],[Have GTS library])
161
if test "x${with_petsc}" != xno; then
162
# This assumes a modern CRAY, for example XT or XE series systems
163
if test "x${ax_cv_cxx_compiler_vendor}" = xcray; then
164
AC_DEFINE(HAVE_PETSC,1,[Define if you have the Petsc library.])
170
if test "x${with_janpack}" != xno; then
174
if test "x${enable_debug}" != xno; then
175
CXXFLAGS="-g -DDEBUG $CXXFLAGS"
178
# Checks for typedefs, structures, and compiler characteristics.
185
if test "x${ac_cv_c_bigendian}" != xno; then
186
AC_DEFINE(HAVE_BIG_ENDIAN, 1, [Big endian byte order.])
190
# Checks for library functions.
191
AC_FUNC_ERROR_AT_LINE
192
AC_CHECK_FUNCS([floor memset pow sqrt])
195
AC_CONFIG_HEADERS([include/dolfin/config/dolfin_config.h])
196
AC_CONFIG_FILES([Makefile src/Makefile\
198
src/elements/Makefile\
200
src/function/Makefile\
209
src/parameter/Makefile\
213
include/dolfin/Makefile])
220
---------------------------------------------------------
222
Configuration of DOLFIN ${PACKAGE_VERSION} finished.
225
Compiler: ${CXX} ${CXXFLAGS} ${CPPFLAGS}
226
Libs: ${LD} ${LDFLAGS} ${LIBS}
231
MPI I/O: ${enable_mpiio}
232
OpenMP: ${enable_openmp}
234
JANPACK: ${with_janpack}
236
Function cache: ${enable_function_cache}
237
Optimize P1: ${enable_optimize_p1}
238
Progress bar: ${enable_progressbar}
239
Compressed VTK: ${enable_zlib}
242
---------------------------------------------------------