-
Notifications
You must be signed in to change notification settings - Fork 34
/
configure.ac
132 lines (114 loc) · 4.51 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
dnl
dnl This file is part of the SC Library.
dnl
AC_INIT([libsc],
[m4_esyscmd([build-aux/git-version-gen .tarball-version])],
[info@p4est.org])
AC_PREREQ(2.61)
AC_CONFIG_HEADERS([src/pre_config.h])
AC_CONFIG_SRCDIR([src/sc.h])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([config])
AC_PREFIX_DEFAULT([$PWD/local])
AX_PREFIX_CONFIG_H([src/sc_config.h], [SC])
AM_INIT_AUTOMAKE([parallel-tests subdir-objects])
AM_SILENT_RULES
SC_VERSION([SC])
echo "o---------------------------------------"
echo "| Checking options"
echo "o---------------------------------------"
AC_ARG_ENABLE([logging],
[AS_HELP_STRING([--enable-logging=PRIO], [\
change log threshold (see sc.h for possible values)])],
[case "$enableval" in
yes) AC_MSG_ERROR([\
See sc.h for possible log priorities in --enable-logging=PRIO])
;;
no) AC_DEFINE([LOG_PRIORITY], [SC_LP_SILENT],
[minimal log priority])
;;
*) AC_DEFINE_UNQUOTED([LOG_PRIORITY], [$enableval],
[minimal log priority])
esac])
SC_ARG_ENABLE([debug], [enable debug mode (assertions and extra checks)],
[DEBUG])
SC_ARG_WITH([papi], [enable Flop counting with papi], [PAPI])
echo "o---------------------------------------"
echo "| Checking MPI and related programs"
echo "o---------------------------------------"
dnl A nonempty second/third argument causes to enable F77+FC/CXX, respectively.
SC_MPI_CONFIG([SC], [yes], [yes])
SC_MPI_ENGAGE([SC])
# This is needed for compatibility with automake >= 1.12
m4_ifdef([AM_PROG_AR],[AM_PROG_AR])
SC_PROG_LINT
dnl SC_C_VERSION
LT_INIT
echo "o---------------------------------------"
echo "| Checking libraries"
echo "o---------------------------------------"
SC_CHECK_LIBRARIES([SC])
echo "o---------------------------------------"
echo "| Checking headers"
echo "o---------------------------------------"
AC_CHECK_HEADERS([execinfo.h signal.h sys/time.h sys/types.h time.h])
AC_CHECK_HEADERS([lua.h lua5.1/lua.h lua5.2/lua.h])
echo "o---------------------------------------"
echo "| Checking functions"
echo "o---------------------------------------"
AC_CHECK_FUNCS([backtrace backtrace_symbols strtol strtoll])
echo "o---------------------------------------"
echo "| Checking keywords and types"
echo "o---------------------------------------"
AC_C_BIGENDIAN
AC_C_CONST
AC_C_INLINE
AC_C_RESTRICT
AC_CHECK_SIZEOF([long])
AC_CHECK_SIZEOF([long long])
AC_CHECK_SIZEOF([unsigned long])
AC_CHECK_SIZEOF([unsigned long long])
AC_TYPE_SIZE_T
AC_TYPE_SSIZE_T
# Print summary.
AC_DEFINE_UNQUOTED(F77, ["${F77}"], [F77 compiler])
AC_DEFINE_UNQUOTED(FFLAGS, ["${FFLAGS}"], [F77 compiler flags])
AC_DEFINE_UNQUOTED(FC, ["${FC}"], [FC compiler])
AC_DEFINE_UNQUOTED(FCFLAGS, ["${FCFLAGS}"], [FC compiler flags])
AC_DEFINE_UNQUOTED(CPP, ["${CPP}"], [C preprocessor])
AC_DEFINE_UNQUOTED(CPPFLAGS, ["${CPPFLAGS}"], [C preprocessor flags])
AC_DEFINE_UNQUOTED(CC, ["${CC}"], [C compiler])
dnl AC_DEFINE_UNQUOTED(C_VERSION, ["${C_VERSION}"], [C compiler version])
AC_DEFINE_UNQUOTED(CFLAGS, ["${CFLAGS}"], [C compiler flags])
AC_DEFINE_UNQUOTED(CXX, ["${CXX}"], [CXX compiler])
AC_DEFINE_UNQUOTED(CXXFLAGS, ["${CXXFLAGS}"], [CXX compiler flags])
AC_DEFINE_UNQUOTED(LDFLAGS, ["${LDFLAGS}"], [Linker flags])
AC_DEFINE_UNQUOTED(LIBS, ["${LIBS}"], [Libraries])
dnl AC_DEFINE_UNQUOTED(BLAS_LIBS, ["${BLAS_LIBS}"], [BLAS libraries])
dnl AC_DEFINE_UNQUOTED(LAPACK_LIBS, ["${LAPACK_LIBS}"], [LAPACK libraries])
dnl AC_DEFINE_UNQUOTED(FLIBS, ["${FLIBS}"], [Fortran libraries])
echo "o----------------------------------"
echo "| Results for libsc are"
echo "o----------------------------------"
echo "| F77: $F77"
echo "| FFLAGS: $FFLAGS"
echo "| FC: $FC"
echo "| FCFLAGS: $FCFLAGS"
echo "| CPP: $CPP"
echo "| CPPFLAGS: $CPPFLAGS"
echo "| CC: $CC"
dnl echo "| C_VERSION: $C_VERSION"
echo "| CFLAGS: $CFLAGS"
echo "| CXX: $CXX"
echo "| CXXFLAGS: $CXXFLAGS"
echo "| LDFLAGS: $LDFLAGS"
echo "| LIBS: $LIBS"
dnl echo "| FLIBS: $FLIBS"
dnl echo "| BLAS_LIBS: $BLAS_LIBS"
dnl echo "| LAPACK_LIBS: $LAPACK_LIBS"
echo "o----------------------------------"
# Create output files.
AC_CONFIG_FILES([Makefile Makefile.sc.pre Doxyfile])
AC_OUTPUT
# Final notifications.
SC_FINAL_MESSAGES([SC])