two new `macros': cvs_def_enabled and cvs_def_disabled. they control the

default enabled/disabled depending on if building from cvs or dist tarbal.
eg:
AC_ARG_ENABLE(typecheck-progs,
    [  --disable-typecheck-progs disable type checking on progs field access])
if test "x$enable_typecheck_progs" $cvs_def_enabled; then
	AC_DEFINE(TYPECHECK_PROGS)
fi

typecheck-progs will default to enabled in cvs, disabled in release. reverse
for cvs_def_disabled.
This commit is contained in:
Bill Currie 2001-08-01 03:44:27 +00:00
parent 513347effd
commit 0342341142

View file

@ -906,6 +906,14 @@ dnl ==================================================================
dnl Misc checks
dnl ==================================================================
if test -d $srcdir/CVS; then
cvs_def_enabled="!= xno"
cvs_def_disabled="= xyes"
else
cvs_def_enabled="= xyes"
cvs_def_disabled="!= xno"
fi
dnl Set $prefix and $exec_prefix to $ac_default_prefix if they are not set
test "x$prefix" = xNONE && prefix=$ac_default_prefix
test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
@ -1008,7 +1016,7 @@ AC_ARG_ENABLE(optimize,
AC_ARG_ENABLE(typecheck-progs,
[ --disable-typecheck-progs disable type checking on progs field access])
if test "x$enable_typecheck_progs" != xno; then
if test "x$enable_typecheck_progs" $cvs_def_enabled; then
AC_DEFINE(TYPECHECK_PROGS)
fi
@ -1130,12 +1138,7 @@ AC_ARG_ENABLE(Werror,
)
dnl We want warnings, lots of warnings...
if test "x$GCC" = "xyes"; then
if test -d $srcdir/CVS; then
tst="!= xno"
else
tst="= xyes"
fi
if test "x$enable_Werror" $tst; then
if test "x$enable_Werror" $cvs_def_enabled; then
CFLAGS="$CFLAGS -Wall -Werror"
else
CFLAGS="$CFLAGS -Wall"