comparison configure.ac @ 18584:89b7bd7d0b83 gui-release

configure.ac: Use atomic reference counting by default for Qt toolkit. * configure.ac: Chane --enable-atomic-refcount option to --disable-atomic-refcount. Update warning messages.
author Rik <rik@octave.org>
date Sat, 22 Mar 2014 13:39:55 -0700
parents de76baa76aa1
children 3985333e13fa 2e68c34521e0
comparison
equal deleted inserted replaced
18577:56209bab4213 18584:89b7bd7d0b83
243 AC_DEFINE(USE_OCTAVE_ALLOCATOR, 1, 243 AC_DEFINE(USE_OCTAVE_ALLOCATOR, 1,
244 [Define to 1 to use octave_allocator class.]) 244 [Define to 1 to use octave_allocator class.])
245 fi 245 fi
246 246
247 ### Use atomic operations for internal reference counting. This is required 247 ### Use atomic operations for internal reference counting. This is required
248 ### for thread-safe behavior but incurs a significant slowdown, and is thus 248 ### for thread-safe behavior (Qt Handles) but incurs a significant slowdown.
249 ### disabled by default. 249 ### Enabled by default until a higher performing solution can be found.
250 250
251 USE_ATOMIC_REFCOUNT=no 251 USE_ATOMIC_REFCOUNT=yes
252 AC_ARG_ENABLE([atomic-refcount], 252 AC_ARG_ENABLE([atomic-refcount],
253 [AS_HELP_STRING([--enable-atomic-refcount], 253 [AS_HELP_STRING([--disable-atomic-refcount],
254 [use atomic operations for internal reference counting. This is required for thread-safe behavior but does not by itself make Octave internals thread safe.])], 254 [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.])],
255 [if test "$enableval" = yes; then USE_ATOMIC_REFCOUNT=yes; fi], []) 255 [if test "$enableval" = no; then USE_ATOMIC_REFCOUNT=no; fi], [])
256 if test $USE_ATOMIC_REFCOUNT = yes; then 256 if test $USE_ATOMIC_REFCOUNT = yes; then
257 AC_DEFINE(USE_ATOMIC_REFCOUNT, 1, 257 AC_DEFINE(USE_ATOMIC_REFCOUNT, 1,
258 [Define to 1 to use atomic operations for reference counting.]) 258 [Define to 1 to use atomic operations for reference counting.])
259 fi 259 fi
260 260
3079 AC_MSG_WARN([]) 3079 AC_MSG_WARN([])
3080 3080
3081 warn_msg_printed=true 3081 warn_msg_printed=true
3082 fi 3082 fi
3083 3083
3084 if test $USE_ATOMIC_REFCOUNT = no; then
3085 AC_MSG_WARN([])
3086 AC_MSG_WARN([atomic reference counting disabled.])
3087 AC_MSG_WARN([This feature allows access to Octave data safely from])
3088 AC_MSG_WARN([another thread, and is required when using the GUI's Qt toolkit])
3089 AC_MSG_WARN([for plotting.])
3090 AC_MSG_WARN([])
3091 fi
3084 if test $USE_ATOMIC_REFCOUNT = yes; then 3092 if test $USE_ATOMIC_REFCOUNT = yes; then
3085 AC_MSG_WARN([])
3086 AC_MSG_WARN([Using atomic reference counting.])
3087 AC_MSG_WARN([This feature allows access to Octave data safely from])
3088 AC_MSG_WARN([another thread, for instance from a GUI. However this])
3089 AC_MSG_WARN([results in a small performance penalty in the Octave])
3090 AC_MSG_WARN([interpreter.])
3091 AC_MSG_WARN([])
3092 if test $USE_OCTAVE_ALLOCATOR = yes; then 3093 if test $USE_OCTAVE_ALLOCATOR = yes; then
3093 AC_MSG_WARN([Thread-safe behavior is not guaranteed unless you also]) 3094 AC_MSG_WARN([Using atomic reference counting.])
3094 AC_MSG_WARN([disable the use of the octave_allocator class.]) 3095 AC_MSG_WARN([Thread-safe behavior is not guaranteed unless the])
3096 AC_MSG_WARN([octave_allocator class is also disabled.])
3095 AC_MSG_WARN([]) 3097 AC_MSG_WARN([])
3096 fi 3098 fi
3097 warn_msg_printed=true 3099 warn_msg_printed=true
3098 fi 3100 fi
3099 3101