~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to configure.ac

  • Committer: Brian Aker
  • Date: 2008-07-04 17:39:41 UTC
  • mfrom: (53.2.3 codestyle2)
  • Revision ID: brian@tangent.org-20080704173941-z0s9jhsl26i3ax1w
Merge from incomming patch from Monty covering warnings

Show diffs side-by-side

added added

removed removed

Lines of Context:
200
200
 
201
201
AC_SUBST(NM)dnl
202
202
 
203
 
# NM= "$NM -X64"
204
 
#archive_expsym_cmds= `echo "$archive_expsym_cmds" | sed -e '/"$(CC)"//'`
205
 
#archive_expsym_cmds= "$CC -q64 $archive_expsym_cmds"
206
 
#  CXXFLAGS=`echo "$CXXFLAGS -Werror" | sed -e 's/-fbranch-probabilities//; s/-Wall//; s/-ansi//; s/-pedantic//; s/-Wcheck//'`
207
 
 
208
 
#AC_LIBTOOL_DLOPEN AC_LIBTOOL_WIN32_DLL AC_DISABLE_FAST_INSTALL AC_DISABLE_SHARED AC_DISABLE_STATIC
209
 
 
210
 
# AC_PROG_INSTALL
211
203
AC_PROG_INSTALL
212
204
test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
213
205
 
260
252
AC_SUBST(LD)
261
253
AC_SUBST(INSTALL_SCRIPT)
262
254
 
 
255
 
263
256
export CC CXX CFLAGS LD LDFLAGS AR ARFLAGS
264
257
 
265
258
if test "$GCC" = "yes"
270
263
  # We should use -Wno-invalid-offsetof flag to disable some warnings from gcc
271
264
  # regarding offset() usage in C++ which are done in a safe manner in the
272
265
  # server
273
 
  CXXFLAGS="$CXXFLAGS -Wall -fno-implicit-templates -fno-exceptions -fno-rtti"
274
 
  CFLAGS="$CFLAGS -Wall"
 
266
  CXXFLAGS="$CXXFLAGS ${GCC_WARNINGS} -fno-implicit-templates -fno-exceptions -fno-rtti"
 
267
  CFLAGS="$CFLAGS ${GCC_WARNINGS} "
275
268
  AC_DEFINE([HAVE_EXPLICIT_TEMPLATE_INSTANTIATION],
276
269
    [1], [Defined by configure. Use explicit template instantiation.])
277
270
fi
580
573
AC_HEADER_DIRENT
581
574
AC_HEADER_STDC
582
575
AC_HEADER_SYS_WAIT
 
576
AC_HEADER_STDBOOL
583
577
AC_CHECK_HEADERS(fcntl.h float.h floatingpoint.h fpu_control.h ieeefp.h \
584
578
 limits.h memory.h pwd.h select.h \
585
 
 stdlib.h stddef.h sys/fpu.h \
 
579
 stdlib.h stddef.h stdint.h sys/fpu.h \
586
580
 strings.h string.h synch.h sys/mman.h sys/socket.h netinet/in.h arpa/inet.h \
587
581
 sys/timeb.h sys/types.h sys/un.h sys/vadvise.h sys/wait.h term.h \
588
582
 unistd.h utime.h sys/utime.h termio.h termios.h sched.h crypt.h alloca.h \
1177
1171
AC_SUBST(mysql_plugin_libs)
1178
1172
AC_SUBST(mysql_plugin_defs)
1179
1173
 
 
1174
AC_ARG_ENABLE([pedantic-warnings],
 
1175
    [AS_HELP_STRING([--disable-pedantic-warnings],
 
1176
       [Toggle pedanticness @<:@default=on@:>@])],
 
1177
    [ac_warn_pedantic="$enableval"],
 
1178
    [ac_warn_pedantic="yes"])
 
1179
 
 
1180
AC_ARG_ENABLE([fail],
 
1181
    [AS_HELP_STRING([--enable-fail],
 
1182
       [Turn warnings into failures @<:@default=off@:>@])],
 
1183
    [ac_warn_fail="$enableval"],
 
1184
    [ac_warn_fail="no"])
 
1185
 
 
1186
 
 
1187
if test "$GCC" = "yes"
 
1188
then
 
1189
 
 
1190
  GCC_WARNINGS="-W -Wall"
 
1191
  GXX_WARNINGS="${GCC_WARNINGS}"
 
1192
 
 
1193
 
 
1194
  if test "$ac_warn_pedantic" = "yes"
 
1195
  then
 
1196
    GCC_WARNINGS="${GCC_WARNINGS}  -std=gnu99 -pedantic -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wunreachable-code"
 
1197
    GXX_WARNINGS="${GXX_WARNINGS}  -std=gnu++98 -pedantic -Wundef -Wredundant-decls -Wunreachable-code"
 
1198
  fi
 
1199
 
 
1200
  if test "$ac_warn_fail" = "yes"
 
1201
  then
 
1202
    GCC_WARNINGS="${GCC_WARNINGS} -Werror"
 
1203
    GXX_WARNINGS="${GXX_WARNINGS} -Werror"
 
1204
  fi
 
1205
 
 
1206
    CXXFLAGS="$CXXFLAGS ${GXX_WARNINGS}"
 
1207
    CFLAGS="$CFLAGS ${GCC_WARNINGS} "
 
1208
fi
 
1209
 
1180
1210
# Some usefull subst
1181
1211
AC_SUBST(CC)
1182
1212
AC_SUBST(GXX)