-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathconfigure.ac
More file actions
executable file
·171 lines (152 loc) · 5.16 KB
/
Copy pathconfigure.ac
File metadata and controls
executable file
·171 lines (152 loc) · 5.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
AC_INIT([angora],[0.20.0],[bugs@angorafdtd.org])
AC_CONFIG_SRCDIR([src/constants.h])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_AUX_DIR([.])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE
# Checks for programs.
AC_LANG([C++])
AC_PROG_CXX
AC_PROG_AWK
AC_PROG_CC
AC_PROG_CPP
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
LT_INIT
# Checks for header files.
AC_CHECK_HEADERS([stdlib.h sys/timeb.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_C_INLINE
AC_TYPE_SIZE_T
# Checks for library functions.
AC_FUNC_MALLOC
AC_CHECK_FUNCS([floor mkdir pow sqrt])
# check if MPI parallel I/O should be used
AC_ARG_ENABLE([mpi-io],
[AS_HELP_STRING([--enable-mpi-io],
[enables the MPI parallel I/O support [default=disabled]])],
[AC_DEFINE([MPI_USE_PARALLEL_IO], [], [Enables MPI I/O support.])],
[])
# location of the MPI installation directory
dnl Define a macro for introducing the MPI preprocessor variable
m4_define([ANGORA_DEFN_MPI_DISABLE],[AC_DEFINE([MPI_DISABLE], [], [Disables the message-passing-interface (MPI) support.])])
AC_ARG_WITH([mpi],
[AS_HELP_STRING([--with-mpi@<:@=DIR@:>@],
[enable MPI support (with binary directory DIR, if not in path)])],
[if test "$with_mpi" = "yes" ; then
AC_SUBST([CXX],[mpicxx])
else
if test "$with_mpi" != "no" ; then
AC_SUBST([CXX],[$with_mpi/bin/mpicxx])
else
ANGORA_DEFN_MPI_DISABLE
fi
fi],
[ANGORA_DEFN_MPI_DISABLE])
# location of the HDF5 installation directory
#C++ compiler and linker under the h5c++ wrapper are what's been already set (g++, mpicxx, etc)
AC_SUBST([HDF5_CXX],[$CXX])dnl
AC_SUBST([HDF5_CLINKER],[$CXX])dnl
# Save the current value of CXX, to be restored later if HDF5 is disabled
CXX_SAVEFIRST=$CXX
AC_SUBST([CXX],[h5c++])dnl
AC_ARG_WITH([hdf5],
[AS_HELP_STRING([--with-hdf5@<:@=DIR@:>@],
[enable HDF5 support (with binary directory DIR, if not in path)])],
[
if test "$with_hdf5" != "no" ; then
if test "$with_hdf5" != "yes" ; then
AC_SUBST([CXX],[$with_hdf5/bin/h5c++])dnl
fi
else
AC_MSG_ERROR([HDF5 support cannot be disabled])
fi],
[])dnl HDF5 enabled by default
# location of the blitz++ installation directory
AC_ARG_WITH([blitz],
[AS_HELP_STRING([--with-blitz@<:@=DIR@:>@],
[location of blitz++ root directory, if not in path])],
[if test "$with_blitz" != "yes" ; then
if test "$with_blitz" != "no" ; then
AC_SUBST([blitzdir],[$with_blitz])
else
AC_MSG_ERROR([blitz++ functionality cannot be disabled])
fi
fi],
[])
# location of the libconfig installation directory
AC_ARG_WITH([config],
[AS_HELP_STRING([--with-config@<:@=DIR@:>@],
[location of libconfig++ root directory, if not in path])],
[if test "$with_config" != "yes" ; then
if test "$with_config" != "no" ; then
AC_SUBST([libconfigdir],[$with_config])
else
AC_MSG_ERROR([libconfig++ functionality cannot be disabled])
fi
fi],
[])
# location of Boost directory
AC_ARG_WITH([boost],
[AS_HELP_STRING([--with-boost@<:@=DIR@:>@],
[location of Boost root directory, if not in path])],
[if test "$with_boost" != "yes" ; then
if test "$with_boost" != "no" ; then
AC_SUBST([boostdir],[$with_boost])
else
AC_MSG_ERROR([Boost functionality cannot be disabled])
fi
fi],
[])
# debugging
AC_ARG_ENABLE([debug],
[AS_HELP_STRING([--enable-debug],
[Turn on debugging])],
[case "${enableval}" in
yes) AC_SUBST([CXXFLAGS],["-g -DBZ_DEBUG"]) ;;
no) ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-debug]) ;;
esac],[debug=false])
# whether to install the documentation by default
AC_ARG_ENABLE([doc-install],
[AS_HELP_STRING([--enable-doc-install],
[Install the documentation by default])],
[case "${enableval}" in
yes) DOC_INSTALL=true ;;
no) DOC_INSTALL=false ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-doc-install]) ;;
esac],[DOC_INSTALL=false])
AM_CONDITIONAL([DOC_INSTALL], [test x$DOC_INSTALL = xtrue])
# location of the Angora template config file
dnl See the autoconf documentation at http://www.gnu.org/software/autoconf/manual/autoconf.html#Preset-Output-Variables, section 4.8.1
dnl "...coupled with the fact that configure is always run from the top build directory,
dnl it is sufficient to use just ‘$srcdir’ instead of ‘$top_srcdir’."
AC_DEFINE_UNQUOTED([angora_cfgdir], ["$srcdir/cfg"], [Location of the Angora template config file.])
AC_CONFIG_FILES(Makefile \
doc/Makefile \
src/Makefile \
src/main/Makefile \
src/update/Makefile \
src/config/Makefile \
src/shape/Makefile \
src/material/Makefile \
src/absorb/Makefile \
src/fft/Makefile \
src/fft/kiss_D_fft/Makefile \
src/fft/kiss_F_fft/Makefile \
src/specfun/hermite/Makefile \
src/specfun/gamma/Makefile \
src/pointsources/Makefile \
src/waveforms/Makefile \
src/recorder/Makefile \
src/estimator/Makefile \
src/imaging/Makefile \
src/nffft/Makefile \
src/nffft/td/Makefile \
src/nffft/pd/Makefile \
src/tfsf/Makefile \
src/tfsf/glquad/Makefile \
src/tfsf/evan/Makefile)
AC_OUTPUT