From: Karsten Ballüder Date: Mon, 13 Jul 1998 12:45:47 +0000 (+0000) Subject: Configure now adds -D__WXDEBUG__ to the compiler switches if run with X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/4acbf24597fb8244a519651694e8510dc3f3234c Configure now adds -D__WXDEBUG__ to the compiler switches if run with --with-debug_flag. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@255 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/install/gtk/configure b/install/gtk/configure index 1a68a3f106..e1ba36ebdd 100755 --- a/install/gtk/configure +++ b/install/gtk/configure @@ -20,7 +20,7 @@ ac_help="$ac_help ac_help="$ac_help **--with-optimise create optimised code" ac_help="$ac_help -**--with-debug_flag create code with DEBUG define set to 1" +**--with-debug_flag create code with WXDEBUG define set to 1" ac_help="$ac_help **--with-debug_info create code with debuging information included" ac_help="$ac_help @@ -5663,6 +5663,12 @@ if test "$USE_DEBUG_FLAG" = 1 ; then #define WXDEBUG $USE_DEBUG_FLAG EOF + cat >> confdefs.h <&6 -echo "configure:6016: checking for $ac_word" >&5 +echo "configure:6022: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6043,7 +6049,7 @@ fi min_gtk_version=0.99.7 echo $ac_n "checking for GTK - version >= $min_gtk_version""... $ac_c" 1>&6 -echo "configure:6047: checking for GTK - version >= $min_gtk_version" >&5 +echo "configure:6053: checking for GTK - version >= $min_gtk_version" >&5 no_gtk="" if test "$GTK_CONFIG" != "no" ; then GTK_CFLAGS=`$GTK_CONFIG --cflags` @@ -6056,7 +6062,7 @@ echo "configure:6047: checking for GTK - version >= $min_gtk_version" >&5 echo $ac_n "cross compiling; assumed OK... $ac_c" else cat > conftest.$ac_ext < @@ -6078,7 +6084,7 @@ main () } EOF -if { (eval echo configure:6082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:6088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then : else @@ -6129,7 +6135,7 @@ OPENGL_LINK= if test "$USE_OPENGL" = 1; then echo $ac_n "checking for OpenGL includes""... $ac_c" 1>&6 -echo "configure:6133: checking for OpenGL includes" >&5 +echo "configure:6139: checking for OpenGL includes" >&5 ac_find_includes= for ac_dir in $SEARCH_INCLUDE; @@ -6144,7 +6150,7 @@ for ac_dir in $SEARCH_INCLUDE; OPENGL_INCLUDE="-I$ac_find_includes" echo "$ac_t""found $ac_find_includes" 1>&6 echo $ac_n "checking for OpenGL library""... $ac_c" 1>&6 -echo "configure:6148: checking for OpenGL library" >&5 +echo "configure:6154: checking for OpenGL library" >&5 ac_find_libraries= for ac_dir in $SEARCH_LIB; @@ -6571,6 +6577,7 @@ s%@host_cpu@%$host_cpu%g s%@host_vendor@%$host_vendor%g s%@host_os@%$host_os%g s%@WXDEBUG@%$WXDEBUG%g +s%@WXDEBUG_DEFINE@%$WXDEBUG_DEFINE%g s%@PROFILE@%$PROFILE%g s%@OPTIMISE@%$OPTIMISE%g s%@RPC@%$RPC%g diff --git a/install/gtk/configure.in b/install/gtk/configure.in index 05b71a014a..21a7cbc971 100644 --- a/install/gtk/configure.in +++ b/install/gtk/configure.in @@ -745,7 +745,7 @@ AC_OVERRIDES(optimise,optimise, USE_OPTIMISE) AC_OVERRIDES(debug_flag,debug_flag, -**--with-debug_flag create code with DEBUG define set to 1, +**--with-debug_flag create code with WXDEBUG define set to 1, USE_DEBUG_FLAG) AC_OVERRIDES(debug_info,debug_info, @@ -947,6 +947,9 @@ AC_SUBST(WXDEBUG) if test "$USE_DEBUG_FLAG" = 1 ; then AC_DEFINE_UNQUOTED(WXDEBUG,$USE_DEBUG_FLAG) + AC_DEFINE_UNQUOTED(__WXDEBUG__,$USE_DEBUG_FLAG) + WXDEBUG_DEFINE="-D__WXDEBUG__" + AC_SUBST(WXDEBUG_DEFINE) fi if test "$USE_MEM_TRACING" = 1 ; then diff --git a/src/gtk/setup/maketmpl.in b/src/gtk/setup/maketmpl.in index 9580d21943..8c5244d63f 100644 --- a/src/gtk/setup/maketmpl.in +++ b/src/gtk/setup/maketmpl.in @@ -27,7 +27,7 @@ TOOLKIT_DEF = -D@TOOLKIT_DEF@ # general compiler stuff OPTIMISE = @OPTIMISE@ PROFILE = @PROFILE@ -DEBUG = @WXDEBUG@ +DEBUG = @WXDEBUG@ @WXDEBUG_DEFINE@ # c-compiler stuff CC = @CC@ diff --git a/src/gtk/setup/setup.hin b/src/gtk/setup/setup.hin index 95fef3444b..1579f25a23 100644 --- a/src/gtk/setup/setup.hin +++ b/src/gtk/setup/setup.hin @@ -191,9 +191,13 @@ some new features such as event tables */ #define WXWIN_COMPATIBILITY 1 /* - * Enables debugging: memory tracing, assert, etc. + * Enables debugging: memory tracing, assert, etc., contains debug level */ #undef WXDEBUG +/* + * Enables debugging: memory tracing, assert, etc., undefined if no debugging + */ +#undef __WXDEBUG__ /* * Enables debugging version of wxObject::new and wxObject::delete (IF WXDEBUG) * WARNING: this code may not work with all architectures, especially diff --git a/src/gtk/setup/substit.in b/src/gtk/setup/substit.in index 9fff70df91..127ccdd019 100644 --- a/src/gtk/setup/substit.in +++ b/src/gtk/setup/substit.in @@ -2,6 +2,8 @@ s|*OS*|@OS@|g s|*WXBASEDIR*|@WXBASEDIR@|g s|*PROFILE*|@PROFILE@|g s|*WXDEBUG*|@WXDEBUG@|g +s|*WXDEBUG_DEFINE*|@WXDEBUG_DEFINE@|g +s|*__WXDEBUG__*|@WXDEBUG@|g s|*OPTIMISE*|@OPTIMISE@|g s|*CC*|@CC@|g s|*CFLAGS*|@CFLAGS@|g diff --git a/src/gtk1/setup/maketmpl.in b/src/gtk1/setup/maketmpl.in index 9580d21943..8c5244d63f 100644 --- a/src/gtk1/setup/maketmpl.in +++ b/src/gtk1/setup/maketmpl.in @@ -27,7 +27,7 @@ TOOLKIT_DEF = -D@TOOLKIT_DEF@ # general compiler stuff OPTIMISE = @OPTIMISE@ PROFILE = @PROFILE@ -DEBUG = @WXDEBUG@ +DEBUG = @WXDEBUG@ @WXDEBUG_DEFINE@ # c-compiler stuff CC = @CC@ diff --git a/src/gtk1/setup/setup.hin b/src/gtk1/setup/setup.hin index 95fef3444b..1579f25a23 100644 --- a/src/gtk1/setup/setup.hin +++ b/src/gtk1/setup/setup.hin @@ -191,9 +191,13 @@ some new features such as event tables */ #define WXWIN_COMPATIBILITY 1 /* - * Enables debugging: memory tracing, assert, etc. + * Enables debugging: memory tracing, assert, etc., contains debug level */ #undef WXDEBUG +/* + * Enables debugging: memory tracing, assert, etc., undefined if no debugging + */ +#undef __WXDEBUG__ /* * Enables debugging version of wxObject::new and wxObject::delete (IF WXDEBUG) * WARNING: this code may not work with all architectures, especially diff --git a/src/gtk1/setup/substit.in b/src/gtk1/setup/substit.in index 9fff70df91..127ccdd019 100644 --- a/src/gtk1/setup/substit.in +++ b/src/gtk1/setup/substit.in @@ -2,6 +2,8 @@ s|*OS*|@OS@|g s|*WXBASEDIR*|@WXBASEDIR@|g s|*PROFILE*|@PROFILE@|g s|*WXDEBUG*|@WXDEBUG@|g +s|*WXDEBUG_DEFINE*|@WXDEBUG_DEFINE@|g +s|*__WXDEBUG__*|@WXDEBUG@|g s|*OPTIMISE*|@OPTIMISE@|g s|*CC*|@CC@|g s|*CFLAGS*|@CFLAGS@|g