wctob: Move AC_LIBOBJ invocations to module description.
authorBruno Haible <bruno@clisp.org>
Sun, 22 May 2011 16:47:27 +0000 (18:47 +0200)
committerBruno Haible <bruno@clisp.org>
Wed, 15 Jun 2011 22:07:12 +0000 (00:07 +0200)
* m4/wctob.m4 (gl_FUNC_WCTOB): Set HAVE_WCTOB. Move AC_LIBOBJ and
gl_PREREQ_WCTOB invocations from here...
* modules/wctob (configure.ac): ... to here.
(Depends-on): Update conditions.

ChangeLog
m4/wctob.m4
modules/wctob

index ab675bade48169ec606181c43382150cc3213dab..4e1d228719a1baf8183f51abbc79fad166fbd737 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2011-05-22  Bruno Haible  <bruno@clisp.org>
+
+       wctob: Move AC_LIBOBJ invocations to module description.
+       * m4/wctob.m4 (gl_FUNC_WCTOB): Set HAVE_WCTOB. Move AC_LIBOBJ and
+       gl_PREREQ_WCTOB invocations from here...
+       * modules/wctob (configure.ac): ... to here.
+       (Depends-on): Update conditions.
+
 2011-05-22  Bruno Haible  <bruno@clisp.org>
 
        wcsxfrm: Move AC_LIBOBJ invocations to module description.
index b66e755d4d5b5a3e86b981ca4a14eef894de4dac..8175d00e3357e12403b203d584cf3cc7cb71d693 100644 (file)
@@ -1,4 +1,4 @@
-# wctob.m4 serial 8
+# wctob.m4 serial 9
 dnl Copyright (C) 2008-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,
@@ -10,10 +10,10 @@ AC_DEFUN([gl_FUNC_WCTOB],
 
   AC_CHECK_FUNCS_ONCE([wctob])
   if test $ac_cv_func_wctob = no; then
+    HAVE_WCTOB=0
     HAVE_DECL_WCTOB=0
-    AC_LIBOBJ([wctob])
-    gl_PREREQ_WCTOB
   else
+    HAVE_WCTOB=1
 
     dnl Solaris 9 has the wctob() function but it does not work.
     dnl Cygwin 1.7.2 has the wctob() function but it clobbers caller-owned
@@ -101,10 +101,7 @@ int main ()
       *yes) ;;
       *) REPLACE_WCTOB=1 ;;
     esac
-    if test $REPLACE_WCTOB = 1; then
-      AC_LIBOBJ([wctob])
-      gl_PREREQ_WCTOB
-    else
+    if test $REPLACE_WCTOB = 0; then
 
       dnl IRIX 6.5 has the wctob() function but does not declare it.
       AC_CHECK_DECLS([wctob], [], [], [
index be430ebf416cc69635f093a5657258828be966db..2801c2f7c930f4460395ba1b2438849797e9c30c 100644 (file)
@@ -9,10 +9,14 @@ m4/codeset.m4
 
 Depends-on:
 wchar
-wctomb          [test $ac_cv_func_wctob = no || test $REPLACE_WCTOB = 1]
+wctomb          [test $HAVE_WCTOB = 0 || test $REPLACE_WCTOB = 1]
 
 configure.ac:
 gl_FUNC_WCTOB
+if test $HAVE_WCTOB = 0 || test $REPLACE_WCTOB = 1; then
+  AC_LIBOBJ([wctob])
+  gl_PREREQ_WCTOB
+fi
 gl_WCHAR_MODULE_INDICATOR([wctob])
 
 Makefile.am: