summaryrefslogtreecommitdiff
path: root/bin/aclocal.in
diff options
context:
space:
mode:
Diffstat (limited to 'bin/aclocal.in')
-rw-r--r--bin/aclocal.in69
1 files changed, 40 insertions, 29 deletions
diff --git a/bin/aclocal.in b/bin/aclocal.in
index a4535bc47..b3715d9c6 100644
--- a/bin/aclocal.in
+++ b/bin/aclocal.in
@@ -7,7 +7,7 @@ eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac'
# aclocal - create aclocal.m4 by scanning configure.ac
-# Copyright (C) 1996-2017 Free Software Foundation, Inc.
+# Copyright (C) 1996-2018 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,16 +20,15 @@ eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac'
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
# Written by Tom Tromey <tromey@redhat.com>, and
# Alexandre Duret-Lutz <adl@gnu.org>.
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;
@@ -69,7 +68,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 ($);
################################################################
@@ -646,7 +664,7 @@ sub scan_file ($$$)
{
msg ('syntax', "$file:$.", "underquoted definition of $2"
. "\n run info Automake 'Extending aclocal'\n"
- . " or see http://www.gnu.org/software/automake/manual/"
+ . " or see https://www.gnu.org/software/automake/manual/"
. "automake.html#Extending-aclocal")
unless $underquoted_manual_once;
$underquoted_manual_once = 1;
@@ -750,7 +768,7 @@ sub trace_used_macros ()
# When AC_CONFIG_MACRO_DIRS is used, avoid possible spurious warnings
# from autom4te about macros being "m4_require'd but not m4_defun'd";
# for more background, see:
- # http://lists.gnu.org/archive/html/autoconf-patches/2012-11/msg00004.html
+ # https://lists.gnu.org/archive/html/autoconf-patches/2012-11/msg00004.html
# as well as autoconf commit 'v2.69-44-g1ed0548', "warn: allow aclocal
# to silence m4_require warnings".
my $early_m4_code .= "m4_define([m4_require_silent_probe], [-])";
@@ -1044,7 +1062,7 @@ Warning categories include:
Report bugs to <@PACKAGE_BUGREPORT@>.
GNU Automake home page: <@PACKAGE_URL@>.
-General help using GNU software: <http://www.gnu.org/gethelp/>.
+General help using GNU software: <https://www.gnu.org/gethelp/>.
EOF
exit $status;
}
@@ -1055,7 +1073,7 @@ sub version ()
print <<EOF;
aclocal (GNU $PACKAGE) $VERSION
Copyright (C) $RELEASE_YEAR Free Software Foundation, Inc.
-License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl-2.0.html>
+License GPLv2+: GNU GPL version 2 or later <https://gnu.org/licenses/gpl-2.0.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
@@ -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;
@@ -1195,20 +1223,3 @@ while (1)
check_acinclude;
exit $exit_code;
-
-### Setup "GNU" style for perl-mode and cperl-mode.
-## Local Variables:
-## perl-indent-level: 2
-## perl-continued-statement-offset: 2
-## perl-continued-brace-offset: 0
-## perl-brace-offset: 0
-## perl-brace-imaginary-offset: 0
-## perl-label-offset: -2
-## cperl-indent-level: 2
-## cperl-brace-offset: 0
-## cperl-continued-brace-offset: 0
-## cperl-label-offset: -2
-## cperl-extra-newline-before-brace: t
-## cperl-merge-trailing-else: nil
-## cperl-continued-statement-offset: 2
-## End: