config/cxxflags.m4
changeset 1433 e0ec5ce0771e
parent 1350 fb794edbf04b
equal deleted inserted replaced
0:ffa0040164b8 1:71c6a88fa3c4
    72 
    72 
    73 dnl Set some debugging and error reporting related compiler flags.
    73 dnl Set some debugging and error reporting related compiler flags.
    74 dnl uses lx_user_cxxflags
    74 dnl uses lx_user_cxxflags
    75 AC_DEFUN([LX_SET_CXXFLAGS],
    75 AC_DEFUN([LX_SET_CXXFLAGS],
    76   [AC_ARG_ENABLE([debug],
    76   [AC_ARG_ENABLE([debug],
    77 AS_HELP_STRING([--enable-debug@<:@=yes|no|full@:>@], [Build with debugging support])
    77 AS_HELP_STRING([--enable-debug@<:@=yes|no|full@:>@], [build with debugging support])
    78 AS_HELP_STRING([--disable-debug], [Build without debugging support @<:@default@:>@]),
    78 AS_HELP_STRING([--disable-debug], [build without debugging support @<:@default@:>@]),
    79      [], [enable_debug=no])
    79      [], [enable_debug=no])
    80    LX_CXX_COMPILER_VENDOR([lx_cxx_compiler_vendor])
    80    LX_CXX_COMPILER_VENDOR([lx_cxx_compiler_vendor])
    81    AC_MSG_CHECKING([whether to build with debugging support])
    81    AC_MSG_CHECKING([whether to build with debugging support])
    82    if test x"$enable_debug" != x"no"; then
    82    if test x"$enable_debug" != x"no"; then
    83      AC_DEFINE([DEBUG], [1], [Define for debugging support])
    83      AC_DEFINE([DEBUG], [1], [Define for debugging support])
   104    else
   104    else
   105      AC_MSG_RESULT([no])
   105      AC_MSG_RESULT([no])
   106    fi
   106    fi
   107 
   107 
   108    AC_ARG_ENABLE([extra-warnings],
   108    AC_ARG_ENABLE([extra-warnings],
   109 AS_HELP_STRING([--enable-extra-warnings], [Enable extra warning messages])
   109 AS_HELP_STRING([--enable-extra-warnings], [enable extra warning messages])
   110 AS_HELP_STRING([--disable-extra-warnings], [Disable extra warning messages @<:@default@:>@]),
   110 AS_HELP_STRING([--disable-extra-warnings], [disable extra warning messages @<:@default@:>@]),
   111      [],[enable_extra_warnings=no])
   111      [],[enable_extra_warnings=no])
   112    AC_MSG_CHECKING(whether to enable extra warning flags)
   112    AC_MSG_CHECKING(whether to enable extra warning flags)
   113    if test x"$enable_extra_warnings" != x"no"; then
   113    if test x"$enable_extra_warnings" != x"no"; then
   114      if test x"$lx_cxx_compiler_vendor" = x"gnu"; then
   114      if test x"$lx_cxx_compiler_vendor" = x"gnu"; then
   115        CXXFLAGS="$CXXFLAGS -ansi -pedantic -Wall -Wextra"
   115        CXXFLAGS="$CXXFLAGS -ansi -pedantic -Wall -Wextra"