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 ab675ba..4e1d228 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 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.
        * m4/wcsxfrm.m4 (gl_FUNC_WCSXFRM): Move AC_LIBOBJ invocation from
        here...
index b66e755..8175d00 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 be430eb..2801c2f 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: