forked from manufactured-solutions/MASA
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
139 lines (107 loc) · 3.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
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.61)
#init
AC_INIT([masa],[0.43.0], [[email protected]])
AC_CONFIG_HEADER(config.h)
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE
# snarf and provide versioning numbers
AX_SPLIT_VERSION
GENERIC_MAJOR_VERSION=$AX_MAJOR_VERSION
GENERIC_MINOR_VERSION=$AX_MINOR_VERSION
GENERIC_MICRO_VERSION=$AX_POINT_VERSION
GENERIC_VERSION=$GENERIC_MAJOR_VERSION.$GENERIC_MINOR_VERSION.$GENERIC_MICRO_VERSION
GENERIC_RELEASE=$GENERIC_MAJOR_VERSION.$GENERIC_MINOR_VERSION
AC_SUBST(GENERIC_VERSION)
AC_SUBST(GENERIC_MAJOR_VERSION)
AC_SUBST(GENERIC_MINOR_VERSION)
AC_SUBST(GENERIC_MICRO_VERSION)
AC_SUBST(GENERIC_RELEASE)
# define
PACKAGE_DESCRIPTION="Manufactured Analytical Solutions Abstraction Library"
AC_SUBST([PACKAGE_DESCRIPTION])
PACKAGE_URL="https://red.ices.utexas.edu/projects/software/"
AC_SUBST([PACKAGE_URL])
# ------------------------------------------------------------------
# Optimization Settings:
#
# As MASA is targeted to support verification efforts, we desire to
# maintain as much floating-point accuracy as possible (and are
# willing to sacrifice speed). We thus request minimal compiler
# optimization unless the user dictates otherwise via specific
# CFLAGS/CXXFLAGS settings.
# ------------------------------------------------------------------
AX_CC_MINOPT # request minimum optimization level for C
AX_CXX_MINOPT # request minimum optimization level for CXX
# set suffix to .F90 to get CPP support for testing vendor Fortran compiler
AC_FC_SRCEXT([F90])
AX_FC_MINOPT # request minimum optimization level for FC
# ---------------------------------------------
# Enable/Disable -Wall (Warn all)
# ---------------------------------------------
AX_MASA_WARN_ALL
# ------------------------------
# Checks for required programs
# ------------------------------
AC_DISABLE_STATIC
AC_PROG_CC
AC_PROG_CXX
AC_PROG_FC
AC_PROG_F77
AC_PROG_LIBTOOL
AM_SANITY_CHECK
# ---------------------------------------------
# enable python interfaces with SWIG
# ---------------------------------------------
SWIG_INTERFACES=0
AC_ARG_ENABLE([python-interfaces], AC_HELP_STRING([--enable-python-interfaces],[enable python support]),
[
AM_PATH_PYTHON(2.3)
dnl AC_PROG_SWIG(1.3.21)
AC_PROG_SWIG()
dnl SWIG_ENABLE_C
SWIG_PYTHON
SWIG_INTERFACES=1
AC_DEFINE(SWIG_INTERFACES,1,[Define if python interfaces enabled])
],[])
AM_CONDITIONAL(SWIG_ENABLED,[test "x$SWIG_INTERFACES" = x1])
# ---------------------------------------------
# Check for extra-strict regression tolerance
# ---------------------------------------------
FC_STRICT_TOL_CPP=""
AC_ARG_ENABLE([strict-tests], AC_HELP_STRING([--enable-strict-tests],[enable strict absolute tolerance in regression tests]),
MASA_STRICT_REGRESSION=1
FC_STRICT_TOL_CPP="-DMASA_STRICT_REGRESSION"
AC_DEFINE(MASA_STRICT_REGRESSION,1,[Define if strict regression enabled]),[])
AC_SUBST(FC_STRICT_TOL_CPP)
#---------------------------------------------
# Check for exception handling
#---------------------------------------------
AC_ARG_ENABLE([masa-exceptions], AC_HELP_STRING([--enable-masa-exceptions],[enable exception handling in masa]),
MASA_EXCEPTIONS=1
AC_DEFINE(MASA_EXCEPTIONS,1,[Define if exception handling enabled]),[])
# --------------------------
# Checks for code coverage
# -------------------------
AX_CODE_COVERAGE
# Query configuration environment
AX_SUMMARIZE_ENV
# ----------------
# Doxygen support
# ----------------
DX_HTML_FEATURE(ON)
DX_CHM_FEATURE(OFF)
DX_CHI_FEATURE(OFF)
DX_MAN_FEATURE(OFF)
DX_RTF_FEATURE(OFF)
DX_XML_FEATURE(OFF)
DX_PDF_FEATURE(ON)
DX_PS_FEATURE(OFF)
DX_INIT_DOXYGEN(MASA, doxygen/masa.dox, docs)
# Generate Output Files
AC_OUTPUT( Makefile src/Makefile examples/Makefile tests/Makefile tutorial/Makefile \
doxygen/Makefile doxygen/txt_common/about_vpath.page src/masa.h masa.spec masa.pc )
# FINAL SUMMARY
AX_SUMMARIZE_CONFIG