~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to configure.ac

  • Committer: Monty Taylor
  • Date: 2008-07-15 19:05:24 UTC
  • mfrom: (77.1.109 codestyle)
  • mto: This revision was merged to the branch mainline in revision 176.
  • Revision ID: monty@inaugust.com-20080715190524-nc4uahsj82181zpp
Merged fro mcodestyle.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1187
1187
    [AS_HELP_STRING([--enable-fail],
1188
1188
       [Turn warnings into failures @<:@default=off@:>@])],
1189
1189
    [ac_warn_fail="$enableval"],
1190
 
    [ac_warn_fail="no"])
 
1190
    [ac_warn_fail="yes"])
1191
1191
 
1192
1192
AC_ARG_ENABLE([unreachable],
1193
1193
    [AS_HELP_STRING([--enable-unreachable],
1195
1195
    [ac_warn_unreachable="$enableval"],
1196
1196
    [ac_warn_unreachable="no"])
1197
1197
 
 
1198
AC_ARG_ENABLE([longlong-warnings],
 
1199
    [AS_HELP_STRING([--enable-longlong-warnings],
 
1200
       [Enable warnings about longlong in C++ @<:@default=off@:>@])],
 
1201
    [ac_warn_longlong="$enableval"],
 
1202
    [ac_warn_longlong="no"])
 
1203
 
 
1204
AC_ARG_ENABLE([strict-aliasing],
 
1205
    [AS_HELP_STRING([--enable-strict-aliasing],
 
1206
       [Enable warnings about stict-aliasing @<:@default=off@:>@])],
 
1207
    [ac_warn_strict_aliasing="$enableval"],
 
1208
    [ac_warn_strict_aliasing="no"])
 
1209
 
1198
1210
 
1199
1211
if test "$GCC" = "yes"
1200
1212
then
1201
1213
 
1202
 
  GCC_WARNINGS="-W -Wall -Wextra"
1203
 
  GXX_WARNINGS="${GCC_WARNINGS}"
 
1214
  if test "$ac_warn_longlong" = "yes"
 
1215
  then
 
1216
    W_LONGLONG="-Wlong-long"
 
1217
  else
 
1218
    W_LONGLONG="-Wno-long-long"
 
1219
  fi
1204
1220
 
 
1221
  if test "$ac_warn_strict_aliasing" = "yes"
 
1222
  then
 
1223
    W_STRICT_ALIASING="-Wstrict-aliasing"
 
1224
  else
 
1225
    W_STRICT_ALIASING="-Wno-strict_aliasing"
 
1226
  fi
1205
1227
 
1206
1228
  if test "$ac_warn_pedantic" = "yes"
1207
1229
  then
1208
 
    GCC_WARNINGS="${GCC_WARNINGS}  -std=gnu99 -pedantic -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wno-strict-aliasing "
1209
 
    GXX_WARNINGS="${GXX_WARNINGS}  -std=gnu++98 -pedantic -Wundef -Wredundant-decls -Wno-long-long -Wno-strict-aliasing"
 
1230
    GCC_PEDANTIC="-pedantic -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls ${W_STRICT_ALIASING}"
 
1231
    GXX_PEDANTIC="-pedantic -Wundef -Wredundant-decls ${W_LONGLONG} ${W_STRICT_ALIASING}"
1210
1232
  fi
1211
1233
 
1212
1234
  if test "$ac_warn_unreachable" = "yes"
1213
1235
  then
1214
 
    GCC_WARNINGS="${GCC_WARNINGS} -Wunreachable-code"
1215
 
    GXX_WARNINGS="${GXX_WARNINGS} -Wunreachable-code"
 
1236
    W_UNREACHABLE="-Wunreachable-code"
1216
1237
  fi
1217
1238
 
1218
1239
  if test "$ac_warn_fail" = "yes"
1219
1240
  then
1220
 
    GCC_WARNINGS="${GCC_WARNINGS} -Werror"
1221
 
    GXX_WARNINGS="${GXX_WARNINGS} -Werror"
 
1241
    W_FAIL="-Werror"
1222
1242
  fi
1223
1243
 
1224
 
    CXXFLAGS="$CXXFLAGS ${GXX_WARNINGS}"
1225
 
    CFLAGS="$CFLAGS ${GCC_WARNINGS} "
 
1244
  BASE_WARNINGS="-W -Wall -Wextra"
 
1245
  GCC_WARNINGS="${BASE_WARNINGS} -std=gnu99 ${GCC_PEDANTIC} ${W_UNREACHABLE} ${W_FAIL}"
 
1246
  GXX_WARNINGS="${BASE_WARNINGS} -std=gnu++98 ${GXX_PEDANTIC} ${W_UNREACHABLE} ${W_FAIL}"
 
1247
 
 
1248
  CXXFLAGS="$CXXFLAGS ${GXX_WARNINGS}"
 
1249
  CFLAGS="$CFLAGS ${GCC_WARNINGS} "
1226
1250
fi
1227
1251
 
1228
1252
# Some usefull subst