Commit f9d2ec0e authored by Marc G. Fournier's avatar Marc G. Fournier

Have CASSERT enabled/disabled via configure, and passed through config.h

instead of as a -D
parent 5dcc9bef
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
# #
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.20 1997/04/12 10:32:03 scrappy Exp $ # $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.21 1997/04/15 18:35:41 scrappy Exp $
# #
# NOTES # NOTES
# Essentially all Postgres make files include this file and use the # Essentially all Postgres make files include this file and use the
...@@ -137,7 +137,7 @@ OIDNAMELEN= 36 ...@@ -137,7 +137,7 @@ OIDNAMELEN= 36
# Commenting out CASSERT will make things go a LOT faster, but you will # Commenting out CASSERT will make things go a LOT faster, but you will
# also loose a lot of useful error-checking. # also loose a lot of useful error-checking.
CASSERT= true CASSERT= @CASSERT@
# Comment out ENFORCE_ALIGNMENT if you do NOT want unaligned access to # Comment out ENFORCE_ALIGNMENT if you do NOT want unaligned access to
# multi-byte types to generate a bus error. # multi-byte types to generate a bus error.
...@@ -304,10 +304,6 @@ ifdef COPT ...@@ -304,10 +304,6 @@ ifdef COPT
CFLAGS+= $(COPT) CFLAGS+= $(COPT)
endif endif
ifndef CASSERT
CFLAGS+= -DNO_ASSERT_CHECKING
endif
ifdef PROFILE ifdef PROFILE
CFLAGS+= $(PROFILE) CFLAGS+= $(PROFILE)
endif endif
......
This diff is collapsed.
...@@ -234,6 +234,38 @@ else ...@@ -234,6 +234,38 @@ else
fi fi
export NOHBA export NOHBA
dnl Unless we specify the command line options
dnl --disable cassert to explicitly disable it
dnl --enable cassert to explicitly enable it
dnl If you do not explicitly do it, it asks you here.
dnl We need some explanatory text here.
echo ""
if test "$enable_cassert" = "no"
then
echo "ASSERT CHECKING disabled"
AC_DEFINE(NO_ASSERT_CHECKING)
elif test "$enable_cassert" = "yes"
then
echo "ASSERT CHECKING enabled"
else
echo "Disabling ASSERT CHECKING will make things go a LOT faster, but"
echo "you will also loose a lot of useful error-checking"
echo ""
echo "Developers should *always* have this enabled"
$ECHO_N "Enable CASSERT { no }: $ECHO_C"
read a
if test "$a" = "yes"
then
echo "ASSERT CHECKING enabled"
else
echo "ASSERT CHECKING disabled"
AC_DEFINE(NO_ASSERT_CHECKING)
fi
echo "**************************************************************"
fi
echo ""
AC_CONFIG_HEADER(include/config.h) AC_CONFIG_HEADER(include/config.h)
dnl Checks for programs. dnl Checks for programs.
......
...@@ -107,6 +107,9 @@ ...@@ -107,6 +107,9 @@
/* Set to 1 if you want to USE_LOCALE */ /* Set to 1 if you want to USE_LOCALE */
#undef USE_LOCALE #undef USE_LOCALE
/* Set to 1 if you want to Disable ASSERT CHECKING */
#undef NO_ASSERT_CHECKING
/* /*
* Code below this point should not require changes * Code below this point should not require changes
*/ */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment