forked from Expander/FlexibleSUSY
/
flexiblesusy-config.in
163 lines (154 loc) · 7.21 KB
/
flexiblesusy-config.in
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
#!/bin/sh
# Author: Alexander Voigt
packagename="@PKGNAME@"
version="@FLEXIBLESUSY_VERSION@"
algorithms="@ALGORITHMS@"
addons="@ADDONS@"
models="@MODELS@"
help() {
cat <<EOF
Usage: `basename $0` [options]
Options:
--algorithms Print all algorithms that are used
--addons Print all addons that are build
--blaslibs Print BLAS libraries, BLASLIBS
--boostflags Print compiler flags for BOOST, BOOSTFLAGS
--boosttestlibs Print BOOST test libraries, BOOSTTESTLIBS
--boostthreadlibs Print BOOST thread libraries, BOOSTTHREADLIBS
--cppflags Print C preprocessor flags, CPPFLAGS
--cxx Print C++ compiler, CXX
--cxxflags Print C++ compiler flags, CXXFLAGS
--eigenflags Print compiler flags for Eigen, EIGENFLAGS
--enable-colors Test if colors are enabled
--enable-compile Test if compilation is enabled
--enable-compiler-warnings
Test if compiler warnings are enabled
--enable-debug Test if debug mode is enabled
--enable-fflite Test if FFlite is enabled
--enable-lapack Test if LAPACK is enabled
--enable-librarylink Test if LibraryLink is enabled
--enable-looptools Test if LoopTools is enabled
--enable-mass-error-check
Test if mass error check is enabled
--enable-ilp64mkl-workaround
Test if ilp64 MKL workaround is enabled
--enable-silent Test if silet mode is enabled
--enable-shared-libs Test if shared libraries are build
--enable-sqlite Test if SQLite is enabled
--enable-static Test if static executables are build
--enable-threads Test if multi-threading is enabled
--enable-tsil Test if TSIL is linked in
--enable-verbose Test if verbose mode is enabled
--fc Print Fortran compiler, FC
--fflags Print Fortran flags, FFLAGS
--flibs Print Fortran libraries, FLIBS
--gslflags Print compiler flags for GSL, GSLFLAGS
--gsllibs Print GSL libraries, GSLLIBS
--lapacklibs Print LAPACK libraries, LAPACKLIBS
--ldflags Print flags for optional libraries, LDFLAGS
--ldlibs Print optional libraries, LDLIBS
--loopfuncflags Print compiler flags for loop function library, LOOPFUNCFLAGS
--loopfunclibs Print loop function libraries, LOOPFUNCLIBS
--math-cmd Print Mathematica kernel command, MATH
--models Print all models that are build
--module-make-lib-cmd Print command to build module libraries, MODULE_MAKE_LIB_CMD
--module-lib-ext Print file name extension for module libraries, MODULE_LIBEXT
--shared-lib-cmd Print command to build shared library, SHARED_LIB_CMD
--sqliteflags Print SQLite flags, SQLITEFLAGS, SQLITEFLAGS
--sqlitelibs Print SQLite libararies, SQLITELIBS, SQLITELIBS
--static-lib-cmd Print command to build static library, STATIC_LIB_CMD
--threadlibs Print thread library, THREADLIBS
--tsilflags Print TSIL flags, TSILFLAGS
--tsillibs Print TSIL libraries, TSILLIBS
--with-<addon> Test if <addon> is compiled in
--with-<algorithm> Test if <algorithm> is compiled in
--with-<model> Test if <model> is compiled in
--version Print the $packagename version
--help Print this message
EOF
}
out=""
while test $# -gt 0; do
case "$1" in
-*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
*) optarg= ;;
esac
case $1 in
--addons) out="$out $addons" ;;
--algorithms) out="$out $algorithms" ;;
--blaslibs) out="$out @BLASLIBS@" ;;
--boostflags) out="$out @BOOSTFLAGS@" ;;
--boosttestlibs) out="$out @BOOSTTESTLIBS@" ;;
--boostthreadlibs) out="$out @BOOSTTHREADLIBS@" ;;
--cppflags) out="$out @CPPFLAGS@" ;;
--cxx) out="$out @CXX@" ;;
--cxxflags) out="$out @CXXFLAGS@" ;;
--eigenflags) out="$out @EIGENFLAGS@" ;;
--fc) out="$out @FC@" ;;
--fflags) out="$out @FFLAGS@" ;;
--flibs) out="$out @FLIBS@" ;;
--gslflags) out="$out @GSLFLAGS@" ;;
--gsllibs) out="$out @GSLLIBS@" ;;
--lapacklibs) out="$out @LAPACKLIBS@" ;;
--ldflags) out="$out @LDFLAGS@" ;;
--ldlibs) out="$out @LDLIBS@" ;;
--loopfuncflags) out="$out @LOOPFUNCFLAGS@" ;;
--loopfunclibs) out="$out @LOOPFUNCLIBS@" ;;
--math-cmd) out="$out @MATH@" ;;
--models) out="$out $models" ;;
--module-make-lib-cmd) out="$out @MODULE_MAKE_LIB_CMD@" ;;
--module-lib-ext) out="$out @MODULE_LIBEXT@" ;;
--shared-lib-cmd) out="$out @SHARED_LIB_CMD@" ;;
--sqliteflags) out="$out @SQLITEFLAGS@" ;;
--sqlitelibs) out="$out @SQLITELIBS@" ;;
--static-lib-cmd) out="$out @STATIC_LIB_CMD@" ;;
--threadlibs) out="$out @THREADLIBS@" ;;
--tsilflags) out="$out @TSILFLAGS@" ;;
--tsillibs) out="$out @TSILLIBS@" ;;
--with-*)
### Check for models and addons
f=`echo $1 | sed 's/--with-//'`
for c in $models $addons $algorithms ; do
if test "x`basename $c`" = "x$f" ; then
out="$out yes"
break
fi
c=""
done
if test "x$c" = "x" ; then
out="$out no"
fi
;;
### flags
--enable-colors) out="$out @ENABLE_COLOR_PRINTOUT@" ;;
--enable-compile) out="$out @ENABLE_COMPILE@" ;;
--enable-compiler-warnings) out="$out @ENABLE_COMPILER_WARNINGS@" ;;
--enable-debug) out="$out @ENABLE_DEBUG@" ;;
--enable-fflite) out="$out @ENABLE_FFLITE@" ;;
--enable-lapack) out="$out @ENABLE_LAPACK@" ;;
--enable-librarylink) out="$out @ENABLE_LIBRARYLINK@" ;;
--enable-looptools) out="$out @ENABLE_LOOPTOOLS@" ;;
--enable-mass-error-check) out="$out @ENABLE_CHECK_EIGENVALUE_ERROR@" ;;
--enable-ilp64mkl-workaround) out="$out @ENABLE_ILP64MKL_WORKAROUND@" ;;
--enable-silent) out="$out @ENABLE_SILENT@" ;;
--enable-shared-libs) out="$out @ENABLE_SHARED_LIBS@" ;;
--enable-sqlite) out="$out @ENABLE_SQLITE@" ;;
--enable-static) out="$out @ENABLE_STATIC@" ;;
--enable-threads) out="$out @ENABLE_THREADS@" ;;
--enable-tsil) out="$out @ENABLE_TSIL@" ;;
--enable-verbose) out="$out @ENABLE_VERBOSE@" ;;
--version) out="$out $version" ;;
--help)
help
exit 0
;;
*)
echo "Unknown argument: $1" 1>&2
help
exit 1
;;
esac
shift
done
### Output the stuff
echo $out