configure.ac: Add header checks for fenv.h and complex.h.
authorSteve Ellcey <sellcey@mips.com>
Thu, 31 Oct 2013 17:12:35 +0000 (17:12 +0000)
committerSteve Ellcey <sje@gcc.gnu.org>
Thu, 31 Oct 2013 17:12:35 +0000 (17:12 +0000)
2013-10-31  Steve Ellcey  <sellcey@mips.com>

* configure.ac: Add header checks for fenv.h and complex.h.
* configure: Regenerate.

From-SVN: r204270

libstdc++-v3/ChangeLog
libstdc++-v3/configure
libstdc++-v3/configure.ac

index 0b51888fb21ff2317ad1fb26ada1ed32da81b695..a0991022d430218c2699e8c5c85fdbce79df2fd1 100644 (file)
@@ -1,3 +1,8 @@
+2013-10-31  Steve Ellcey  <sellcey@mips.com>
+
+       * configure.ac: Add header checks for fenv.h and complex.h.
+       * configure: Regenerate.
+
 2013-10-31  Edward Smith-Rowland  <3dw4rd@verizon.net>
 
         Implement C++14 digit separators.
index c436cb986363a1b10afc5c4690692d1bce0e995f..4be21b10eb357aa647e1e6ae2c3d56d2ed4db7a7 100755 (executable)
@@ -18677,6 +18677,25 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
 
+# Check for fenv.h and complex.h before GLIBCXX_CHECK_C99_TR1
+# so that the check is done with the C compiler (not C++).
+# Checking with C++ can break a canadian cross build if either
+# file does not exist in C but does in C++.
+for ac_header in fenv.h complex.h
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+eval as_val=\$$as_ac_Header
+   if test "x$as_val" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
 # For C99 support to TR1.
 
 
index dd13b011f97a71c758e9454453fca06ee52ba636..22fc840f68bb068b399da42cef38ebffc1b74c0d 100644 (file)
@@ -195,6 +195,12 @@ GLIBCXX_CHECK_S_ISREG_OR_S_IFREG
 AC_CHECK_HEADERS(sys/uio.h)
 GLIBCXX_CHECK_WRITEV
 
+# Check for fenv.h and complex.h before GLIBCXX_CHECK_C99_TR1
+# so that the check is done with the C compiler (not C++).
+# Checking with C++ can break a canadian cross build if either
+# file does not exist in C but does in C++.
+AC_CHECK_HEADERS(fenv.h complex.h)
+
 # For C99 support to TR1.
 GLIBCXX_CHECK_C99_TR1