-
Notifications
You must be signed in to change notification settings - Fork 2
/
configure.ac
166 lines (156 loc) · 5.03 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
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
dnl ----------------------------------------------------
dnl Package name, release number, description, and URL
dnl ----------------------------------------------------
AC_INIT([ESIO], [0.2.0], [[email protected]], [esio])
AC_REVISION([$Id$])
PACKAGE_DESCRIPTION="ExaScale IO library for turbulence simulation restart files"
AC_SUBST([PACKAGE_DESCRIPTION])
PACKAGE_URL="http://github.com/RhysU/ESIO"
AC_SUBST([PACKAGE_URL])
dnl ------------------------------------------------
dnl Initialization macros
dnl ------------------------------------------------
AC_CONFIG_COMMANDS_PRE([m4_ifdef([AH_HEADER],
[AC_SUBST([CONFIG_INCLUDE], m4_defn([AH_HEADER]))])])
AC_CONFIG_SRCDIR([esio/esio.h])
AM_CONFIG_HEADER(esio/config.h)
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
AX_PREFIX_CONFIG_H([esio/esio-config.h])
AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE(1.11 no-define tar-ustar color-tests -Wall foreign subdir-objects)
AC_PREREQ([2.64])
AX_AM_MACROS
AX_ADD_AM_CTAGSFLAGS
AX_AM_JOBSERVER([no])
AX_SPLIT_VERSION
AC_SUBST([AX_MAJOR_VERSION])
AC_SUBST([AX_MINOR_VERSION])
AC_SUBST([AX_POINT_VERSION])
AC_PROG_SED
AC_PATH_PROG([PERL],[perl],[no])
AM_CONDITIONAL([HAVE_PERL],[test x$PERL != xno])
AC_CACHE_SAVE
dnl ------------------------------------------------
dnl Manipulate C settings and find MPI/HDF5
dnl ------------------------------------------------
AX_CHECK_ENABLE_DEBUG([info])
AC_USE_SYSTEM_EXTENSIONS
AC_PROG_CC
AM_PROG_CC_C_O
AM_PROG_AR
gl_EARLY
gl_INIT
AX_APPEND_LINK_FLAGS([-Wl,--as-needed],[LDFLAGS])
AC_LANG_PUSH([C])
if test "x$ax_enable_debug" != "xno"; then
AX_TRACEBACK()
fi
AX_PATH_GRVY_NEW([0.27],[no])
AX_CFLAGS_WARN_ALL
AX_PROG_CC_C99_CFLAGS(,AC_MSG_ERROR([Compiler cannot support ISO C99]))
ACX_MPI(,AC_MSG_ERROR(Could not find MPI compilation tools for C, e.g. mpicc.))
MPICC_LOCATION=$(eval command -v $MPICC)
AC_SUBST([MPICC_LOCATION])
AX_LIB_HDF5([parallel])
if test "x$with_hdf5" != "xyes"; then
AC_MSG_ERROR([Parallel HDF5 installation not detected.])
fi
AX_VISIBILITY([hidden],[:],[:])
AX_COMPILER_VENDOR()
AX_WARNINGS_SANITIZE()
AC_LANG_POP([C])
AC_CACHE_SAVE
dnl ------------------------------------------------
dnl Manipulate Fortran settings and find MPI
dnl ------------------------------------------------
AC_PROG_FC
AC_LANG_PUSH([Fortran])
dnl BEGIN: Ensure that preprocessor is run on free-form Fortran .F90 sources
dnl Stupidly complicated to get correct. Modify FCFLAGS_F90 with result.
dnl When Autoconf 2.69 is more common, AC_FC_PP_SRCEXT([F90]) should be used.
AC_FC_SRCEXT([F90])
AC_FC_FREEFORM()
ax_save_FCFLAGS=$FCFLAGS
dnl AC_LANG_WERROR # IBM XL Fortran emits success strings on stderr and breaks us!
AC_MSG_CHECKING([for flags required to enable Fortran preprocessing])
for fppflag in '' -fpp -cpp '-x f95-cpp-input' none
do
if test "x$fppflag" == xnone; then
AC_MSG_RESULT([unknown])
AC_MSG_ERROR([Could not enable Fortran preprocessing])
break
fi
ax_fpp_save_FCFLAGS=$FCFLAGS
FCFLAGS="$FCFLAGS $fppflag"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[#define TESTDEFINE])],[
FCFLAGS=$ax_fpp_save_FCFLAGS
break
],[
FCFLAGS=$ax_fpp_save_FCFLAGS
])
done
AC_MSG_RESULT([$fppflag])
FCFLAGS_F90="$FCFLAGS_F90 $fppflag"
dnl END: Ensure that preprocessor is run on free-form Fortran .F90 sources
AC_FC_WRAPPERS
AX_FCFLAGS_WARN_ALL
if test "x$ax_enable_debug" != "xno"; then
AX_TRACEBACK()
fi
ACX_MPI(,AC_MSG_ERROR(Could not find MPI compilation tools for Fortran, e.g. mpf90.))
MPIFC_LOCATION=$(eval command -v $MPIFC)
AC_SUBST([MPIFC_LOCATION])
if test "x$with_hdf5_fortran" != "xyes"; then
AC_MSG_WARN([HDF5 Fortran support not detected])
AC_MSG_NOTICE([ESIO Fortran support does not require HDF5 Fortran support])
fi
AC_LANG_POP([Fortran])
AC_CACHE_SAVE
dnl ------------------------------------------------
dnl Enable GNU libtool
dnl Current version checks also in Makefile.am
dnl ------------------------------------------------
LT_INIT()
LT_PREREQ([2.2.6])
AC_SUBST(LIBTOOL_DEPS)
AC_CACHE_SAVE
dnl ------------------------------------------------
dnl Documentation generation
dnl ------------------------------------------------
DX_DOXYGEN_FEATURE([ON])
DX_HTML_FEATURE([ON])
DX_CHM_FEATURE([OFF])
DX_CHI_FEATURE([OFF])
DX_MAN_FEATURE([ON])
DX_RTF_FEATURE([OFF])
DX_XML_FEATURE([OFF])
DX_PDF_FEATURE([OFF])
DX_PS_FEATURE([OFF])
DX_INIT_DOXYGEN(AC_PACKAGE_NAME,[doxygen/doxygen.cfg],[docs])
#--------------------------
# Checks for code coverage
#-------------------------
AX_CODE_COVERAGE
# Query configuration environment
AX_SUMMARIZE_ENV
dnl ------------------------------------------------
dnl Generate Makefiles
dnl ------------------------------------------------
AC_SUBST([CONFIG_STATUS_DEPENDENCIES], ['$(top_srcdir)/LICENSE.in'])
AC_CONFIG_FILES([
LICENSE
Makefile
esio.pc
esio-hdf5.pc
apps/Makefile
doxygen/Makefile
esio/Makefile
esio/version.h
examples/Makefile
gnulib/Makefile
tests/Makefile
])
AC_OUTPUT()
dnl Final summary
AX_SUMMARIZE_CONFIG