unsetenv: Move AC_LIBOBJ invocations to module description.
authorBruno Haible <bruno@clisp.org>
Sat, 21 May 2011 22:06:38 +0000 (00:06 +0200)
committerBruno Haible <bruno@clisp.org>
Wed, 15 Jun 2011 22:06:45 +0000 (00:06 +0200)
* m4/setenv.m4 (gl_FUNC_UNSETENV): Set HAVE_UNSETENV. Move AC_LIBOBJ
and gl_PREREQ_UNSETENV invocations from here...
* modules/unsetenv (configure.ac): ... to here.
(Depends-on): Update.

ChangeLog
m4/setenv.m4
modules/unsetenv

index 57e3815d2ae40d2a6fc9a8c72e31f0310f4dcb99..5fe5fcef23f6c55b61981b3a0c459be9cf75c4aa 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2011-05-21  Bruno Haible  <bruno@clisp.org>
+
+       unsetenv: Move AC_LIBOBJ invocations to module description.
+       * m4/setenv.m4 (gl_FUNC_UNSETENV): Set HAVE_UNSETENV. Move AC_LIBOBJ
+       and gl_PREREQ_UNSETENV invocations from here...
+       * modules/unsetenv (configure.ac): ... to here.
+       (Depends-on): Update.
+
 2011-05-21  Bruno Haible  <bruno@clisp.org>
 
        setenv: Move AC_LIBOBJ invocations to module description.
index eaa53b1e3c114956780f5a3db48a010fbf88fa9d..8927a6cac19f89872f8acc62b2283d709df9f85f 100644 (file)
@@ -1,4 +1,4 @@
-# setenv.m4 serial 23
+# setenv.m4 serial 24
 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,
@@ -62,9 +62,9 @@ AC_DEFUN([gl_FUNC_UNSETENV],
   fi
   AC_CHECK_FUNCS([unsetenv])
   if test $ac_cv_func_unsetenv = no; then
-    AC_LIBOBJ([unsetenv])
-    gl_PREREQ_UNSETENV
+    HAVE_UNSETENV=0
   else
+    HAVE_UNSETENV=1
     dnl Some BSDs return void, failing to do error checking.
     AC_CACHE_CHECK([for unsetenv() return type], [gt_cv_func_unsetenv_ret],
       [AC_COMPILE_IFELSE(
@@ -90,7 +90,6 @@ int unsetenv();
       AC_DEFINE([VOID_UNSETENV], [1], [Define to 1 if unsetenv returns void
        instead of int.])
       REPLACE_UNSETENV=1
-      AC_LIBOBJ([unsetenv])
     fi
 
     dnl Solaris 10 unsetenv does not remove all copies of a name.
@@ -123,7 +122,6 @@ int unsetenv();
       [gl_cv_func_unsetenv_works="guessing no"])])
     if test "$gl_cv_func_unsetenv_works" != yes; then
       REPLACE_UNSETENV=1
-      AC_LIBOBJ([unsetenv])
     fi
   fi
 ])
index 26662b349b4701e7c078edc41c67a8ee31b2f7ac..2be6e46d7307089ef581f58c7eed81eea4141564 100644 (file)
@@ -7,11 +7,15 @@ m4/setenv.m4
 
 Depends-on:
 stdlib
-unistd          [test $ac_cv_func_unsetenv = no || test $REPLACE_UNSETENV = 1]
-environ         [test $ac_cv_func_unsetenv = no || test $REPLACE_UNSETENV = 1]
+unistd          [test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1]
+environ         [test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1]
 
 configure.ac:
 gl_FUNC_UNSETENV
+if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
+  AC_LIBOBJ([unsetenv])
+  gl_PREREQ_UNSETENV
+fi
 gl_STDLIB_MODULE_INDICATOR([unsetenv])
 
 Makefile.am: