OSDN Git Service

2005-01-25 Benjamin Kosnik <bkoz@redhat.com>
authorbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 25 Jan 2005 15:47:35 +0000 (15:47 +0000)
committerbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 25 Jan 2005 15:47:35 +0000 (15:47 +0000)
* acinclude.m4 (GLIBCXX_ENABLE_C99): Test for complex math
functions, and enable _GLIBCXX_USE_C99_COMPLEX_MATH if they exist.
* acconfig.h: Add _GLIBCXX_USE_C99_COMPLEX_MATH.
* config.h.in: Regenerate.
* configure: Regenerate.
* include/std/std_complex.h: Protect complex builtins with
_GLIBCXX_USE_C99_COMPLEX_MATH.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@94221 138bc75d-0d04-0410-961f-82ee72b054a4

libstdc++-v3/ChangeLog
libstdc++-v3/acconfig.h
libstdc++-v3/acinclude.m4
libstdc++-v3/config.h.in
libstdc++-v3/configure
libstdc++-v3/include/std/std_complex.h

index 8b95181..a6f7935 100644 (file)
@@ -1,3 +1,13 @@
+2005-01-25  Benjamin Kosnik  <bkoz@redhat.com>
+
+       * acinclude.m4 (GLIBCXX_ENABLE_C99): Test for complex math
+       functions, and enable _GLIBCXX_USE_C99_COMPLEX_MATH if they exist.
+       * acconfig.h: Add _GLIBCXX_USE_C99_COMPLEX_MATH.
+       * config.h.in: Regenerate.
+       * configure: Regenerate.
+       * include/std/std_complex.h: Protect complex builtins with
+       _GLIBCXX_USE_C99_COMPLEX_MATH.
+
 2005-01-24  Paolo Carlini  <pcarlini@suse.de>
 
        * include/tr1/type_traits: Implement is_signed and is_unsigned.
 2005-01-24  Paolo Carlini  <pcarlini@suse.de>
 
        * include/tr1/type_traits: Implement is_signed and is_unsigned.
index cffecbd..f1b8216 100644 (file)
 // Include I/O support for 'long long' and 'unsigned long long'.
 #undef _GLIBCXX_USE_LONG_LONG
 
 // Include I/O support for 'long long' and 'unsigned long long'.
 #undef _GLIBCXX_USE_LONG_LONG
 
+// Define if C99 features such as lldiv_t, llabs, lldiv should be exposed.
+#undef _GLIBCXX_USE_C99
+
 // Define if C99 math functions (like fpclassify) should be exposed.
 #undef _GLIBCXX_USE_C99_MATH
 
 // Define if C99 math functions (like fpclassify) should be exposed.
 #undef _GLIBCXX_USE_C99_MATH
 
-// Define if C99 features such as lldiv_t, llabs, lldiv should be exposed.
-#undef _GLIBCXX_USE_C99
+// Define if C99 complex math functions should be used in std::complex.
+#undef _GLIBCXX_USE_C99_COMPLEX_MATH
 
 // Define if code specialized for wchar_t should be used.
 #undef _GLIBCXX_USE_WCHAR_T
 
 // Define if code specialized for wchar_t should be used.
 #undef _GLIBCXX_USE_WCHAR_T
index 16ec53a..2a1c6e2 100644 (file)
@@ -871,6 +871,121 @@ AC_DEFUN([GLIBCXX_ENABLE_C99], [
     AC_DEFINE(_GLIBCXX_USE_C99_MATH)
   fi
 
     AC_DEFINE(_GLIBCXX_USE_C99_MATH)
   fi
 
+  # Check for the existence of <math.h> complex functions.
+  # This is necessary even though libstdc++ uses the builtin versions
+  # of these functions, because if the builtin cannot be used, a reference
+  # to the library function is emitted.
+  AC_CHECK_HEADERS(complex.h, ac_has_complex_h=yes, ac_has_complex_h=no)
+  ac_c99_complex=no;
+  if test x"$ac_has_complex_h" = x"yes"; then
+    ac_c99_complex=yes;
+    AC_MSG_CHECKING([for ISO C99 support in <complex.h>])
+    AC_TRY_COMPILE([#include <complex.h>],
+                  [typedef __complex__ float _ComplexT; _ComplexT tmp;
+                   cabsf(tmp);],, [ac_c99_complex=no])
+    AC_TRY_COMPILE([#include <complex.h>],
+                  [typedef __complex__ double _ComplexT; _ComplexT tmp;
+                   cabs(tmp);],, [ac_c99_complex=no])
+    AC_TRY_COMPILE([#include <complex.h>],
+                  [typedef __complex__ long double _ComplexT; _ComplexT tmp;
+                   cabsl(tmp);],, [ac_c99_complex=no])
+    AC_TRY_COMPILE([#include <complex.h>],
+                  [typedef __complex__ float _ComplexT; _ComplexT tmp;
+                    cargf(tmp);],, [ac_c99_complex=no])
+    AC_TRY_COMPILE([#include <complex.h>],
+                  [typedef __complex__ double _ComplexT; _ComplexT tmp;
+                   carg(tmp);],, [ac_c99_complex=no])
+    AC_TRY_COMPILE([#include <complex.h>],
+                  [typedef __complex__ long double _ComplexT; _ComplexT tmp;
+                   cargl(tmp);],, [ac_c99_complex=no])
+    AC_TRY_COMPILE([#include <complex.h>],
+                  [typedef __complex__ float _ComplexT; _ComplexT tmp;
+                   ccosf(tmp);],, [ac_c99_complex=no])
+    AC_TRY_COMPILE([#include <complex.h>],
+                  [typedef __complex__ double _ComplexT; _ComplexT tmp;
+                   ccos(tmp);],, [ac_c99_complex=no])
+    AC_TRY_COMPILE([#include <complex.h>],
+                  [typedef __complex__ long double _ComplexT; _ComplexT tmp;
+                   ccosl(tmp);],, [ac_c99_complex=no])
+    AC_TRY_COMPILE([#include <complex.h>],
+                  [typedef __complex__ float _ComplexT; _ComplexT tmp;
+                   ccoshf(tmp);],, [ac_c99_complex=no])
+    AC_TRY_COMPILE([#include <complex.h>],
+                  [typedef __complex__ double _ComplexT; _ComplexT tmp;
+                   ccosh(tmp);],, [ac_c99_complex=no])
+    AC_TRY_COMPILE([#include <complex.h>],
+                  [typedef __complex__ long double _ComplexT; _ComplexT tmp;
+                   ccoshl(tmp);],, [ac_c99_complex=no])
+    AC_TRY_COMPILE([#include <complex.h>],
+                  [typedef __complex__ float _ComplexT; _ComplexT tmp;
+                   cexpf(tmp);],, [ac_c99_complex=no])
+    AC_TRY_COMPILE([#include <complex.h>],
+                  [typedef __complex__ double _ComplexT; _ComplexT tmp;
+                   cexp(tmp);],, [ac_c99_complex=no])
+    AC_TRY_COMPILE([#include <complex.h>],
+                  [typedef __complex__ long double _ComplexT; _ComplexT tmp;
+                   cexpl(tmp);],, [ac_c99_complex=no])
+    AC_TRY_COMPILE([#include <complex.h>],
+                  [typedef __complex__ float _ComplexT; _ComplexT tmp;
+                   csinf(tmp);],, [ac_c99_complex=no])
+    AC_TRY_COMPILE([#include <complex.h>],
+                  [typedef __complex__ double _ComplexT; _ComplexT tmp;
+                   csin(tmp);],, [ac_c99_complex=no])
+    AC_TRY_COMPILE([#include <complex.h>],
+                  [typedef __complex__ long double _ComplexT; _ComplexT tmp;
+                   csinl(tmp);],, [ac_c99_complex=no])
+    AC_TRY_COMPILE([#include <complex.h>],
+                  [typedef __complex__ float _ComplexT; _ComplexT tmp;
+                   csinhf(tmp);],, [ac_c99_complex=no])
+    AC_TRY_COMPILE([#include <complex.h>],
+                  [typedef __complex__ double _ComplexT; _ComplexT tmp;
+                   csinh(tmp);],, [ac_c99_complex=no])
+    AC_TRY_COMPILE([#include <complex.h>],
+                  [typedef __complex__ long double _ComplexT; _ComplexT tmp;
+                   csinhl(tmp);],, [ac_c99_complex=no])
+    AC_TRY_COMPILE([#include <complex.h>],
+                  [typedef __complex__ float _ComplexT; _ComplexT tmp;
+                   csqrtf(tmp);],, [ac_c99_complex=no])
+    AC_TRY_COMPILE([#include <complex.h>],
+                  [typedef __complex__ double _ComplexT; _ComplexT tmp;
+                   csqrt(tmp);],, [ac_c99_complex=no])
+    AC_TRY_COMPILE([#include <complex.h>],
+                  [typedef __complex__ long double _ComplexT; _ComplexT tmp;
+                   csqrtl(tmp);],, [ac_c99_complex=no])
+    AC_TRY_COMPILE([#include <complex.h>],
+                  [typedef __complex__ float _ComplexT; _ComplexT tmp;
+                   ctanf(tmp);],, [ac_c99_complex=no])
+    AC_TRY_COMPILE([#include <complex.h>],
+                  [typedef __complex__ double _ComplexT; _ComplexT tmp;
+                   ctan(tmp);],, [ac_c99_complex=no])
+    AC_TRY_COMPILE([#include <complex.h>],
+                  [typedef __complex__ long double _ComplexT; _ComplexT tmp;
+                   ctanl(tmp);],, [ac_c99_complex=no])
+    AC_TRY_COMPILE([#include <complex.h>],
+                  [typedef __complex__ float _ComplexT; _ComplexT tmp;
+                   ctanhf(tmp);],, [ac_c99_complex=no])
+    AC_TRY_COMPILE([#include <complex.h>],
+                  [typedef __complex__ double _ComplexT; _ComplexT tmp;
+                   ctanh(tmp);],, [ac_c99_complex=no])
+    AC_TRY_COMPILE([#include <complex.h>],
+                  [typedef __complex__ long double _ComplexT; _ComplexT tmp;
+                   ctanhl(tmp);],, [ac_c99_complex=no])
+    AC_TRY_COMPILE([#include <complex.h>],
+                  [typedef __complex__ float _ComplexT; _ComplexT tmp;
+                   cpowf(tmp, tmp);],, [ac_c99_complex=no])
+    AC_TRY_COMPILE([#include <complex.h>],
+                  [typedef __complex__ double _ComplexT; _ComplexT tmp;
+                   cpow(tmp, tmp);],, [ac_c99_complex=no])
+    AC_TRY_COMPILE([#include <complex.h>],
+                  [typedef __complex__ long double _ComplexT; _ComplexT tmp;
+                   cpowl(tmp, tmp);],, [ac_c99_complex=no])
+  fi
+  AC_MSG_RESULT($ac_c99_complex)
+
+  if test x"$ac_c99_complex" = x"yes"; then
+    AC_DEFINE(_GLIBCXX_USE_C99_COMPLEX_MATH)
+  fi
+
   # Check for the existence in <stdio.h> of vscanf, et. al.
   ac_c99_stdio=yes;
   AC_MSG_CHECKING([for ISO C99 support in <stdio.h>])
   # Check for the existence in <stdio.h> of vscanf, et. al.
   ac_c99_stdio=yes;
   AC_MSG_CHECKING([for ISO C99 support in <stdio.h>])
index 86c1106..fdcc07c 100644 (file)
 // Include I/O support for 'long long' and 'unsigned long long'.
 #undef _GLIBCXX_USE_LONG_LONG
 
 // Include I/O support for 'long long' and 'unsigned long long'.
 #undef _GLIBCXX_USE_LONG_LONG
 
+// Define if C99 features such as lldiv_t, llabs, lldiv should be exposed.
+#undef _GLIBCXX_USE_C99
+
 // Define if C99 math functions (like fpclassify) should be exposed.
 #undef _GLIBCXX_USE_C99_MATH
 
 // Define if C99 math functions (like fpclassify) should be exposed.
 #undef _GLIBCXX_USE_C99_MATH
 
-// Define if C99 features such as lldiv_t, llabs, lldiv should be exposed.
-#undef _GLIBCXX_USE_C99
+// Define if C99 complex math functions should be used in std::complex.
+#undef _GLIBCXX_USE_C99_COMPLEX_MATH
 
 // Define if code specialized for wchar_t should be used.
 #undef _GLIBCXX_USE_WCHAR_T
 
 // Define if code specialized for wchar_t should be used.
 #undef _GLIBCXX_USE_WCHAR_T
 /* Define to 1 if you have the `ceill' function. */
 #undef HAVE_CEILL
 
 /* Define to 1 if you have the `ceill' function. */
 #undef HAVE_CEILL
 
+/* Define to 1 if you have the <complex.h> header file. */
+#undef HAVE_COMPLEX_H
+
 /* Define to 1 if you have the `copysign' function. */
 #undef HAVE_COPYSIGN
 
 /* Define to 1 if you have the `copysign' function. */
 #undef HAVE_COPYSIGN
 
index 490c45c..e2a7f58 100755 (executable)
@@ -6368,6 +6368,7 @@ fi;
 
 
 
 
 
 
+
    # Check whether --enable-c99 or --disable-c99 was given.
 if test "${enable_c99+set}" = set; then
   enableval="$enable_c99"
    # Check whether --enable-c99 or --disable-c99 was given.
 if test "${enable_c99+set}" = set; then
   enableval="$enable_c99"
@@ -6947,6 +6948,1696 @@ _ACEOF
 
   fi
 
 
   fi
 
+  # Check for the existence of <math.h> complex functions.
+  # This is necessary even though libstdc++ uses the builtin versions
+  # of these functions, because if the builtin cannot be used, a reference
+  # to the library function is emitted.
+
+for ac_header in complex.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_cxx_werror_flag"
+                        || test ! -s conftest.err'
+  { (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); }; } &&
+        { 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
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_cxx_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ----------------------------------------- ##
+## Report this to the package-unused lists.  ##
+## ----------------------------------------- ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+ ac_has_complex_h=yes
+else
+  ac_has_complex_h=no
+fi
+
+done
+
+  ac_c99_complex=no;
+  if test x"$ac_has_complex_h" = x"yes"; then
+    ac_c99_complex=yes;
+    echo "$as_me:$LINENO: checking for ISO C99 support in <complex.h>" >&5
+echo $ECHO_N "checking for ISO C99 support in <complex.h>... $ECHO_C" >&6
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <complex.h>
+int
+main ()
+{
+typedef __complex__ float _ComplexT; _ComplexT tmp;
+                   cabsf(tmp);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_cxx_werror_flag"
+                        || test ! -s conftest.err'
+  { (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); }; } &&
+        { 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
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_c99_complex=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <complex.h>
+int
+main ()
+{
+typedef __complex__ double _ComplexT; _ComplexT tmp;
+                   cabs(tmp);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_cxx_werror_flag"
+                        || test ! -s conftest.err'
+  { (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); }; } &&
+        { 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
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_c99_complex=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <complex.h>
+int
+main ()
+{
+typedef __complex__ long double _ComplexT; _ComplexT tmp;
+                   cabsl(tmp);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_cxx_werror_flag"
+                        || test ! -s conftest.err'
+  { (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); }; } &&
+        { 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
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_c99_complex=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <complex.h>
+int
+main ()
+{
+typedef __complex__ float _ComplexT; _ComplexT tmp;
+                    cargf(tmp);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_cxx_werror_flag"
+                        || test ! -s conftest.err'
+  { (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); }; } &&
+        { 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
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_c99_complex=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <complex.h>
+int
+main ()
+{
+typedef __complex__ double _ComplexT; _ComplexT tmp;
+                   carg(tmp);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_cxx_werror_flag"
+                        || test ! -s conftest.err'
+  { (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); }; } &&
+        { 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
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_c99_complex=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <complex.h>
+int
+main ()
+{
+typedef __complex__ long double _ComplexT; _ComplexT tmp;
+                   cargl(tmp);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_cxx_werror_flag"
+                        || test ! -s conftest.err'
+  { (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); }; } &&
+        { 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
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_c99_complex=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <complex.h>
+int
+main ()
+{
+typedef __complex__ float _ComplexT; _ComplexT tmp;
+                   ccosf(tmp);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_cxx_werror_flag"
+                        || test ! -s conftest.err'
+  { (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); }; } &&
+        { 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
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_c99_complex=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <complex.h>
+int
+main ()
+{
+typedef __complex__ double _ComplexT; _ComplexT tmp;
+                   ccos(tmp);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_cxx_werror_flag"
+                        || test ! -s conftest.err'
+  { (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); }; } &&
+        { 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
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_c99_complex=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <complex.h>
+int
+main ()
+{
+typedef __complex__ long double _ComplexT; _ComplexT tmp;
+                   ccosl(tmp);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_cxx_werror_flag"
+                        || test ! -s conftest.err'
+  { (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); }; } &&
+        { 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
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_c99_complex=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <complex.h>
+int
+main ()
+{
+typedef __complex__ float _ComplexT; _ComplexT tmp;
+                   ccoshf(tmp);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_cxx_werror_flag"
+                        || test ! -s conftest.err'
+  { (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); }; } &&
+        { 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
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_c99_complex=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <complex.h>
+int
+main ()
+{
+typedef __complex__ double _ComplexT; _ComplexT tmp;
+                   ccosh(tmp);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_cxx_werror_flag"
+                        || test ! -s conftest.err'
+  { (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); }; } &&
+        { 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
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_c99_complex=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <complex.h>
+int
+main ()
+{
+typedef __complex__ long double _ComplexT; _ComplexT tmp;
+                   ccoshl(tmp);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_cxx_werror_flag"
+                        || test ! -s conftest.err'
+  { (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); }; } &&
+        { 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
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_c99_complex=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <complex.h>
+int
+main ()
+{
+typedef __complex__ float _ComplexT; _ComplexT tmp;
+                   cexpf(tmp);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_cxx_werror_flag"
+                        || test ! -s conftest.err'
+  { (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); }; } &&
+        { 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
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_c99_complex=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <complex.h>
+int
+main ()
+{
+typedef __complex__ double _ComplexT; _ComplexT tmp;
+                   cexp(tmp);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_cxx_werror_flag"
+                        || test ! -s conftest.err'
+  { (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); }; } &&
+        { 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
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_c99_complex=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <complex.h>
+int
+main ()
+{
+typedef __complex__ long double _ComplexT; _ComplexT tmp;
+                   cexpl(tmp);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_cxx_werror_flag"
+                        || test ! -s conftest.err'
+  { (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); }; } &&
+        { 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
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_c99_complex=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <complex.h>
+int
+main ()
+{
+typedef __complex__ float _ComplexT; _ComplexT tmp;
+                   csinf(tmp);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_cxx_werror_flag"
+                        || test ! -s conftest.err'
+  { (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); }; } &&
+        { 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
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_c99_complex=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <complex.h>
+int
+main ()
+{
+typedef __complex__ double _ComplexT; _ComplexT tmp;
+                   csin(tmp);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_cxx_werror_flag"
+                        || test ! -s conftest.err'
+  { (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); }; } &&
+        { 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
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_c99_complex=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <complex.h>
+int
+main ()
+{
+typedef __complex__ long double _ComplexT; _ComplexT tmp;
+                   csinl(tmp);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_cxx_werror_flag"
+                        || test ! -s conftest.err'
+  { (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); }; } &&
+        { 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
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_c99_complex=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <complex.h>
+int
+main ()
+{
+typedef __complex__ float _ComplexT; _ComplexT tmp;
+                   csinhf(tmp);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_cxx_werror_flag"
+                        || test ! -s conftest.err'
+  { (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); }; } &&
+        { 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
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_c99_complex=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <complex.h>
+int
+main ()
+{
+typedef __complex__ double _ComplexT; _ComplexT tmp;
+                   csinh(tmp);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_cxx_werror_flag"
+                        || test ! -s conftest.err'
+  { (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); }; } &&
+        { 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
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_c99_complex=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <complex.h>
+int
+main ()
+{
+typedef __complex__ long double _ComplexT; _ComplexT tmp;
+                   csinhl(tmp);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_cxx_werror_flag"
+                        || test ! -s conftest.err'
+  { (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); }; } &&
+        { 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
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_c99_complex=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <complex.h>
+int
+main ()
+{
+typedef __complex__ float _ComplexT; _ComplexT tmp;
+                   csqrtf(tmp);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_cxx_werror_flag"
+                        || test ! -s conftest.err'
+  { (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); }; } &&
+        { 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
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_c99_complex=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <complex.h>
+int
+main ()
+{
+typedef __complex__ double _ComplexT; _ComplexT tmp;
+                   csqrt(tmp);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_cxx_werror_flag"
+                        || test ! -s conftest.err'
+  { (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); }; } &&
+        { 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
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_c99_complex=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <complex.h>
+int
+main ()
+{
+typedef __complex__ long double _ComplexT; _ComplexT tmp;
+                   csqrtl(tmp);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_cxx_werror_flag"
+                        || test ! -s conftest.err'
+  { (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); }; } &&
+        { 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
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_c99_complex=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <complex.h>
+int
+main ()
+{
+typedef __complex__ float _ComplexT; _ComplexT tmp;
+                   ctanf(tmp);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_cxx_werror_flag"
+                        || test ! -s conftest.err'
+  { (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); }; } &&
+        { 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
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_c99_complex=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <complex.h>
+int
+main ()
+{
+typedef __complex__ double _ComplexT; _ComplexT tmp;
+                   ctan(tmp);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_cxx_werror_flag"
+                        || test ! -s conftest.err'
+  { (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); }; } &&
+        { 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
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_c99_complex=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <complex.h>
+int
+main ()
+{
+typedef __complex__ long double _ComplexT; _ComplexT tmp;
+                   ctanl(tmp);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_cxx_werror_flag"
+                        || test ! -s conftest.err'
+  { (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); }; } &&
+        { 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
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_c99_complex=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <complex.h>
+int
+main ()
+{
+typedef __complex__ float _ComplexT; _ComplexT tmp;
+                   ctanhf(tmp);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_cxx_werror_flag"
+                        || test ! -s conftest.err'
+  { (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); }; } &&
+        { 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
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_c99_complex=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <complex.h>
+int
+main ()
+{
+typedef __complex__ double _ComplexT; _ComplexT tmp;
+                   ctanh(tmp);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_cxx_werror_flag"
+                        || test ! -s conftest.err'
+  { (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); }; } &&
+        { 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
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_c99_complex=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <complex.h>
+int
+main ()
+{
+typedef __complex__ long double _ComplexT; _ComplexT tmp;
+                   ctanhl(tmp);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_cxx_werror_flag"
+                        || test ! -s conftest.err'
+  { (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); }; } &&
+        { 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
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_c99_complex=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <complex.h>
+int
+main ()
+{
+typedef __complex__ float _ComplexT; _ComplexT tmp;
+                   cpowf(tmp, tmp);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_cxx_werror_flag"
+                        || test ! -s conftest.err'
+  { (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); }; } &&
+        { 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
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_c99_complex=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <complex.h>
+int
+main ()
+{
+typedef __complex__ double _ComplexT; _ComplexT tmp;
+                   cpow(tmp, tmp);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_cxx_werror_flag"
+                        || test ! -s conftest.err'
+  { (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); }; } &&
+        { 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
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_c99_complex=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <complex.h>
+int
+main ()
+{
+typedef __complex__ long double _ComplexT; _ComplexT tmp;
+                   cpowl(tmp, tmp);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_cxx_werror_flag"
+                        || test ! -s conftest.err'
+  { (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); }; } &&
+        { 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
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_c99_complex=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+  fi
+  echo "$as_me:$LINENO: result: $ac_c99_complex" >&5
+echo "${ECHO_T}$ac_c99_complex" >&6
+
+  if test x"$ac_c99_complex" = x"yes"; then
+    cat >>confdefs.h <<\_ACEOF
+#define _GLIBCXX_USE_C99_COMPLEX_MATH 1
+_ACEOF
+
+  fi
+
   # Check for the existence in <stdio.h> of vscanf, et. al.
   ac_c99_stdio=yes;
   echo "$as_me:$LINENO: checking for ISO C99 support in <stdio.h>" >&5
   # Check for the existence in <stdio.h> of vscanf, et. al.
   ac_c99_stdio=yes;
   echo "$as_me:$LINENO: checking for ISO C99 support in <stdio.h>" >&5
index 7efd975..da322ab 100644 (file)
@@ -1,6 +1,6 @@
 // The template and inlines for the -*- C++ -*- complex number classes.
 
 // The template and inlines for the -*- C++ -*- complex number classes.
 
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
 // Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
@@ -51,7 +51,7 @@
 
 namespace std
 {
 
 namespace std
 {
-  // Forward declarations
+  // Forward declarations.
   template<typename _Tp> class complex;
   template<> class complex<float>;
   template<> class complex<double>;
   template<typename _Tp> class complex;
   template<> class complex<float>;
   template<> class complex<double>;
@@ -558,9 +558,10 @@ namespace std
         return __s;
       __x /= __s; 
       __y /= __s;
         return __s;
       __x /= __s; 
       __y /= __s;
-          return __s * sqrt(__x * __x + __y * __y);
+      return __s * sqrt(__x * __x + __y * __y);
     }
 
     }
 
+#if _GLIBCXX_USE_C99_COMPLEX_MATH
   inline float
   __complex_abs(__complex__ float __z) { return __builtin_cabsf(__z); }
 
   inline float
   __complex_abs(__complex__ float __z) { return __builtin_cabsf(__z); }
 
@@ -569,23 +570,25 @@ namespace std
 
   inline long double
   __complex_abs(const __complex__ long double& __z)
 
   inline long double
   __complex_abs(const __complex__ long double& __z)
-  {
-    return __builtin_cabsl(__z);
-  }
-  
+  { return __builtin_cabsl(__z); }
+
   template<typename _Tp>
     inline _Tp
     abs(const complex<_Tp>& __z) { return __complex_abs(__z.__rep()); }
   template<typename _Tp>
     inline _Tp
     abs(const complex<_Tp>& __z) { return __complex_abs(__z.__rep()); }
+#else
+  template<typename _Tp>
+    inline _Tp
+    abs(const complex<_Tp>& __z) { return __complex_abs(__z); }
+#endif  
 
 
   // 26.2.7/4: arg(__z): Returns the phase angle of __z.
   template<typename _Tp>
     inline _Tp
     __complex_arg(const complex<_Tp>& __z)
 
 
   // 26.2.7/4: arg(__z): Returns the phase angle of __z.
   template<typename _Tp>
     inline _Tp
     __complex_arg(const complex<_Tp>& __z)
-    {
-      return  atan2(__z.imag(), __z.real()); 
-    }
+    { return  atan2(__z.imag(), __z.real()); }
 
 
+#if _GLIBCXX_USE_C99_COMPLEX_MATH
   inline float
   __complex_arg(__complex__ float __z) { return __builtin_cargf(__z); }
 
   inline float
   __complex_arg(__complex__ float __z) { return __builtin_cargf(__z); }
 
@@ -599,6 +602,11 @@ namespace std
   template<typename _Tp>
     inline _Tp
     arg(const complex<_Tp>& __z) { return __complex_arg(__z.__rep()); }
   template<typename _Tp>
     inline _Tp
     arg(const complex<_Tp>& __z) { return __complex_arg(__z.__rep()); }
+#else
+  template<typename _Tp>
+    inline _Tp
+    arg(const complex<_Tp>& __z) { return __complex_arg(__z); }
+#endif
 
   // 26.2.7/5: norm(__z) returns the squared magintude of __z.
   //     As defined, norm() is -not- a norm is the common mathematical
 
   // 26.2.7/5: norm(__z) returns the squared magintude of __z.
   //     As defined, norm() is -not- a norm is the common mathematical
@@ -632,7 +640,8 @@ namespace std
     inline _Tp
     norm(const complex<_Tp>& __z)
     {
     inline _Tp
     norm(const complex<_Tp>& __z)
     {
-      return _Norm_helper<__is_floating<_Tp>::_M_type && !_GLIBCXX_FAST_MATH>::_S_do_it(__z);
+      return _Norm_helper<__is_floating<_Tp>::_M_type 
+       && !_GLIBCXX_FAST_MATH>::_S_do_it(__z);
     }
 
   template<typename _Tp>
     }
 
   template<typename _Tp>
@@ -657,6 +666,7 @@ namespace std
       return complex<_Tp>(cos(__x) * cosh(__y), -sin(__x) * sinh(__y));
     }
 
       return complex<_Tp>(cos(__x) * cosh(__y), -sin(__x) * sinh(__y));
     }
 
+#if _GLIBCXX_USE_C99_COMPLEX_MATH
   inline __complex__ float
   __complex_cos(__complex__ float __z) { return __builtin_ccosf(__z); }
 
   inline __complex__ float
   __complex_cos(__complex__ float __z) { return __builtin_ccosf(__z); }
 
@@ -666,10 +676,15 @@ namespace std
   inline __complex__ long double
   __complex_cos(const __complex__ long double& __z)
   { return __builtin_ccosl(__z); }
   inline __complex__ long double
   __complex_cos(const __complex__ long double& __z)
   { return __builtin_ccosl(__z); }
-  
+
   template<typename _Tp>
     inline complex<_Tp>
     cos(const complex<_Tp>& __z) { return __complex_cos(__z.__rep()); }
   template<typename _Tp>
     inline complex<_Tp>
     cos(const complex<_Tp>& __z) { return __complex_cos(__z.__rep()); }
+#else
+  template<typename _Tp>
+    inline complex<_Tp>
+    cos(const complex<_Tp>& __z) { return __complex_cos(__z); }
+#endif
 
   // 26.2.8/2 cosh(__z): Returns the hyperbolic cosine of __z.
   template<typename _Tp>
 
   // 26.2.8/2 cosh(__z): Returns the hyperbolic cosine of __z.
   template<typename _Tp>
@@ -681,6 +696,7 @@ namespace std
       return complex<_Tp>(cosh(__x) * cos(__y), sinh(__x) * sin(__y));
     }
 
       return complex<_Tp>(cosh(__x) * cos(__y), sinh(__x) * sin(__y));
     }
 
+#if _GLIBCXX_USE_C99_COMPLEX_MATH
   inline __complex__ float
   __complex_cosh(__complex__ float __z) { return __builtin_ccoshf(__z); }
 
   inline __complex__ float
   __complex_cosh(__complex__ float __z) { return __builtin_ccoshf(__z); }
 
@@ -694,6 +710,11 @@ namespace std
   template<typename _Tp>
     inline complex<_Tp>
     cosh(const complex<_Tp>& __z) { return __complex_cosh(__z.__rep()); }
   template<typename _Tp>
     inline complex<_Tp>
     cosh(const complex<_Tp>& __z) { return __complex_cosh(__z.__rep()); }
+#else
+  template<typename _Tp>
+    inline complex<_Tp>
+    cosh(const complex<_Tp>& __z) { return __complex_cosh(__z); }
+#endif
 
   // 26.2.8/3 exp(__z): Returns the complex base e exponential of x
   template<typename _Tp>
 
   // 26.2.8/3 exp(__z): Returns the complex base e exponential of x
   template<typename _Tp>
@@ -701,6 +722,7 @@ namespace std
     __complex_exp(const complex<_Tp>& __z)
     { return std::polar(exp(__z.real()), __z.imag()); }
 
     __complex_exp(const complex<_Tp>& __z)
     { return std::polar(exp(__z.real()), __z.imag()); }
 
+#if _GLIBCXX_USE_C99_COMPLEX_MATH
   inline __complex__ float
   __complex_exp(__complex__ float __z) { return __builtin_cexpf(__z); }
 
   inline __complex__ float
   __complex_exp(__complex__ float __z) { return __builtin_cexpf(__z); }
 
@@ -710,10 +732,15 @@ namespace std
   inline __complex__ long double
   __complex_exp(const __complex__ long double& __z)
   { return __builtin_cexpl(__z); }
   inline __complex__ long double
   __complex_exp(const __complex__ long double& __z)
   { return __builtin_cexpl(__z); }
-  
+
   template<typename _Tp>
     inline complex<_Tp>
     exp(const complex<_Tp>& __z) { return __complex_exp(__z.__rep()); }
   template<typename _Tp>
     inline complex<_Tp>
     exp(const complex<_Tp>& __z) { return __complex_exp(__z.__rep()); }
+#else
+  template<typename _Tp>
+    inline complex<_Tp>
+    exp(const complex<_Tp>& __z) { return __complex_exp(__z); }
+#endif
 
   // 26.2.8/5 log(__z): Reurns the natural complex logaritm of __z.
   //                    The branch cut is along the negative axis.
 
   // 26.2.8/5 log(__z): Reurns the natural complex logaritm of __z.
   //                    The branch cut is along the negative axis.
@@ -733,7 +760,7 @@ namespace std
   __complex_log(const __complex__ long double& __z)
   { return __builtin_clogl(__z); } */
 
   __complex_log(const __complex__ long double& __z)
   { return __builtin_clogl(__z); } */
 
-  // FIXME: Currently wer don't use built-ins for log() because of some
+  // FIXME: Currently we don't use built-ins for log() because of some
   //        obscure user name-space issues.  So, we use the generic version
   //        which is why we don't use __z.__rep() in the call below.
   template<typename _Tp>
   //        obscure user name-space issues.  So, we use the generic version
   //        which is why we don't use __z.__rep() in the call below.
   template<typename _Tp>
@@ -755,6 +782,7 @@ namespace std
       return complex<_Tp>(sin(__x) * cosh(__y), cos(__x) * sinh(__y)); 
     }
 
       return complex<_Tp>(sin(__x) * cosh(__y), cos(__x) * sinh(__y)); 
     }
 
+#if _GLIBCXX_USE_C99_COMPLEX_MATH
   inline __complex__ float
   __complex_sin(__complex__ float __z) { return __builtin_csinf(__z); }
 
   inline __complex__ float
   __complex_sin(__complex__ float __z) { return __builtin_csinf(__z); }
 
@@ -768,6 +796,11 @@ namespace std
   template<typename _Tp>
     inline complex<_Tp>
     sin(const complex<_Tp>& __z) { return __complex_sin(__z.__rep()); }
   template<typename _Tp>
     inline complex<_Tp>
     sin(const complex<_Tp>& __z) { return __complex_sin(__z.__rep()); }
+#else
+  template<typename _Tp>
+    inline complex<_Tp>
+    sin(const complex<_Tp>& __z) { return __complex_sin(__z); }
+#endif
 
   // 26.2.8/11 sinh(__z): Returns the hyperbolic sine of __z.
   template<typename _Tp>
 
   // 26.2.8/11 sinh(__z): Returns the hyperbolic sine of __z.
   template<typename _Tp>
@@ -779,6 +812,7 @@ namespace std
       return complex<_Tp>(sinh(__x) * cos(__y), cosh(__x) * sin(__y));
     }
 
       return complex<_Tp>(sinh(__x) * cos(__y), cosh(__x) * sin(__y));
     }
 
+#if _GLIBCXX_USE_C99_COMPLEX_MATH
   inline __complex__ float
   __complex_sinh(__complex__ float __z) { return __builtin_csinhf(__z); }      
 
   inline __complex__ float
   __complex_sinh(__complex__ float __z) { return __builtin_csinhf(__z); }      
 
@@ -792,6 +826,11 @@ namespace std
   template<typename _Tp>
     inline complex<_Tp>
     sinh(const complex<_Tp>& __z) { return __complex_sinh(__z.__rep()); }
   template<typename _Tp>
     inline complex<_Tp>
     sinh(const complex<_Tp>& __z) { return __complex_sinh(__z.__rep()); }
+#else
+  template<typename _Tp>
+    inline complex<_Tp>
+    sinh(const complex<_Tp>& __z) { return __complex_sinh(__z); }
+#endif
 
   // 26.2.8/13 sqrt(__z): Returns the complex square root of __z.
   //                     The branch cut is on the negative axis.
 
   // 26.2.8/13 sqrt(__z): Returns the complex square root of __z.
   //                     The branch cut is on the negative axis.
@@ -817,6 +856,7 @@ namespace std
         }
     }
 
         }
     }
 
+#if _GLIBCXX_USE_C99_COMPLEX_MATH
   inline __complex__ float
   __complex_sqrt(__complex__ float __z) { return __builtin_csqrtf(__z); }
 
   inline __complex__ float
   __complex_sqrt(__complex__ float __z) { return __builtin_csqrtf(__z); }
 
@@ -830,6 +870,11 @@ namespace std
   template<typename _Tp>
     inline complex<_Tp>
     sqrt(const complex<_Tp>& __z) { return __complex_sqrt(__z.__rep()); }
   template<typename _Tp>
     inline complex<_Tp>
     sqrt(const complex<_Tp>& __z) { return __complex_sqrt(__z.__rep()); }
+#else
+  template<typename _Tp>
+    inline complex<_Tp>
+    sqrt(const complex<_Tp>& __z) { return __complex_sqrt(__z); }
+#endif
 
   // 26.2.8/14 tan(__z):  Return the complex tangent of __z.
   
 
   // 26.2.8/14 tan(__z):  Return the complex tangent of __z.
   
@@ -838,6 +883,7 @@ namespace std
     __complex_tan(const complex<_Tp>& __z)
     { return std::sin(__z) / std::cos(__z); }
 
     __complex_tan(const complex<_Tp>& __z)
     { return std::sin(__z) / std::cos(__z); }
 
+#if _GLIBCXX_USE_C99_COMPLEX_MATH
   inline __complex__ float
   __complex_tan(__complex__ float __z) { return __builtin_ctanf(__z); }
 
   inline __complex__ float
   __complex_tan(__complex__ float __z) { return __builtin_ctanf(__z); }
 
@@ -851,6 +897,12 @@ namespace std
   template<typename _Tp>
     inline complex<_Tp>
     tan(const complex<_Tp>& __z) { return __complex_tan(__z.__rep()); }
   template<typename _Tp>
     inline complex<_Tp>
     tan(const complex<_Tp>& __z) { return __complex_tan(__z.__rep()); }
+#else
+  template<typename _Tp>
+    inline complex<_Tp>
+    tan(const complex<_Tp>& __z) { return __complex_tan(__z); }
+#endif
+
 
   // 26.2.8/15 tanh(__z):  Returns the hyperbolic tangent of __z.
   
 
   // 26.2.8/15 tanh(__z):  Returns the hyperbolic tangent of __z.
   
@@ -859,6 +911,7 @@ namespace std
     __complex_tanh(const complex<_Tp>& __z)
     { return std::sinh(__z) / std::cosh(__z); }
 
     __complex_tanh(const complex<_Tp>& __z)
     { return std::sinh(__z) / std::cosh(__z); }
 
+#if _GLIBCXX_USE_C99_COMPLEX_MATH
   inline __complex__ float
   __complex_tanh(__complex__ float __z) { return __builtin_ctanhf(__z); }
 
   inline __complex__ float
   __complex_tanh(__complex__ float __z) { return __builtin_ctanhf(__z); }
 
@@ -872,6 +925,12 @@ namespace std
   template<typename _Tp>
     inline complex<_Tp>
     tanh(const complex<_Tp>& __z) { return __complex_tanh(__z.__rep()); }
   template<typename _Tp>
     inline complex<_Tp>
     tanh(const complex<_Tp>& __z) { return __complex_tanh(__z.__rep()); }
+#else
+  template<typename _Tp>
+    inline complex<_Tp>
+    tanh(const complex<_Tp>& __z) { return __complex_tanh(__z); }
+#endif
+
 
   // 26.2.8/9  pow(__x, __y): Returns the complex power base of __x
   //                          raised to the __y-th power.  The branch
 
   // 26.2.8/9  pow(__x, __y): Returns the complex power base of __x
   //                          raised to the __y-th power.  The branch
@@ -879,9 +938,7 @@ namespace std
   template<typename _Tp>
     inline complex<_Tp>
     pow(const complex<_Tp>& __z, int __n)
   template<typename _Tp>
     inline complex<_Tp>
     pow(const complex<_Tp>& __z, int __n)
-    {
-      return std::__pow_helper(__z, __n);
-    }
+    { return std::__pow_helper(__z, __n); }
 
   template<typename _Tp>
     complex<_Tp>
 
   template<typename _Tp>
     complex<_Tp>
@@ -899,6 +956,7 @@ namespace std
     __complex_pow(const complex<_Tp>& __x, const complex<_Tp>& __y)
     { return __x == _Tp() ? _Tp() : std::exp(__y * std::log(__x)); }
 
     __complex_pow(const complex<_Tp>& __x, const complex<_Tp>& __y)
     { return __x == _Tp() ? _Tp() : std::exp(__y * std::log(__x)); }
 
+#if _GLIBCXX_USE_C99_COMPLEX_MATH
   inline __complex__ float
   __complex_pow(__complex__ float __x, __complex__ float __y)
   { return __builtin_cpowf(__x, __y); }
   inline __complex__ float
   __complex_pow(__complex__ float __x, __complex__ float __y)
   { return __builtin_cpowf(__x, __y); }
@@ -910,7 +968,8 @@ namespace std
   inline __complex__ long double
   __complex_pow(__complex__ long double& __x, __complex__ long double& __y)
   { return __builtin_cpowl(__x, __y); }
   inline __complex__ long double
   __complex_pow(__complex__ long double& __x, __complex__ long double& __y)
   { return __builtin_cpowl(__x, __y); }
-  
+#endif
+
   template<typename _Tp>
     inline complex<_Tp>
     pow(const complex<_Tp>& __x, const complex<_Tp>& __y)
   template<typename _Tp>
     inline complex<_Tp>
     pow(const complex<_Tp>& __x, const complex<_Tp>& __y)
@@ -936,7 +995,7 @@ namespace std
       complex(_ComplexT __z) : _M_value(__z) { }
 
       complex(float = 0.0f, float = 0.0f);
       complex(_ComplexT __z) : _M_value(__z) { }
 
       complex(float = 0.0f, float = 0.0f);
-#ifdef _GLIBCXX_BUGGY_COMPLEX
+#if _GLIBCXX_BUGGY_COMPLEX
       complex(const complex& __z) : _M_value(__z._M_value) { }
 #endif
       explicit complex(const complex<double>&);
       complex(const complex& __z) : _M_value(__z._M_value) { }
 #endif
       explicit complex(const complex<double>&);
@@ -1092,7 +1151,7 @@ namespace std
       complex(_ComplexT __z) : _M_value(__z) { }
 
       complex(double  = 0.0, double = 0.0);
       complex(_ComplexT __z) : _M_value(__z) { }
 
       complex(double  = 0.0, double = 0.0);
-#ifdef _GLIBCXX_BUGGY_COMPLEX
+#if _GLIBCXX_BUGGY_COMPLEX
       complex(const complex& __z) : _M_value(__z._M_value) { }
 #endif
       complex(const complex<float>&);
       complex(const complex& __z) : _M_value(__z._M_value) { }
 #endif
       complex(const complex<float>&);
@@ -1247,7 +1306,7 @@ namespace std
       complex(_ComplexT __z) : _M_value(__z) { }
 
       complex(long double = 0.0L, long double = 0.0L);
       complex(_ComplexT __z) : _M_value(__z) { }
 
       complex(long double = 0.0L, long double = 0.0L);
-#ifdef _GLIBCXX_BUGGY_COMPLEX
+#if _GLIBCXX_BUGGY_COMPLEX
       complex(const complex& __z) : _M_value(__z._M_value) { }
 #endif
       complex(const complex<float>&);
       complex(const complex& __z) : _M_value(__z._M_value) { }
 #endif
       complex(const complex<float>&);