-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
192 lines (164 loc) · 4.92 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
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
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.69])
AC_INIT([fireball-lightning-grid], [1.0], [[email protected]])
AC_CONFIG_SRCDIR([src/include/constants.h])
AC_CONFIG_HEADERS([config.h])
# Checks for programs.
AC_PROG_FC
AC_PROG_INSTALL
# Checks for libraries.
# Checks for header files.
# Checks for command line options
dnl Example of default-enabled feature
dnl AC_ARG_ENABLE([foo],
dnl AS_HELP_STRING([--disable-foo], [Disable feature foo]))
dnl
dnl AS_IF([test "x$enable_foo" != "xno"], [
dnl dnl Do the stuff needed for enabling the feature
dnl ])
dnl THEORY
AC_ARG_ENABLE([THEORY],
AS_HELP_STRING([--enable-THEORY=[ARG]], [Select THEORY (HARRIS (default), DOGS or KS)]))
THEORY=HARRIS
AS_IF([test "x$enable_THEORY" = "xDOGS"], [
AC_DEFINE([DOGS], 1, [THEORY=DOGS enabled])
THEORY=DOGS
])
AS_IF([test "x$enable_THEORY" = "xKS"], [
AC_DEFINE([KS], 1, [THEORY=KS enabled])
THEORY=KS
])
AC_SUBST([THEORY],[${THEORY}])
dnl METHOD
AC_ARG_ENABLE([METHOD],
AS_HELP_STRING([--enable-METHOD=[ARG]], [Select METHOD (GAMMA (default), KPOINTS, MDET or KS)]))
METHOD=GAMMA
AS_IF([test "x$enable_METHOD" = "xKPOINTS"], [
AC_DEFINE([KPOINTS], 1, [METHOD=KPOINTS enabled])
METHOD=KPOINTS
])
AS_IF([test "x$enable_METHOD" = "xMDET"], [
AC_DEFINE([MDET], 1, [METHOD=MDET enabled])
METHOD=MDET
])
AS_IF([test "x$enable_METHOD" = "xKS"], [
AC_DEFINE([KS], 1, [METHOD=KS enabled])
METHOD=KS
])
AC_SUBST([METHOD],[${METHOD}])
dnl XC
AC_ARG_ENABLE([XC],
AS_HELP_STRING([--enable-XC=[ARG]], [Select XC (eXchange and Correlation) LDA (default), BLYP or LIBXC ]))
XC=LDA
AS_IF([test "x$enable_XC" = "xBLYP"], [
AC_DEFINE([BLYP], 1, [XC=BLYP enabled])
XC=BLYP
])
AS_IF([test "x$enable_XC" = "xLIBXC"], [
AC_DEFINE([LIBXC], 1, [XC=LIBXC enabled])
XC=LIBXC
])
AC_SUBST([XC],[${XC}])
dnl MACHINE
AC_ARG_ENABLE([MACHINE],
AS_HELP_STRING([--enable-MACHINE=[ARG]], [Select MACHINE (GENERIC (default), FIREBALL, SPRUCE, etc) ]))
MACHINE=GENERIC
AS_IF([test "x$enable_MACHINE" = "xFIREBALL"], [
MACHINE=FIREBALL
])
AS_IF([test "x$enable_MACHINE" = "xSPRUCE"], [
MACHINE=SPRUCE
])
AC_SUBST([MACHINE],[${MACHINE}])
dnl LINALG
AC_ARG_ENABLE([LINALG],
AS_HELP_STRING([--enable-LINALG=[ARG]], [Select Linear Algebra (MKL (default), LAPACK)]))
LINALG=MKL
AS_IF([test "x$enable_LINALG" = "xLAPACK"], [
LINALG=LAPACK
])
AC_SUBST([LINALG],[${LINALG}])
dnl OPENMP
AC_ARG_ENABLE([OPENMP],
AS_HELP_STRING([--enable-OPENMP], [Enable OpenMP (Shared memory Multiprocessing)]))
OPENMP=no
AS_IF([test "x$enable_OPENMP" = "xyes"], [
AC_DEFINE([OPENMP], 1, [OPENMP enabled])
OPENMP=yes
])
AC_SUBST([OPENMP],[$OPENMP])
dnl MPI
AC_ARG_ENABLE([MPI],
AS_HELP_STRING([--enable-MPI], [Enable MPI (Message Passing Interface)]))
MPI=no
AS_IF([test "x$enable_MPI" = "xyes"], [
AC_DEFINE([MPI], 1, [MPI enabled])
MPI=yes
])
AC_SUBST([MPI],[$MPI])
dnl DEBUG
AC_ARG_ENABLE([DEBUG],
AS_HELP_STRING([--enable-DEBUG], [Enable DEBUGGING]))
DEBUG=no
AS_IF([test "x$enable_DEBUG" = "xyes"], [
AC_DEFINE([DEBUG], 1, [DEBUG enabled])
AC_SUBST([MODE],[DEBUG])
DEBUG=yes
])
AC_SUBST([DEBUG],[$DEBUG])
dnl OPT
AC_ARG_ENABLE([OPT],
AS_HELP_STRING([--enable-OPT], [Enable OPTIMIZATION]))
OPT=no
AS_IF([test "x$enable_OPT" = "xyes"], [
AC_DEFINE([OPT], 1, [OPT enabled])
AC_SUBST([MODE],[OPT])
DEBUG=yes
])
AC_SUBST([OPT],[$OPT])
AC_SUBST([COMPILER],[$FC])
# Checks for typedefs, structures, and compiler characteristics.
# Checks for library functions.
AC_CHECK_FUNCS([sqrt])
AC_CONFIG_FILES([Makefile
src/Makefile
src/a.GLOBAL/Makefile
src/b.FUNCTIONS/Makefile
src/c.SYSTEM/Makefile
src/d.FUNCTIONS_EXTRA/Makefile
src/e.FDATA/Makefile
src/g.XC_FUNCTIONALS/Makefile
src/h.SOLVESH/Makefile
src/i.GRID/Makefile
src/j.ASSEMBLERS/Makefile
src/l.SCF/Makefile
src/o.OUTPUT/Makefile
src/p.THEORY/Makefile
src/u.UTIL/Makefile
src/x.DRIVERS/Makefile])
AC_OUTPUT
echo \
"-------------------------------------------------
${PACKAGE_NAME} Version ${PACKAGE_VERSION}
Prefix: '${prefix}'.
Compiler: '${FC} ${FCFLAGS} ${CPPFLAGS}'
Package features:
THEORY : ${THEORY}
METHOD : ${METHOD}
XC : ${XC}
OPENMP : ${OPENMP}
MPI : ${MPI}
DEBUG : ${DEBUG}
OPT : ${OPT}
MACHINE : ${MACHINE}
COMPILER : ${COMPILER}
LINALG : ${LINALG}
MODE : ${MODE}
Now type 'make @<:@<target>@:>@'
where the optional <target> is:
all - build the driver lightning.x
install - install everything
clean - remove all compiled files (.o, .a and .mod)
cleanall - clean + remove all binaries (.x)
--------------------------------------------------"