116
116
m4_include(m4/character_sets.m4)
117
117
AC_SUBST(AVAILABLE_LANGUAGES)
119
m4_include(m4/gettext.m4)
120
AM_GNU_GETTEXT(external, need-formatstring-macros)
121
if test "x$MSGMERGE" = "x" -o "x$MSGMERGE" = "x:"
123
AM_PATH_PROG_WITH_TEST(GMSGMERGE, gmsgmerge,
124
[$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :)
125
MSGMERGE="${GMSGMERGE}"
127
AM_CONDITIONAL([BUILD_GETTEXT],[test "x$MSGMERGE" != "x" -a "x$MSGMERGE" != "x:"])
130
120
# Set this for plugins to use
131
121
ac_build_drizzle="yes"
201
191
AC_DEFINE([_GNU_SOURCE],[1],[Fix problem with S_ISLNK() on Linux])
204
dnl Solaris 9 include file <sys/feature_tests.h> refers to X/Open document
206
dnl System Interfaces and Headers, Issue 5
208
dnl saying we should define _XOPEN_SOURCE=500 to get POSIX.1c prototypes,
209
dnl but apparently other systems (namely FreeBSD) don't agree.
211
dnl On a newer Solaris 10, the above file recognizes also _XOPEN_SOURCE=600.
212
dnl Furthermore, it tests that if a program requires older standard
213
dnl (_XOPEN_SOURCE<600 or _POSIX_C_SOURCE<200112L) it cannot be
214
dnl run on a new compiler (that defines _STDC_C99) and issues an #error.
215
dnl It's also an #error if a program requires new standard (_XOPEN_SOURCE=600
216
dnl or _POSIX_C_SOURCE=200112L) and a compiler does not define _STDC_C99.
218
dnl To add more to this mess, Sun Studio C compiler defines _STDC_C99 while
219
dnl C++ compiler does not!
221
dnl TODO: Can _ISOC99_SOURCE be defined on all platforms and remove the
222
dnl Need for all of this?
194
dnl C99 is illegal in C++... but these turn on extensions to the standard
195
dnl On Solars. This whole block is sort of silly atm, since we don't do
223
197
if test "$GCC" = "yes"
225
199
case "$target_os" in
227
201
AC_DEFINE([_XOPEN_SOURCE],[600],[Turn on XOpen 6.0 Features])
228
202
AC_DEFINE([__C99FEATURES__],[1],[Turn on C99 Features for C++])
203
AC_DEFINE([__XPG6],[1],[Turn on C99/XOpen Group 6 Extensions])
247
222
AC_MSG_ERROR(["bison is required for Drizzle to build from a bzr branch"])
251
# The following is required for portable results of floating point calculations
252
# on PowerPC. The same must also be done for IA-64, but this options is missing
253
# in the IA-64 gcc backend.
225
# Build optimized or debug version ?
226
# First check for gcc and g++
255
227
if test "$GCC" = "yes"
229
dnl The following is required for portable results of floating point
230
dnl calculations on PowerPC. The same must also be done for IA-64, but
231
dnl this options is missing in the IA-64 gcc backend.
257
232
case "$host_cpu" in
258
233
*ppc* | *powerpc*)
259
CFLAGS="$CFLAGS -mno-fused-madd"
260
CXXFLAGS="$CXXFLAGS -mno-fused-madd"
234
CFLAGS="-mno-fused-madd ${CFLAGS}"
235
CXXFLAGS="-mno-fused-madd ${CXXFLAGS}"
264
# Build optimized or debug version ?
265
# First check for gcc and g++
266
if test "$GCC" = "yes"
268
CFLAGS="${CFLAGS} -ggdb3 -std=gnu99"
269
CXXFLAGS="${CXXFLAGS} -ggdb3 -std=gnu++98"
239
CFLAGS="-ggdb3 -std=gnu99 ${CFLAGS}"
240
CXXFLAGS="-ggdb3 ${CXXFLAGS}"
241
AC_CXX_CHECK_STANDARD
271
244
DEBUG_CFLAGS="-O0"
272
245
DEBUG_CXXFLAGS="-O0"
277
250
if test "$SUNCC" = "yes"
252
dnl we put CPPFLAGS and LDFLAGS first here, because if the user has specified
253
dnl command line CPPFLAGS or LDFLAGS, their -I or -L should come _first_
279
254
isainfo_k=`isainfo -k`
280
255
if test "$target_cpu" = "sparc"
282
257
MEMALIGN_FLAGS="-xmemalign=8s"
284
LDFLAGS="${LDFLAGS} -L/usr/lib/${isainfo_k} -L/usr/local/lib/${isainfo_k}"
286
260
if test "$isainfo_k" = "amd64"
289
LDFLAGS="${LDFLAGS} -L/usr/lib/${isainfo_k} -L/usr/local/lib/${isainfo_k}"
292
CPPFLAGS="${CPPFLAGS} -I/usr/local/include"
265
LDFLAGS="${LDFLAGS} -L/usr/local/lib/${isainfo_k} -L/usr/local/lib -L/opt/csw/lib/${isainfo_k} -L/opt/csw/lib -L/usr/lib/${isainfo_k}"
266
CPPFLAGS="${CPPFLAGS} -I/usr/local/include -I/opt/csw/include"
294
CXXFLAGS="${CXXFLAGS} -xlang=c99 -g -mt -compat=5 -library=stlport4 -template=no%extdef ${IS_64} ${MEMALIGN_FLAGS}"
295
CFLAGS="${CFLAGS} -g -mt -xc99=all ${IS_64} ${MEMALIGN_FLAGS}"
268
CXXFLAGS="-xlang=c99 -g -mt -compat=5 -library=stlport4 -template=no%extdef ${IS_64} ${MEMALIGN_FLAGS} ${CXXFLAGS}"
269
CFLAGS="-g -mt -xc99=all ${IS_64} ${MEMALIGN_FLAGS} ${CFLAGS}"
296
270
DEBUG_CFLAGS="-xO0"
297
271
DEBUG_CXXFLAGS="-xO0"
281
m4_include(m4/gettext.m4)
282
AM_GNU_GETTEXT(external, need-formatstring-macros)
283
if test "x$MSGMERGE" = "x" -o "x$MSGMERGE" = "x:"
285
AM_PATH_PROG_WITH_TEST(GMSGMERGE, gmsgmerge,
286
[$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :)
287
MSGMERGE="${GMSGMERGE}"
289
AM_CONDITIONAL([BUILD_GETTEXT],[test "x$MSGMERGE" != "x" -a "x$MSGMERGE" != "x:"])
1297
1283
if test "$ac_warn_pedantic" = "yes"
1299
save_CXXFLAGS="${CXXFLAGS}"
1300
CXXFLAGS="${CXXFLAGS} ${W_FAIL} -Wredundant-decls"
1301
1285
AC_CACHE_CHECK([whether it is safe to use -Wredundant-decls],
1302
1286
[ac_cv_safe_to_use_Wredundant_decls_],
1303
1287
[AC_LANG_PUSH(C++)
1288
save_CXXFLAGS="${CXXFLAGS}"
1289
CXXFLAGS="${CXXFLAGS} ${W_FAIL} -Wredundant-decls"
1304
1290
AC_COMPILE_IFELSE(
1305
1291
[AC_LANG_PROGRAM([
1306
1292
template <typename E> struct C { void foo(); };
1309
1295
AC_INCLUDES_DEFAULT])],
1310
1296
[ac_cv_safe_to_use_Wredundant_decls_=yes],
1311
1297
[ac_cv_safe_to_use_Wredundant_decls_=no])
1298
CXXFLAGS="${save_CXXFLAGS}"
1312
1299
AC_LANG_POP()])
1313
1300
if test $ac_cv_safe_to_use_Wredundant_decls_ = yes
1337
1324
AC_DEFINE(HAVE_ATTR_HIDDEN, 1,
1338
1325
[Define to 1 if you have support for __attribute__((visibility("hidden")))])
1341
CXXFLAGS="${save_CXXFLAGS}"
1344
1329
if test "$ac_warn_unreachable" = "yes"
1361
1346
W_CONVERSION="-Wconversion"
1364
CC_WARNINGS="${C99_SUPPORT_HACK} ${BASE_WARNINGS} ${GCC_PEDANTIC} ${W_UNREACHABLE} ${GPROF_PROFILING} ${GPROF_COVERAGE} ${W_SHADOW} ${W_CONVERSION}"
1349
CC_WARNINGS="${BASE_WARNINGS} ${GCC_PEDANTIC} ${W_UNREACHABLE} ${GPROF_PROFILING} ${GPROF_COVERAGE} ${W_SHADOW} ${W_CONVERSION}"
1365
1350
CXX_WARNINGS="${BASE_WARNINGS} ${GXX_PEDANTIC} ${W_UNREACHABLE} ${GPROF_PROFILING} ${GPROF_COVERAGE} ${W_CAST} ${W_SHADOW} ${W_EFFC} ${W_CONVERSION}"
1367
1352
if test "$ac_exceptions" = "no"
1377
1362
if test "$ac_datarace" = "yes"
1379
CFLAGS="${CFLAGS} -xinstrument=datarace"
1380
CXXFLAGS="${CXXFLAGS} -xinstrument=datarace"
1364
CFLAGS="-xinstrument=datarace ${CFLAGS}"
1365
CXXFLAGS="-xinstrument=datarace ${CXXFLAGS}"
1383
1368
if test "$ac_warn_fail" = "yes"
1506
1491
echo " * C++ cstdint location: $ac_cv_cxx_cstdint"
1507
1492
echo " * C++ hash_map location: $ac_cv_cxx_hash_map"
1508
1493
echo " * C++ hash namespace: $ac_cv_cxx_hash_namespace"
1494
echo " * C++ shared_ptr namespace: $ac_cv_shared_ptr_namespace"