changeset 7348:7d0519d18212

Pass to the gl_GETLOADAVG macro the $gl_source_base from gnulib-tool.
author Bruno Haible <bruno@clisp.org>
date Fri, 22 Sep 2006 12:47:54 +0000
parents d86464f614f7
children da9a7fb22bf8
files ChangeLog gnulib-tool m4/ChangeLog m4/getloadavg.m4 modules/getloadavg
diffstat 5 files changed, 21 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2006-09-17  Bruno Haible  <bruno@clisp.org>
+
+	* gnulib-tool (func_import, func_create_testdir): Set gl_source_base
+	at the beginning of the gl_INIT macro.
+	* modules/getloadavg (configure.ac): Pass $gl_source_base to
+	gl_GETLOADAVG.
+
 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
 	* gnulib-tool (func_version): Create output all at once.  This
--- a/gnulib-tool
+++ b/gnulib-tool
@@ -22,7 +22,7 @@
 
 progname=$0
 package=gnulib
-cvsdatestamp='$Date: 2006-09-22 03:10:42 $'
+cvsdatestamp='$Date: 2006-09-22 12:47:54 $'
 last_checkin_date=`echo "$cvsdatestamp" | sed -e 's,^\$[D]ate: ,,'`
 version=`echo "$last_checkin_date" | sed -e 's/ .*$//' -e 's,/,-,g'`
 nl='
@@ -1887,6 +1887,7 @@
       echo "  gl_libdeps="
       echo "  gl_ltlibdeps="
     fi
+    echo "  gl_source_base='$sourcebase'"
     if test "$auxdir" != "build-aux"; then
       sed_replace_build_aux='
         :a
@@ -2182,6 +2183,7 @@
        echo "gl_libdeps="
        echo "gl_ltlibdeps="
      fi
+     echo "gl_source_base='$testsbase'"
      # Wrap the set of autoconf snippets into an autoconf macro that is then
      # invoked. This is needed because autoconf does not support AC_REQUIRE
      # at the top level:
@@ -2290,6 +2292,7 @@
      echo "gl_libdeps="
      echo "gl_ltlibdeps="
    fi
+   echo "gl_source_base='$sourcebase'"
    # Wrap the set of autoconf snippets into an autoconf macro that is then
    # invoked. This is needed because autoconf does not support AC_REQUIRE
    # at the top level:
--- a/m4/ChangeLog
+++ b/m4/ChangeLog
@@ -1,3 +1,8 @@
+2006-09-17  Bruno Haible  <bruno@clisp.org>
+
+	* getloadavg.m4 (gl_GETLOADAVG): Expect the directory of getloadavg.c
+	as first argument.
+
 2006-09-20  Paul Eggert  <eggert@cs.ucla.edu>
 
 	* regex.m4 (gl_REGEX): Check for locale.h, since the test
--- a/m4/getloadavg.m4
+++ b/m4/getloadavg.m4
@@ -10,13 +10,13 @@
 # Autoconf defines AC_FUNC_GETLOADAVG, but that is obsolescent.
 # New applications should use gl_GETLOADAVG instead.
 
-# gl_GETLOADAVG
-# -------------
+# gl_GETLOADAVG(LIBOBJDIR)
+# ------------------------
 AC_DEFUN([gl_GETLOADAVG],
 [gl_have_func=no # yes means we've found a way to get the load average.
 
 # Make sure getloadavg.c is where it belongs, at configure-time.
-test -f "$srcdir/$ac_config_libobj_dir/getloadavg.c" ||
+test -f "$srcdir/$1/getloadavg.c" ||
   AC_MSG_ERROR([$srcdir/$ac_config_libobj_dir/getloadavg.c is missing])
 
 gl_save_LIBS=$LIBS
@@ -64,7 +64,7 @@
 	       gl_cv_func_getloadavg_setgid,
 [AC_EGREP_CPP([Yowza Am I SETGID yet],
 [#define CONFIGURING_GETLOADAVG
-#include "$srcdir/$ac_config_libobj_dir/getloadavg.c"
+#include "$srcdir/$1/getloadavg.c"
 #ifdef LDAV_PRIVILEGED
 Yowza Am I SETGID yet
 #endif
--- a/modules/getloadavg
+++ b/modules/getloadavg
@@ -14,7 +14,7 @@
 fcntl-safer
 
 configure.ac:
-gl_GETLOADAVG
+gl_GETLOADAVG([$gl_source_base])
 
 Makefile.am: