From bc04f8f55f384cbe7682f13699b6d584c9a4c56f Mon Sep 17 00:00:00 2001
From: Bruno Haible <bruno@clisp.org>
Date: Sat, 21 May 2011 14:27:19 +0200
Subject: [PATCH] mbtowc: Move AC_LIBOBJ invocations to module description.

* m4/mbtowc.m4 (gl_FUNC_MBTOWC): Move AC_LIBOBJ and gl_PREREQ_MBTOWC
invocations from here...
* modules/mbtowc (configure.ac): ... to here.
---
 ChangeLog      | 7 +++++++
 m4/mbtowc.m4   | 6 +-----
 modules/mbtowc | 4 ++++
 3 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index b017548c5f..af0d43ea8a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-05-21  Bruno Haible  <bruno@clisp.org>
+
+	mbtowc: Move AC_LIBOBJ invocations to module description.
+	* m4/mbtowc.m4 (gl_FUNC_MBTOWC): Move AC_LIBOBJ and gl_PREREQ_MBTOWC
+	invocations from here...
+	* modules/mbtowc (configure.ac): ... to here.
+
 2011-05-21  Bruno Haible  <bruno@clisp.org>
 
 	mbsrtowcs: Move AC_LIBOBJ invocations to module description.
diff --git a/m4/mbtowc.m4 b/m4/mbtowc.m4
index 9215892f6f..7793a00711 100644
--- a/m4/mbtowc.m4
+++ b/m4/mbtowc.m4
@@ -1,4 +1,4 @@
-# mbtowc.m4 serial 1
+# mbtowc.m4 serial 2
 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,
@@ -11,10 +11,6 @@ AC_DEFUN([gl_FUNC_MBTOWC],
   if false; then
     REPLACE_MBTOWC=1
   fi
-  if test $REPLACE_MBTOWC = 1; then
-    AC_LIBOBJ([mbtowc])
-    gl_PREREQ_MBTOWC
-  fi
 ])
 
 # Prerequisites of lib/mbtowc.c.
diff --git a/modules/mbtowc b/modules/mbtowc
index 02b0c88dcf..c23323b3e8 100644
--- a/modules/mbtowc
+++ b/modules/mbtowc
@@ -13,6 +13,10 @@ wchar           [test $REPLACE_MBTOWC = 1]
 
 configure.ac:
 gl_FUNC_MBTOWC
+if test $REPLACE_MBTOWC = 1; then
+  AC_LIBOBJ([mbtowc])
+  gl_PREREQ_MBTOWC
+fi
 gl_STDLIB_MODULE_INDICATOR([mbtowc])
 
 Makefile.am:
-- 
2.30.2