changeset 30513:772e8f8e9054

maint: merge stable to default.
author Markus Mützel <markus.muetzel@gmx.de>
date Sun, 19 Dec 2021 19:23:48 +0100
parents 1ec1f93ac16a (current diff) 9b41aba64c12 (diff)
children b65d423b12a6
files configure.ac
diffstat 1 files changed, 13 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/configure.ac	Sun Dec 19 14:36:51 2021 +0100
+++ b/configure.ac	Sun Dec 19 19:23:48 2021 +0100
@@ -400,7 +400,19 @@
   OCTAVE_CONFIGURE_WARNING([warn_stl_algo_h])
 fi
 
-OCTAVE_CHECK_STD_PMR_POLYMORPHIC_ALLOCATOR
+ENABLE_STD_PMR_POLYMORPHIC_ALLOCATOR=no
+AC_ARG_ENABLE(std-pmr-polymorphic-allocator,
+  [AS_HELP_STRING([--enable-std-pmr-polymorphic-allocator],
+    [build libraries requiring std::pmr::polymorphic_allocator if possible. This allows more efficient transfer of arrays at the .mex file interface. That also means that all libraries including Octave headers (e.g., .oct files) must be able to compile with that C++17 feature.])],
+  [case $enableval in
+     yes) ENABLE_STD_PMR_POLYMORPHIC_ALLOCATOR=yes ;;
+     no) ENABLE_STD_PMR_POLYMORPHIC_ALLOCATOR=no ;;
+     *) AC_MSG_ERROR([bad value $enableval for --enable-std-pmr-polymorphic-allocator]) ;;
+   esac])
+
+if test $ENABLE_STD_PMR_POLYMORPHIC_ALLOCATOR = yes; then
+  OCTAVE_CHECK_STD_PMR_POLYMORPHIC_ALLOCATOR
+fi
 
 ### Check version number when using gcc.
 dnl It might be different from the g++ version number.