comparison configure.ac @ 21229:a83e7a384ee0

create and install a subset of config.h in octave-config.h * mk-octave-config-h.sh: New file. * Makefile.am (EXTRA_DIST): Add mk-octave-config.h.sh to the list. (octinclude_HEADERS): Add octave-config.h to the list. (octave-config.h): New rule. * common.mk (do_subst_config_vals, do_subst_cross_config_vals): Don't substitute unused ENABLE options. * configure.ac: Note the reason for using oct-conf-post.in.h. Add OCTAVE_ prefix to ENABLE_BOUNDS_CHECK ENABLE_ATOMIC_REFCOUNT, ENABLE_64, ENABLE_OPENMP, and ENABLE_FLOAT_TRUNCATE in calls to AC_DEFINE. Change all uses. * oct-conf-post.in.h: Define HAVE_OCTAVE_DEPRECATED_ATTR instead of HAVE_ATTR_DEPRECATED. Likewise for HAVE_ATTR_NORETURN and HAVE_ATTR_UNUSED. Change all uses.
author John W. Eaton <jwe@octave.org>
date Mon, 08 Feb 2016 17:30:29 -0500
parents 2cf8bc5c7017
children 933083fee7ae
comparison
equal deleted inserted replaced
21228:77a622392714 21229:a83e7a384ee0
234 AC_ARG_ENABLE([bounds-check], 234 AC_ARG_ENABLE([bounds-check],
235 [AS_HELP_STRING([--enable-bounds-check], 235 [AS_HELP_STRING([--enable-bounds-check],
236 [enable bounds checking for indexing in internal array classes])], 236 [enable bounds checking for indexing in internal array classes])],
237 [if test "$enableval" = yes; then ENABLE_BOUNDS_CHECK=yes; fi], []) 237 [if test "$enableval" = yes; then ENABLE_BOUNDS_CHECK=yes; fi], [])
238 if test $ENABLE_BOUNDS_CHECK = yes; then 238 if test $ENABLE_BOUNDS_CHECK = yes; then
239 AC_DEFINE(ENABLE_BOUNDS_CHECK, 1, [Define to 1 to use internal bounds checking.]) 239 AC_DEFINE(OCTAVE_ENABLE_BOUNDS_CHECK, 1, [Define to 1 to use internal bounds checking.])
240 fi 240 fi
241 241
242 ### Use atomic operations for internal reference counting. This is required 242 ### Use atomic operations for internal reference counting. This is required
243 ### for thread-safe behavior (Qt Handles) but incurs a significant slowdown. 243 ### for thread-safe behavior (Qt Handles) but incurs a significant slowdown.
244 ### Enabled by default until a higher performing solution can be found. 244 ### Enabled by default until a higher performing solution can be found.
247 AC_ARG_ENABLE([atomic-refcount], 247 AC_ARG_ENABLE([atomic-refcount],
248 [AS_HELP_STRING([--disable-atomic-refcount], 248 [AS_HELP_STRING([--disable-atomic-refcount],
249 [Do not use atomic operations for internal reference counting. This option is required for thread-safe behavior as used in the GUI's Qt plotting toolkit. Performance for CLI-only builds is improved by disabling this feature.])], 249 [Do not use atomic operations for internal reference counting. This option is required for thread-safe behavior as used in the GUI's Qt plotting toolkit. Performance for CLI-only builds is improved by disabling this feature.])],
250 [if test "$enableval" = no; then ENABLE_ATOMIC_REFCOUNT=no; fi], []) 250 [if test "$enableval" = no; then ENABLE_ATOMIC_REFCOUNT=no; fi], [])
251 if test $ENABLE_ATOMIC_REFCOUNT = yes; then 251 if test $ENABLE_ATOMIC_REFCOUNT = yes; then
252 AC_DEFINE(ENABLE_ATOMIC_REFCOUNT, 1, 252 AC_DEFINE(OCTAVE_ENABLE_ATOMIC_REFCOUNT, 1,
253 [Define to 1 to use atomic operations for reference counting.]) 253 [Define to 1 to use atomic operations for reference counting.])
254 fi 254 fi
255 255
256 ### Disable running Make in the doc directory. 256 ### Disable running Make in the doc directory.
257 ### This is useful, for example, when building Octave on systems without TeX. 257 ### This is useful, for example, when building Octave on systems without TeX.
288 fi 288 fi
289 AC_SUBST(OCTAVE_IDX_TYPE) 289 AC_SUBST(OCTAVE_IDX_TYPE)
290 AC_DEFINE_UNQUOTED(OCTAVE_IDX_TYPE, [$OCTAVE_IDX_TYPE], 290 AC_DEFINE_UNQUOTED(OCTAVE_IDX_TYPE, [$OCTAVE_IDX_TYPE],
291 [Define to the type of octave_idx_type (64 or 32 bit signed integer).]) 291 [Define to the type of octave_idx_type (64 or 32 bit signed integer).])
292 if test $ENABLE_64 = yes; then 292 if test $ENABLE_64 = yes; then
293 AC_DEFINE(ENABLE_64, 1, 293 AC_DEFINE(OCTAVE_ENABLE_64, 1,
294 [Define to 1 if using 64-bit integers for array dimensions and indexing.]) 294 [Define to 1 if using 64-bit integers for array dimensions and indexing.])
295 fi 295 fi
296 AC_SUBST(ENABLE_64) 296 AC_SUBST(ENABLE_64)
297 297
298 ### It seems that there are some broken inline assembly functions in 298 ### It seems that there are some broken inline assembly functions in
449 AC_LANG_POP(C++) 449 AC_LANG_POP(C++)
450 fi 450 fi
451 dnl Define here since it is skipped if the first argument to 451 dnl Define here since it is skipped if the first argument to
452 dnl AX_OPENMP is not empty. 452 dnl AX_OPENMP is not empty.
453 if test $ENABLE_OPENMP = yes; then 453 if test $ENABLE_OPENMP = yes; then
454 AC_DEFINE(ENABLE_OPENMP, 1, [Define if OpenMP is enabled.]) 454 AC_DEFINE(OCTAVE_ENABLE_OPENMP, 1, [Define if OpenMP is enabled.])
455 fi 455 fi
456 ## Set these for any other tests that may require them. They will be 456 ## Set these for any other tests that may require them. They will be
457 ## reset before output files are generated. 457 ## reset before output files are generated.
458 CFLAGS="$CFLAGS $OPENMP_CFLAGS" 458 CFLAGS="$CFLAGS $OPENMP_CFLAGS"
459 CXXFLAGS="$CXXFLAGS $OPENMP_CXXFLAGS" 459 CXXFLAGS="$CXXFLAGS $OPENMP_CXXFLAGS"
472 AC_ARG_ENABLE([float-truncate], 472 AC_ARG_ENABLE([float-truncate],
473 [AS_HELP_STRING([--disable-float-truncate], 473 [AS_HELP_STRING([--disable-float-truncate],
474 [truncate intermediate FP results])], 474 [truncate intermediate FP results])],
475 [if test "$enableval" = no; then ENABLE_FLOAT_TRUNCATE=no; fi], []) 475 [if test "$enableval" = no; then ENABLE_FLOAT_TRUNCATE=no; fi], [])
476 if test $ENABLE_FLOAT_TRUNCATE = yes; then 476 if test $ENABLE_FLOAT_TRUNCATE = yes; then
477 AC_DEFINE(ENABLE_FLOAT_TRUNCATE, 1, 477 AC_DEFINE(OCTAVE_ENABLE_FLOAT_TRUNCATE, 1,
478 [Define to 1 if you need to truncate intermediate FP results.]) 478 [Define to 1 if you need to truncate intermediate FP results.])
479 fi 479 fi
480 480
481 ### Determine extra CFLAGS that may be necessary for Octave. 481 ### Determine extra CFLAGS that may be necessary for Octave.
482 482
3058 ### Do the substitutions in all the Makefiles. 3058 ### Do the substitutions in all the Makefiles.
3059 3059
3060 AC_SUBST(ac_config_files) 3060 AC_SUBST(ac_config_files)
3061 AC_SUBST(ac_config_headers) 3061 AC_SUBST(ac_config_headers)
3062 3062
3063 dnl We use a .in.h file for oct-conf-post.h simply to copy it to
3064 dnl the build tree and so that we don't have to add the -I$(top_srcdir)
3065 dnl to any CPPFLAGS variables.
3063 AC_CONFIG_FILES([ 3066 AC_CONFIG_FILES([
3064 oct-conf-post.h:oct-conf-post.in.h 3067 oct-conf-post.h:oct-conf-post.in.h
3065 Makefile 3068 Makefile
3066 doc/doxyhtml/Doxyfile 3069 doc/doxyhtml/Doxyfile
3067 libgnu/Makefile 3070 libgnu/Makefile