Have CASSERT enabled/disabled via configure, and passed through config.h
instead of as a -D
This commit is contained in:
parent
5dcc9bef6e
commit
f9d2ec0eba
@ -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
|
|||||||
|
|
||||||
# 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
|
|||||||
CFLAGS+= $(COPT)
|
CFLAGS+= $(COPT)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifndef CASSERT
|
|
||||||
CFLAGS+= -DNO_ASSERT_CHECKING
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifdef PROFILE
|
ifdef PROFILE
|
||||||
CFLAGS+= $(PROFILE)
|
CFLAGS+= $(PROFILE)
|
||||||
endif
|
endif
|
||||||
|
397
src/configure
vendored
397
src/configure
vendored
File diff suppressed because it is too large
Load Diff
@ -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 @@
|
|||||||
/* 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
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user