From 5578f81fadb4a41139718c79d321ccd6b52a4237 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Mon, 10 Aug 2009 23:54:09 +0200 Subject: [PATCH] Don't optimize AC_LIBOBJs, as they may appear in different contexts. --- ChangeLog | 10 ++++++++++ m4/close.m4 | 6 ++---- m4/fclose.m4 | 8 +++----- m4/open.m4 | 8 +++----- m4/strstr.m4 | 6 ++++-- 5 files changed, 22 insertions(+), 16 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7784e0c44..570bc1a02 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,15 @@ 2009-08-10 Bruno Haible + Don't optimize AC_LIBOBJs, as they may appear in different contexts. + * m4/close.m4 (gl_REPLACE_CLOSE): Execute AC_LIBOBJ unconditionally, + not only the first time. + * m4/fclose.m4 (gl_REPLACE_FCLOSE): Likewise. + * m4/open.m4 (gl_REPLACE_OPEN): Likewise. + * m4/strstr.m4 (gl_FUNC_STRSTR): Execute AC_LIBOBJ when REPLACE_STRSTR + is 1, not only the the first time. + +2009-08-10 Bruno Haible + Make it possible to use module 'gethostname' without module 'close'. * lib/unistd.in.h (close): Evoke a link error only if UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS is set. diff --git a/m4/close.m4 b/m4/close.m4 index a6623a330..fdcc96b67 100644 --- a/m4/close.m4 +++ b/m4/close.m4 @@ -1,4 +1,4 @@ -# close.m4 serial 4 +# close.m4 serial 5 dnl Copyright (C) 2008-2009 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -20,9 +20,7 @@ AC_DEFUN([gl_FUNC_CLOSE], AC_DEFUN([gl_REPLACE_CLOSE], [ AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) - if test $REPLACE_CLOSE != 1; then - AC_LIBOBJ([close]) - fi REPLACE_CLOSE=1 + AC_LIBOBJ([close]) gl_REPLACE_FCLOSE ]) diff --git a/m4/fclose.m4 b/m4/fclose.m4 index d10c104fa..ab2986fd1 100644 --- a/m4/fclose.m4 +++ b/m4/fclose.m4 @@ -1,5 +1,5 @@ -# fclose.m4 serial 1 -dnl Copyright (C) 2008 Free Software Foundation, Inc. +# fclose.m4 serial 2 +dnl Copyright (C) 2008-2009 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -11,8 +11,6 @@ AC_DEFUN([gl_FUNC_FCLOSE], AC_DEFUN([gl_REPLACE_FCLOSE], [ AC_REQUIRE([gl_STDIO_H_DEFAULTS]) - if test $REPLACE_FCLOSE != 1; then - AC_LIBOBJ([fclose]) - fi REPLACE_FCLOSE=1 + AC_LIBOBJ([fclose]) ]) diff --git a/m4/open.m4 b/m4/open.m4 index 3202886aa..c0eb8e862 100644 --- a/m4/open.m4 +++ b/m4/open.m4 @@ -1,4 +1,4 @@ -# open.m4 serial 6 +# open.m4 serial 7 dnl Copyright (C) 2007-2009 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -51,11 +51,9 @@ changequote([,])dnl AC_DEFUN([gl_REPLACE_OPEN], [ AC_REQUIRE([gl_FCNTL_H_DEFAULTS]) - if test $REPLACE_OPEN != 1; then - AC_LIBOBJ([open]) - gl_PREREQ_OPEN - fi REPLACE_OPEN=1 + AC_LIBOBJ([open]) + gl_PREREQ_OPEN ]) # Prerequisites of lib/open.c. diff --git a/m4/strstr.m4 b/m4/strstr.m4 index 0f17a6b1e..b72df089f 100644 --- a/m4/strstr.m4 +++ b/m4/strstr.m4 @@ -1,4 +1,4 @@ -# strstr.m4 serial 6 +# strstr.m4 serial 7 dnl Copyright (C) 2008, 2009 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -71,7 +71,9 @@ AC_DEFUN([gl_FUNC_STRSTR], ]) if test "$gl_cv_func_strstr_linear" != yes; then REPLACE_STRSTR=1 - AC_LIBOBJ([strstr]) fi fi + if test $REPLACE_STRSTR = 1; then + AC_LIBOBJ([strstr]) + fi ]) # gl_FUNC_STRSTR -- 2.11.0