[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
ac_top_srcdir not set
From: |
Pavel Roskin |
Subject: |
ac_top_srcdir not set |
Date: |
Wed, 19 Feb 2003 18:21:18 -0500 (EST) |
Hello!
Autoconf 2.57 as well as CVS autoconf doesn't set ac_top_srcdir and
several other variables in packages with just one configure.ac.
The reason is because _AC_SRCPATHS is only used in general.m4 like this:
if test "$ac_init_help" = "recursive"; then
# If there are subdirs, report their specific --help.
ac_popdir=`pwd`
for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
test -d $ac_dir || continue
_AC_SRCPATHS(["$ac_dir"])
...
_AC_SRCPATHS is the only place where ac_top_srcdir is set. ac_top_srcdir
is documented and there is no mention that it may not be set under certain
conditions.
What's even worth, we may have some variables like ac_srcdir left from the
last subdirectory.
It appears that the error messages reported by Christian Cornelssen in
http://mail.gnu.org/archive/html/autoconf-patches/2003-01/msg00003.html
may be a result of ac_srcdir not being set.
Following patch fixes the problem. It has been tested both for local and
srcdir builds. I haven't worked on Autoconf for some time, so I need
somebody to look at this patch to make sure that I'm not doing anything
stupid.
===========================
--- ChangeLog
+++ ChangeLog
@@ -1 +1,6 @@
+2003-02-19 Pavel Roskin <address@hidden>
+
+ * lib/autoconf/general.m4 (_AC_INIT_HELP): Call _AC_SRCPATHS for
+ the top-level directory.
+
2002-12-23 Paul Eggert <address@hidden>
--- lib/autoconf/general.m4
+++ lib/autoconf/general.m4
@@ -1067,6 +1067,8 @@
done
fi
+_AC_SRCPATHS(["."])
+
test -n "$ac_init_help" && exit 0
m4_divert_pop([HELP_END])dnl
])# _AC_INIT_HELP
===========================
--
Regards,
Pavel Roskin
- ac_top_srcdir not set,
Pavel Roskin <=