-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathconfigure.ac
96 lines (79 loc) · 2.4 KB
/
configure.ac
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
# Process this file with autoconf to produce a configure script.
AC_INIT([pi-qmc], [1.1], [[email protected]])
#save flags passed to configure
config_flags="$*"
AC_CONFIG_AUX_DIR(config)
AM_INIT_AUTOMAKE([subdir-objects])
AC_CONFIG_SRCDIR([src])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([m4])
AM_MAINTAINER_MODE
AC_DEFINE_UNQUOTED([CONFIG_FLAGS],["$config_flags"],[Flags passed to configure])
# Checks for programs.
AC_PROG_CXX
AC_PROG_F77
AC_PROG_INSTALL
AC_PROG_AWK
AC_F77_WRAPPERS
AC_LANG(C++)
AC_ARG_ENABLE(mpi,[ --enable-mpi Produces an mpi executable],
[
ACX_MPI
AC_DEFINE(ENABLE_MPI,[],[Flag to enable mpi features.])
CXX="$MPICXX"
LIBS="$MPILIBS $LIBS"
])
LT_INIT
# Checks for libraries.
AC_ARG_ENABLE(sprng,[ --enable-sprng Use the SPRNG library],
[
AC_CHECK_LIB(sprng,get_rn_dbl, [
LIBS="-lsprng $LIBS"
AC_DEFINE(ENABLE_SPRNG,[],[Flag to enable SPRNG library.])
],[
echo "You requested --enable-sprng but linking to libsprng failed."
exit -1
])
])
ACX_LAPACK(LIBS="$LAPACK_LIBS $BLAS_LIBS $LIBS $FLIBS")
AM_PATH_XML2(2.4.0,,AC_MSG_ERROR([
*** Libxml is required to build pi; Available at
http://www.libxml.org/.]))
LIBS="$XML_LIBS $LIBS"
CPPFLAGS="$XML_CFLAGS $CPPFLAGS"
AX_PATH_GSL([1.0],[],[AC_MSG_ERROR(
*** Libgsl is required to build pi; Available at http://www.gnu.org/software/gsl/.)])
LIBS="$GSL_LIBS $LIBS"
CPPFLAGS="$GSL_CFLAGS $CPPFLAGS"
#ACX_BLITZ(required) #moved to Makefile.am files.
AC_CHECK_LIB(hdf5,H5Fopen)
AC_CHECK_LIB(fftw3,fftw_plan_dft)
AC_ARG_WITH(ndim, [ --with-ndim=[NDIM] Set the number of physical dimensions (default is 3)],
AC_DEFINE_UNQUOTED(NDIM,${withval},[The number of physics dimensions.]),
AC_DEFINE_UNQUOTED(NDIM,3,[The number of physics dimensions.])
)
AC_CHECK_FUNC(getopt_long,
[AC_DEFINE(HAVE_GETOPT_H, 1,
[Define this if there is a system getopt.h header])
], [])
# Checks for header files.
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
# Checks for library functions.
AC_CONFIG_FILES([Makefile \
src/Makefile \
src/action/Makefile \
src/advancer/Makefile \
src/algorithm/Makefile \
src/base/Makefile \
src/demo/Makefile \
src/emarate/Makefile \
src/estimator/Makefile \
src/fixednode/Makefile \
src/parser/Makefile \
src/spin/Makefile \
src/stats/Makefile \
src/util/Makefile \
doc/Makefile \
unit-tests/Makefile])
AC_OUTPUT