# HG changeset patch # User Petter Tomner # Date 1677602460 18000 # Node ID f3a6f41314ed12d2a0153b12555f8280d1dcb70d # Parent 359de694adce026dfc5496d61c30ea327a5c087f new configure option, --enable-internal-checks (patch #10226) * configure.ac (--enable-internal-checks): New option. Use it to define a new configure macro, OCTAVE_ENABLE_INTERNAL_CHECKS. * mk-octave-config-h.sh: Copy OCTAVE_ENABLE_INTERNAL_CHECKS definition to public octave-config.h file. diff -r 359de694adce -r f3a6f41314ed build-aux/mk-octave-config-h.sh --- a/build-aux/mk-octave-config-h.sh Tue Feb 28 09:42:20 2023 -0500 +++ b/build-aux/mk-octave-config-h.sh Tue Feb 28 11:41:00 2023 -0500 @@ -105,6 +105,7 @@ $SED -n 's/#\(\(undef\|define\) OCTAVE_ENABLE_64.*$\)/# \1/p' $config_h_file $SED -n 's/#\(\(undef\|define\) OCTAVE_ENABLE_BOUNDS_CHECK.*$\)/# \1/p' $config_h_file $SED -n 's/#\(\(undef\|define\) OCTAVE_ENABLE_FLOAT_TRUNCATE.*$\)/# \1/p' $config_h_file +$SED -n 's/#\(\(undef\|define\) OCTAVE_ENABLE_INTERNAL_CHECKS.*$\)/# \1/p' $config_h_file $SED -n 's/#\(\(undef\|define\) OCTAVE_ENABLE_LIB_VISIBILITY_FLAGS.*$\)/# \1/p' $config_h_file $SED -n 's/#\(\(undef\|define\) OCTAVE_ENABLE_OPENMP.*$\)/# \1/p' $config_h_file $SED -n 's/#\(\(undef\|define\) OCTAVE_F77_INT_TYPE.*$\)/# \1/p' $config_h_file diff -r 359de694adce -r f3a6f41314ed configure.ac --- a/configure.ac Tue Feb 28 09:42:20 2023 -0500 +++ b/configure.ac Tue Feb 28 11:41:00 2023 -0500 @@ -926,6 +926,20 @@ [Define to 1 to truncate intermediate FP results.]) fi +### Enable internal checks + +## The checks slow down the execution and are redundant, +## but useful for debugging or verifying GNU Octave. +ENABLE_INTERNAL_CHECKS=no +AC_ARG_ENABLE([internal-checks], + [AS_HELP_STRING([--enable-internal-checks], + [Enable internal checks that are redundant but useful to debug or verify GNU Octave])], + [if test "$enableval" = yes; then ENABLE_INTERNAL_CHECKS=yes; fi], []) +if test $ENABLE_INTERNAL_CHECKS = yes; then + AC_DEFINE(OCTAVE_ENABLE_INTERNAL_CHECKS, 1, + [Define to 1 to enable internal checks.]) +fi + ### Determine extra CFLAGS, CXXFLAGS that may be necessary for Octave. ## On Intel systems with gcc, we need to compile with -mieee-fp to get full