annotate GEMBASSY-1.0.3/configure.in @ 0:8300eb051bea draft

Initial upload
author ktnyt
date Fri, 26 Jun 2015 05:19:29 -0400
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
1 # -*- Autoconf -*-
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
2 # Configure template for the EMBOSS package.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
3 # Process this file with autoconf to produce a configure script.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
4
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
5 AC_PREREQ([2.64])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
6 AC_INIT([GEMBASSY],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
7 [1.0.3],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
8 [celery@g-language.org],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
9 [GEMBASSY],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
10 [http://www.g-language.org/gembassy/])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
11 AC_REVISION([$Revision: 1.35 $])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
12 AC_CONFIG_SRCDIR([src/ggcskew.c])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
13 AC_CONFIG_HEADERS([src/config.h])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
14 AC_CONFIG_MACRO_DIR([m4])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
15
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
16 # Make sure CFLAGS is defined to stop AC_PROG_CC adding -g.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
17 CFLAGS="${CFLAGS} "
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
18
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
19 # Checks for programs.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
20 AC_PROG_AWK
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
21 AC_PROG_CC([icc gcc cc])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
22 AC_PROG_CXX([icpc g++])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
23 AC_PROG_CPP
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
24 AC_PROG_INSTALL
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
25 AC_PROG_LN_S
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
26 AC_PROG_MAKE_SET
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
27 AC_PROG_MKDIR_P
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
28
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
29 AM_INIT_AUTOMAKE
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
30
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
31 # Use libtool to make a shared library.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
32 LT_INIT
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
33
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
34
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
35
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
36
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
37 # Check if 64 bit pointer support is required on 32 bit machines
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
38 # Disabled by default
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
39
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
40 AC_ARG_ENABLE([64],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
41 [AS_HELP_STRING([--enable-64], [64 bit pointers on 32 bit machines])])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
42
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
43 AS_IF([test "x${enable_64}" = "xyes"],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
44 [
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
45 AC_MSG_CHECKING([for 64bit compilation support])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
46
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
47 AS_CASE([${host_os}],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
48 [aix*],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
49 [
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
50 CPPFLAGS="-DAJ_AIX64 ${CPPFLAGS}"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
51 AS_CASE([${CC}],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
52 [gcc],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
53 [],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
54 [
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
55 AS_VAR_APPEND([CC], [" -q64"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
56 ])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
57 NM="nm -B -X 64"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
58 AR="ar -X 64"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
59 ],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
60 [hpux*],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
61 [
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
62 AS_CASE([${CC}],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
63 [gcc],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
64 [],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
65 [
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
66 AS_VAR_APPEND([CC], [" +DD64"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
67 ])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
68 AC_DEFINE([HPUX64PTRS], [1], [Set to 1 if HPUX 64bit ptrs on 32 bit m/c])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
69 ])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
70 AC_MSG_RESULT([done])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
71 ])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
72
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
73
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
74
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
75
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
76 # Compiler optimisations
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
77 # The Solaris 64bit ptr check has to be done here owing to param order
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
78
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
79 AC_ARG_WITH([optimisation],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
80 [AS_HELP_STRING([--without-optimisation], [Disable compiler optimisation])])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
81
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
82 AS_IF([test "x${with_optimisation}" != "xno"],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
83 [
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
84 AS_CASE([${CC}],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
85 [gcc],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
86 [
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
87 # Intel MacOSX requires reduced optimisation for PCRE code
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
88 # other OSs just use -O2
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
89 AS_CASE([${host_os}],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
90 [darwin*],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
91 [
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
92 AS_IF([test "x${host_cpu}" = "xi386"],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
93 [AS_VAR_APPEND([CFLAGS], [" -O1"])],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
94 [AS_VAR_APPEND([CFLAGS], [" -O2"])])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
95 ],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
96 [
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
97 AS_VAR_APPEND([CFLAGS], [" -O2"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
98 ])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
99 ],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
100 [
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
101 AS_CASE([${host_os}],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
102 [aix*],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
103 [
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
104 AS_VAR_APPEND([CFLAGS], [" -O3 -qstrict -qarch=auto -qtune=auto"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
105 ],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
106 [irix*],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
107 [
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
108 LD="/usr/bin/ld -IPA"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
109 AS_VAR_APPEND([CFLAGS], [" -O3"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
110 ],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
111 [hpux*],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
112 [
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
113 AS_VAR_APPEND([CFLAGS], [" -fast"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
114 ],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
115 [osf*],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
116 [
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
117 AS_VAR_APPEND([CFLAGS], [" -fast -U_FASTMATH"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
118 ],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
119 [solaris*],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
120 [
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
121 AS_VAR_APPEND([CFLAGS], [" -O"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
122 # test for 64 bit ptr here (see Solaris 64bit above)
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
123 AS_IF([test "x${enable_64}" = "xyes"],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
124 [AS_VAR_APPEND([CFLAGS], [" -xtarget=ultra -xarch=v9"])])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
125 ],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
126 [linux*],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
127 [
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
128 # Default optimisation for non-gcc compilers under Linux
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
129 AS_VAR_APPEND([CFLAGS], [" -O2"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
130 ],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
131 [freebsd*],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
132 [
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
133 AS_VAR_APPEND([CFLAGS], [" -O2"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
134 ])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
135 ])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
136 ])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
137
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
138
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
139
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
140
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
141 # Compiler warning settings: --enable-warnings, defines WARN_CFLAGS
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
142
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
143 AC_ARG_ENABLE([warnings],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
144 [AS_HELP_STRING([--enable-warnings], [compiler warnings])])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
145
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
146 AS_IF([test "x${enable_warnings}" = "xyes"],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
147 [
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
148 AS_CASE([${CC}],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
149 [gcc],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
150 [
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
151 # -Wall priovides:
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
152 # -Waddress
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
153 # -Warray-bounds (only with -O2)
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
154 # -Wc++0x-compat
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
155 # -Wchar-subscripts
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
156 # -Wenum-compare (in C/Objc; this is on by default in C++)
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
157 # -Wimplicit-int (C and Objective-C only)
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
158 # -Wimplicit-function-declaration (C and Objective-C only)
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
159 # -Wcomment
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
160 # -Wformat
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
161 # -Wmain (only for C/ObjC and unless -ffreestanding)
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
162 # -Wmissing-braces
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
163 # -Wnonnull
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
164 # -Wparentheses
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
165 # -Wpointer-sign
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
166 # -Wreorder
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
167 # -Wreturn-type
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
168 # -Wsequence-point
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
169 # -Wsign-compare (only in C++)
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
170 # -Wstrict-aliasing
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
171 # -Wstrict-overflow=1
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
172 # -Wswitch
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
173 # -Wtrigraphs
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
174 # -Wuninitialized
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
175 # -Wunknown-pragmas
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
176 # -Wunused-function
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
177 # -Wunused-label
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
178 # -Wunused-value
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
179 # -Wunused-variable
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
180 # -Wvolatile-register-var
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
181
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
182 AS_VAR_SET([WARN_CFLAGS], ["-Wall -fno-strict-aliasing"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
183 ])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
184 ])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
185
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
186 AC_SUBST([WARN_CFLAGS])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
187
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
188
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
189
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
190
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
191 # Compiler developer warning settings: --enable-devwarnings,
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
192 # sets DEVWARN_CFLAGS
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
193
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
194 AC_ARG_ENABLE([devwarnings],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
195 [AS_HELP_STRING([--enable-devwarnings],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
196 [strict compiler warnings for developers])])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
197
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
198 AS_IF([test "x${enable_devwarnings}" = "xyes"],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
199 [
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
200 AS_CASE([${CC}],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
201 [gcc],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
202 [
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
203 # Only -Wstrict-prototypes and -Wmissing-prototypes are set in this
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
204 # EMBASSY module.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
205
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
206 AS_VAR_SET([DEVWARN_CFLAGS], ["-Wstrict-prototypes -Wmissing-prototypes"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
207
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
208 # Diagnostic options for the GNU GCC compiler version 4.6.1.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
209 # http://gcc.gnu.org/onlinedocs/gcc-4.6.1/gcc/Warning-Options.html
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
210 #
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
211 # -Wextra: more warnings beyond what -Wall provides
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
212 # -Wclobbered
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
213 # -Wempty-body
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
214 # -Wignored-qualifiers
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
215 # -Wmissing-field-initializers
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
216 # -Wmissing-parameter-type (C only)
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
217 # -Wold-style-declaration (C only)
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
218 # -Woverride-init
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
219 # -Wsign-compare
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
220 # -Wtype-limits
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
221 # -Wuninitialized
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
222 # -Wunused-parameter (only with -Wunused or -Wall)
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
223 # -Wunused-but-set-parameter (only with -Wunused or -Wall)
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
224
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
225 # AS_VAR_SET([DEVWARN_CFLAGS], ["-Wextra"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
226
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
227 # Warn if a function is declared or defined without specifying the
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
228 # argument types.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
229
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
230 # AS_VAR_APPEND([DEVWARN_CFLAGS], [" -Wstrict-prototypes"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
231
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
232 # Warn if a global function is defined without a previous prototype
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
233 # declaration.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
234
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
235 # AS_VAR_APPEND([DEVWARN_CFLAGS], [" -Wmissing-prototypes"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
236
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
237 # Warn for obsolescent usages, according to the C Standard,
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
238 # in a declaration.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
239
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
240 # AS_VAR_APPEND([DEVWARN_CFLAGS], [" -Wold-style-definition"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
241
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
242 # Warn if a global function is defined without a previous declaration.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
243
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
244 # AS_VAR_APPEND([DEVWARN_CFLAGS], [" -Wmissing-declarations"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
245
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
246 # When compiling C, give string constants the type const char[length]
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
247 # so that copying the address of one into a non-const char * pointer
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
248 # will get a warning.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
249
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
250 # AS_VAR_APPEND([DEVWARN_CFLAGS], [" -Wwrite-strings"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
251
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
252 # Warn whenever a local variable or type declaration shadows another
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
253 # variable, parameter, type, or class member (in C++), or whenever a
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
254 # built-in function is shadowed.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
255
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
256 # AS_VAR_APPEND([DEVWARN_CFLAGS], [" -Wshadow"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
257
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
258 # Warn when a declaration is found after a statement in a block.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
259
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
260 # AS_VAR_APPEND([DEVWARN_CFLAGS], [" -Wdeclaration-after-statement"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
261
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
262 # Warn if an undefined identifier is evaluated in an `#if' directive.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
263
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
264 # AS_VAR_APPEND([DEVWARN_CFLAGS], [" -Wundef"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
265
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
266 # Warn about anything that depends on the "size of" a function type
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
267 # or of void.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
268
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
269 # AS_VAR_APPEND([DEVWARN_CFLAGS], [" -Wpointer-arith"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
270
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
271 # Warn whenever a pointer is cast so as to remove a type qualifier
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
272 # from the target type.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
273
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
274 # AS_VAR_APPEND([DEVWARN_CFLAGS], [" -Wcast-qual"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
275
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
276 # Warn whenever a pointer is cast such that the required alignment
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
277 # of the target is increased.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
278
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
279 # AS_VAR_APPEND([DEVWARN_CFLAGS], [" -Wcast-align"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
280
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
281 # Warn whenever a function call is cast to a non-matching type.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
282
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
283 # AS_VAR_APPEND([DEVWARN_CFLAGS], [" -Wbad-function-cast"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
284
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
285 # Warn when a comparison between signed and unsigned values could
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
286 # produce an incorrect result when the signed value is converted to
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
287 # unsigned.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
288
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
289 # AS_VAR_APPEND([DEVWARN_CFLAGS], [" -Wsign-compare"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
290
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
291 # Warn if a structure's initializer has some fields missing.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
292
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
293 # AS_VAR_APPEND([DEVWARN_CFLAGS], [" -Wmissing-field-initializers"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
294
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
295 # An alias of the new option -Wsuggest-attribute=noreturn
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
296 # Warn for cases where adding an attribute may be beneficial.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
297
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
298 # AS_VAR_APPEND([DEVWARN_CFLAGS], [" -Wmissing-noreturn"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
299
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
300 # Warn if an extern declaration is encountered within a function.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
301
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
302 # AS_VAR_APPEND([DEVWARN_CFLAGS], [" -Wnested-externs"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
303
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
304 # Warn if anything is declared more than once in the same scope,
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
305 # even in cases where multiple declaration is valid and changes
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
306 # nothing.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
307
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
308 # AS_VAR_APPEND([DEVWARN_CFLAGS], [" -Wredundant-decls"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
309
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
310 # Warn if the loop cannot be optimized because the compiler could not
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
311 # assume anything on the bounds of the loop indices.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
312 # -Wunsafe-loop-optimizations objects to loops with increments more
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
313 # than 1 because if the end is at INT_MAX it could run forever ...
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
314 # rarely
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
315
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
316 # AS_VAR_APPEND([DEVWARN_CFLAGS], [" -Wunsafe-loop-optimizations"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
317
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
318 # Warn for implicit conversions that may alter a value.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
319 # -Wconversion is brain-damaged - complains about char arguments
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
320 # every time
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
321
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
322 # AS_VAR_APPEND([DEVWARN_CFLAGS], [" -Wconversion"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
323
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
324 # Warn about certain constructs that behave differently in traditional
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
325 # and ISO C.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
326 # -Wtraditional gives #elif and #error msgs
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
327
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
328 # AS_VAR_APPEND([DEVWARN_CFLAGS], [" -Wtraditional"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
329
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
330 # Warn if floating point values are used in equality comparisons.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
331 # -Wfloat-equal will not allow tests for values still 0.0
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
332
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
333 # AS_VAR_APPEND([DEVWARN_CFLAGS], [" -Wfloat-equal"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
334
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
335 # This option is only active when -ftree-vrp is active
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
336 # (default for -O2 and above). It warns about subscripts to arrays
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
337 # that are always out of bounds.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
338 # -Warray-bounds gives false positives in gcc 4.6.0
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
339 # Disable rather than use a non-portable pragma
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
340
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
341 # AS_VAR_APPEND([DEVWARN_CFLAGS], [" -Wno-array-bounds"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
342 ],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
343 [icc],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
344 [
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
345 # Diagnostic options for the Intel(R) C++ compiler version 11.1.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
346 # http://software.intel.com/en-us/articles/intel-c-compiler-professional-edition-for-linux-documentation/
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
347
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
348 # This option specifies the level of diagnostic messages to be
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
349 # generated by the compiler.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
350
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
351 AS_VAR_SET([DEVWARN_CFLAGS], ["-w2"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
352
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
353 # This option determines whether a warning is issued if generated
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
354 # code is not C++ ABI compliant.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
355
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
356 AS_VAR_APPEND([DEVWARN_CFLAGS], [" -Wabi"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
357
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
358 # This option tells the compiler to display errors, warnings, and
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
359 # remarks.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
360
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
361 AS_VAR_APPEND([DEVWARN_CFLAGS], [" -Wall"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
362
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
363 # This option tells the compiler to display a shorter form of
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
364 # diagnostic output.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
365
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
366 # AS_VAR_APPEND([DEVWARN_CFLAGS], [" -Wbrief"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
367
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
368 # This option warns if cast is used to override pointer type
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
369 # qualifier
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
370
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
371 AS_VAR_APPEND([DEVWARN_CFLAGS], [" -Wcast-qual"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
372
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
373 # This option tells the compiler to perform compile-time code
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
374 # checking for certain code.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
375
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
376 AS_VAR_APPEND([DEVWARN_CFLAGS], [" -Wcheck"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
377
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
378 # This option determines whether a warning is issued when /*
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
379 # appears in the middle of a /* */ comment.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
380
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
381 AS_VAR_APPEND([DEVWARN_CFLAGS], [" -Wcomment"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
382
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
383 # Set maximum number of template instantiation contexts shown in
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
384 # diagnostic.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
385
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
386 # AS_VAR_APPEND([DEVWARN_CFLAGS], [" -Wcontext-limit=n"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
387
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
388 # This option enables warnings for implicit conversions that may
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
389 # alter a value.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
390
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
391 AS_VAR_APPEND([DEVWARN_CFLAGS], [" -Wconversion"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
392
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
393 # This option determines whether warnings are issued for deprecated
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
394 # features.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
395
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
396 AS_VAR_APPEND([DEVWARN_CFLAGS], [" -Wdeprecated"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
397
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
398 # This option enables warnings based on certain C++ programming
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
399 # guidelines.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
400
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
401 # AS_VAR_APPEND([DEVWARN_CFLAGS], [" -Weffc++"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
402
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
403 # This option changes all warnings to errors.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
404 # Alternate: -diag-error warn
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
405
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
406 # AS_VAR_APPEND([DEVWARN_CFLAGS], [" -Werror"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
407
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
408 # This option changes all warnings and remarks to errors.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
409 # Alternate: -diag-error warn, remark
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
410
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
411 # AS_VAR_APPEND([DEVWARN_CFLAGS], [" -Werror-all"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
412
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
413 # This option determines whether warnings are issued about extra
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
414 # tokens at the end of preprocessor directives.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
415
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
416 AS_VAR_APPEND([DEVWARN_CFLAGS], [" -Wextra-tokens"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
417
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
418 # This option determines whether argument checking is enabled for
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
419 # calls to printf, scanf, and so forth.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
420
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
421 AS_VAR_APPEND([DEVWARN_CFLAGS], [" -Wformat"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
422
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
423 # This option determines whether the compiler issues a warning when
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
424 # the use of format functions may cause security problems.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
425
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
426 AS_VAR_APPEND([DEVWARN_CFLAGS], [" -Wformat-security"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
427
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
428 # This option enables diagnostics about what is inlined and what is
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
429 # not inlined.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
430
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
431 # AS_VAR_APPEND([DEVWARN_CFLAGS], [" -Winline"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
432
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
433 # This option determines whether a warning is issued if the return
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
434 # type of main is not expected.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
435
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
436 AS_VAR_APPEND([DEVWARN_CFLAGS], [" -Wmain"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
437
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
438 # This option determines whether warnings are issued for global
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
439 # functions and variables without prior declaration.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
440
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
441 AS_VAR_APPEND([DEVWARN_CFLAGS], [" -Wmissing-declarations"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
442
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
443 # Determines whether warnings are issued for missing prototypes.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
444
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
445 AS_VAR_APPEND([DEVWARN_CFLAGS], [" -Wmissing-prototypes"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
446
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
447 # This option enables warnings if a multicharacter constant
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
448 # ('ABC') is used.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
449
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
450 AS_VAR_APPEND([DEVWARN_CFLAGS], [" -Wmultichar"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
451
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
452 # Issue a warning when a class appears to be polymorphic,
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
453 # yet it declares a non-virtual one.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
454 # This option is supported in C++ only.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
455
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
456 # AS_VAR_APPEND([DEVWARN_CFLAGS], [" -Wnon-virtual-dtor"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
457
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
458 # This option warns about operations that could result in
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
459 # integer overflow.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
460
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
461 AS_VAR_APPEND([DEVWARN_CFLAGS], [" -Woverflow"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
462
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
463 # This option tells the compiler to display diagnostics for 64-bit
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
464 # porting.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
465
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
466 AS_VAR_APPEND([DEVWARN_CFLAGS], [" -Wp64"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
467
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
468 # Determines whether warnings are issued for questionable pointer
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
469 # arithmetic.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
470
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
471 AS_VAR_APPEND([DEVWARN_CFLAGS], [" -Wpointer-arith"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
472
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
473 # his option determines whether a warning is issued about the
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
474 # use of #pragma once.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
475
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
476 AS_VAR_APPEND([DEVWARN_CFLAGS], [" -Wpragma-once"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
477
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
478 # Issue a warning when the order of member initializers does not
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
479 # match the order in which they must be executed.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
480 # This option is supported with C++ only.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
481
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
482 # AS_VAR_APPEND([DEVWARN_CFLAGS], [" -Wreorder"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
483
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
484 # This option determines whether warnings are issued when a function
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
485 # uses the default int return type or when a return statement is
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
486 # used in a void function.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
487
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
488 AS_VAR_APPEND([DEVWARN_CFLAGS], [" -Wreturn-type"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
489
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
490 # This option determines whether a warning is issued when a variable
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
491 # declaration hides a previous declaration.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
492
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
493 AS_VAR_APPEND([DEVWARN_CFLAGS], [" -Wshadow"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
494
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
495 # This option warns for code that might violate the optimizer's
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
496 # strict aliasing rules. Warnings are issued only when using
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
497 # -fstrict-aliasing or -ansi-alias.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
498
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
499 # AS_VAR_APPEND([DEVWARN_CFLAGS], [" -Wstrict-aliasing"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
500
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
501 # This option determines whether warnings are issued for functions
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
502 # declared or defined without specified argument types.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
503
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
504 AS_VAR_APPEND([DEVWARN_CFLAGS], [" -Wstrict-prototypes"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
505
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
506 # This option determines whether warnings are issued if any trigraphs
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
507 # are encountered that might change the meaning of the program.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
508
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
509 AS_VAR_APPEND([DEVWARN_CFLAGS], [" -Wtrigraphs"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
510
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
511 # This option determines whether a warning is issued if a variable
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
512 # is used before being initialized.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
513
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
514 AS_VAR_APPEND([DEVWARN_CFLAGS], [" -Wuninitialized"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
515
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
516 # This option determines whether a warning is issued if an unknown
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
517 # #pragma directive is used.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
518
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
519 AS_VAR_APPEND([DEVWARN_CFLAGS], [" -Wunknown-pragmas"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
520
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
521 # This option determines whether a warning is issued if a declared
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
522 # function is not used.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
523
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
524 AS_VAR_APPEND([DEVWARN_CFLAGS], [" -Wunused-function"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
525
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
526 # This option determines whether a warning is issued if a local or
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
527 # non-constant static variable is unused after being declared.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
528
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
529 AS_VAR_APPEND([DEVWARN_CFLAGS], [" -Wunused-variable"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
530
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
531 # This option issues a diagnostic message if const char* is
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
532 # converted to (non-const) char *.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
533
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
534 AS_VAR_APPEND([DEVWARN_CFLAGS], [" -Wwrite-strings"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
535
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
536 # Disable warning #981 operands are evaluated in unspecified order
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
537 # http://software.intel.com/en-us/articles/cdiag981/
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
538
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
539 AS_VAR_APPEND([DEVWARN_CFLAGS], [" -diag-disable 981"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
540 ])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
541 ])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
542
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
543 AC_SUBST([DEVWARN_CFLAGS])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
544
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
545
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
546
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
547
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
548 # Compiler extra developer warning settings: --enable-devextrawarnings,
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
549 # appends DEVWARN_CFLAGS
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
550 # Will only have an effect if --enable-devwarnings also given
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
551
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
552 AC_ARG_ENABLE([devextrawarnings],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
553 [AS_HELP_STRING([--enable-devextrawarnings],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
554 [add extra warnings to devwarnings])])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
555
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
556 AS_IF([test "x${enable_devwarnings}" = "xyes" &&
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
557 test "x${enable_devextrawarnings}" = "xyes"],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
558 [
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
559 AS_CASE([${CC}],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
560 [gcc],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
561 [
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
562 # flags used by Ubuntu 8.10 to check open has 2/3 arguments etc.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
563
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
564 AC_DEFINE([_FORTIFY_SOURCE], [2], [Set to 2 for open args])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
565
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
566 # compiler flags
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
567
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
568 CPPFLAGS="-fstack-protector ${CPPFLAGS}"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
569
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
570 # warnings used by Ubuntu 8.10
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
571 # -Wall already includes:
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
572 # -Wformat
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
573
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
574 AS_VAR_APPEND([DEVWARN_CFLAGS], [" -Wformat-security -Wl,-z,relro"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
575
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
576 # -Wpadded means moving char to end of structs - but also flags
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
577 # end of struct so need to add padding at end
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
578
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
579 AS_VAR_APPEND([DEVWARN_CFLAGS], [" -Wpadded"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
580 ])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
581 ])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
582
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
583
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
584
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
585
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
586 # Compile deprecated functions still used in the book text for 6.2.0
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
587
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
588 AC_ARG_ENABLE([buildbookdeprecated],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
589 [AS_HELP_STRING([--enable-buildbookdeprecated],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
590 [build deprecated functions used in books for 6.2.0])])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
591
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
592 # Compile all deprecated functions
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
593
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
594 AC_ARG_ENABLE([buildalldeprecated],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
595 [AS_HELP_STRING([--enable-buildalldeprecated],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
596 [build all deprecated functions])])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
597
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
598 AS_IF([test "x${enable_buildbookdeprecated}" = "xyes" ||
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
599 test "x${enable_buildalldeprecated}" = "xyes"],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
600 [
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
601 AC_DEFINE([AJ_COMPILE_DEPRECATED_BOOK], [1],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
602 [Define to 1 to compile deprecated functions used in book texts for 6.2.0])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
603 ])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
604
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
605 AS_IF([test "x${enable_buildalldeprecated}" = "xyes"],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
606 [
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
607 AC_DEFINE([AJ_COMPILE_DEPRECATED], [1],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
608 [Define to 1 to compile all deprecated functions])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
609 ])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
610
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
611
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
612
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
613
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
614 # Add extensions to Solaris for some reentrant functions
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
615
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
616 AS_CASE([${host_os}],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
617 [solaris*],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
618 [AS_VAR_APPEND([CFLAGS], [" -D__EXTENSIONS__"])])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
619
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
620
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
621
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
622
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
623 # Test whether --with-sgiabi given for IRIX (n32m3 n32m4 64m3 64m4)
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
624
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
625 AS_CASE([${host_os}],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
626 [irix*],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
627 [
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
628 AS_CASE([${CC}],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
629 [gcc],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
630 [],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
631 [cc],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
632 [CHECK_SGI])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
633 ])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
634
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
635
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
636
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
637
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
638 dnl PCRE library definitions - see the MAJOR and MINOR values
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
639 dnl to see which version's configure.in these lines come from
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
640
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
641 dnl Provide the current PCRE version information. Do not use numbers
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
642 dnl with leading zeros for the minor version, as they end up in a C
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
643 dnl macro, and may be treated as octal constants. Stick to single
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
644 dnl digits for minor numbers less than 10. There are unlikely to be
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
645 dnl that many releases anyway.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
646
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
647 PCRE_MAJOR="7"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
648 PCRE_MINOR="9"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
649 PCRE_DATE="11-Apr-2009"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
650 PCRE_VERSION="${PCRE_MAJOR}.${PCRE_MINOR}"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
651
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
652 dnl Default values for miscellaneous macros
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
653
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
654 POSIX_MALLOC_THRESHOLD="-DPOSIX_MALLOC_THRESHOLD=10"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
655
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
656 dnl Provide versioning information for libtool shared libraries that
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
657 dnl are built by default on Unix systems.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
658
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
659 PCRE_LIB_VERSION="0:1:0"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
660 PCRE_POSIXLIB_VERSION="0:0:0"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
661
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
662
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
663
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
664
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
665 dnl FIXME: This does no longer seem required with Autoconf 2.67?
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
666 dnl Intel MacOSX 10.6 puts X11 in a non-standard place
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
667 dnl AS_IF([test "x${with_x}" != "xno"],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
668 dnl [
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
669 dnl AS_CASE([${host_os}],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
670 dnl [darwin*],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
671 dnl [
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
672 dnl OSXX=`sw_vers -productVersion | sed 's/\(10\.[[0-9]]*\).*/\1/'`
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
673 dnl AS_IF([test ${OSXX} '>' '10.4'],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
674 dnl [AS_VAR_APPEND([CFLAGS], [" -I/usr/X11/include -L/usr/X11/lib"])])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
675 dnl ])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
676 dnl ])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
677
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
678
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
679
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
680
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
681 # Checks for header files.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
682 AC_PATH_XTRA
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
683 AC_HEADER_DIRENT
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
684 AC_HEADER_STDC
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
685
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
686 AC_CHECK_HEADERS([unistd.h TargetConfig.h])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
687
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
688
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
689 # Checks for typedefs, structures, and compiler characteristics.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
690 AC_C_BIGENDIAN
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
691 AC_C_CONST
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
692 AC_C_INLINE
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
693 AC_TYPE_PID_T
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
694 AC_TYPE_SIZE_T
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
695 AC_STRUCT_TM
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
696
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
697
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
698 # Checks for library functions.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
699 AC_FUNC_GETPGRP
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
700 AC_FUNC_STRFTIME
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
701 AC_FUNC_FORK
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
702 AC_FUNC_VPRINTF
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
703
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
704 AC_CHECK_FUNCS([strdup strstr strchr erand48 memmove])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
705
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
706 AS_IF([test "x${with_x}" != "xno"], [LF_EMBOSS_PATH_XLIB])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
707
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
708
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
709 # Library checks.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
710 AC_CHECK_LIB([c], [socket], [LIBS="${LIBS}"], [LIBS="${LIBS} -lsocket"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
711 AC_CHECK_LIB([m], [main])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
712 AC_CHECK_LIB([curl], [curl_easy_init], [],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
713 [AC_MSG_ERROR([You need to install libcurl-devel library to your system])])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
714
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
715 # GD for FreeBSD requires libiconv
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
716
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
717 AS_CASE([${host_os}],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
718 [freebsd*],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
719 [
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
720 AS_IF([test "x${with_pngdriver}" != "xno"],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
721 [AC_CHECK_LIB([iconv], [main], [LIBS="${LIBS}"], [LIBS="-liconv ${LIBS}"])])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
722 ])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
723
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
724
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
725
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
726
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
727 AM_CONDITIONAL([AMPNG], [false])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
728 AM_CONDITIONAL([AMPDF], [false])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
729
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
730 CHECK_GENERAL
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
731 CHECK_JAVA
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
732 CHECK_HPDF
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
733 CHECK_PNGDRIVER
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
734
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
735 AX_LIB_MYSQL
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
736 AX_LIB_POSTGRESQL
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
737
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
738
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
739
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
740
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
741 dnl "Export" these variables for PCRE
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
742
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
743 AC_SUBST([HAVE_MEMMOVE])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
744 AC_SUBST([HAVE_STRERROR])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
745 AC_SUBST([PCRE_MAJOR])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
746 AC_SUBST([PCRE_MINOR])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
747 AC_SUBST([PCRE_DATE])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
748 AC_SUBST([PCRE_VERSION])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
749 AC_SUBST([PCRE_LIB_VERSION])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
750 AC_SUBST([PCRE_POSIXLIB_VERSION])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
751 AC_SUBST([POSIX_MALLOC_THRESHOLD])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
752
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
753
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
754
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
755
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
756 dnl Test if --enable-localforce given
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
757 locallink="no"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
758 embprefix="/usr/local"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
759 AC_ARG_ENABLE([localforce],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
760 [AS_HELP_STRING([--enable-localforce],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
761 [force compile/link against /usr/local])])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
762
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
763 AS_IF([test "x${enable_localforce}" = "xyes"],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
764 [embprefix="/usr/local"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
765
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
766 AS_IF([test "x${prefix}" = "xNONE"],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
767 [
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
768 AS_IF([test "x${enable_localforce}" != "xyes"],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
769 [locallink="yes"],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
770 [
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
771 locallink="no"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
772 embprefix="/usr/local"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
773 ])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
774 ],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
775 [
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
776 embprefix="${prefix}"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
777 ])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
778
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
779 AM_CONDITIONAL([LOCALLINK], [test "x${locallink}" = "xyes"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
780
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
781 AC_SUBST([embprefix])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
782
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
783
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
784
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
785
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
786 # Enable debugging: --enable-debug, sets CFLAGS
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
787
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
788 AC_ARG_ENABLE([debug],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
789 [AS_HELP_STRING([--enable-debug], [debug (-g option on compiler)])])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
790
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
791 AS_IF([test "x${enable_debug}" = "xyes"], [AS_VAR_APPEND([CFLAGS], [" -g"])])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
792
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
793
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
794
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
795
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
796 # Turn off irritating linker warnings in IRIX
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
797
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
798 AS_CASE([${host_os}],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
799 [irix*],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
800 [
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
801 CFLAGS="-Wl,-LD_MSG:off=85:off=84:off=16:off=134 ${CFLAGS}"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
802 ])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
803
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
804
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
805
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
806
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
807 # Enable the large file interface: --enable-large, appends CPPFLAGS
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
808
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
809 AC_ARG_ENABLE([large],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
810 [AS_HELP_STRING([--enable-large],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
811 [over 2Gb file support @<:@default=yes@:>@])])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
812
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
813 AC_MSG_CHECKING([for large file support])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
814
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
815 AS_IF([test "x${enable_large}" = "xno"],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
816 [
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
817 AC_MSG_RESULT([no])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
818 ],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
819 [
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
820 AS_CASE([${host_os}],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
821 [linux*],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
822 [
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
823 AS_VAR_APPEND([CPPFLAGS], [" -DAJ_LinuxLF"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
824 AS_VAR_APPEND([CPPFLAGS], [" -D_LARGEFILE_SOURCE"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
825 AS_VAR_APPEND([CPPFLAGS], [" -D_LARGEFILE64_SOURCE"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
826 AS_VAR_APPEND([CPPFLAGS], [" -D_FILE_OFFSET_BITS=64"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
827 ],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
828 [freebsd*],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
829 [
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
830 AS_VAR_APPEND([CPPFLAGS], [" -DAJ_FreeBSDLF"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
831 ],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
832 [solaris*],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
833 [
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
834 AS_VAR_APPEND([CPPFLAGS], [" -DAJ_SolarisLF"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
835 AS_VAR_APPEND([CPPFLAGS], [" -D_LARGEFILE_SOURCE"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
836 AS_VAR_APPEND([CPPFLAGS], [" -D_FILE_OFFSET_BITS=64"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
837 ],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
838 [osf*],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
839 [
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
840 AS_VAR_APPEND([CPPFLAGS], [" -DAJ_OSF1LF"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
841 ],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
842 [irix*],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
843 [
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
844 AS_VAR_APPEND([CPPFLAGS], [" -DAJ_IRIXLF"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
845 AS_VAR_APPEND([CPPFLAGS], [" -D_LARGEFILE64_SOURCE"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
846 ],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
847 [aix*],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
848 [
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
849 AS_VAR_APPEND([CPPFLAGS], [" -DAJ_AIXLF"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
850 AS_VAR_APPEND([CPPFLAGS], [" -D_LARGE_FILES"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
851 ],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
852 [hpux*],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
853 [
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
854 AS_VAR_APPEND([CPPFLAGS], [" -DAJ_HPUXLF"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
855 AS_VAR_APPEND([CPPFLAGS], [" -D_LARGEFILE_SOURCE"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
856 AS_VAR_APPEND([CPPFLAGS], [" -D_FILE_OFFSET_BITS=64"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
857 ],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
858 [darwin*],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
859 [
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
860 AS_VAR_APPEND([CPPFLAGS], [" -DAJ_MACOSXLF"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
861 ])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
862
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
863 AC_MSG_RESULT([yes])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
864 ])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
865
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
866
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
867
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
868
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
869 # Enable libraries provided by the system rather than EMBOSS:
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
870 # --enable-systemlibs, sets ESYSTEMLIBS
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
871
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
872 AC_ARG_ENABLE([systemlibs],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
873 [AS_HELP_STRING([--enable-systemlibs], [utility for RPM/dpkg bundles])])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
874
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
875 AM_CONDITIONAL([ESYSTEMLIBS], [test "x${enable_systemlibs}" = "xyes"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
876
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
877
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
878
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
879
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
880 # Enable the purify tool: --enable-purify, sets CC and LIBTOOL
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
881
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
882 AC_ARG_ENABLE([purify],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
883 [AS_HELP_STRING([--enable-purify], [purify])])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
884
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
885 AC_MSG_CHECKING([for purify])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
886
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
887 AS_IF([test "x${enable_purify}" = "xyes"],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
888 [
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
889 dnl if(purify -version) < /dev/null > /dev/null 2>&1; then
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
890 CC="purify --chain-length=20 -best-effort -windows=yes gcc -g"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
891 LIBTOOL="${LIBTOOL} --tag=CC"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
892 AC_MSG_RESULT([yes])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
893 dnl fi
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
894 ],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
895 [
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
896 AC_MSG_RESULT([no])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
897 ])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
898
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
899
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
900
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
901
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
902 dnl Set extra needed compiler flags
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
903 if test "x${CC}" = "xcc"; then
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
904 case "${host}" in
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
905 alpha*-dec-osf*) CFLAGS="${CFLAGS} -ieee";;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
906 esac
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
907 fi
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
908
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
909 AM_CONDITIONAL([PURIFY], [test "x${enable_purify}" = "xyes"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
910
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
911
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
912
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
913
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
914 dnl Test for cygwin to set AM_LDFLAGS in library & apps Makefile.ams
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
915 dnl Replaces original version which used 'expr' and so wasn't entirely
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
916 dnl portable.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
917 platform_cygwin="no"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
918 AC_MSG_CHECKING([for cygwin])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
919 case "${host}" in
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
920 *-*-mingw*|*-*-cygwin*)
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
921 platform_cygwin="yes"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
922 ;;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
923 *)
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
924 platform_cygwin="no"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
925 ;;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
926 esac
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
927 AC_MSG_RESULT([${platform_cygwin}])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
928 AM_CONDITIONAL([ISCYGWIN], [test "x${platform_cygwin}" = "xyes"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
929
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
930
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
931
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
932
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
933 dnl Tests for AIX
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
934 dnl If shared needs -Wl,-G in plplot,ajax,nucleus, -lX11 in plplot,
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
935 dnl and -Wl,brtl -Wl,-bdynamic in emboss
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
936 dnl We therefore need a static test as well
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
937 needajax="no"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
938
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
939 AS_CASE([${host_os}],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
940 [aix*],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
941 [AM_CONDITIONAL([ISAIXIA64], [true])],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
942 [AM_CONDITIONAL([ISAIXIA64], [false])])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
943
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
944 AM_CONDITIONAL([ISSHARED], [test "x${enable_shared}" = "xyes"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
945
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
946 AS_CASE([${host_os}],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
947 [aix*],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
948 [
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
949 AS_IF([test -d ajax/.libs],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
950 [AS_ECHO(["AIX ajax/.libs exists"])], [mkdir ajax/.libs])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
951
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
952 AS_CASE([${host_os}],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
953 [aix5*], [needajax="no"],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
954 [aix4.3.3*], [needajax="yes"],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
955 [needajax="no"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
956 ])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
957
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
958 AM_CONDITIONAL([NEEDAJAX], [test "x${needajax}" = "xyes"])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
959
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
960
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
961
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
962
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
963 # HP-UX needs -lsec for shadow passwords
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
964
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
965 AS_CASE([${host_os}],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
966 [hpux*],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
967 [AS_VAR_APPEND([LDFLAGS], [" -lsec"])])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
968
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
969
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
970
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
971
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
972 # GNU mcheck functions: --enable-mcheck, defines HAVE_MCHECK
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
973
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
974 AC_ARG_ENABLE([mcheck],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
975 [AS_HELP_STRING([--enable-mcheck],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
976 [mcheck and mprobe memory allocation test])])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
977
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
978 AS_IF([test "x${enable_mcheck}" = "xyes"], [AC_CHECK_FUNCS([mcheck])])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
979
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
980
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
981
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
982
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
983 # Collect AJAX statistics: --enable-savestats, defines AJ_SAVESTATS
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
984
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
985 AC_ARG_ENABLE([savestats],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
986 [AS_HELP_STRING([--enable-savestats],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
987 [save AJAX statistics and print with debug output])])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
988
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
989 AC_MSG_CHECKING([for savestats])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
990
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
991 AS_IF([test "x${enable_savestats}" = "xyes"],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
992 [
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
993 AC_DEFINE([AJ_SAVESTATS], [1],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
994 [Define to 1 to collect AJAX library usage statistics.])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
995 AC_MSG_RESULT([yes])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
996 ],
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
997 [
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
998 AC_MSG_RESULT([no])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
999 ])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
1000
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
1001
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
1002
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
1003
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
1004 AC_CONFIG_FILES([Makefile
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
1005 src/Makefile
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
1006 acd/Makefile
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
1007 doc/Makefile
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
1008 doc/html/Makefile
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
1009 doc/text/Makefile
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
1010 ])
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
1011
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
1012 AC_OUTPUT