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-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
@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
[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
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],
# 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
])