changeset 15077:52f8925a96a4

realloc-*: Move AC_LIBOBJ invocations to module description. * m4/realloc.m4 (gl_REPLACE_REALLOC): Remove macro. (gl_FUNC_REALLOC_GNU, gl_FUNC_REALLOC_POSIX): Inline it here. Move AC_LIBOBJ invocations from here... * modules/realloc-gnu (configure.ac): ... to here. * modules/realloc-posix (configure.ac): ... and here.
author Bruno Haible <bruno@clisp.org>
date Sat, 21 May 2011 18:10:27 +0200
parents 19b4041d8566
children c6c18bdb8fc9
files ChangeLog m4/realloc.m4 modules/realloc-gnu modules/realloc-posix
diffstat 4 files changed, 18 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 2011-05-21  Bruno Haible  <bruno@clisp.org>
 
+	realloc-*: Move AC_LIBOBJ invocations to module description.
+	* m4/realloc.m4 (gl_REPLACE_REALLOC): Remove macro.
+	(gl_FUNC_REALLOC_GNU, gl_FUNC_REALLOC_POSIX): Inline it here. Move
+	AC_LIBOBJ invocations from here...
+	* modules/realloc-gnu (configure.ac): ... to here.
+	* modules/realloc-posix (configure.ac): ... and here.
+
+2011-05-21  Bruno Haible  <bruno@clisp.org>
+
 	readutmp: Move AC_LIBOBJ invocations to module description.
 	* m4/readutmp.m4 (gl_READUTMP): Move AC_LIBOBJ invocation from here...
 	* modules/readutmp (configure.ac): ... to here.
--- a/m4/realloc.m4
+++ b/m4/realloc.m4
@@ -1,4 +1,4 @@
-# realloc.m4 serial 11
+# realloc.m4 serial 12
 dnl Copyright (C) 2007, 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,
@@ -17,7 +17,7 @@
                [Define to 1 if your system has a GNU libc compatible 'realloc'
                 function, and to 0 otherwise.])],
     [AC_DEFINE([HAVE_REALLOC_GNU], [0])
-     gl_REPLACE_REALLOC
+     REPLACE_REALLOC=1
     ])
 ])# gl_FUNC_REALLOC_GNU
 
@@ -33,12 +33,6 @@
     AC_DEFINE([HAVE_REALLOC_POSIX], [1],
       [Define if the 'realloc' function is POSIX compliant.])
   else
-    gl_REPLACE_REALLOC
+    REPLACE_REALLOC=1
   fi
 ])
-
-AC_DEFUN([gl_REPLACE_REALLOC],
-[
-  AC_LIBOBJ([realloc])
-  REPLACE_REALLOC=1
-])
--- a/modules/realloc-gnu
+++ b/modules/realloc-gnu
@@ -14,6 +14,9 @@
 
 configure.ac:
 gl_FUNC_REALLOC_GNU
+if test $REPLACE_REALLOC = 1; then
+  AC_LIBOBJ([realloc])
+fi
 gl_MODULE_INDICATOR([realloc-gnu])
 
 Makefile.am:
--- a/modules/realloc-posix
+++ b/modules/realloc-posix
@@ -11,6 +11,9 @@
 
 configure.ac:
 gl_FUNC_REALLOC_POSIX
+if test $REPLACE_REALLOC = 1; then
+  AC_LIBOBJ([realloc])
+fi
 gl_STDLIB_MODULE_INDICATOR([realloc-posix])
 
 Makefile.am: