1999.6.1
by kalebral at gmail
update Copyright strings to a more common format to help with creating the master debian copyright file |
1 |
dnl Copyright (C) 2009 Sun Microsystems, Inc. |
2 |
dnl This file is free software; Sun Microsystems, Inc. |
|
1085.1.4
by Monty Taylor
pandora-build v1 |
3 |
dnl gives unlimited permission to copy and/or distribute it, |
4 |
dnl with or without modifications, as long as this notice is preserved. |
|
5 |
||
1085.1.3
by Monty Taylor
Split out warnings - start using the pandora build system. |
6 |
dnl AC_PANDORA_WARNINGS([less-warnings|warnings-always-on]) |
7 |
dnl less-warnings turn on a limited set of warnings |
|
8 |
dnl warnings-always-on always set warnings=error regardless of tarball/vc |
|
1085.1.7
by Monty Taylor
pandora-build r0.7 |
9 |
|
10 |
dnl @TODO: remove less-warnings option as soon as Drizzle is clean enough to |
|
11 |
dnl allow it |
|
1085.1.3
by Monty Taylor
Split out warnings - start using the pandora build system. |
12 |
|
13 |
AC_DEFUN([PANDORA_WARNINGS],[ |
|
1085.1.4
by Monty Taylor
pandora-build v1 |
14 |
m4_define([PW_LESS_WARNINGS],[no]) |
15 |
m4_define([PW_WARN_ALWAYS_ON],[no]) |
|
1085.1.7
by Monty Taylor
pandora-build r0.7 |
16 |
ifdef([m4_define],,[define([m4_define], defn([define]))]) |
17 |
ifdef([m4_undefine],,[define([m4_undefine], defn([undefine]))]) |
|
1085.3.4
by Monty Taylor
pandora-build v0.8 |
18 |
m4_foreach([pw_arg],[$*],[ |
1085.1.4
by Monty Taylor
pandora-build v1 |
19 |
m4_case(pw_arg,
|
20 |
[less-warnings],[ |
|
21 |
m4_undefine([PW_LESS_WARNINGS]) |
|
22 |
m4_define([PW_LESS_WARNINGS],[yes]) |
|
23 |
], |
|
24 |
[warnings-always-on],[ |
|
25 |
m4_undefine([PW_WARN_ALWAYS_ON]) |
|
26 |
m4_define([PW_WARN_ALWAYS_ON],[yes]) |
|
27 |
]) |
|
28 |
]) |
|
1085.1.3
by Monty Taylor
Split out warnings - start using the pandora build system. |
29 |
|
30 |
AC_REQUIRE([PANDORA_BUILDING_FROM_VC]) |
|
1085.1.4
by Monty Taylor
pandora-build v1 |
31 |
m4_if(PW_WARN_ALWAYS_ON, [yes], |
1085.1.3
by Monty Taylor
Split out warnings - start using the pandora build system. |
32 |
[ac_cv_warnings_as_errors=yes], |
1273.12.1
by Monty Taylor
pandora-build v0.100 - Fixes several bugs found by cb1kenobi. Add several thoughts from folks at LCA. |
33 |
AS_IF([test "$pandora_building_from_vc" = "yes"], |
1085.1.4
by Monty Taylor
pandora-build v1 |
34 |
[ac_cv_warnings_as_errors=yes], |
35 |
[ac_cv_warnings_as_errors=no])) |
|
1085.1.3
by Monty Taylor
Split out warnings - start using the pandora build system. |
36 |
|
1992.6.4
by Monty Taylor
Added support for GCC Profile Mode (new in 4.5) |
37 |
AC_ARG_ENABLE([gcc-profile-mode], |
38 |
[AS_HELP_STRING([--enable-gcc-profile-mode], |
|
39 |
[Toggle gcc profile mode @<:@default=off@:>@])], |
|
40 |
[ac_gcc_profile_mode="$enableval"], |
|
41 |
[ac_gcc_profile_mode="no"]) |
|
42 |
||
1085.1.3
by Monty Taylor
Split out warnings - start using the pandora build system. |
43 |
AC_ARG_ENABLE([profiling], |
44 |
[AS_HELP_STRING([--enable-profiling], |
|
45 |
[Toggle profiling @<:@default=off@:>@])], |
|
46 |
[ac_profiling="$enableval"], |
|
47 |
[ac_profiling="no"]) |
|
48 |
||
49 |
AC_ARG_ENABLE([coverage], |
|
50 |
[AS_HELP_STRING([--enable-coverage], |
|
51 |
[Toggle coverage @<:@default=off@:>@])], |
|
52 |
[ac_coverage="$enableval"], |
|
53 |
[ac_coverage="no"]) |
|
54 |
||
55 |
AS_IF([test "$GCC" = "yes"],[ |
|
56 |
||
57 |
AS_IF([test "$ac_profiling" = "yes"],[ |
|
58 |
CC_PROFILING="-pg"
|
|
1192.3.77
by Monty Taylor
Fixed dynamic loading with lcov and gprof. |
59 |
GCOV_LIBS="-pg -lgcov"
|
1085.1.3
by Monty Taylor
Split out warnings - start using the pandora build system. |
60 |
save_LIBS="${LIBS}"
|
61 |
LIBS=""
|
|
62 |
AC_CHECK_LIB(c_p, read)
|
|
63 |
LIBC_P="${LIBS}"
|
|
64 |
LIBS="${save_LIBS}"
|
|
65 |
AC_SUBST(LIBC_P)
|
|
66 |
],[ |
|
67 |
CC_PROFILING=" "
|
|
68 |
]) |
|
69 |
||
70 |
AS_IF([test "$ac_coverage" = "yes"], |
|
1192.3.77
by Monty Taylor
Fixed dynamic loading with lcov and gprof. |
71 |
[ |
72 |
CC_COVERAGE="--coverage"
|
|
73 |
GCOV_LIBS="-lgcov"
|
|
74 |
]) |
|
75 |
||
76 |
||
1085.1.3
by Monty Taylor
Split out warnings - start using the pandora build system. |
77 |
|
78 |
AS_IF([test "$ac_cv_warnings_as_errors" = "yes"], |
|
79 |
[W_FAIL="-Werror"]) |
|
80 |
||
81 |
AC_CACHE_CHECK([whether it is safe to use -fdiagnostics-show-option], |
|
82 |
[ac_cv_safe_to_use_fdiagnostics_show_option_], |
|
83 |
[save_CFLAGS="$CFLAGS" |
|
1093.2.1
by Monty Taylor
pandora-build v0.16 |
84 |
CFLAGS="-fdiagnostics-show-option ${AM_CFLAGS} ${CFLAGS}"
|
1085.1.3
by Monty Taylor
Split out warnings - start using the pandora build system. |
85 |
AC_COMPILE_IFELSE(
|
86 |
[AC_LANG_PROGRAM([],[])], |
|
87 |
[ac_cv_safe_to_use_fdiagnostics_show_option_=yes], |
|
88 |
[ac_cv_safe_to_use_fdiagnostics_show_option_=no]) |
|
89 |
CFLAGS="$save_CFLAGS"]) |
|
90 |
||
91 |
AS_IF([test "$ac_cv_safe_to_use_fdiagnostics_show_option_" = "yes"], |
|
92 |
[ |
|
93 |
F_DIAGNOSTICS_SHOW_OPTION="-fdiagnostics-show-option"
|
|
94 |
]) |
|
95 |
||
1992.6.3
by Monty Taylor
Added check for and usage of -floop-parallelize-all. |
96 |
AC_CACHE_CHECK([whether it is safe to use -floop-parallelize-all], |
97 |
[ac_cv_safe_to_use_floop_parallelize_all_], |
|
98 |
[save_CFLAGS="$CFLAGS" |
|
99 |
CFLAGS="-floop-parallelize-all ${AM_CFLAGS} ${CFLAGS}"
|
|
100 |
AC_COMPILE_IFELSE(
|
|
101 |
[AC_LANG_PROGRAM([],[])], |
|
102 |
[ac_cv_safe_to_use_floop_parallelize_all_=yes], |
|
103 |
[ac_cv_safe_to_use_floop_parallelize_all_=no]) |
|
104 |
CFLAGS="$save_CFLAGS"]) |
|
105 |
||
106 |
AS_IF([test "$ac_cv_safe_to_use_floop_parallelize_all_" = "yes"], |
|
107 |
[ |
|
108 |
F_LOOP_PARALLELIZE_ALL="-floop-parallelize-all"
|
|
109 |
]) |
|
110 |
||
1085.1.3
by Monty Taylor
Split out warnings - start using the pandora build system. |
111 |
NO_STRICT_ALIASING="-fno-strict-aliasing -Wno-strict-aliasing" |
1093.4.1
by Monty Taylor
pandora-build v0.22 - fixes solaris build. |
112 |
NO_SHADOW="-Wno-shadow" |
1085.1.3
by Monty Taylor
Split out warnings - start using the pandora build system. |
113 |
|
1093.2.2
by mordred
pandora-build v0.18 |
114 |
AS_IF([test "$INTELCC" = "yes"],[ |
1093.2.3
by mordred
pandora-build v0.20 |
115 |
m4_if(PW_LESS_WARNINGS,[no],[ |
1953.1.6
by Monty Taylor
Fixed an ordering/logic error in pandora_warnings. |
116 |
BASE_WARNINGS="-w1 -Werror -Wcheck -Wp64 -Woverloaded-virtual -Wcast-qual -diag-disable 188"
|
1093.2.3
by mordred
pandora-build v0.20 |
117 |
],[ |
1816.2.1
by Monty Taylor
Made ICC warning suppressions a little more sensible given what we can't accomplish any time in the near future. |
118 |
dnl 2203 is like old-style-cast
|
119 |
dnl 1684 is like strict-aliasing
|
|
1816.2.2
by Monty Taylor
Suppress warning about using enums as bitfields. |
120 |
dnl 188 is about using enums as bitfields
|
1816.2.3
by Monty Taylor
Fixed some more ICC warnings. How did I get started on this this morning? |
121 |
dnl 1683 is a warning about _EXPLICIT_ casting, which we want
|
1953.1.6
by Monty Taylor
Fixed an ordering/logic error in pandora_warnings. |
122 |
BASE_WARNINGS="-w1 -Werror -Wcheck -Wp64 -Woverloaded-virtual -Wcast-qual -diag-disable 188,981,2259,2203,1683,1684"
|
1093.2.3
by mordred
pandora-build v0.20 |
123 |
]) |
1093.2.2
by mordred
pandora-build v0.18 |
124 |
CC_WARNINGS="${BASE_WARNINGS}" |
125 |
CXX_WARNINGS="${BASE_WARNINGS}" |
|
1816.2.3
by Monty Taylor
Fixed some more ICC warnings. How did I get started on this this morning? |
126 |
PROTOSKIP_WARNINGS="-diag-disable 188,981,967,2259,1683,1684,2203" |
1816.2.1
by Monty Taylor
Made ICC warning suppressions a little more sensible given what we can't accomplish any time in the near future. |
127 |
|
1085.1.3
by Monty Taylor
Split out warnings - start using the pandora build system. |
128 |
],[ |
1093.2.2
by mordred
pandora-build v0.18 |
129 |
m4_if(PW_LESS_WARNINGS,[no],[ |
1953.1.6
by Monty Taylor
Fixed an ordering/logic error in pandora_warnings. |
130 |
BASE_WARNINGS_FULL="${W_CONVERSION} -Wstrict-aliasing"
|
1093.2.2
by mordred
pandora-build v0.18 |
131 |
CC_WARNINGS_FULL="-Wswitch-default -Wswitch-enum -Wwrite-strings"
|
132 |
CXX_WARNINGS_FULL="-Weffc++ -Wold-style-cast"
|
|
1471.3.1
by Monty Taylor
Latest pandora-build. Moves the lint check to only run distcheck. |
133 |
NO_OLD_STYLE_CAST="-Wno-old-style-cast"
|
134 |
NO_EFF_CXX="-Wno-effc++"
|
|
1093.2.2
by mordred
pandora-build v0.18 |
135 |
],[ |
1953.1.6
by Monty Taylor
Fixed an ordering/logic error in pandora_warnings. |
136 |
BASE_WARNINGS_FULL="${NO_STRICT_ALIASING}"
|
1093.2.2
by mordred
pandora-build v0.18 |
137 |
]) |
138 |
||
139 |
AS_IF([test "${ac_cv_assert}" = "no"], |
|
140 |
[NO_UNUSED="-Wno-unused-variable -Wno-unused-parameter"]) |
|
141 |
|
|
1192.3.1
by Monty Taylor
pandora-build v0.64 |
142 |
AC_CACHE_CHECK([whether it is safe to use -Wextra], |
143 |
[ac_cv_safe_to_use_Wextra_], |
|
144 |
[save_CFLAGS="$CFLAGS" |
|
145 |
CFLAGS="${W_FAIL} -pedantic -Wextra ${AM_CFLAGS} ${CFLAGS}"
|
|
146 |
AC_COMPILE_IFELSE([
|
|
147 |
AC_LANG_PROGRAM(
|
|
148 |
[[
|
|
149 |
#include <stdio.h>
|
|
150 |
]], [[]]) |
|
151 |
], |
|
152 |
[ac_cv_safe_to_use_Wextra_=yes], |
|
153 |
[ac_cv_safe_to_use_Wextra_=no]) |
|
154 |
CFLAGS="$save_CFLAGS"]) |
|
155 |
||
1992.6.3
by Monty Taylor
Added check for and usage of -floop-parallelize-all. |
156 |
BASE_WARNINGS="${W_FAIL} -pedantic -Wall -Wundef -Wshadow ${NO_UNUSED} ${F_DIAGNOSTICS_SHOW_OPTION} ${F_LOOP_PARALLELIZE_ALL} ${BASE_WARNINGS_FULL}" |
1192.3.1
by Monty Taylor
pandora-build v0.64 |
157 |
AS_IF([test "$ac_cv_safe_to_use_Wextra_" = "yes"], |
158 |
[BASE_WARNINGS="${BASE_WARNINGS} -Wextra"], |
|
159 |
[BASE_WARNINGS="${BASE_WARNINGS} -W"]) |
|
160 |
|
|
1948.1.8
by Monty Taylor
Removed setting flags for ICC that aren't, well, for ICC. |
161 |
AC_CACHE_CHECK([whether it is safe to use -Wformat], |
162 |
[ac_cv_safe_to_use_wformat_], |
|
163 |
[save_CFLAGS="$CFLAGS" |
|
164 |
dnl Use -Werror here instead of ${W_FAIL} so that we don't spew
|
|
165 |
dnl conversion warnings to all the tarball folks
|
|
166 |
CFLAGS="-Wformat -Werror -pedantic ${AM_CFLAGS} ${CFLAGS}"
|
|
167 |
AC_COMPILE_IFELSE(
|
|
168 |
[AC_LANG_PROGRAM([[
|
|
169 |
#include <stdio.h>
|
|
170 |
#include <stdint.h>
|
|
171 |
#include <inttypes.h>
|
|
172 |
void foo();
|
|
173 |
void foo()
|
|
174 |
{
|
|
175 |
uint64_t test_u= 0;
|
|
176 |
printf("This is a %" PRIu64 "test\n", test_u);
|
|
177 |
}
|
|
178 |
]],[[ |
|
179 |
foo();
|
|
180 |
]])], |
|
181 |
[ac_cv_safe_to_use_wformat_=yes], |
|
182 |
[ac_cv_safe_to_use_wformat_=no]) |
|
183 |
CFLAGS="$save_CFLAGS"]) |
|
184 |
AS_IF([test "$ac_cv_safe_to_use_wformat_" = "yes"],[ |
|
1953.1.6
by Monty Taylor
Fixed an ordering/logic error in pandora_warnings. |
185 |
BASE_WARNINGS="${BASE_WARNINGS} -Wformat -Wno-format-nonliteral -Wno-format-security"
|
186 |
BASE_WARNINGS_FULL="${BASE_WARNINGS_FULL} -Wformat=2 -Wno-format-nonliteral -Wno-format-security"
|
|
1948.1.8
by Monty Taylor
Removed setting flags for ICC that aren't, well, for ICC. |
187 |
],[ |
1953.1.6
by Monty Taylor
Fixed an ordering/logic error in pandora_warnings. |
188 |
BASE_WARNINGS="${BASE_WARNINGS} -Wno-format"
|
189 |
BASE_WARNINGS_FULL="${BASE_WARNINGS_FULL} -Wno-format"
|
|
1948.1.8
by Monty Taylor
Removed setting flags for ICC that aren't, well, for ICC. |
190 |
]) |
191 |
||
192 |
||
193 |
|
|
194 |
AC_CACHE_CHECK([whether it is safe to use -Wconversion], |
|
195 |
[ac_cv_safe_to_use_wconversion_], |
|
196 |
[save_CFLAGS="$CFLAGS" |
|
197 |
dnl Use -Werror here instead of ${W_FAIL} so that we don't spew
|
|
198 |
dnl conversion warnings to all the tarball folks
|
|
199 |
CFLAGS="-Wconversion -Werror -pedantic ${AM_CFLAGS} ${CFLAGS}"
|
|
200 |
AC_COMPILE_IFELSE(
|
|
201 |
[AC_LANG_PROGRAM([[
|
|
202 |
#include <stdbool.h>
|
|
203 |
void foo(bool a)
|
|
204 |
{
|
|
205 |
(void)a;
|
|
206 |
}
|
|
207 |
]],[[ |
|
208 |
foo(0);
|
|
209 |
]])], |
|
210 |
[ac_cv_safe_to_use_wconversion_=yes], |
|
211 |
[ac_cv_safe_to_use_wconversion_=no]) |
|
212 |
CFLAGS="$save_CFLAGS"]) |
|
213 |
|
|
214 |
AS_IF([test "$ac_cv_safe_to_use_wconversion_" = "yes"], |
|
215 |
[W_CONVERSION="-Wconversion" |
|
216 |
AC_CACHE_CHECK([whether it is safe to use -Wconversion with htons], |
|
217 |
[ac_cv_safe_to_use_Wconversion_], |
|
218 |
[save_CFLAGS="$CFLAGS" |
|
219 |
dnl Use -Werror here instead of ${W_FAIL} so that we don't spew
|
|
220 |
dnl conversion warnings to all the tarball folks
|
|
221 |
CFLAGS="-Wconversion -Werror -pedantic ${AM_CFLAGS} ${CFLAGS}"
|
|
222 |
AC_COMPILE_IFELSE(
|
|
223 |
[AC_LANG_PROGRAM(
|
|
224 |
[[
|
|
225 |
#include <netinet/in.h>
|
|
226 |
]],[[ |
|
227 |
uint16_t x= htons(80);
|
|
228 |
]])], |
|
229 |
[ac_cv_safe_to_use_Wconversion_=yes], |
|
230 |
[ac_cv_safe_to_use_Wconversion_=no]) |
|
231 |
CFLAGS="$save_CFLAGS"]) |
|
232 |
|
|
233 |
AS_IF([test "$ac_cv_safe_to_use_Wconversion_" = "no"], |
|
234 |
[NO_CONVERSION="-Wno-conversion"]) |
|
235 |
]) |
|
236 |
||
1992.6.7
by Monty Taylor
Revert -Wc++-compat change. |
237 |
CC_WARNINGS="${BASE_WARNINGS} -Wstrict-prototypes -Wmissing-prototypes -Wredundant-decls -Wmissing-declarations -Wcast-align ${CC_WARNINGS_FULL}" |
1093.2.2
by mordred
pandora-build v0.18 |
238 |
CXX_WARNINGS="${BASE_WARNINGS} -Woverloaded-virtual -Wnon-virtual-dtor -Wctor-dtor-privacy -Wno-long-long ${CXX_WARNINGS_FULL}" |
239 |
||
240 |
AC_CACHE_CHECK([whether it is safe to use -Wmissing-declarations from C++], |
|
241 |
[ac_cv_safe_to_use_Wmissing_declarations_], |
|
242 |
[AC_LANG_PUSH(C++) |
|
243 |
save_CXXFLAGS="$CXXFLAGS"
|
|
244 |
CXXFLAGS="-Werror -pedantic -Wmissing-declarations ${AM_CXXFLAGS}"
|
|
245 |
AC_COMPILE_IFELSE([
|
|
246 |
AC_LANG_PROGRAM(
|
|
247 |
[[
|
|
248 |
#include <stdio.h>
|
|
249 |
]], [[]]) |
|
250 |
], |
|
251 |
[ac_cv_safe_to_use_Wmissing_declarations_=yes], |
|
252 |
[ac_cv_safe_to_use_Wmissing_declarations_=no]) |
|
253 |
CXXFLAGS="$save_CXXFLAGS" |
|
254 |
AC_LANG_POP() |
|
255 |
]) |
|
256 |
AS_IF([test "$ac_cv_safe_to_use_Wmissing_declarations_" = "yes"], |
|
257 |
[CXX_WARNINGS="${CXX_WARNINGS} -Wmissing-declarations"]) |
|
258 |
|
|
1929.1.37
by Monty Taylor
Wrap -Wframe-larger-than in a pandora test. |
259 |
AC_CACHE_CHECK([whether it is safe to use -Wframe-larger-than], |
260 |
[ac_cv_safe_to_use_Wframe_larger_than_], |
|
261 |
[AC_LANG_PUSH(C++) |
|
262 |
save_CXXFLAGS="$CXXFLAGS"
|
|
1929.1.38
by Monty Taylor
Fixed the check for Wframe-larger-than |
263 |
CXXFLAGS="-Werror -pedantic -Wframe-larger-than=32768 ${AM_CXXFLAGS}"
|
1929.1.37
by Monty Taylor
Wrap -Wframe-larger-than in a pandora test. |
264 |
AC_COMPILE_IFELSE([
|
265 |
AC_LANG_PROGRAM(
|
|
266 |
[[
|
|
267 |
#include <stdio.h>
|
|
268 |
]], [[]]) |
|
269 |
], |
|
270 |
[ac_cv_safe_to_use_Wframe_larger_than_=yes], |
|
271 |
[ac_cv_safe_to_use_Wframe_larger_than_=no]) |
|
272 |
CXXFLAGS="$save_CXXFLAGS" |
|
273 |
AC_LANG_POP() |
|
274 |
]) |
|
275 |
AS_IF([test "$ac_cv_safe_to_use_Wframe_larger_than_" = "yes"], |
|
1929.1.38
by Monty Taylor
Fixed the check for Wframe-larger-than |
276 |
[CXX_WARNINGS="${CXX_WARNINGS} -Wframe-larger-than=32768"]) |
1929.1.37
by Monty Taylor
Wrap -Wframe-larger-than in a pandora test. |
277 |
|
1093.2.2
by mordred
pandora-build v0.18 |
278 |
AC_CACHE_CHECK([whether it is safe to use -Wlogical-op], |
279 |
[ac_cv_safe_to_use_Wlogical_op_], |
|
280 |
[save_CFLAGS="$CFLAGS" |
|
281 |
CFLAGS="${W_FAIL} -pedantic -Wlogical-op ${AM_CFLAGS} ${CFLAGS}"
|
|
282 |
AC_COMPILE_IFELSE([
|
|
283 |
AC_LANG_PROGRAM(
|
|
284 |
[[
|
|
285 |
#include <stdio.h>
|
|
286 |
]], [[]]) |
|
287 |
], |
|
288 |
[ac_cv_safe_to_use_Wlogical_op_=yes], |
|
289 |
[ac_cv_safe_to_use_Wlogical_op_=no]) |
|
290 |
CFLAGS="$save_CFLAGS"]) |
|
291 |
AS_IF([test "$ac_cv_safe_to_use_Wlogical_op_" = "yes"], |
|
292 |
[CC_WARNINGS="${CC_WARNINGS} -Wlogical-op"]) |
|
293 |
|
|
294 |
AC_CACHE_CHECK([whether it is safe to use -Wredundant-decls from C++], |
|
295 |
[ac_cv_safe_to_use_Wredundant_decls_], |
|
296 |
[AC_LANG_PUSH(C++) |
|
297 |
save_CXXFLAGS="${CXXFLAGS}"
|
|
298 |
CXXFLAGS="${W_FAIL} -pedantic -Wredundant-decls ${AM_CXXFLAGS}"
|
|
299 |
AC_COMPILE_IFELSE(
|
|
300 |
[AC_LANG_PROGRAM([
|
|
1085.1.3
by Monty Taylor
Split out warnings - start using the pandora build system. |
301 |
template <typename E> struct C { void foo(); };
|
302 |
template <typename E> void C<E>::foo() { }
|
|
303 |
template <> void C<int>::foo();
|
|
1093.2.2
by mordred
pandora-build v0.18 |
304 |
AC_INCLUDES_DEFAULT])], |
305 |
[ac_cv_safe_to_use_Wredundant_decls_=yes], |
|
306 |
[ac_cv_safe_to_use_Wredundant_decls_=no]) |
|
1241.9.10
by Monty Taylor
pandora-build v0.85 - Fixed the C++ standard setting in the build checks. |
307 |
CXXFLAGS="${save_CXXFLAGS}" |
308 |
AC_LANG_POP()]) |
|
1093.2.2
by mordred
pandora-build v0.18 |
309 |
AS_IF([test "$ac_cv_safe_to_use_Wredundant_decls_" = "yes"], |
310 |
[CXX_WARNINGS="${CXX_WARNINGS} -Wredundant-decls"], |
|
311 |
[CXX_WARNINGS="${CXX_WARNINGS} -Wno-redundant-decls"]) |
|
1126.7.3
by mordred
pandora-build v0.60 - check for -Wattributes with -fvisibility=hidden issues. |
312 |
|
313 |
AC_CACHE_CHECK([whether it is safe to use -Wattributes from C++], |
|
314 |
[ac_cv_safe_to_use_Wattributes_], |
|
315 |
[AC_LANG_PUSH(C++) |
|
316 |
save_CXXFLAGS="${CXXFLAGS}"
|
|
317 |
CXXFLAGS="${W_FAIL} -pedantic -Wattributes -fvisibility=hidden ${AM_CXXFLAGS}"
|
|
318 |
AC_COMPILE_IFELSE(
|
|
319 |
[AC_LANG_PROGRAM([
|
|
320 |
#include <google/protobuf/message.h>
|
|
321 |
#include <google/protobuf/descriptor.h>
|
|
322 |
||
323 |
||
324 |
const ::google::protobuf::EnumDescriptor* Table_TableOptions_RowType_descriptor();
|
|
325 |
enum Table_TableOptions_RowType {
|
|
326 |
Table_TableOptions_RowType_ROW_TYPE_DEFAULT = 0,
|
|
327 |
Table_TableOptions_RowType_ROW_TYPE_FIXED = 1,
|
|
328 |
Table_TableOptions_RowType_ROW_TYPE_DYNAMIC = 2,
|
|
329 |
Table_TableOptions_RowType_ROW_TYPE_COMPRESSED = 3,
|
|
330 |
Table_TableOptions_RowType_ROW_TYPE_REDUNDANT = 4,
|
|
331 |
Table_TableOptions_RowType_ROW_TYPE_COMPACT = 5,
|
|
332 |
Table_TableOptions_RowType_ROW_TYPE_PAGE = 6
|
|
333 |
};
|
|
334 |
||
335 |
namespace google {
|
|
336 |
namespace protobuf {
|
|
337 |
template <>
|
|
338 |
inline const EnumDescriptor* GetEnumDescriptor<Table_TableOptions_RowType>() {
|
|
339 |
return Table_TableOptions_RowType_descriptor();
|
|
340 |
}
|
|
341 |
}
|
|
342 |
}
|
|
343 |
])], |
|
344 |
[ac_cv_safe_to_use_Wattributes_=yes], |
|
345 |
[ac_cv_safe_to_use_Wattributes_=no]) |
|
346 |
CXXFLAGS="${save_CXXFLAGS}" |
|
347 |
AC_LANG_POP()]) |
|
1192.3.1
by Monty Taylor
pandora-build v0.64 |
348 |
AC_CACHE_CHECK([whether it is safe to use -Wno-attributes], |
349 |
[ac_cv_safe_to_use_Wno_attributes_], |
|
350 |
[save_CFLAGS="$CFLAGS" |
|
351 |
CFLAGS="${W_FAIL} -pedantic -Wno_attributes_ ${AM_CFLAGS} ${CFLAGS}"
|
|
352 |
AC_COMPILE_IFELSE([
|
|
353 |
AC_LANG_PROGRAM(
|
|
354 |
[[
|
|
355 |
#include <stdio.h>
|
|
356 |
]], [[]]) |
|
357 |
], |
|
358 |
[ac_cv_safe_to_use_Wno_attributes_=yes], |
|
359 |
[ac_cv_safe_to_use_Wno_attributes_=no]) |
|
360 |
CFLAGS="$save_CFLAGS"]) |
|
361 |
||
362 |
dnl GCC 3.4 doesn't have -Wno-attributes, so we can't turn them off |
|
363 |
dnl by using that. |
|
364 |
AS_IF([test "$ac_cv_safe_to_use_Wattributes_" != "yes"],[ |
|
365 |
AS_IF([test "$ac_cv_safe_to_use_Wno_attributes_" = "yes"],[ |
|
366 |
CC_WARNINGS="${CC_WARNINGS} -Wno-attributes"
|
|
367 |
NO_ATTRIBUTES="-Wno-attributes"])]) |
|
368 |
|
|
1093.2.2
by mordred
pandora-build v0.18 |
369 |
|
370 |
NO_REDUNDANT_DECLS="-Wno-redundant-decls" |
|
1099.1.10
by Monty Taylor
Avoid cast-align warnings on InnoDB. |
371 |
dnl TODO: Figure out a better way to deal with this: |
1192.3.1
by Monty Taylor
pandora-build v0.64 |
372 |
PROTOSKIP_WARNINGS="-Wno-effc++ -Wno-shadow -Wno-missing-braces ${NO_ATTRIBUTES}" |
1093.9.17
by Monty Taylor
pandora-build v0.45 - added a -Wno-error option for chunks of code like generated protobuf files |
373 |
NO_WERROR="-Wno-error" |
2023.3.27
by Monty Taylor
Updated for OSX. |
374 |
PERMISSIVE_WARNINGS="-Wno-error -Wno-unused-function -fpermissive" |
2093.1.1
by Monty Taylor
Adds ability to build plugins static. |
375 |
PERMISSIVE_C_WARNINGS="-Wno-error -Wno-redundant-decls" |
1531.4.1
by Monty Taylor
Added a suppression for boost for OSX. |
376 |
AS_IF([test "$host_vendor" = "apple"],[ |
377 |
BOOSTSKIP_WARNINGS="-Wno-uninitialized"
|
|
378 |
]) |
|
1093.2.2
by mordred
pandora-build v0.18 |
379 |
]) |
1085.1.3
by Monty Taylor
Split out warnings - start using the pandora build system. |
380 |
]) |
381 |
||
382 |
AS_IF([test "$SUNCC" = "yes"],[ |
|
383 |
||
384 |
AS_IF([test "$ac_profiling" = "yes"], |
|
385 |
[CC_PROFILING="-xinstrument=datarace"]) |
|
386 |
||
387 |
AS_IF([test "$ac_cv_warnings_as_errors" = "yes"], |
|
388 |
[W_FAIL="-errwarn=%all"]) |
|
389 |
||
390 |
AC_CACHE_CHECK([whether E_PASTE_RESULT_NOT_TOKEN is usable], |
|
391 |
[ac_cv_paste_result], |
|
392 |
[ |
|
393 |
save_CFLAGS="${CFLAGS}"
|
|
394 |
CFLAGS="-errwarn=%all -erroff=E_PASTE_RESULT_NOT_TOKEN ${CFLAGS}"
|
|
395 |
AC_COMPILE_IFELSE(
|
|
396 |
[AC_LANG_PROGRAM([
|
|
397 |
AC_INCLUDES_DEFAULT
|
|
398 |
],[ |
|
399 |
int x= 0;])], |
|
400 |
[ac_cv_paste_result=yes], |
|
401 |
[ac_cv_paste_result=no]) |
|
402 |
CFLAGS="${save_CFLAGS}" |
|
403 |
]) |
|
404 |
AS_IF([test $ac_cv_paste_result = yes], |
|
405 |
[W_PASTE_RESULT=",E_PASTE_RESULT_NOT_TOKEN"]) |
|
406 |
||
407 |
||
1085.1.4
by Monty Taylor
pandora-build v1 |
408 |
m4_if(PW_LESS_WARNINGS, [no],[ |
2023.3.6
by Monty Taylor
Fixing some of the innodb c++ casting issues. |
409 |
CC_WARNINGS_FULL="-erroff=E_STATEMENT_NOT_REACHED,E_INTEGER_OVERFLOW_DETECTED${W_PASTE_RESULT}"
|
1093.2.3
by mordred
pandora-build v0.20 |
410 |
CXX_WARNINGS_FULL="-erroff=inllargeuse"
|
1085.1.3
by Monty Taylor
Split out warnings - start using the pandora build system. |
411 |
],[ |
2023.3.6
by Monty Taylor
Fixing some of the innodb c++ casting issues. |
412 |
CC_WARNINGS_FULL="-erroff=E_ATTRIBUTE_NOT_VAR,E_STATEMENT_NOT_REACHED"
|
1085.1.3
by Monty Taylor
Split out warnings - start using the pandora build system. |
413 |
CXX_WARNINGS_FULL="-erroff=attrskipunsup,doubunder,reftotemp,inllargeuse,truncwarn1,signextwarn,inllargeint"
|
414 |
]) |
|
415 |
||
1724.1.1
by Monty Taylor
Rearranged how we set -fvisibility, allowing us to turn it on on a |
416 |
CC_WARNINGS="-v -errtags=yes ${W_FAIL} ${CC_WARNINGS_FULL}" |
417 |
CXX_WARNINGS="+w +w2 -xwe -xport64 -errtags=yes ${CXX_WARNINGS_FULL} ${W_FAIL}" |
|
1093.9.11
by Monty Taylor
pandora-build v0.41 - added more warning exceptions for protobuf |
418 |
PROTOSKIP_WARNINGS="-erroff=attrskipunsup,doubunder,reftotemp,wbadinitl,identexpected,inllargeuse,truncwarn1,signextwarn,partinit,notused,badargtype2w,wbadinit" |
1531.4.4
by Monty Taylor
Added an additional warning solaris can't deal with. |
419 |
BOOSTSKIP_WARNINGS="-erroff=attrskipunsup,doubunder,reftotemp,inllargeuse,truncwarn1,signextwarn,inllargeint,hidef,wvarhidenmem" |
2023.3.28
by mordred
Removed INNOBASE_SKIP_WARNINGS, but re-added them as PERMISSIVE_WARNINGS so that we can ignore some warnings on Sun Studio for bison-generated code (I don't care). |
420 |
PERMISSIVE_WARNINGS="-erroff=attrskipunsup,doubunder,reftotemp,inllargeuse,truncwarn1,signextwarn,inllargeint,hidef,wvarhidenmem,notused,badargtype2w,wunreachable" |
2023.3.29
by Monty Taylor
Added back INNOBASE_SKIP_WARNINGS for solaris. Also dealt with unused params. |
421 |
INNOBASE_SKIP_WARNINGS="-erroff=attrskipunsup,doubunder,reftotemp,wbadinitl,identexpected,inllargeuse,truncwarn1,signextwarn,partinit,notused,badargtype2w,wbadinit,wunreachable" |
1085.1.3
by Monty Taylor
Split out warnings - start using the pandora build system. |
422 |
NO_UNREACHED="-erroff=E_STATEMENT_NOT_REACHED" |
1093.9.17
by Monty Taylor
pandora-build v0.45 - added a -Wno-error option for chunks of code like generated protobuf files |
423 |
NO_WERROR="-errwarn=%none" |
1085.1.3
by Monty Taylor
Split out warnings - start using the pandora build system. |
424 |
|
425 |
]) |
|
426 |
||
427 |
AC_SUBST(NO_CONVERSION) |
|
428 |
AC_SUBST(NO_REDUNDANT_DECLS) |
|
429 |
AC_SUBST(NO_UNREACHED) |
|
430 |
AC_SUBST(NO_SHADOW) |
|
431 |
AC_SUBST(NO_STRICT_ALIASING) |
|
1471.3.1
by Monty Taylor
Latest pandora-build. Moves the lint check to only run distcheck. |
432 |
AC_SUBST(NO_EFF_CXX) |
433 |
AC_SUBST(NO_OLD_STYLE_CAST) |
|
1085.1.3
by Monty Taylor
Split out warnings - start using the pandora build system. |
434 |
AC_SUBST(PROTOSKIP_WARNINGS) |
2023.3.29
by Monty Taylor
Added back INNOBASE_SKIP_WARNINGS for solaris. Also dealt with unused params. |
435 |
AC_SUBST(INNOBASE_SKIP_WARNINGS) |
1578.1.5
by Monty Taylor
Added suppression of warning for boost on solaris. |
436 |
AC_SUBST(BOOSTSKIP_WARNINGS) |
2023.3.1
by Monty Taylor
A stab at C++-izing InnoDB. |
437 |
AC_SUBST(PERMISSIVE_WARNINGS) |
2093.1.1
by Monty Taylor
Adds ability to build plugins static. |
438 |
AC_SUBST(PERMISSIVE_C_WARNINGS) |
1093.9.17
by Monty Taylor
pandora-build v0.45 - added a -Wno-error option for chunks of code like generated protobuf files |
439 |
AC_SUBST(NO_WERROR) |
1192.3.77
by Monty Taylor
Fixed dynamic loading with lcov and gprof. |
440 |
AC_SUBST([GCOV_LIBS]) |
1085.1.3
by Monty Taylor
Split out warnings - start using the pandora build system. |
441 |
|
442 |
]) |