From b857fd90570b0775d9f577c67632e4b2d3581bb1 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Fri, 22 Sep 2006 12:47:54 +0000 Subject: [PATCH] Pass to the gl_GETLOADAVG macro the $gl_source_base from gnulib-tool. --- ChangeLog | 7 +++++++ gnulib-tool | 5 ++++- m4/ChangeLog | 5 +++++ m4/getloadavg.m4 | 8 ++++---- modules/getloadavg | 2 +- 5 files changed, 21 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 057f6c4e4..c8ff08ced 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2006-09-17 Bruno Haible + + * 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 * gnulib-tool (func_version): Create output all at once. This diff --git a/gnulib-tool b/gnulib-tool index b69bc4e2e..b334e18d1 100755 --- 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 @@ 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: diff --git a/m4/ChangeLog b/m4/ChangeLog index 908c93d26..3d961eb4d 100644 --- a/m4/ChangeLog +++ b/m4/ChangeLog @@ -1,3 +1,8 @@ +2006-09-17 Bruno Haible + + * getloadavg.m4 (gl_GETLOADAVG): Expect the directory of getloadavg.c + as first argument. + 2006-09-20 Paul Eggert * regex.m4 (gl_REGEX): Check for locale.h, since the test diff --git a/m4/getloadavg.m4 b/m4/getloadavg.m4 index 9a3c3aafb..14198eca4 100644 --- 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 @@ 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 diff --git a/modules/getloadavg b/modules/getloadavg index c5b2aefaa..bf306e427 100644 --- a/modules/getloadavg +++ b/modules/getloadavg @@ -14,7 +14,7 @@ stdbool fcntl-safer configure.ac: -gl_GETLOADAVG +gl_GETLOADAVG([$gl_source_base]) Makefile.am: -- 2.11.0