File: configure.ac

package info (click to toggle)
abinit 8.8.4-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 353,520 kB
  • sloc: f90: 529,369; xml: 212,361; python: 46,692; perl: 7,303; ansic: 6,365; sh: 5,634; fortran: 557; objc: 323; cpp: 285; makefile: 62; csh: 42; pascal: 31
file content (270 lines) | stat: -rw-r--r-- 6,186 bytes parent folder | download
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
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
# -*- Autoconf -*-
#
# Copyright (C) 2011-2018 ABINIT Group (Yann Pouillon)
#
# This file is part of the ABINIT software package. For license information,
# please see the COPYING file in the top-level directory of the ABINIT source
# distribution.
#

# ---------------------------------------------------------------------------- #

#
# IMPORTANT NOTE
#
# Please DO NOT EDIT this file unless you REALLY know what you are doing.
# Everything is important, in particular the order of the various commands
# executed here. YOU HAVE BEEN WARNED !
#

# ---------------------------------------------------------------------------- #

#
# Autoconf & Automake startup
#

# Initialize Autoconf
AC_PREREQ(2.62)
AC_INIT([ABINIT-Fallbacks],[1.0],
  [https://bugs.launchpad.net/abinit/],[abinit-fallbacks])
AC_REVISION([Autotools support for the ABINIT Fallbacks])
AC_CONFIG_AUX_DIR([config/gnu])
AC_CONFIG_SRCDIR([.])
_AC_SRCDIRS(["."])

# ---------------------------------------------------------------------------- #

#
# Startup
#

# Initial setup
AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE(1.10)

# Check for common programs
AC_PROG_MAKE_SET
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_SED
AC_PROG_AWK
AC_PROG_GREP

# Workaround for the "grep -e" issue on Solaris systems
AC_PROG_EGREP

# Workaround for the wrong path to install-sh on Mac systems
AX_PROG_MKDIR_P

# Make sure the source tree is complete
${MKDIR_P} exports/include sources stamps

# ---------------------------------------------------------------------------- #

#
# Define global options
#

# FIXME: properly manage compiler vendors
AC_ARG_WITH([fc-vendor],
  AC_HELP_STRING([--with-fc-vendor],[Fortran compiler vendor]))
if test "${with_fc_vendor}" = ""; then
  fc_vendor="gnu"
else
  AC_MSG_NOTICE([setting Fortran compiler vendor to ${with_fc_vendor}])
  fc_vendor="${with_fc_vendor}"
fi
AC_SUBST(fc_vendor)

AC_ARG_WITH([fc-version],
  AC_HELP_STRING([--with-fc-version],[Fortran compiler version]))
if test "${with_fc_version}" = ""; then
  fc_version="4.4"
else
  AC_MSG_NOTICE([setting Fortran compiler version to ${with_fc_version}])
  fc_version="${with_fc_version}"
fi
AC_SUBST(fc_version)

AC_ARG_WITH([tardir],
  AC_HELP_STRING([--with-tardir],[Repository containing source tarballs]))
if test "${with_tardir}" = ""; then
  abinit_tardir="${HOME}/.abinit/tarballs"
else
  AC_MSG_NOTICE([setting tarball repository to ${with_tardir}])
  abinit_tardir="${with_tardir}"
fi
AC_SUBST(abinit_tardir)

AC_ARG_VAR([RANLIB],[Archive indexer])
AC_SUBST(RANLIB)

# ---------------------------------------------------------------------------- #

#
# Check option consistency
#

AC_MSG_NOTICE([checking consistency of fallback options])

# The ETSF I/O library requires NetCDF support
if test "${enable_etsf_io}" = "yes" -a "${enable_netcdf}" != "yes"; then
  AC_MSG_WARN([ETSF I/O requires NetCDF])
fi

# ---------------------------------------------------------------------------- #

#
# Downloading support
#

# Look for wget and curl
if test "${WGET}" = ""; then
  AC_CHECK_PROGS([WGET],[wget])
fi
if test "${CURL}" = ""; then
  AC_CHECK_PROGS([CURL],[curl])
fi

# Warn if neither wget nor curl have been found
# Note: cannot stop, since tarballs may be downloaded by other means
if test "${WGET}" = "" -a "${CURL}" = ""; then
  AC_MSG_WARN([no downloader found
    Please set the WGET or CURL environment variable manually if
    you want to be able to download tarballs])
fi

# Select downloader and corresponding options
if test "${WGET}" != ""; then
  afb_downloader="${WGET}"
  afb_dlopts="--timeout=15 --tries=1 -q -O"
elif test "${CURL}" != ""; then
  afb_downloader="${CURL}"
  afb_dlopts="--connect-time 15 --retry 1 -s -S -o"
fi

# Make sure ~/.abinit/tarballs exists
if test "${with_tardir}" != ""; then
  abinit_tardir="${with_tardir}"
fi
if test "${abinit_tardir}" = ""; then
  abinit_tardir="${HOME}/.abinit/tarballs"
  if test ! -e "${abinit_tardir}"; then
    AC_MSG_NOTICE([creating ${abinit_tardir}])
    ${INSTALL} -d -m 755 "${abinit_tardir}"
  fi
fi
AC_MSG_NOTICE([using tarball repository ${abinit_tardir}])
AC_SUBST(abinit_tardir)

# ---------------------------------------------------------------------------- #

#
# Source code management
#

# Init installation directory
fallbacks_instdir="${ac_abs_top_builddir}/exports"
AC_SUBST(fallbacks_instdir)

# Check for patch
AC_CHECK_PROGS([PATCH],[patch])

# Stop if patch is not available
if test "${PATCH}" = ""; then
  AC_MSG_WARN([no 'patch' command available])
  if test "${enable_bigdft}" = "yes"; then
    AC_MSG_ERROR([BigDFT requires patch - disable BigDFT or install patch])
  fi
  if test "${enable_wannier90}" = "yes"; then
    AC_MSG_ERROR([Wannier90 requires patch - disable Wannier90 or install patch])
  fi
fi

# ---------------------------------------------------------------------------- #

#
# C support
#

AC_PROG_CC

# LibXC sometimes requires C99
if test "${with_fc_vendor}" = "ibm"; then
  AC_PROG_CC_C99
else
  ac_cv_prog_cc_c99="no"
fi

# ---------------------------------------------------------------------------- #

#
# Fortran support
#

AC_PROG_FC

# ---------------------------------------------------------------------------- #

#
# Linear algebra support
#

ABI_FALLBACK_LINALG

# ---------------------------------------------------------------------------- #

#
# NetCDF support
#

ABI_FALLBACK_NETCDF

# ---------------------------------------------------------------------------- #

#
# ETSF I/O library support
#

ABI_FALLBACK_ETSF_IO

# ---------------------------------------------------------------------------- #

#
# TDDFT.org exchange-correlation library support
#

ABI_FALLBACK_LIBXC

# ---------------------------------------------------------------------------- #

#
# AtomPAW support
#

ABI_FALLBACK_ATOMPAW

# ---------------------------------------------------------------------------- #

#
# Wavelets support - BigDFT project
#

ABI_FALLBACK_BIGDFT

# ---------------------------------------------------------------------------- #

#
# Wannier90 support
#

ABI_FALLBACK_WANNIER90

# ---------------------------------------------------------------------------- #

#
# Output configuration
#

AC_OUTPUT([Makefile])