Pass to the gl_GETLOADAVG macro the $gl_source_base from gnulib-tool.
authorBruno Haible <bruno@clisp.org>
Fri, 22 Sep 2006 12:47:54 +0000 (12:47 +0000)
committerBruno Haible <bruno@clisp.org>
Fri, 22 Sep 2006 12:47:54 +0000 (12:47 +0000)
ChangeLog
gnulib-tool
m4/ChangeLog
m4/getloadavg.m4
modules/getloadavg

index 057f6c4..c8ff08c 100644 (file)
--- 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
index b69bc4e..b334e18 100755 (executable)
@@ -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 @@ func_import ()
       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 @@ func_create_testdir ()
        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 @@ func_create_testdir ()
      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:
index 908c93d..3d961eb 100644 (file)
@@ -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
index 9a3c3aa..14198ec 100644 (file)
 # 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 @@ AC_CACHE_CHECK(whether getloadavg requires setgid,
               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
index c5b2aef..bf306e4 100644 (file)
@@ -14,7 +14,7 @@ stdbool
 fcntl-safer
 
 configure.ac:
-gl_GETLOADAVG
+gl_GETLOADAVG([$gl_source_base])
 
 Makefile.am: