forked from OpenCMISS-Dependencies/sundials
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
executable file
·157 lines (140 loc) · 3.72 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
# ------------------------------------------------------------------------
# $Revision: 1.52 $
# $Date: 2009/02/17 03:11:47 $
# ------------------------------------------------------------------------
# Programmer(s): Radu Serban and Aaron Collier @ LLNL
# ------------------------------------------------------------------------
# Copyright (c) 2007, The Regents of the University of California.
# Produced at the Lawrence Livermore National Laboratory.
# All rights reserved.
# For details, see the LICENSE file.
# ------------------------------------------------------------------------
# Process this file with autoconf to produce a configure script.
# ------------------------------------------------------------------------
# Initialize configure
AC_INIT(SUNDIALS, 2.5.0, [email protected])
# Display greeting
SUNDIALS_GREETING
# Specify directory containing auxillary build tools and M4 files
AC_CONFIG_AUX_DIR([config])
# Miscellaneous SUNDIALS initializations
echo "Initialization"
echo "--------------"
echo ""
SUNDIALS_INITIALIZE
# Test enable/disable features
SUNDIALS_ENABLES
# Set C compilation (Required)
echo ""
echo "C Compiler Settings"
echo "-------------------"
echo ""
AC_PROG_CC(cc gcc)
SUNDIALS_SET_CC
# Set Fortran support
if test "X${FCMIX_ENABLED}" = "Xyes" || test "X${LAPACK_ENABLED}" = "Xyes"; then
echo ""
echo "Fortran Settings"
echo "----------------"
echo ""
SUNDIALS_F77_SUPPORT
fi
# Set MPI support (Optional)
if test "X${MPI_ENABLED}" = "Xyes"; then
echo ""
echo "MPI-C Settings"
echo "--------------"
echo ""
SUNDIALS_SET_MPICC
fi
if test "X${MPI_C_COMP_OK}" = "Xyes"; then
if test "X${FCMIX_ENABLED}" = "Xyes"; then
echo ""
echo "MPI-2 Functionality"
echo "-------------------"
echo ""
SUNDIALS_CHECK_MPI2
fi
if test "X${F77_EXAMPLES_ENABLED}" = "Xyes"; then
echo ""
echo "MPI-Fortran Settings"
echo "--------------------"
echo ""
SUNDIALS_SET_MPIF77
fi
fi
# Set examples modules
if test "X${EXAMPLES_ENABLED}" = "Xyes"; then
echo ""
echo "Examples"
echo "--------"
echo ""
SUNDIALS_SET_EXAMPLES
fi
# Run libtool checks
echo ""
echo "Libtool Settings"
echo "----------------"
echo ""
AC_DISABLE_SHARED
AC_LIBTOOL_WIN32_DLL
AC_PROG_LIBTOOL
# Do we build shared libraries?
# (enable_shared is set by the function AC_ENABLE_SHARED in libtool.m4)
SHARED_LIBS="${enable_shared}"
# Print a few more lines for configure --help
SUNDIALS_MORE_HELP
# Substitute variables
AC_SUBST(SHARED_LIBS)
AC_SUBST(MPICC)
AC_SUBST(MPIF77)
AC_SUBST(MPI_INC_DIR)
AC_SUBST(MPI_LIB_DIR)
AC_SUBST(MPI_LIBS)
AC_SUBST(MPI_FLAGS)
AC_SUBST(FCMIX_ENABLED)
AC_SUBST(FLOAT_TYPE)
AC_SUBST(LIBTOOL_DEPS)
AC_SUBST(F77_MANGLE_MACRO1)
AC_SUBST(F77_MANGLE_MACRO2)
AC_SUBST(F77_CASE)
AC_SUBST(F77_UNDERSCORES)
AC_SUBST(PRECISION_LEVEL)
AC_SUBST(GENERIC_MATH_LIB)
AC_SUBST(BLAS_LAPACK_MACRO)
AC_SUBST(SUNDIALS_EXPORT)
AC_SUBST(F77_MPI_COMM_F2C)
AC_SUBST(F77_LNKR)
AC_SUBST(F77_LIBS)
AC_SUBST(F77_LDFLAGS)
AC_SUBST(LAPACK_ENABLED)
AC_SUBST(BLAS_LAPACK_LIBS)
AC_SUBST(MPIF77_LNKR)
AC_SUBST(OBJEXT)
AC_SUBST(EXEEXT)
AC_SUBST(SLV_MODULES)
AC_SUBST(EXS_MODULES)
AC_SUBST(EXS_INSTDIR)
# Generate makefiles
echo ""
echo "Create Makefiles and configuration files"
echo "----------------------------------------"
echo ""
SUNDIALS_BUILD_MODULES_LIST
# Set-up postprocessing commands
if test "X${EXAMPLES_ENABLED}" = "Xyes" && test "X${EXS_INSTDIR}" != "Xno"; then
AC_CONFIG_COMMANDS([postprocessing],
[
echo ""
echo "Postprocess exported Makefiles"
echo "------------------------------"
echo ""
])
SUNDIALS_POST_PROCESSING
fi
# Specify files to be configured and call AC_OUTPUT
AC_CONFIG_FILES([${SUNDIALS_MAKEFILES}])
AC_CONFIG_FILES([${SUNDIALS_CONFIGFILES}])
AC_OUTPUT
# Display summary
SUNDIALS_REPORT