}
# Finally, adds any directory listed in the 'dirlist' file.
- if (open (DIRLIST, "$system_includes[0]/dirlist"))
+ if (@system_includes && open (DIRLIST, "$system_includes[0]/dirlist"))
{
while (<DIRLIST>)
{
################################################################
+# Don't refer to installation directories from the build environment
+if (exists $ENV{"AUTOMAKE_UNINSTALLED"})
+ {
+ @automake_includes = ();
+ @system_includes = ();
+ }
+
+@automake_includes = ($ENV{"ACLOCAL_AUTOMAKE_DIR"})
+ if (exists $ENV{"ACLOCAL_AUTOMAKE_DIR"});
+
parse_WARNINGS; # Parse the WARNINGS environment variable.
parse_arguments;
parse_ACLOCAL_PATH;
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-BEGIN
-{
- use strict;
- unshift @ARGV,
- '--automake-acdir=@abs_top_srcdir@/m4',
- '--system-acdir=@abs_top_srcdir@/m4/acdir';
-}
require '@abs_top_builddir@/bin/aclocal';
Look for the automake-provided macro files in @var{dir} instead of
in the installation directory. This is typically used for debugging.
+@vindex ACLOCAL_AUTOMAKE_DIR
+The environment variable @env{ACLOCAL_AUTOMAKE_DIR} provides another
+way to set the directory containing automake-provided macro files.
+However @option{--automake-acdir} takes precedence over it.
+
@item --system-acdir=@var{dir}
@opindex --system-acdir
Look for the system-wide third-party macro files (and the special
AUTOMAKE_LIBDIR="$abs_top_srcdir/lib"
export AUTOMAKE_LIBDIR
+ACLOCAL_AUTOMAKE_DIR="$abs_top_srcdir/m4"
+export ACLOCAL_AUTOMAKE_DIR
+
+ACLOCAL_PATH="$abs_top_srcdir/m4/acdir"
+export ACLOCAL_PATH
+
exec "$@"
cat stderr >&2
grep "^configure\\.ac:5:.*$warn_rx" stderr
-cat aclocal.sav "$am_automake_acdir"/obsolete.m4 > aclocal.m4
+cat aclocal.sav "$am_top_srcdir"/m4/obsolete.m4 > aclocal.m4
$AUTOCONF -Wnone 2>stderr && { cat stderr >&2; exit 1; }
cat stderr >&2
grep "^configure\\.ac:5:.*$warn_rx" stderr
;;
no)
am_amdir=$am_top_srcdir/lib/am
- am_automake_acdir=$am_top_srcdir/m4
+ am_automake_acdir=""
am_bindir=$am_top_builddir/bin
am_datadir=$am_top_srcdir
am_docdir=$am_top_srcdir/doc
am_pkgvdatadir=$am_top_srcdir/lib
am_scriptdir=$am_top_srcdir/lib
- am_system_acdir=$am_top_srcdir/m4/acdir
+ am_system_acdir=""
;;
*)
echo "$me: variable 'am_running_installcheck' has invalid"