From f00bf3ddf06e944b995c913d6c6935cf14eec74b Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sat, 21 May 2011 23:41:37 +0200 Subject: [PATCH] relocatable-prog-wrapper: Fix possible link error. * m4/setenv.m4 (gl_FUNC_SETENV_SEPARATE): Move determination of HAVE_SETENV and REPLACE_SETENV and AC_LIBOBJ invocation from here... (gl_FUNC_SETENV): ... to here. * m4/canonicalize.m4 (gl_CANONICALIZE_LGPL_SEPARATE): Update comment. * m4/readlink.m4 (gl_FUNC_READLINK_SEPARATE): Likewise. (cherry picked from commit 325f131b3d6bdf1b14644f51606d81ee98f6867b) --- ChangeLog | 9 +++++++++ m4/canonicalize.m4 | 4 ++-- m4/readlink.m4 | 5 +++-- m4/setenv.m4 | 32 ++++++++++++++++---------------- 4 files changed, 30 insertions(+), 20 deletions(-) diff --git a/ChangeLog b/ChangeLog index 62b95058c..65ccc705d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2011-05-21 Bruno Haible + + relocatable-prog-wrapper: Fix possible link error. + * m4/setenv.m4 (gl_FUNC_SETENV_SEPARATE): Move determination of + HAVE_SETENV and REPLACE_SETENV and AC_LIBOBJ invocation from here... + (gl_FUNC_SETENV): ... to here. + * m4/canonicalize.m4 (gl_CANONICALIZE_LGPL_SEPARATE): Update comment. + * m4/readlink.m4 (gl_FUNC_READLINK_SEPARATE): Likewise. + 2011-05-20 Jim Meyering maint: replace misused "a" with "an" diff --git a/m4/canonicalize.m4 b/m4/canonicalize.m4 index beb6163ec..9a099bde1 100644 --- a/m4/canonicalize.m4 +++ b/m4/canonicalize.m4 @@ -1,4 +1,4 @@ -# canonicalize.m4 serial 18 +# canonicalize.m4 serial 19 dnl Copyright (C) 2003-2007, 2009-2011 Free Software Foundation, Inc. @@ -44,7 +44,7 @@ AC_DEFUN([gl_CANONICALIZE_LGPL], ]) # Like gl_CANONICALIZE_LGPL, except prepare for separate compilation -# (no AC_LIBOBJ). +# (no REPLACE_CANONICALIZE_FILE_NAME, no REPLACE_REALPATH, no AC_LIBOBJ). AC_DEFUN([gl_CANONICALIZE_LGPL_SEPARATE], [ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) diff --git a/m4/readlink.m4 b/m4/readlink.m4 index a502ca560..ec737d3f4 100644 --- a/m4/readlink.m4 +++ b/m4/readlink.m4 @@ -1,4 +1,4 @@ -# readlink.m4 serial 9 +# readlink.m4 serial 10 dnl Copyright (C) 2003, 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, @@ -48,7 +48,8 @@ AC_DEFUN([gl_FUNC_READLINK], fi ]) -# Like gl_FUNC_READLINK, except prepare for separate compilation (no AC_LIBOBJ). +# Like gl_FUNC_READLINK, except prepare for separate compilation +# (no REPLACE_READLINK, no AC_LIBOBJ). AC_DEFUN([gl_FUNC_READLINK_SEPARATE], [ AC_CHECK_FUNCS_ONCE([readlink]) diff --git a/m4/setenv.m4 b/m4/setenv.m4 index ba619b082..c8b025ce4 100644 --- a/m4/setenv.m4 +++ b/m4/setenv.m4 @@ -1,4 +1,4 @@ -# setenv.m4 serial 21 +# setenv.m4 serial 22 dnl Copyright (C) 2001-2004, 2006-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, @@ -7,20 +7,6 @@ dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_SETENV], [ AC_REQUIRE([gl_FUNC_SETENV_SEPARATE]) - if test $HAVE_SETENV$REPLACE_SETENV != 10; then - AC_LIBOBJ([setenv]) - fi -]) - -# Like gl_FUNC_SETENV, except prepare for separate compilation (no AC_LIBOBJ). -AC_DEFUN([gl_FUNC_SETENV_SEPARATE], -[ - AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) - AC_CHECK_DECLS_ONCE([setenv]) - if test $ac_cv_have_decl_setenv = no; then - HAVE_DECL_SETENV=0 - fi - AC_CHECK_FUNCS_ONCE([setenv]) if test $ac_cv_func_setenv = no; then HAVE_SETENV=0 else @@ -50,9 +36,23 @@ AC_DEFUN([gl_FUNC_SETENV_SEPARATE], [gl_cv_func_setenv_works="guessing no"])]) if test "$gl_cv_func_setenv_works" != yes; then REPLACE_SETENV=1 - AC_LIBOBJ([setenv]) fi fi + if test $HAVE_SETENV$REPLACE_SETENV != 10; then + AC_LIBOBJ([setenv]) + fi +]) + +# Like gl_FUNC_SETENV, except prepare for separate compilation +# (no REPLACE_SETENV, no AC_LIBOBJ). +AC_DEFUN([gl_FUNC_SETENV_SEPARATE], +[ + AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) + AC_CHECK_DECLS_ONCE([setenv]) + if test $ac_cv_have_decl_setenv = no; then + HAVE_DECL_SETENV=0 + fi + AC_CHECK_FUNCS_ONCE([setenv]) gl_PREREQ_SETENV ]) -- 2.11.0