summaryrefslogtreecommitdiff
path: root/bin/aclocal.in
diff options
context:
space:
mode:
authorMathieu Lirzin <mthl@gnu.org>2017-08-31 19:23:42 +0200
committerMathieu Lirzin <mthl@gnu.org>2017-08-31 19:23:42 +0200
commitf389ecb89acb7f51b6a9e8f41ebad3e45ac905a2 (patch)
tree9380abfd73fe36221b5378562629ef2da539e862 /bin/aclocal.in
parentcc7231cc3668a387ae36905efca11f9d236c8df6 (diff)
parente94c0186d98d70df2f18c17622ee75f80f95e17b (diff)
downloadautomake-f389ecb89acb7f51b6a9e8f41ebad3e45ac905a2.tar.gz
Merge branch 'minor'
Diffstat (limited to 'bin/aclocal.in')
-rw-r--r--bin/aclocal.in40
1 files changed, 34 insertions, 6 deletions
diff --git a/bin/aclocal.in b/bin/aclocal.in
index e90bef9fb..87dc9d6ec 100644
--- a/bin/aclocal.in
+++ b/bin/aclocal.in
@@ -27,9 +27,8 @@ eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac'
BEGIN
{
- @Aclocal::perl_libdirs = ('@datadir@/@PACKAGE@-@APIVERSION@')
- unless @Aclocal::perl_libdirs;
- unshift @INC, @Aclocal::perl_libdirs;
+ unshift (@INC, '@datadir@/@PACKAGE@-@APIVERSION@')
+ unless $ENV{AUTOMAKE_UNINSTALLED};
}
use strict;
@@ -68,7 +67,7 @@ $perl_threads = 0;
# ACLOCAL_PATH environment variable, and reset with the '--system-acdir'
# option.
my @user_includes = ();
-my @automake_includes = ("@datadir@/aclocal-$APIVERSION");
+my @automake_includes = ('@datadir@/aclocal-' . $APIVERSION);
my @system_includes = ('@datadir@/aclocal');
# Whether we should copy M4 file in $user_includes[0].
@@ -174,7 +173,26 @@ use constant SCAN_M4_DIRS_ERROR => 2;
# Prototypes for all subroutines.
-#! Prototypes here will automatically be generated by the build system.
+sub add_file ($);
+sub add_macro ($);
+sub check_acinclude ();
+sub install_file ($$);
+sub list_compare (\@\@);
+sub parse_ACLOCAL_PATH ();
+sub parse_arguments ();
+sub reset_maps ();
+sub scan_configure ();
+sub scan_configure_dep ($);
+sub scan_file ($$$);
+sub scan_m4_dirs ($$@);
+sub scan_m4_files ();
+sub strip_redundant_includes (%);
+sub trace_used_macros ();
+sub unlink_tmp (;$);
+sub usage ($);
+sub version ();
+sub write_aclocal ($@);
+sub xmkdir_p ($);
################################################################
@@ -1112,7 +1130,7 @@ sub parse_arguments ()
}
# 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>)
{
@@ -1147,6 +1165,16 @@ sub parse_ACLOCAL_PATH ()
################################################################
+# 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;