summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2011-04-25 20:53:41 +0200
committerBruno Haible <bruno@clisp.org>2011-04-25 20:53:41 +0200
commitb9453f8ce1c5d8bfeb7c110e4c73ba35ac711023 (patch)
treea0af77286dee190928904ce746fa0d04e22b0542 /m4
parentfca1c5cc2d6b7e48f0638f99e78625e21b89ead6 (diff)
downloadgnulib-b9453f8ce1c5d8bfeb7c110e4c73ba35ac711023.tar.gz
strtod: Remove check for strtod, unless supporting old platforms.
* modules/strtod-obsolete: New file. * m4/strtod-obsolete.m4: New file. * m4/strtod.m4 (gl_FUNC_STRTOD): Don't check whether strtod is declared if gl_FUNC_STRTOD_OBSOLETE is not also defined. * modules/strtod (Depends-on): Add strtod-obsolete. * doc/posix-functions/strtod.texi: Mention module strtod-obsolete.
Diffstat (limited to 'm4')
-rw-r--r--m4/strtod-obsolete.m411
-rw-r--r--m4/strtod.m423
2 files changed, 24 insertions, 10 deletions
diff --git a/m4/strtod-obsolete.m4 b/m4/strtod-obsolete.m4
new file mode 100644
index 0000000000..baeb898032
--- /dev/null
+++ b/m4/strtod-obsolete.m4
@@ -0,0 +1,11 @@
+# strtod-obsolete.m4 serial 1
+dnl Copyright (C) 2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_STRTOD_OBSOLETE],
+[
+ dnl The real code is in strtod.m4.
+ :
+])
diff --git a/m4/strtod.m4 b/m4/strtod.m4
index 4619c3357f..f40e342f43 100644
--- a/m4/strtod.m4
+++ b/m4/strtod.m4
@@ -1,4 +1,4 @@
-# strtod.m4 serial 19
+# strtod.m4 serial 20
dnl Copyright (C) 2002-2003, 2006-2011 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -7,15 +7,18 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_STRTOD],
[
AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
- dnl Test whether strtod is declared.
- dnl Don't call AC_FUNC_STRTOD, because it does not have the right guess
- dnl when cross-compiling.
- dnl Don't call AC_CHECK_FUNCS([strtod]) because it would collide with the
- dnl ac_cv_func_strtod variable set by the AC_FUNC_STRTOD macro.
- AC_CHECK_DECLS_ONCE([strtod])
- if test $ac_cv_have_decl_strtod != yes; then
- HAVE_STRTOD=0
- else
+ m4_ifdef([gl_FUNC_STRTOD_OBSOLETE], [
+ dnl Test whether strtod is declared.
+ dnl Don't call AC_FUNC_STRTOD, because it does not have the right guess
+ dnl when cross-compiling.
+ dnl Don't call AC_CHECK_FUNCS([strtod]) because it would collide with the
+ dnl ac_cv_func_strtod variable set by the AC_FUNC_STRTOD macro.
+ AC_CHECK_DECLS_ONCE([strtod])
+ if test $ac_cv_have_decl_strtod != yes; then
+ HAVE_STRTOD=0
+ fi
+ ])
+ if test $HAVE_STRTOD = 1; then
AC_CACHE_CHECK([whether strtod obeys C99], [gl_cv_func_strtod_works],
[AC_RUN_IFELSE([AC_LANG_PROGRAM([[
#include <stdlib.h>