]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* lib/autoconf/functions.m4 (AC_FUNC_GETLOADAVG): Use $srcdir when
authorAkim Demaille <akim@epita.fr>
Mon, 9 Sep 2002 15:43:37 +0000 (15:43 +0000)
committerAkim Demaille <akim@epita.fr>
Mon, 9 Sep 2002 15:43:37 +0000 (15:43 +0000)
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.

ChangeLog
doc/autoconf.texi
lib/autoconf/functions.m4
lib/autoconf/general.m4

index fb1518828d0a239bb9343b9c6a50ed713e3d8439..df3c64198e2235ab3f143d6c63f716ea5ebb7d5e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2002-09-09  Akim Demaille  <akim@epita.fr>
+
+       * 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  <akim@epita.fr>
 
        * doc/autoconf.texi (Setting Output Variables): Clarify what
index 165769b34ed9b1f3b6b22e55c824ebb8349e880d..179a18c66cd1838161e12c0bdfbb6be2e243f215 100644 (file)
@@ -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
index fd47ee56710038a4c30ba5f9aafed0f82cb8fa93..e4503b9135734a7bed23d923fb9c6df88f1a0555 100644 (file)
@@ -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],
index 4c8f5337f5fe6d397ed50d653e6f405bd50ce12c..2fe73a78fc887d6009f9c2231651a7588ec250c9 100644 (file)
@@ -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
 ])