+2010-07-18 Juanma Barranquero <lekktu@gmail.com>
+
+ * configure.bat: New option --enable-checking.
+ * gmake.defs, nmake.defs (CHECKING_CFLAGS): New define.
+ (CFLAGS): Include it.
+
2010-07-12 Dan Nicolaescu <dann@ics.uci.edu>
* config.nt (volatile): Remove definition.
set prefix=\r
set nodebug=N\r
set noopt=N\r
+set enablechecking=N\r
set profile=N\r
set nocygwin=N\r
set COMPILER=\r
if "%1" == "--with-msvc" goto withmsvc\r
if "%1" == "--no-debug" goto nodebug\r
if "%1" == "--no-opt" goto noopt\r
+if "%1" == "--enable-checking" goto enablechecking\r
if "%1" == "--profile" goto profile\r
if "%1" == "--no-cygwin" goto nocygwin\r
if "%1" == "--cflags" goto usercflags\r
echo. --with-msvc use MSVC to compile Emacs\r
echo. --no-debug exclude debug info from executables\r
echo. --no-opt disable optimization\r
+echo. --enable-checking enable checks and assertions\r
echo. --profile enable profiling\r
echo. --no-cygwin use -mno-cygwin option with GCC\r
echo. --cflags FLAG pass FLAG to compiler\r
shift\r
goto again\r
rem ----------------------------------------------------------------------\r
+:enablechecking\r
+set enablechecking=Y\r
+shift\r
+goto again\r
+rem ----------------------------------------------------------------------\r
:profile\r
set profile=Y\r
shift\r
if not "(%dbginfo%)" == "()" echo DEBUG_INFO=%dbginfo%>>config.settings\r
if (%nodebug%) == (Y) echo NODEBUG=1 >>config.settings\r
if (%noopt%) == (Y) echo NOOPT=1 >>config.settings\r
+if (%enablechecking%) == (Y) echo ENABLECHECKS=1 >>config.settings\r
if (%profile%) == (Y) echo PROFILE=1 >>config.settings\r
if (%nocygwin%) == (Y) echo NOCYGWIN=1 >>config.settings\r
if not "(%prefix%)" == "()" echo INSTALL_DIR=%prefix%>>config.settings\r
set prefix=\r
set nodebug=\r
set noopt=\r
+set enablechecking=\r
set profile=\r
set nocygwin=\r
set COMPILER=\r
else
DEBUG_CFLAGS =
endif
-CFLAGS = -I. $(ARCH_CFLAGS) $(DEBUG_CFLAGS) $(PROFILE_CFLAGS) $(USER_CFLAGS) $(LOCAL_FLAGS)
+
+ifdef ENABLECHECKS
+CHECKING_CFLAGS = -DENABLE_CHECKING -DXASSERTS
+else
+CHECKING_CFLAGS =
+endif
+
+CFLAGS = -I. $(ARCH_CFLAGS) $(DEBUG_CFLAGS) $(CHECKING_CFLAGS) $(PROFILE_CFLAGS) $(USER_CFLAGS) $(LOCAL_FLAGS)
EMACS_EXTRA_C_FLAGS = -DUSE_CRT_DLL=1
ifdef PROFILE
!else\r
DEBUG_CFLAGS =\r
!endif\r
+\r
+!ifdef ENABLECHECKS\r
+CHECKING_CFLAGS = -DENABLE_CHECKING -DXASSERTS\r
+!else\r
+CHECKING_CFLAGS =\r
+!endif\r
+\r
CFLAGS = -I. $(ARCH_CFLAGS) \\r
- $(DEBUG_CFLAGS) $(USER_CFLAGS) $(LOCAL_FLAGS)\r
+ $(DEBUG_CFLAGS) $(CHECKING_CFLAGS) $(USER_CFLAGS) $(LOCAL_FLAGS)\r
EMACS_EXTRA_C_FLAGS =\r
\r
SYS_LDFLAGS = -nologo -release -incremental:no -version:3.10 -swaprun:cd -swaprun:net setargv.obj\r