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 057f6c4e4ef908506aa2548e92d36fec0b015bf0..c8ff08ced0925721269dff3589b60452ad0de8f2 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 b69bc4e2e444a31e41e2d6d10c3fc799f614ec42..b334e18d13117161b377d4ab12869b35c0f46205 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 908c93d265aabadfb5d4d008d5d4b9fab8f308b6..3d961eb4d447a645a387ed41bb8900c2286ecb7e 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 9a3c3aafbe07769b02cb31faab8db9193af68b93..14198eca442d01202fa68809876ce00109054b9c 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 c5b2aefaa3da5dfff9331dd09c271b0ca4e4c135..bf306e427b0a54828e11abdb7436e496932fae57 100644 (file)
@@ -14,7 +14,7 @@ stdbool
 fcntl-safer
 
 configure.ac:
-gl_GETLOADAVG
+gl_GETLOADAVG([$gl_source_base])
 
 Makefile.am: