relocatable-prog-wrapper: Fix possible link error.
authorBruno Haible <bruno@clisp.org>
Sat, 21 May 2011 21:41:37 +0000 (23:41 +0200)
committerIan Beckwith <ianb@erislabs.net>
Thu, 9 Jun 2011 17:46:41 +0000 (18:46 +0100)
* 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
m4/canonicalize.m4
m4/readlink.m4
m4/setenv.m4

index 62b9505..65ccc70 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2011-05-21  Bruno Haible  <bruno@clisp.org>
+
+       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  <meyering@redhat.com>
 
        maint: replace misused "a" with "an"
index beb6163..9a099bd 100644 (file)
@@ -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])
index a502ca5..ec737d3 100644 (file)
@@ -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])
index ba619b0..c8b025c 100644 (file)
@@ -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
 ])