From d5df3358bd3ae257b342d03796dbd02e24638cf2 Mon Sep 17 00:00:00 2001
From: Bruno Haible <bruno@clisp.org>
Date: Sat, 21 May 2011 15:21:38 +0200
Subject: [PATCH] memmove: Move AC_LIBOBJ invocations to module description.

* m4/memmove.m4 (gl_FUNC_MEMMOVE): Call AC_CHECK_FUNCS instead of
AC_REPLACE_FUNCS. Move AC_LIBOBJ and gl_PREREQ_MEMMOVE invocations from
here...
* modules/memmove (configure.ac): ... to here.
---
 ChangeLog       | 8 ++++++++
 m4/memmove.m4   | 7 ++-----
 modules/memmove | 4 ++++
 3 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 55d5524d5f..756b753559 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2011-05-21  Bruno Haible  <bruno@clisp.org>
+
+	memmove: Move AC_LIBOBJ invocations to module description.
+	* m4/memmove.m4 (gl_FUNC_MEMMOVE): Call AC_CHECK_FUNCS instead of
+	AC_REPLACE_FUNCS. Move AC_LIBOBJ and gl_PREREQ_MEMMOVE invocations from
+	here...
+	* modules/memmove (configure.ac): ... to here.
+
 2011-05-21  Bruno Haible  <bruno@clisp.org>
 
 	memmem*: Move AC_LIBOBJ invocations to module description.
diff --git a/m4/memmove.m4 b/m4/memmove.m4
index 08c8febeb6..fda34f3696 100644
--- a/m4/memmove.m4
+++ b/m4/memmove.m4
@@ -1,4 +1,4 @@
-# memmove.m4 serial 3
+# memmove.m4 serial 4
 dnl Copyright (C) 2002, 2009-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,
@@ -6,10 +6,7 @@ dnl with or without modifications, as long as this notice is preserved.
 
 AC_DEFUN([gl_FUNC_MEMMOVE],
 [
-  AC_REPLACE_FUNCS([memmove])
-  if test $ac_cv_func_memmove = no; then
-    gl_PREREQ_MEMMOVE
-  fi
+  AC_CHECK_FUNCS([memmove])
 ])
 
 # Prerequisites of lib/memmove.c.
diff --git a/modules/memmove b/modules/memmove
index 53ca972685..a6fdff4861 100644
--- a/modules/memmove
+++ b/modules/memmove
@@ -15,6 +15,10 @@ Depends-on:
 
 configure.ac:
 gl_FUNC_MEMMOVE
+if test $ac_cv_func_memmove = no; then
+  AC_LIBOBJ([memmove])
+  gl_PREREQ_MEMMOVE
+fi
 
 Makefile.am:
 
-- 
2.30.2