diff options
Diffstat (limited to 'libstdc++-v3/configure')
-rwxr-xr-x | libstdc++-v3/configure | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure index 94120ec4dd5..38f14f6729e 100755 --- a/libstdc++-v3/configure +++ b/libstdc++-v3/configure @@ -18174,6 +18174,54 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_math11_overload" >&5 $as_echo "$glibcxx_cv_math11_overload" >&6; } ;; + *-*-*gnu*) + # If <math.h> defines the obsolete isinf(double) and isnan(double) + # functions (instead of or as well as the C99 generic macros) then we + # can't define std::isinf(double) and std::isnan(double) in <cmath> + # and must use the ones from <math.h> instead. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for obsolete isinf and isnan functions in <math.h>" >&5 +$as_echo_n "checking for obsolete isinf and isnan functions in <math.h>... " >&6; } + if test "${glibcxx_cv_obsolete_isinf_isnan+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> + #undef isinf + #undef isnan + namespace std { + using ::isinf; + bool isinf(float); + bool isinf(long double); + using ::isnan; + bool isnan(float); + bool isnan(long double); + } + using std::isinf; + using std::isnan; + bool b = isinf(0.0) || isnan(0.0); + +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_obsolete_isinf_isnan=yes +else + glibcxx_cv_obsolete_isinf_isnan=no + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + + + + if test $glibcxx_cv_obsolete_isinf_isnan = yes; then + +$as_echo "#define HAVE_OBSOLETE_ISINF_ISNAN 1" >>confdefs.h + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_obsolete_isinf_isnan" >&5 +$as_echo "$glibcxx_cv_obsolete_isinf_isnan" >&6; } + ;; esac CXXFLAGS="$ac_save_CXXFLAGS" |