commit Brian Aker configure stuff plus remove old debug.m4 and switch -g to only debug and turn off -O2 without since we use -Os and -O3 instead

This commit is contained in:
toddouska 2012-10-19 11:44:16 -07:00
parent 218ae522c6
commit ba4d058ba7
3 changed files with 5 additions and 26 deletions

1
.gitignore vendored
View File

@ -12,6 +12,7 @@ config*
*Release/ *Release/
*.ncb *.ncb
*.suo *.suo
build-aux/
stamp-h stamp-h
libtool.m4 libtool.m4
aclocal.m4 aclocal.m4

View File

@ -58,6 +58,7 @@
# AX_APPEND_COMPILE_FLAGS([-Wold-style-definition],,[$ax_append_compile_flags_extra]) # AX_APPEND_COMPILE_FLAGS([-Wold-style-definition],,[$ax_append_compile_flags_extra])
# AX_APPEND_COMPILE_FLAGS([-std=c99],,[$ax_append_compile_flags_extra]) # AX_APPEND_COMPILE_FLAGS([-std=c99],,[$ax_append_compile_flags_extra])
# AX_APPEND_COMPILE_FLAGS([-Wlogical-op],,[$ax_append_compile_flags_extra]) # AX_APPEND_COMPILE_FLAGS([-Wlogical-op],,[$ax_append_compile_flags_extra])
# AX_APPEND_COMPILE_FLAGS([-Wshorten-64-to-32],,[$ax_append_compile_flags_extra]) -- Fix these TAO, put back after -Wshadow when done
#serial 3 #serial 3
@ -85,13 +86,11 @@
AC_LANG_PUSH([C]) AC_LANG_PUSH([C])
CFLAGS= CFLAGS=
AX_APPEND_COMPILE_FLAGS([-g])
AS_IF([test "$ax_enable_debug" = "yes"], [ AS_IF([test "$ax_enable_debug" = "yes"], [
AX_APPEND_COMPILE_FLAGS([-g])
AX_APPEND_COMPILE_FLAGS([-ggdb],,[$ax_append_compile_flags_extra]) AX_APPEND_COMPILE_FLAGS([-ggdb],,[$ax_append_compile_flags_extra])
AX_APPEND_COMPILE_FLAGS([-O0],,[$ax_append_compile_flags_extra]) AX_APPEND_COMPILE_FLAGS([-O0],,[$ax_append_compile_flags_extra])
],[ ],[])
AX_APPEND_COMPILE_FLAGS([-O2],,[$ax_append_compile_flags_extra])
])
ac_cv_warnings_as_errors=no ac_cv_warnings_as_errors=no
AS_IF([test "$ac_cv_vcs_checkout" = "yes"], [ AS_IF([test "$ac_cv_vcs_checkout" = "yes"], [
@ -129,7 +128,6 @@
AX_APPEND_COMPILE_FLAGS([-Wpointer-sign],,[$ax_append_compile_flags_extra]) AX_APPEND_COMPILE_FLAGS([-Wpointer-sign],,[$ax_append_compile_flags_extra])
AX_APPEND_COMPILE_FLAGS([-Wredundant-decls],,[$ax_append_compile_flags_extra]) AX_APPEND_COMPILE_FLAGS([-Wredundant-decls],,[$ax_append_compile_flags_extra])
AX_APPEND_COMPILE_FLAGS([-Wshadow],,[$ax_append_compile_flags_extra]) AX_APPEND_COMPILE_FLAGS([-Wshadow],,[$ax_append_compile_flags_extra])
AX_APPEND_COMPILE_FLAGS([-Wshorten-64-to-32],,[$ax_append_compile_flags_extra])
AX_APPEND_COMPILE_FLAGS([-Wsign-compare],,[$ax_append_compile_flags_extra]) AX_APPEND_COMPILE_FLAGS([-Wsign-compare],,[$ax_append_compile_flags_extra])
AX_APPEND_COMPILE_FLAGS([-Wstrict-overflow=1],,[$ax_append_compile_flags_extra]) AX_APPEND_COMPILE_FLAGS([-Wstrict-overflow=1],,[$ax_append_compile_flags_extra])
AX_APPEND_COMPILE_FLAGS([-Wstrict-prototypes],,[$ax_append_compile_flags_extra]) AX_APPEND_COMPILE_FLAGS([-Wstrict-prototypes],,[$ax_append_compile_flags_extra])
@ -149,12 +147,11 @@
AC_LANG_PUSH([C++]) AC_LANG_PUSH([C++])
CXXFLAGS= CXXFLAGS=
AX_APPEND_COMPILE_FLAGS([-g],,[$ax_append_compile_flags_extra])
AS_IF([test "$ax_enable_debug" = "yes" ], [ AS_IF([test "$ax_enable_debug" = "yes" ], [
AX_APPEND_COMPILE_FLAGS([-g],,[$ax_append_compile_flags_extra])
AX_APPEND_COMPILE_FLAGS([-O0],,[$ax_append_compile_flags_extra]) AX_APPEND_COMPILE_FLAGS([-O0],,[$ax_append_compile_flags_extra])
AX_APPEND_COMPILE_FLAGS([-ggdb],,[$ax_append_compile_flags_extra]) AX_APPEND_COMPILE_FLAGS([-ggdb],,[$ax_append_compile_flags_extra])
],[ ],[
AX_APPEND_COMPILE_FLAGS([-O2],,[$ax_append_compile_flags_extra])
AX_APPEND_COMPILE_FLAGS([-D_FORTIFY_SOURCE=2],,[$ax_append_compile_flags_extra]) AX_APPEND_COMPILE_FLAGS([-D_FORTIFY_SOURCE=2],,[$ax_append_compile_flags_extra])
]) ])
@ -188,7 +185,6 @@
AX_APPEND_COMPILE_FLAGS([-Wpointer-arith],,[$ax_append_compile_flags_extra]) AX_APPEND_COMPILE_FLAGS([-Wpointer-arith],,[$ax_append_compile_flags_extra])
AX_APPEND_COMPILE_FLAGS([-Wredundant-decls],,[$ax_append_compile_flags_extra]) AX_APPEND_COMPILE_FLAGS([-Wredundant-decls],,[$ax_append_compile_flags_extra])
AX_APPEND_COMPILE_FLAGS([-Wshadow],,[$ax_append_compile_flags_extra]) AX_APPEND_COMPILE_FLAGS([-Wshadow],,[$ax_append_compile_flags_extra])
AX_APPEND_COMPILE_FLAGS([-Wshorten-64-to-32],,[$ax_append_compile_flags_extra])
AX_APPEND_COMPILE_FLAGS([-Wsign-compare],,[$ax_append_compile_flags_extra]) AX_APPEND_COMPILE_FLAGS([-Wsign-compare],,[$ax_append_compile_flags_extra])
AX_APPEND_COMPILE_FLAGS([-Wstrict-overflow=1],,[$ax_append_compile_flags_extra]) AX_APPEND_COMPILE_FLAGS([-Wstrict-overflow=1],,[$ax_append_compile_flags_extra])
AX_APPEND_COMPILE_FLAGS([-Wswitch-enum],,[$ax_append_compile_flags_extra]) AX_APPEND_COMPILE_FLAGS([-Wswitch-enum],,[$ax_append_compile_flags_extra])

View File

@ -1,18 +0,0 @@
AC_DEFUN([AX_DEBUG],[
AC_ARG_WITH([debug],
[AS_HELP_STRING([--with-debug],
[Add debug code/turns off optimizations (yes|no) @<:@default=no@:>@])],
[ax_with_debug=$withval],
[ax_with_debug=no])
AS_IF([test "$ax_with_debug" = "yes"],[
# Debugging. No optimization.
AM_CFLAGS="${AM_CFLAGS} ${DEBUG_CFLAGS} -DDEBUG"
AM_CXXFLAGS="${AM_CXXFLAGS} ${DEBUG_CXXFLAGS} -DDEBUG"
AC_DEFINE(DEBUG, [ 1 ], [Define to 1 to enable debugging code.])
],[
# Optimized version. No debug
AM_CFLAGS="${AM_CFLAGS} ${OPTIMIZE_CFLAGS}"
AM_CXXFLAGS="${AM_CXXFLAGS} ${OPTIMIZE_CXXFLAGS}"
AC_DEFINE(DEBUG, [ 0 ], [Define to 1 to enable debugging code.])
])
])