changeset 12583:462199e08415

nl_langinfo: do not call AC_CHECK_FUNC_ONCE inside if. * m4/nl_langinfo.m4 (gl_FUNC_NL_LANGINFO): Do not call AC_CHECK_FUNC_ONCE inside if, do not adjust ac_cv_func_nl_langinfo.
author Paolo Bonzini <bonzini@gnu.org>
date Tue, 05 Jan 2010 18:54:29 +0100
parents 21afac8020be
children 87284d3e1be2
files ChangeLog m4/nl_langinfo.m4
diffstat 2 files changed, 9 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-01-06  Paolo Bonzini  <bonzini@gnu.org>
+
+	nl_langinfo: do not call AC_CHECK_FUNC_ONCE inside if.
+	* m4/nl_langinfo.m4 (gl_FUNC_NL_LANGINFO): Do not call
+	AC_CHECK_FUNC_ONCE inside if, do not adjust ac_cv_func_nl_langinfo.
+
 2010-01-06  Jim Meyering  <meyering@redhat.com>
 
 	readtokens: this module *does* require xalloc.h
--- a/m4/nl_langinfo.m4
+++ b/m4/nl_langinfo.m4
@@ -8,13 +8,9 @@
 [
   AC_REQUIRE([gl_LANGINFO_H_DEFAULTS])
   AC_REQUIRE([gl_LANGINFO_H])
-  if test $HAVE_LANGINFO_H = 1; then
-    AC_CHECK_FUNCS_ONCE([nl_langinfo])
-    : # in case AC_CHECK_FUNCS_ONCE expands to nothing
-  else
-    ac_cv_func_nl_langinfo=no
-  fi
-  if test $ac_cv_func_nl_langinfo = yes; then
+  AC_CHECK_FUNCS_ONCE([nl_langinfo])
+  if test $HAVE_LANGINFO_H = 1 \
+     && test x$ac_cv_func_nl_langinfo = xyes; then
     if test $HAVE_LANGINFO_CODESET = 1 && test $HAVE_LANGINFO_ERA = 1; then
       :
     else