Mercurial > octave
changeset 31865:f3a6f41314ed
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.
author | Petter Tomner <tomner@kth.se> |
---|---|
date | Tue, 28 Feb 2023 11:41:00 -0500 |
parents | 359de694adce |
children | 3722c5b1a8c8 |
files | build-aux/mk-octave-config-h.sh configure.ac |
diffstat | 2 files changed, 15 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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
--- 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