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:
parent
218ae522c6
commit
ba4d058ba7
1
.gitignore
vendored
1
.gitignore
vendored
@ -12,6 +12,7 @@ config*
|
||||
*Release/
|
||||
*.ncb
|
||||
*.suo
|
||||
build-aux/
|
||||
stamp-h
|
||||
libtool.m4
|
||||
aclocal.m4
|
||||
|
@ -58,6 +58,7 @@
|
||||
# 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([-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
|
||||
|
||||
@ -85,13 +86,11 @@
|
||||
AC_LANG_PUSH([C])
|
||||
CFLAGS=
|
||||
|
||||
AX_APPEND_COMPILE_FLAGS([-g])
|
||||
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([-O0],,[$ax_append_compile_flags_extra])
|
||||
],[
|
||||
AX_APPEND_COMPILE_FLAGS([-O2],,[$ax_append_compile_flags_extra])
|
||||
])
|
||||
],[])
|
||||
|
||||
ac_cv_warnings_as_errors=no
|
||||
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([-Wredundant-decls],,[$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([-Wstrict-overflow=1],,[$ax_append_compile_flags_extra])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wstrict-prototypes],,[$ax_append_compile_flags_extra])
|
||||
@ -149,12 +147,11 @@
|
||||
AC_LANG_PUSH([C++])
|
||||
CXXFLAGS=
|
||||
|
||||
AX_APPEND_COMPILE_FLAGS([-g],,[$ax_append_compile_flags_extra])
|
||||
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([-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])
|
||||
])
|
||||
|
||||
@ -188,7 +185,6 @@
|
||||
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([-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([-Wstrict-overflow=1],,[$ax_append_compile_flags_extra])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wswitch-enum],,[$ax_append_compile_flags_extra])
|
||||
|
18
m4/debug.m4
18
m4/debug.m4
@ -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.])
|
||||
])
|
||||
])
|
Loading…
Reference in New Issue
Block a user