Use of AC_LIBOBJ is suboptimal: The libgnu.a specific CFLAGS or CPPFLAGS are ignored for such compilation units.
We had AC_LIBOBJ([realloc]) because it was necessary to make 'realloc-gnu' and 'realloc-posix' work together. This is no longer needed since 2024-10-27. 2024-11-05 Bruno Haible <br...@clisp.org> realloc-posix: Avoid use of AC_LIBOBJ. * modules/realloc-posix (configure.ac): Define GL_COND_OBJ_REALLOC_POSIX. Don't invoke AC_LIBOBJ. (Makefile.am): Add realloc.c to lib_SOURCES instead. diff --git a/modules/realloc-posix b/modules/realloc-posix index 236afa3113..fd4fd89c3d 100644 --- a/modules/realloc-posix +++ b/modules/realloc-posix @@ -14,12 +14,14 @@ stdlib configure.ac: gl_FUNC_REALLOC_POSIX gl_FUNC_REALLOC_0_NONNULL -if test $REPLACE_REALLOC_FOR_REALLOC_POSIX != 0; then - AC_LIBOBJ([realloc]) -fi +gl_CONDITIONAL([GL_COND_OBJ_REALLOC_POSIX], + [test $REPLACE_REALLOC_FOR_REALLOC_POSIX != 0]) gl_STDLIB_MODULE_INDICATOR([realloc-posix]) Makefile.am: +if GL_COND_OBJ_REALLOC_POSIX +lib_SOURCES += realloc.c +endif Include: <stdlib.h>