~njansson/dolfin/hpc

« back to all changes in this revision

Viewing changes to configure.ac

  • Committer: Niclas Jansson
  • Date: 2011-06-10 14:33:43 UTC
  • Revision ID: njansson@csc.kth.se-20110610143343-d21p4am8rghiojfm
Added rudimentary header to binary files

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
AC_PREREQ(2.59)
 
3
AC_INIT([dolfin],[0.8.1-hpc])
 
4
AC_DEFINE_UNQUOTED(DOLFIN_VERSION,["${PACKAGE_VERSION}"],[Version of DOLFIN])
 
5
AM_INIT_AUTOMAKE
 
6
AM_MAINTAINER_MODE
 
7
AC_LANG(C++)
 
8
AC_CONFIG_MACRO_DIR([m4])
 
9
LT_INIT([disable-shared])
 
10
PACKAGE_REQUIRES=""
 
11
AC_SUBST(PACKAGE_REQUIRES)
 
12
 
 
13
 
 
14
 
 
15
# Feature options.
 
16
AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug],[Compile with debug symbols]),
 
17
                     [enable_debug=${enableval}],[enable_debug=no])
 
18
 
 
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])
 
22
 
 
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])
 
26
 
 
27
AC_ARG_ENABLE(progress-bar, AC_HELP_STRING([--disable-progress-bar],[Compile without progress bar]),
 
28
                            [enable_progressbar=no],[enable_progressbar=yes])
 
29
AC_ARG_ENABLE(mpi,
 
30
              AC_HELP_STRING([--enable-mpi],
 
31
              [Compile with support for MPI]),[enable_mpi=${enableval}], [enable_mpi=no])
 
32
 
 
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])
 
36
 
 
37
AC_ARG_ENABLE(openmp,
 
38
              AC_HELP_STRING([--enable-openmp],
 
39
              [Compile with support for OpenMP]),[enable_openmp=${enableval}], [enable_openmp=no])
 
40
 
 
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])
 
44
 
 
45
 
 
46
 
 
47
 
 
48
 
 
49
# Optional packages
 
50
AC_ARG_WITH(gts, AC_HELP_STRING([--with-gts], [Compile with support for GTS]),
 
51
                 [with_gts=${withval}],[with_gts=no])
 
52
 
 
53
AC_ARG_WITH(janpack, AC_HELP_STRING([--with-janpack], [Compile with support for JANPACK]),
 
54
                     [with_janpack=${withval}],[with_janpack=no])
 
55
 
 
56
AC_ARG_WITH(petsc, AC_HELP_STRING([--with-petsc], [Compile with support for PETSc linear algebra]),
 
57
                     [with_petsc=${withval}],[with_petsc=no])
 
58
 
 
59
 
 
60
if test "x${enable_function_cache}" = xyes; then
 
61
   AC_DEFINE(ENABLE_FUNCTION_CACHE, [1], [Compile with local data cache in functions])
 
62
fi
 
63
 
 
64
if test "x${enable_optimize_p1}" = xyes; then
 
65
   AC_DEFINE(ENABLE_P1_OPTIMIZATIONS, [1], [Compile with optimization for P1 elements])
 
66
fi
 
67
 
 
68
if test "x${enable_progressbar}" != xyes; then
 
69
   AC_DEFINE(NO_PROGRESS_BAR, [1], [Compile without progress bar])
 
70
fi
 
71
 
 
72
if test "x${enable_boosttr1}" = xyes; then
 
73
   AC_DEFINE(ENABLE_BOOST_TR1,[1],[Compile with support for Boost TR1 headers])
 
74
   need_boost=yes       
 
75
fi
 
76
 
 
77
 
 
78
# Checks for programs.
 
79
AC_PROG_CXX
 
80
AC_PROG_INSTALL
 
81
AC_PROG_MAKE_SET
 
82
AC_PROG_LIBTOOL
 
83
PKG_PROG_PKG_CONFIG
 
84
AX_COMPILER_VENDOR
 
85
if test "x${enable_mpi}" != xno; then
 
86
   AX_MPI       
 
87
   CXX="$MPICXX"
 
88
   LIBS="$MPILIBS $LIBS"   
 
89
   if test "x${ax_cv_cxx_compiler_vendor}" = xsgi; then
 
90
      LIBS="$LIBS -lmpi++"
 
91
   fi   
 
92
 
 
93
   if test "x${enable_mpiio}" != xno; then
 
94
      AC_DEFINE(ENABLE_MPIIO, 1, [Compile with support for MPI I/O])
 
95
   fi
 
96
fi
 
97
 
 
98
 
 
99
 
 
100
if test "x${enable_openmp}" != xno; then
 
101
   AX_OPENMP
 
102
   CXXFLAGS="$CXXFLAGS $OPENMP_CXXFLAGS"
 
103
else
 
104
   if test "x${ax_cv_cxx_compiler_vendor}" = xcray; then
 
105
      CXXFLAGS="-hnoomp $CXXFLAGS" 
 
106
   fi
 
107
fi
 
108
 
 
109
 
 
110
 
 
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"
 
117
 
 
118
 
 
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"
 
122
fi
 
123
 
 
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"
 
127
   fi
 
128
fi
 
129
 
 
130
 
 
131
# Checks for libraries.
 
132
AM_PATH_XML2(,,AC_MSG_ERROR([libxml2 not found]))
 
133
LIBS="$XML_LIBS $LIBS"
 
134
 
 
135
AX_ZLIB
 
136
 
 
137
if test "${ZLIB_LIBS}"; then
 
138
   LIBS="$ZLIB_LIBS $LIBS"
 
139
   enable_zlib="yes"
 
140
else
 
141
   enable_zlib="no"
 
142
fi
 
143
 
 
144
 
 
145
if test "x${enable_mpi}" != xno; then
 
146
   AX_PARMETIS
 
147
   if test "${PARMETIS_LIBS}"; then
 
148
      LIBS="$PARMETIS_LIBS $LIBS"
 
149
   else
 
150
      AC_MSG_ERROR([Required library ParMetis not found])
 
151
   fi
 
152
fi
 
153
 
 
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])
 
159
fi
 
160
 
 
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.])
 
165
   else
 
166
      AX_PETSC
 
167
   fi
 
168
fi
 
169
 
 
170
if test "x${with_janpack}" != xno; then
 
171
   AX_JANPACK
 
172
fi
 
173
 
 
174
if test "x${enable_debug}" != xno; then
 
175
   CXXFLAGS="-g -DDEBUG $CXXFLAGS"
 
176
fi
 
177
 
 
178
# Checks for typedefs, structures, and compiler characteristics.
 
179
AC_C_BIGENDIAN
 
180
AC_C_INLINE
 
181
AC_TYPE_SIZE_T
 
182
AC_TYPE_UINT32_T
 
183
AC_TYPE_UINT8_T
 
184
 
 
185
if test "x${ac_cv_c_bigendian}" != xno; then
 
186
   AC_DEFINE(HAVE_BIG_ENDIAN, 1, [Big endian byte order.])
 
187
fi
 
188
 
 
189
 
 
190
# Checks for library functions.
 
191
AC_FUNC_ERROR_AT_LINE
 
192
AC_CHECK_FUNCS([floor memset pow sqrt])
 
193
 
 
194
 
 
195
AC_CONFIG_HEADERS([include/dolfin/config/dolfin_config.h])
 
196
AC_CONFIG_FILES([Makefile src/Makefile\
 
197
                          src/common/Makefile\
 
198
                          src/elements/Makefile\
 
199
                          src/fem/Makefile\
 
200
                          src/function/Makefile\
 
201
                          src/graph/Makefile\
 
202
                          src/io/Makefile\
 
203
                          src/la/Makefile\
 
204
                          src/log/Makefile\
 
205
                          src/main/Makefile\
 
206
                          src/math/Makefile\
 
207
                          src/mesh/Makefile\
 
208
                          src/nls/Makefile\
 
209
                          src/parameter/Makefile\
 
210
                          src/pde/Makefile\
 
211
                          src/dolfin.pc
 
212
                          include/Makefile
 
213
                          include/dolfin/Makefile])
 
214
 
 
215
AC_OUTPUT
 
216
 
 
217
# Display help text
 
218
echo \
 
219
"
 
220
---------------------------------------------------------
 
221
 
 
222
Configuration of DOLFIN ${PACKAGE_VERSION} finished.
 
223
 
 
224
Prefix: '${prefix}'.
 
225
Compiler: ${CXX} ${CXXFLAGS} ${CPPFLAGS}
 
226
Libs: ${LD} ${LDFLAGS} ${LIBS}
 
227
 
 
228
Package features:
 
229
 
 
230
  MPI: ${enable_mpi} 
 
231
  MPI I/O: ${enable_mpiio}
 
232
  OpenMP: ${enable_openmp}
 
233
  PETSc: ${with_petsc}
 
234
  JANPACK: ${with_janpack}
 
235
  GTS: ${with_gts}
 
236
  Function cache: ${enable_function_cache}
 
237
  Optimize P1: ${enable_optimize_p1}
 
238
  Progress bar: ${enable_progressbar}
 
239
  Compressed VTK: ${enable_zlib}
 
240
 
 
241
 
 
242
---------------------------------------------------------
 
243
"
 
244
 
 
245