From 4e90ef85d2d3c2e42ce26d2e6eebfb5e5b0f0943 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sat, 21 May 2011 14:10:51 +0200 Subject: [PATCH] malloc-*: Move AC_LIBOBJ invocations to module description. * m4/malloc.m4 (gl_REPLACE_MALLOC): Remove macro. (gl_FUNC_MALLOC_GNU, gl_FUNC_MALLOC_POSIX): Inline it here. Move AC_LIBOBJ invocations from here... * modules/malloc-gnu (configure.ac): ... to here. * modules/malloc-posix (configure.ac): ... and here. --- ChangeLog | 9 +++++++++ m4/malloc.m4 | 12 +++--------- modules/malloc-gnu | 3 +++ modules/malloc-posix | 3 +++ 4 files changed, 18 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index f5a3d8aecb..11a1b8b8ed 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2011-05-21 Bruno Haible + + malloc-*: Move AC_LIBOBJ invocations to module description. + * m4/malloc.m4 (gl_REPLACE_MALLOC): Remove macro. + (gl_FUNC_MALLOC_GNU, gl_FUNC_MALLOC_POSIX): Inline it here. Move + AC_LIBOBJ invocations from here... + * modules/malloc-gnu (configure.ac): ... to here. + * modules/malloc-posix (configure.ac): ... and here. + 2011-05-21 Bruno Haible lstat, openat: Respect rules for use of AC_LIBOBJ. diff --git a/m4/malloc.m4 b/m4/malloc.m4 index 8094444507..87018ec87e 100644 --- a/m4/malloc.m4 +++ b/m4/malloc.m4 @@ -1,4 +1,4 @@ -# malloc.m4 serial 12 +# malloc.m4 serial 13 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 @@ AC_DEFUN([gl_FUNC_MALLOC_GNU], [Define to 1 if your system has a GNU libc compatible 'malloc' function, and to 0 otherwise.])], [AC_DEFINE([HAVE_MALLOC_GNU], [0]) - gl_REPLACE_MALLOC + REPLACE_MALLOC=1 ]) ]) @@ -33,7 +33,7 @@ AC_DEFUN([gl_FUNC_MALLOC_POSIX], AC_DEFINE([HAVE_MALLOC_POSIX], [1], [Define if the 'malloc' function is POSIX compliant.]) else - gl_REPLACE_MALLOC + REPLACE_MALLOC=1 fi ]) @@ -58,9 +58,3 @@ AC_DEFUN([gl_CHECK_MALLOC_POSIX], [gl_cv_func_malloc_posix=no]) ]) ]) - -AC_DEFUN([gl_REPLACE_MALLOC], -[ - AC_LIBOBJ([malloc]) - REPLACE_MALLOC=1 -]) diff --git a/modules/malloc-gnu b/modules/malloc-gnu index 7cb21b8d37..0bfa92d758 100644 --- a/modules/malloc-gnu +++ b/modules/malloc-gnu @@ -14,6 +14,9 @@ malloc-posix configure.ac: gl_FUNC_MALLOC_GNU +if test $REPLACE_MALLOC = 1; then + AC_LIBOBJ([malloc]) +fi gl_MODULE_INDICATOR([malloc-gnu]) Makefile.am: diff --git a/modules/malloc-posix b/modules/malloc-posix index 0b0edd6df4..b4b0bc0adb 100644 --- a/modules/malloc-posix +++ b/modules/malloc-posix @@ -10,6 +10,9 @@ stdlib configure.ac: gl_FUNC_MALLOC_POSIX +if test $REPLACE_MALLOC = 1; then + AC_LIBOBJ([malloc]) +fi gl_STDLIB_MODULE_INDICATOR([malloc-posix]) Makefile.am: -- 2.30.2