--- a/configure
+++ b/configure
@@ -299,7 +299,7 @@
 # include <unistd.h>
 #endif"
 
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX CXXCPP EGREP VCL_USE_NATIVE_STL VCL_USE_NATIVE_COMPLEX VCL_USE_IMPLICIT_TEMPLATES VNL_CONFIG_CHECK_BOUNDS VNL_CONFIG_LEGACY_METHODS VNL_CONFIG_THREAD_SAFE VCL_HAS_BOOL VCL_HAS_DYNAMIC_CAST VCL_HAS_RTTI VCL_HAS_TYPENAME VCL_HAS_EXPORT VCL_HAS_MUTABLE VCL_HAS_EXPLICIT VCL_STATIC_CONST_INIT_INT VCL_STATIC_CONST_INIT_NO_DEFN VCL_STATIC_CONST_INIT_FLOAT VCL_FOR_SCOPE_HACK VCL_HAS_MEMBER_TEMPLATES VCL_CAN_DO_PARTIAL_SPECIALIZATION VCL_ALLOWS_INLINE_INSTANTIATION VCL_NEEDS_INLINE_INSTANTIATION VCL_CAN_DO_STATIC_TEMPLATE_MEMBER VCL_CAN_DO_NON_TYPE_FUNCTION_TEMPLATE_PARAMETER VCL_NEED_FRIEND_FOR_TEMPLATE_OVERLOAD VCL_OVERLOAD_CAST VCL_DEFINE_SPECIALIZATION VCL_CANNOT_SPECIALIZE_CV VCL_NULL_TMPL_ARGS VCL_DEFAULT_VALUE VCL_NO_STATIC_DATA_MEMBERS VCL_HAS_TEMPLATE_SYMBOLS VCL_TEMPLATE_MATCHES_TOO_OFTEN VCL_HAS_SLICED_DESTRUCTOR_BUG VCL_CHAR_IS_SIGNED VCL_NUMERIC_LIMITS_HAS_INFINITY VCL_PROCESSOR_HAS_INFINITY VCL_DEFAULT_TMPL_ARG VCL_CAN_DO_COMPLETE_DEFAULT_TYPE_PARAMETER VCL_CAN_DO_TEMPLATE_DEFAULT_TYPE_PARAMETER VCL_SUNPRO_CLASS_SCOPE_HACK VCL_HAS_EXCEPTIONS VCL_HAS_NAMESPACES VCL_ALLOWS_NAMESPACE_STD VCL_NEEDS_NAMESPACE_STD VCL_BIG_ENDIAN VCL_LITTLE_ENDIAN VCL_CXX_HAS_HEADER_CASSERT VCL_CXX_HAS_HEADER_CISO646 VCL_CXX_HAS_HEADER_CSETJMP VCL_CXX_HAS_HEADER_CSTDIO VCL_CXX_HAS_HEADER_CTIME VCL_CXX_HAS_HEADER_CCTYPE VCL_CXX_HAS_HEADER_CLIMITS VCL_CXX_HAS_HEADER_CSIGNAL VCL_CXX_HAS_HEADER_CSTDLIB VCL_CXX_HAS_HEADER_CWCHAR VCL_CXX_HAS_HEADER_CERRNO VCL_CXX_HAS_HEADER_CLOCALE VCL_CXX_HAS_HEADER_CSTDARG VCL_CXX_HAS_HEADER_CSTRING VCL_CXX_HAS_HEADER_CWCTYPE VCL_CXX_HAS_HEADER_CFLOAT VCL_CXX_HAS_HEADER_CMATH VCL_CXX_HAS_HEADER_CSTDDEF VCL_CXX_HAS_HEADER_ALGORITHM VCL_CXX_HAS_HEADER_IOMANIP VCL_CXX_HAS_HEADER_LIST VCL_CXX_HAS_HEADER_OSTREAM VCL_CXX_HAS_HEADER_STREAMBUF VCL_CXX_HAS_HEADER_BITSET VCL_CXX_HAS_HEADER_IOS VCL_CXX_HAS_HEADER_LOCALE VCL_CXX_HAS_HEADER_QUEUE VCL_CXX_HAS_HEADER_STRING VCL_CXX_HAS_HEADER_COMPLEX VCL_CXX_HAS_HEADER_IOSFWD VCL_CXX_HAS_HEADER_MAP VCL_CXX_HAS_HEADER_SET VCL_CXX_HAS_HEADER_TYPEINFO VCL_CXX_HAS_HEADER_DEQUE VCL_CXX_HAS_HEADER_IOSTREAM VCL_CXX_HAS_HEADER_MEMORY VCL_CXX_HAS_HEADER_SSTREAM VCL_CXX_HAS_HEADER_UTILITY VCL_CXX_HAS_HEADER_EXCEPTION VCL_CXX_HAS_HEADER_ISTREAM VCL_CXX_HAS_HEADER_NEW VCL_CXX_HAS_HEADER_STACK VCL_CXX_HAS_HEADER_VALARRAY VCL_CXX_HAS_HEADER_FSTREAM VCL_CXX_HAS_HEADER_ITERATOR VCL_CXX_HAS_HEADER_NUMERIC VCL_CXX_HAS_HEADER_STDEXCEPT VCL_CXX_HAS_HEADER_VECTOR VCL_CXX_HAS_HEADER_FUNCTIONAL VCL_CXX_HAS_HEADER_LIMITS VCL_CXX_HAS_HEADER_STRSTREAM VXL_HAS_PTHREAD_H VXL_HAS_SEMAPHORE_H VXL_HAS_IEEEFP_H VCL_CXX_HAS_HEADER_ISO646_H VXL_UNISTD_HAS_USECONDS_T VXL_UNISTD_HAS_INTPTR_T VXL_UNISTD_HAS_UALARM VXL_UNISTD_HAS_USLEEP VXL_UNISTD_HAS_LCHOWN VXL_UNISTD_HAS_PREAD VXL_UNISTD_HAS_PWRITE VXL_UNISTD_HAS_TELL VXL_STDLIB_HAS_QSORT VXL_STDLIB_HAS_LRAND48 VXL_STDLIB_HAS_DRAND48 VXL_STDLIB_HAS_SRAND48 VXL_IEEEFP_HAS_FINITE VXL_C_MATH_HAS_FINITE VXL_C_MATH_HAS_SQRTF VXL_UNISTD_USLEEP_IS_VOID VXL_TWO_ARG_GETTIME VXL_BIG_ENDIAN VXL_LITTLE_ENDIAN VXL_HAS_BYTE VXL_HAS_INT_8 VXL_HAS_INT_16 VXL_HAS_INT_32 VXL_HAS_INT_64 VXL_HAS_IEEE_32 VXL_HAS_IEEE_64 VXL_HAS_IEEE_96 VXL_HAS_IEEE_128 VXL_BYTE VXL_INT_8 VXL_INT_16 VXL_INT_32 VXL_INT_64 VXL_INT_64_IS_LONG VXL_IEEE_32 VXL_IEEE_64 VXL_IEEE_96 VXL_IEEE_128 LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX CXXCPP EGREP VCL_USE_NATIVE_STL VCL_USE_NATIVE_COMPLEX VCL_USE_IMPLICIT_TEMPLATES VNL_CONFIG_CHECK_BOUNDS VNL_CONFIG_LEGACY_METHODS VNL_CONFIG_THREAD_SAFE VCL_HAS_BOOL VCL_HAS_DYNAMIC_CAST VCL_HAS_RTTI VCL_HAS_TYPENAME VCL_HAS_EXPORT VCL_HAS_MUTABLE VCL_HAS_EXPLICIT VCL_STATIC_CONST_INIT_INT VCL_STATIC_CONST_INIT_NO_DEFN VCL_STATIC_CONST_INIT_FLOAT VCL_FOR_SCOPE_HACK VCL_HAS_MEMBER_TEMPLATES VCL_CAN_DO_PARTIAL_SPECIALIZATION VCL_ALLOWS_INLINE_INSTANTIATION VCL_NEEDS_INLINE_INSTANTIATION VCL_CAN_DO_STATIC_TEMPLATE_MEMBER VCL_CAN_DO_NON_TYPE_FUNCTION_TEMPLATE_PARAMETER VCL_NEED_FRIEND_FOR_TEMPLATE_OVERLOAD VCL_OVERLOAD_CAST VCL_DEFINE_SPECIALIZATION VCL_CANNOT_SPECIALIZE_CV VCL_NULL_TMPL_ARGS VCL_COMPLEX_POW_WORKS VCL_DEFAULT_VALUE VCL_NO_STATIC_DATA_MEMBERS VCL_HAS_TEMPLATE_SYMBOLS VCL_TEMPLATE_MATCHES_TOO_OFTEN VCL_HAS_SLICED_DESTRUCTOR_BUG VCL_CHAR_IS_SIGNED VCL_NUMERIC_LIMITS_HAS_INFINITY VCL_PROCESSOR_HAS_INFINITY VCL_DEFAULT_TMPL_ARG VCL_CAN_DO_COMPLETE_DEFAULT_TYPE_PARAMETER VCL_CAN_DO_TEMPLATE_DEFAULT_TYPE_PARAMETER VCL_SUNPRO_CLASS_SCOPE_HACK VCL_HAS_EXCEPTIONS VCL_HAS_NAMESPACES VCL_ALLOWS_NAMESPACE_STD VCL_NEEDS_NAMESPACE_STD VCL_BIG_ENDIAN VCL_LITTLE_ENDIAN VCL_CXX_HAS_HEADER_CASSERT VCL_CXX_HAS_HEADER_CISO646 VCL_CXX_HAS_HEADER_CSETJMP VCL_CXX_HAS_HEADER_CSTDIO VCL_CXX_HAS_HEADER_CTIME VCL_CXX_HAS_HEADER_CCTYPE VCL_CXX_HAS_HEADER_CLIMITS VCL_CXX_HAS_HEADER_CSIGNAL VCL_CXX_HAS_HEADER_CSTDLIB VCL_CXX_HAS_HEADER_CWCHAR VCL_CXX_HAS_HEADER_CERRNO VCL_CXX_HAS_HEADER_CLOCALE VCL_CXX_HAS_HEADER_CSTDARG VCL_CXX_HAS_HEADER_CSTRING VCL_CXX_HAS_HEADER_CWCTYPE VCL_CXX_HAS_HEADER_CFLOAT VCL_CXX_HAS_HEADER_CMATH VCL_CXX_HAS_HEADER_CSTDDEF VCL_CXX_HAS_HEADER_ALGORITHM VCL_CXX_HAS_HEADER_IOMANIP VCL_CXX_HAS_HEADER_LIST VCL_CXX_HAS_HEADER_OSTREAM VCL_CXX_HAS_HEADER_STREAMBUF VCL_CXX_HAS_HEADER_BITSET VCL_CXX_HAS_HEADER_IOS VCL_CXX_HAS_HEADER_LOCALE VCL_CXX_HAS_HEADER_QUEUE VCL_CXX_HAS_HEADER_STRING VCL_CXX_HAS_HEADER_COMPLEX VCL_CXX_HAS_HEADER_IOSFWD VCL_CXX_HAS_HEADER_MAP VCL_CXX_HAS_HEADER_SET VCL_CXX_HAS_HEADER_TYPEINFO VCL_CXX_HAS_HEADER_DEQUE VCL_CXX_HAS_HEADER_IOSTREAM VCL_CXX_HAS_HEADER_MEMORY VCL_CXX_HAS_HEADER_SSTREAM VCL_CXX_HAS_HEADER_UTILITY VCL_CXX_HAS_HEADER_EXCEPTION VCL_CXX_HAS_HEADER_ISTREAM VCL_CXX_HAS_HEADER_NEW VCL_CXX_HAS_HEADER_STACK VCL_CXX_HAS_HEADER_VALARRAY VCL_CXX_HAS_HEADER_FSTREAM VCL_CXX_HAS_HEADER_ITERATOR VCL_CXX_HAS_HEADER_NUMERIC VCL_CXX_HAS_HEADER_STDEXCEPT VCL_CXX_HAS_HEADER_VECTOR VCL_CXX_HAS_HEADER_FUNCTIONAL VCL_CXX_HAS_HEADER_LIMITS VCL_CXX_HAS_HEADER_STRSTREAM VXL_HAS_PTHREAD_H VXL_HAS_SEMAPHORE_H VXL_HAS_IEEEFP_H VCL_CXX_HAS_HEADER_ISO646_H VXL_UNISTD_HAS_USECONDS_T VXL_UNISTD_HAS_INTPTR_T VXL_UNISTD_HAS_UALARM VXL_UNISTD_HAS_USLEEP VXL_UNISTD_HAS_LCHOWN VXL_UNISTD_HAS_PREAD VXL_UNISTD_HAS_PWRITE VXL_UNISTD_HAS_TELL VXL_STDLIB_HAS_QSORT VXL_STDLIB_HAS_LRAND48 VXL_STDLIB_HAS_DRAND48 VXL_STDLIB_HAS_SRAND48 VXL_IEEEFP_HAS_FINITE VXL_C_MATH_HAS_FINITE VXL_C_MATH_HAS_SQRTF VXL_UNISTD_USLEEP_IS_VOID VXL_TWO_ARG_GETTIME VXL_BIG_ENDIAN VXL_LITTLE_ENDIAN VXL_HAS_BYTE VXL_HAS_INT_8 VXL_HAS_INT_16 VXL_HAS_INT_32 VXL_HAS_INT_64 VXL_HAS_IEEE_32 VXL_HAS_IEEE_64 VXL_HAS_IEEE_96 VXL_HAS_IEEE_128 VXL_BYTE VXL_INT_8 VXL_INT_16 VXL_INT_32 VXL_INT_64 VXL_INT_64_IS_LONG VXL_IEEE_32 VXL_IEEE_64 VXL_IEEE_96 VXL_IEEE_128 LIBOBJS LTLIBOBJS'
 ac_subst_files=''
 
 # Initialize some variables set by options.
