Changeset 1514 for trunk/configure.ac
- Timestamp:
- Sep 23, 2012, 10:30:43 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/configure.ac
r1495 r1514 65 65 AC_SUBST(DISTCHECK_CONFIGURE_FLAGS) 66 66 67 # Let user overide default CXXFLAGS 68 if test "${CXXFLAGS+set}" != set; then 69 CXXFLAGS="" # Setting CXXFLAGS here to prevent expansion in AC_PROG_CXX 70 fi 67 # record if CXXFLAGS was set by user for further use below 68 AS_IF([test "${CXXFLAGS+set}" = set], [ 69 CXXFLAGS_set_by_user=yes 70 ],[ 71 CXXFLAGS_set_by_user=no 72 # set CXXFLAGS to avoid expansion in AC_PROG_CXX 73 CXXFLAGS= 74 ]) 71 75 72 76 # Checks for programs. … … 95 99 96 100 AC_ARG_ENABLE([debug], 97 [AS_HELP_STRING([--enable-debug],[turn on debug options and code])]) 98 99 # -Wno-long-long is needed to suppress compiler diagnostics regarding 100 # using extension beyond the C++ standard (usage of non C++ standard 101 # 'long long' types). 102 AS_IF([test x$enable_debug = xyes], 103 [YAT_CXX_ADD_FLAG([CXXFLAGS],[-pedantic -Wall -Wno-long-long -g -O])], 104 [YAT_CPP_ADD_FLAG([CPPFLAGS],[-DNDEBUG]) 105 YAT_CXX_ADD_FLAG([CXXFLAGS],[-O3])]) 101 [AS_HELP_STRING([--enable-debug],[turn on debug options and code])], 102 [], [enable_debug=no]) 103 104 # Set CXXFLAGS depending on whether CXXFLAGS was provided by user and 105 # whether we are in debug mode 106 AS_IF([test x$enable_debug = xyes], [ 107 # in debug we alsways add flags below i.e. we turn on warnings, 108 # debug symbols, and low level of optimisation. 109 110 # -Wno-long-long is needed to suppress compiler diagnostics regarding 111 # using extension beyond the C++ standard (usage of non C++ standard 112 # 'long long' types). 113 YAT_CXX_ADD_FLAG([CXXFLAGS],[-pedantic -Wall -Wno-long-long -g -O]) 114 ],[ 115 # in standard mode we set to CXXFLAGS default to '-O3', but only if 116 # CXXFLAGS was not proved by user. If user provided a VALUE FOR 117 # CXXFLAGS we listen to that and leave as is. 118 AS_IF([test x$CXXFLAGS_set_by_user != xyes], [ 119 YAT_CXX_ADD_FLAG([CXXFLAGS],[-O3]) 120 ]) 121 ]) 122 123 AC_ARG_ENABLE([assert], 124 [AS_HELP_STRING([--enable-assert], [turn on assertions])]) 125 126 # if assert not enabled/disabled explicitly, default behaviour is to 127 # enable assert in debug mode and disable otherwise 128 test "${enable_assert+set}" = set || enable_assert=$enable_debug 129 130 # FIXME perhaps we should AC_DEFINE NDEBUG instead but then we need to 131 # include config.h in all source files. 132 # 133 # propagate enable_assert to CPPFLAGS 134 AS_IF([test x$enable_assert != xyes],[YAT_CPP_ADD_FLAG([CPPFLAGS],[-DNDEBUG])]) 106 135 107 136 AC_MSG_CHECKING([g++ deprecation attribute])
Note: See TracChangeset
for help on using the changeset viewer.