~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to configure.ac

  • Committer: Brian Aker
  • Date: 2008-07-15 20:14:05 UTC
  • mfrom: (77.1.112 codestyle)
  • Revision ID: brian@tangent.org-20080715201405-hov2omn1y8k5r00o
Saving import from Monty

Show diffs side-by-side

added added

removed removed

Lines of Context:
282
282
fi
283
283
AC_SUBST(LD_VERSION_SCRIPT)
284
284
 
 
285
 
285
286
#--------------------------------------------------------------------
286
287
# Check for libevent
287
288
#--------------------------------------------------------------------
305
306
AC_CHECK_LIB(pthread, pthread_create, [], [AC_MSG_ERROR(could not find libpthread)])
306
307
 
307
308
#--------------------------------------------------------------------
 
309
# Check for tcmalloc
 
310
#--------------------------------------------------------------------
 
311
 
 
312
AC_ARG_ENABLE([tcmalloc],
 
313
    [AS_HELP_STRING([--enable-tcmalloc],
 
314
       [Enable linking with tcmalloc @<:@default=off@:>@])],
 
315
    [ac_warn_strict_aliasing="$enableval"],
 
316
    [ac_warn_strict_aliasing="no"])
 
317
 
 
318
if test "x$ac_warn_strict_aliasing" = "xyes"
 
319
then
 
320
  AC_CHECK_LIB(tcmalloc,malloc,[],[])
 
321
fi
 
322
 
 
323
#--------------------------------------------------------------------
308
324
# Check for libz
309
325
#--------------------------------------------------------------------
310
326
 
332
348
  dnl Only check the header here, because autoconf can't handle
333
349
  dnl checking for C++ methods without C linkages
334
350
  AC_CHECK_HEADERS(pcrecpp.h)
335
 
  if test "x$ac_cv_header_prcecpp_h" = "xno" 
 
351
  if test "x$ac_cv_header_pcrecpp_h" != "xyes" 
336
352
  then
337
353
    found_pcre="no"
338
354
  else
1179
1195
    [ac_warn_pedantic="yes"])
1180
1196
 
1181
1197
AC_ARG_ENABLE([fail],
1182
 
    [AS_HELP_STRING([--enable-fail],
1183
 
       [Turn warnings into failures @<:@default=off@:>@])],
 
1198
    [AS_HELP_STRING([--disable-fail],
 
1199
       [Turn warnings into failures @<:@default=on@:>@])],
1184
1200
    [ac_warn_fail="$enableval"],
1185
 
    [ac_warn_fail="no"])
 
1201
    [ac_warn_fail="yes"])
1186
1202
 
1187
1203
AC_ARG_ENABLE([unreachable],
1188
1204
    [AS_HELP_STRING([--enable-unreachable],
1190
1206
    [ac_warn_unreachable="$enableval"],
1191
1207
    [ac_warn_unreachable="no"])
1192
1208
 
 
1209
AC_ARG_ENABLE([longlong-warnings],
 
1210
    [AS_HELP_STRING([--enable-longlong-warnings],
 
1211
       [Enable warnings about longlong in C++ @<:@default=off@:>@])],
 
1212
    [ac_warn_longlong="$enableval"],
 
1213
    [ac_warn_longlong="no"])
 
1214
 
 
1215
AC_ARG_ENABLE([strict-aliasing],
 
1216
    [AS_HELP_STRING([--enable-strict-aliasing],
 
1217
       [Enable warnings about stict-aliasing @<:@default=off@:>@])],
 
1218
    [ac_warn_strict_aliasing="$enableval"],
 
1219
    [ac_warn_strict_aliasing="no"])
 
1220
 
1193
1221
 
1194
1222
if test "$GCC" = "yes"
1195
1223
then
1196
1224
 
1197
 
  GCC_WARNINGS="-W -Wall -Wextra"
1198
 
  GXX_WARNINGS="${GCC_WARNINGS}"
 
1225
  if test "$ac_warn_longlong" = "yes"
 
1226
  then
 
1227
    W_LONGLONG="-Wlong-long"
 
1228
  else
 
1229
    W_LONGLONG="-Wno-long-long"
 
1230
  fi
1199
1231
 
 
1232
  if test "$ac_warn_strict_aliasing" = "yes"
 
1233
  then
 
1234
    W_STRICT_ALIASING="-Wstrict-aliasing"
 
1235
  else
 
1236
    W_STRICT_ALIASING="-Wno-strict-aliasing"
 
1237
  fi
1200
1238
 
1201
1239
  if test "$ac_warn_pedantic" = "yes"
1202
1240
  then
1203
 
    GCC_WARNINGS="${GCC_WARNINGS}  -std=gnu99 -pedantic -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wno-strict-aliasing "
1204
 
    GXX_WARNINGS="${GXX_WARNINGS}  -std=gnu++98 -pedantic -Wundef -Wredundant-decls -Wno-long-long -Wno-strict-aliasing"
 
1241
    GCC_PEDANTIC="-pedantic -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls ${W_STRICT_ALIASING}"
 
1242
    GXX_PEDANTIC="-pedantic -Wundef -Wredundant-decls ${W_LONGLONG} ${W_STRICT_ALIASING}"
1205
1243
  fi
1206
1244
 
1207
1245
  if test "$ac_warn_unreachable" = "yes"
1208
1246
  then
1209
 
    GCC_WARNINGS="${GCC_WARNINGS} -Wunreachable-code"
1210
 
    GXX_WARNINGS="${GXX_WARNINGS} -Wunreachable-code"
 
1247
    W_UNREACHABLE="-Wunreachable-code"
1211
1248
  fi
1212
1249
 
1213
1250
  if test "$ac_warn_fail" = "yes"
1214
1251
  then
1215
 
    GCC_WARNINGS="${GCC_WARNINGS} -Werror"
1216
 
    GXX_WARNINGS="${GXX_WARNINGS} -Werror"
 
1252
    W_FAIL="-Werror"
1217
1253
  fi
1218
1254
 
1219
 
    CXXFLAGS="$CXXFLAGS ${GXX_WARNINGS}"
1220
 
    CFLAGS="$CFLAGS ${GCC_WARNINGS} "
 
1255
  BASE_WARNINGS="-W -Wall -Wextra"
 
1256
  GCC_WARNINGS="${BASE_WARNINGS} -std=gnu99 ${GCC_PEDANTIC} ${W_UNREACHABLE} ${W_FAIL}"
 
1257
  GXX_WARNINGS="${BASE_WARNINGS} -std=gnu++98 ${GXX_PEDANTIC} ${W_UNREACHABLE} ${W_FAIL}"
 
1258
 
 
1259
  CXXFLAGS="$CXXFLAGS ${GXX_WARNINGS}"
 
1260
  CFLAGS="$CFLAGS ${GCC_WARNINGS} "
1221
1261
fi
1222
1262
 
1223
1263
# Some usefull subst