changeset 13426:217e97d8c256

Factor out common code in gl_FUNC_STRTOD.
author Ben Pfaff <blp@cs.stanford.edu>
date Mon, 14 Jun 2010 16:52:25 -0700
parents e2b2ba442532
children 727e17a1e8b3
files ChangeLog m4/strtod.m4
diffstat 2 files changed, 9 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-06-14  Ben Pfaff  <blp@cs.stanford.edu>
+
+	* m4/strtod.m4 (gl_FUNC_STRTOD): Factor out common code.
+
 2010-06-15  Bruno Haible  <bruno@clisp.org>
 
 	* m4/strtod.m4 (gl_FUNC_STRTOD): Stop using AC_FUNC_STRTOD.
--- a/m4/strtod.m4
+++ b/m4/strtod.m4
@@ -15,9 +15,6 @@
   AC_CHECK_DECLS_ONCE([strtod])
   if test $ac_cv_have_decl_strtod != yes; then
     HAVE_STRTOD=0
-    gl_PREREQ_STRTOD
-    dnl Use undocumented macro to set POW_LIB correctly.
-    _AC_LIBOBJ_STRTOD
   else
     AC_CACHE_CHECK([whether strtod obeys C99], [gl_cv_func_strtod_works],
       [AC_RUN_IFELSE([AC_LANG_PROGRAM([[
@@ -101,11 +98,13 @@
         [gl_cv_func_strtod_works="guessing no"])])
     if test "$gl_cv_func_strtod_works" != yes; then
       REPLACE_STRTOD=1
-      gl_PREREQ_STRTOD
-      dnl Use undocumented macro to set POW_LIB correctly.
-      _AC_LIBOBJ_STRTOD
     fi
   fi
+  if test $HAVE_STRTOD = 0 || test $REPLACE_STRTOD = 1; then
+    gl_PREREQ_STRTOD
+    dnl Use undocumented macro to set POW_LIB correctly.
+    _AC_LIBOBJ_STRTOD
+  fi
 ])
 
 # Prerequisites of lib/strtod.c.