-
Notifications
You must be signed in to change notification settings - Fork 8
/
configure.ac
165 lines (138 loc) · 5.71 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
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_INIT([Vofi], [1.0], [[email protected]])
AC_PREREQ([2.69])
AC_MSG_RESULT(---------------------------------------------)
AC_MSG_RESULT(----------- Configuring vofi ----------------)
AC_MSG_RESULT(---------------------------------------------)
AC_CONFIG_MACRO_DIR([m4])
# --------------------------------------------------------------
# Compute the canonical target system type variable "target", and its
# three individual parts: "target_cpu", "target_vendor", and "target_os"
# --------------------------------------------------------------
AC_CANONICAL_TARGET
# --------------------------------------------------------------
# makefiles generation
# --------------------------------------------------------------
AC_CONFIG_FILES([makefile
src/makefile
demo_src/makefile
demo_src/C/makefile
demo_src/CPP/makefile
demo_src/Fortran/makefile
])
# --------------------------------------------------------------
# require automake
# --------------------------------------------------------------
AM_INIT_AUTOMAKE
# --------------------------------------------------------------
# do not use silent rules
# --------------------------------------------------------------
AM_SILENT_RULES(no)
# --------------------------------------------------------------
# by default we do not want 'maintainer mode', which may be useful for forcing configure to
# work on systems with no autotools
# --------------------------------------------------------------
AM_MAINTAINER_MODE([disable])
# --------------------------------------------------------------
# Checks for header files.
# --------------------------------------------------------------
AC_HEADER_STDC
# --------------------------------------------------------------
# Checks for typedefs, structures, and compiler characteristics.
# --------------------------------------------------------------
# --------------------------------------------------------------
# Checks for libraries.
# --------------------------------------------------------------
AC_CHECK_LIB([m],[cos])
# --------------------------------------------------------------
# Checks for library functions.
# --------------------------------------------------------------
AC_CHECK_FUNCS([sqrt])
# --------------------------------------------------------------
# Do compilation tests using the compiler, preprocessor, and file extensions
# of C, CPP and Fotran. This uses the .C extension for test programs.
# --------------------------------------------------------------
AC_PROG_CC
AC_PROG_CXX
AC_PROG_FC
AC_C_CONST
AC_C_INLINE
AC_LANG([C])
AC_LANG([C++])
AC_LANG([Fortran])
# --------------------------------------------------------------
# Set AR, RM and INSTALL variables
# --------------------------------------------------------------
AC_PATH_PROG(AR, ar, /bin/ar)
AC_PATH_PROG(RM, rm, /bin/rm)
RM="$RM -f"
AC_PROG_INSTALL
# --------------------------------------------------------------
# C, Cpp and Fortran compiler flags
# --------------------------------------------------------------
AS_IF([test "x${ac_cv_env_CFLAGS_set}" = "x"],
[CFLAGS=""])
AS_IF([test "x${ac_cv_env_FCFLAGS_set}" = "x"],
[FCFLAGS=""])
AS_IF([test "x${ac_cv_env_CXXFLAGS_set}" = "x"],
[CXXFLAGS=""])
AC_MSG_CHECKING([C compiler flags...])
AS_IF([test "x${ac_cv_env_CFLAGS_set}" = "x"],[
AS_IF([test "$GCC" = "yes"],[
CFLAGS="${CFLAGS} -O2 -fomit-frame-pointer -ffast-math -Wall"
])
AC_MSG_RESULT([use default: $CFLAGS])
],[
AC_MSG_RESULT([use user-supplied: $CFLAGS])
])
AC_MSG_CHECKING([Fortran compiler flags...])
AS_IF([test "x${ac_cv_env_FCFLAGS_set}" = "x"],[
AS_IF([test "$GCC" = "yes"],[
FCFLAGS="${FCFLAGS} -O2 -Wall"
])
AC_MSG_RESULT([use default: $FCFLAGS])
],[
AC_MSG_RESULT([use user-supplied: $FCFLAGS])
])
AC_MSG_CHECKING([C++ compiler flags...])
AS_IF([test "x${ac_cv_env_CXXFLAGS_set}" = "x"],[
AS_IF([test "$GCC" = "yes"],[
CXXFLAGS="${CXXFLAGS} -O2 -Wall"
])
AC_MSG_RESULT([use default: $CXXFLAGS])
],[
AC_MSG_RESULT([use user-supplied: $CXXFLAGS])
])
#-----------------------------------------------------
# Initialize libtool. By default, we will build
# only shared libraries on platforms that support them
#-----------------------------------------------------
LT_INIT([disable-static])
# --------------------------------------------------------------
# Portable symbolic links
# --------------------------------------------------------------
AC_PROG_LN_S
# -------------------------------------------------------------
# --------------------------------------------------------------
# parent directories -- portably and without race conditions
# --------------------------------------------------------------
AC_PROG_MKDIR_P
# -------------------------------------------------------------
# --------------------------------------------------------------
# nice sed that doesn't truncate output
# --------------------------------------------------------------
AC_PROG_SED
AC_SUBST(SED)
# --------------------------------------------------------------
# --------------------------------------------------------------
# Create output files.
# --------------------------------------------------------------
AC_OUTPUT
AC_MSG_RESULT()
AC_MSG_RESULT(-------------------------------------------------------------------------------)
AC_MSG_RESULT(Configure complete now type 'make' and then 'make install')
AC_MSG_RESULT()
AC_MSG_RESULT(---------------------------------------------)
AC_MSG_RESULT(--------- Done Configuring vofi -------------)
AC_MSG_RESULT(---------------------------------------------)