From: Akim Demaille Date: Mon, 9 Sep 2002 15:43:37 +0000 (+0000) Subject: * lib/autoconf/functions.m4 (AC_FUNC_GETLOADAVG): Use $srcdir when X-Git-Tag: AUTOCONF-2.54~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3e8becf84f6fdf723f07debf0b24f5f10264979d;p=thirdparty%2Fautoconf.git * lib/autoconf/functions.m4 (AC_FUNC_GETLOADAVG): Use $srcdir when looking for a replacement file. * lib/autoconf/general.m4 (AC_CHECK_DECLS): Check that the directory is relative. * doc/autoconf.texi (Generic Functions): Clarify the replacement directory definition. Reported by Andreas Schwab and Jim Meyering. --- diff --git a/ChangeLog b/ChangeLog index fb1518828..df3c64198 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2002-09-09 Akim Demaille + + * lib/autoconf/functions.m4 (AC_FUNC_GETLOADAVG): Use $srcdir when + looking for a replacement file. + * lib/autoconf/general.m4 (AC_CHECK_DECLS): Check that the + directory is relative. + * doc/autoconf.texi (Generic Functions): Clarify the replacement + directory definition. + Reported by Andreas Schwab and Jim Meyering. + 2002-09-06 Akim Demaille * doc/autoconf.texi (Setting Output Variables): Clarify what diff --git a/doc/autoconf.texi b/doc/autoconf.texi index 165769b34..179a18c66 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -4109,11 +4109,15 @@ AC_LIBOBJ($foo_or_bar) @defmac AC_CONFIG_LIBOBJ_DIR (@var{directory}) @acindex CONFIG_LIBOBJ_DIR Specify that @code{AC_LIBOBJ} replacement files are to be found in -@var{directory} (which defaults to @samp{.}, the top source directory). -@command{configure} might need to know where these files are for the +@var{directory}, a relative path starting from the top level of the +source tree. The replacement directory defaults to @file{.}, the top +level directory, and the most typical value is @file{lib}, corresponding +to @samp{AC_CONFIG_LIBOBJ_DIR(lib)}. + +@command{configure} might need to know the replacement directory for the following reasons: (i) some checks use the replacement files, (ii) some macros bypass broken system headers by installing links to the -replacement headers etc. +replacement headers, etc. @end defmac @sp 1 diff --git a/lib/autoconf/functions.m4 b/lib/autoconf/functions.m4 index fd47ee567..e4503b913 100644 --- a/lib/autoconf/functions.m4 +++ b/lib/autoconf/functions.m4 @@ -553,8 +553,8 @@ AC_DEFUN([AC_FUNC_GETLOADAVG], [ac_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 "$ac_config_libobj_dir/getloadavg.c" || - AC_MSG_ERROR([$ac_config_libobj_dir/getloadavg.c is missing]) +test -f "$srcdir/$ac_config_libobj_dir/getloadavg.c" || + AC_MSG_ERROR([$srcdir/$ac_config_libobj_dir/getloadavg.c is missing]) ac_save_LIBS=$LIBS @@ -600,7 +600,7 @@ AC_CHECK_FUNCS(getloadavg, [], AC_CACHE_CHECK(whether getloadavg requires setgid, ac_cv_func_getloadavg_setgid, [AC_EGREP_CPP([Yowza Am I SETGID yet], -[#include "$ac_config_libobj_dir/getloadavg.c" +[#include "$srcdir/$ac_config_libobj_dir/getloadavg.c" #ifdef LDAV_PRIVILEGED Yowza Am I SETGID yet @%:@endif], diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4 index 4c8f5337f..2fe73a78f 100644 --- a/lib/autoconf/general.m4 +++ b/lib/autoconf/general.m4 @@ -2363,9 +2363,11 @@ $3], # AC_CONFIG_LIBOBJ_DIR(DIRNAME) # ----------------------------- -# Announce LIBOBJ replacement files are in DIRNAME. +# Announce LIBOBJ replacement files are in $top_srcdir/DIRNAME. AC_DEFUN_ONCE([AC_CONFIG_LIBOBJ_DIR], -[m4_divert_text([DEFAULTS], [ac_config_libobj_dir=$1])[]dnl +[m4_bmatch([$1], [^]m4_defn([m4_cr_symbols2]), + [AC_WARNING([invalid replacement directory: $1])])dnl +m4_divert_text([DEFAULTS], [ac_config_libobj_dir=$1])[]dnl ])