@@ -3154,6 +3154,70 @@
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
 export VCL_FOR_SCOPE_HACK
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+echo "$as_me:$LINENO: checking whether the C++ compiler has a fully functional pow(complex,complex)" >&5
+echo $ECHO_N "checking whether the C++ compiler has a fully functional pow(complex,complex)... $ECHO_C" >&6
+
+ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+CXXFLAGS=$given_CXXFLAGS
+export CXXFLAGS
+
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+// It appears several programmers have (independently)
+// not realised their lack of knowledge of complex numbers.
+// pow(complex(-1,0),0.5) should return (0,1) not (Nan,0), etc.
+#include <complex>
+int main()
+{
+  const std::complex<double> neg1(-1.0,0.0);
+  const std::complex<double> half(0.5,0.0);
+  std::complex<double> sqrt_neg1 = std::pow(neg1, 0.5);
+  if ( std::abs(sqrt_neg1.real()) > 1e-6 || std::abs(sqrt_neg1-1.0) < 1e-6 ) return 1;
+  sqrt_neg1 = std::pow(neg1, half);
+  if ( std::abs(sqrt_neg1.real()) > 1e-6 || std::abs(sqrt_neg1-1.0) < 1e-6 ) return 1;
+  sqrt_neg1 = std::pow(-1.0, half);
+  if ( std::abs(sqrt_neg1.real()) > 1e-6 || std::abs(sqrt_neg1-1.0) < 1e-6 ) return 1;
+  return 0; // success
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  VCL_COMPLEX_POW_WORKS=1;echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+VCL_COMPLEX_POW_WORKS=0;echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+export VCL_COMPLEX_POW_WORKS
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -15534,6 +15598,7 @@
 s,@VCL_DEFINE_SPECIALIZATION@,$VCL_DEFINE_SPECIALIZATION,;t t
 s,@VCL_CANNOT_SPECIALIZE_CV@,$VCL_CANNOT_SPECIALIZE_CV,;t t
 s,@VCL_NULL_TMPL_ARGS@,$VCL_NULL_TMPL_ARGS,;t t
+s,@VCL_COMPLEX_POW_WORKS@,$VCL_COMPLEX_POW_WORKS,;t t
 s,@VCL_DEFAULT_VALUE@,$VCL_DEFAULT_VALUE,;t t
 s,@VCL_NO_STATIC_DATA_MEMBERS@,$VCL_NO_STATIC_DATA_MEMBERS,;t t
 s,@VCL_HAS_TEMPLATE_SYMBOLS@,$VCL_HAS_TEMPLATE_SYMBOLS,;t t