From 6eaa0cd7817416d6a8f7cb4762d996c4e12f1bb2 Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Mon, 29 Jan 2001 09:50:01 +0000 Subject: [PATCH] * autoscan.pl: Do scan `configure.ac' when you claim it. From Raja R Harinath. (@kinds): Use `qw', rather than lots of quotes and commas. (%generic_macro): Use single quotes around literals. ($configure_scan): Define global, and use it instead of the literal. Use `warn' in place of `printf STDERR'. --- ChangeLog | 11 ++++++++++- autoscan.in | 26 +++++++++++++------------- autoscan.pl | 26 +++++++++++++------------- bin/autoscan.in | 26 +++++++++++++------------- 4 files changed, 49 insertions(+), 40 deletions(-) diff --git a/ChangeLog b/ChangeLog index 59e784be..f79825ec 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2001-01-29 Jim Meyering + + * autoscan.pl: Do scan `configure.ac' when you claim it. + From Raja R Harinath. + (@kinds): Use `qw', rather than lots of quotes and commas. + (%generic_macro): Use single quotes around literals. + ($configure_scan): Define global, and use it instead of the literal. + Use `warn' in place of `printf STDERR'. + 2001-01-29 Akim Demaille * autoscan.pl: `Formatting++' changes: prototypes all the @@ -7,7 +16,7 @@ describe the functions. (output): Accept an CONFIGURE_SCAN parameters, and open CONF. - + 2001-01-29 Akim Demaille * acgeneral.m4 (AC_SITE_LOAD): Let config.log know what you load. diff --git a/autoscan.in b/autoscan.in index 08925af1..54cc1256 100644 --- a/autoscan.in +++ b/autoscan.in @@ -39,19 +39,19 @@ $verbose = 0; %programs_macros = (); %needed_macros = (); -my @kinds = - ('functions', 'headers', 'identifiers', 'programs', 'makevars'); +my @kinds = qw (functions headers identifiers programs makevars); # For each kind, the default macro. my %generic_macro = ( - "functions" => "AC_CHECK_FUNCS", - "headers" => "AC_CHECK_HEADERS", - "identifiers" => "AC_CHECK_TYPES", - "programs" => "AC_CHECK_PROGS" + 'functions' => 'AC_CHECK_FUNCS', + 'headers' => 'AC_CHECK_HEADERS', + 'identifiers' => 'AC_CHECK_TYPES', + 'programs' => 'AC_CHECK_PROGS' ); +my $configure_scan = 'configure.scan'; # find_autoconf # ------------- @@ -88,7 +88,7 @@ sub print_usage () Examine source files in the directory tree rooted at SRCDIR, or the current directory if none is given. Search the source files for -common portability problems and create a file `configure.scan' which +common portability problems and create a file `$configure_scan' which is a preliminary `configure.ac' for that package. -h, --help print this help, then exit @@ -434,7 +434,7 @@ sub scan_sh_file ($) # print_unique ($MACRO, @WHERE) # ----------------------------- -# $MACRO is wanted from $WHERE, hence (i) print $MACRO in configure.scan +# $MACRO is wanted from $WHERE, hence (i) print $MACRO in $configure_scan # if it exists and hasn't been printed already, (ii), remember it's needed. sub print_unique ($@) { @@ -611,7 +611,7 @@ sub output ($) print CONF "AC_OUTPUT\n"; close CONF || - die "$me: closing configure.scan: $!\n"; + die "$me: closing $configure_scan: $!\n"; } @@ -665,7 +665,7 @@ sub check_configure_ac ($) foreach $macro (sort keys %needed_macros) { - print STDERR "warning: missing $macro wanted by: @{$needed_macros{$macro}}\n"; + warn "warning: missing $macro wanted by: @{$needed_macros{$macro}}\n"; } } @@ -687,10 +687,10 @@ if (-f 'configure.ac') { if (-f 'configure.in') { - print STDERR "warning: `configure.ac' and `configure.in' both present.\n"; - print STDERR "warning: proceeding with `configure.ac'.\n"; + warn "warning: `configure.ac' and `configure.in' both present.\n"; + warn "warning: proceeding with `configure.ac'.\n"; } - check_configure_ac ('configure.in'); + check_configure_ac ('configure.ac'); } elsif (-f 'configure.in') { diff --git a/autoscan.pl b/autoscan.pl index 08925af1..54cc1256 100644 --- a/autoscan.pl +++ b/autoscan.pl @@ -39,19 +39,19 @@ $verbose = 0; %programs_macros = (); %needed_macros = (); -my @kinds = - ('functions', 'headers', 'identifiers', 'programs', 'makevars'); +my @kinds = qw (functions headers identifiers programs makevars); # For each kind, the default macro. my %generic_macro = ( - "functions" => "AC_CHECK_FUNCS", - "headers" => "AC_CHECK_HEADERS", - "identifiers" => "AC_CHECK_TYPES", - "programs" => "AC_CHECK_PROGS" + 'functions' => 'AC_CHECK_FUNCS', + 'headers' => 'AC_CHECK_HEADERS', + 'identifiers' => 'AC_CHECK_TYPES', + 'programs' => 'AC_CHECK_PROGS' ); +my $configure_scan = 'configure.scan'; # find_autoconf # ------------- @@ -88,7 +88,7 @@ sub print_usage () Examine source files in the directory tree rooted at SRCDIR, or the current directory if none is given. Search the source files for -common portability problems and create a file `configure.scan' which +common portability problems and create a file `$configure_scan' which is a preliminary `configure.ac' for that package. -h, --help print this help, then exit @@ -434,7 +434,7 @@ sub scan_sh_file ($) # print_unique ($MACRO, @WHERE) # ----------------------------- -# $MACRO is wanted from $WHERE, hence (i) print $MACRO in configure.scan +# $MACRO is wanted from $WHERE, hence (i) print $MACRO in $configure_scan # if it exists and hasn't been printed already, (ii), remember it's needed. sub print_unique ($@) { @@ -611,7 +611,7 @@ sub output ($) print CONF "AC_OUTPUT\n"; close CONF || - die "$me: closing configure.scan: $!\n"; + die "$me: closing $configure_scan: $!\n"; } @@ -665,7 +665,7 @@ sub check_configure_ac ($) foreach $macro (sort keys %needed_macros) { - print STDERR "warning: missing $macro wanted by: @{$needed_macros{$macro}}\n"; + warn "warning: missing $macro wanted by: @{$needed_macros{$macro}}\n"; } } @@ -687,10 +687,10 @@ if (-f 'configure.ac') { if (-f 'configure.in') { - print STDERR "warning: `configure.ac' and `configure.in' both present.\n"; - print STDERR "warning: proceeding with `configure.ac'.\n"; + warn "warning: `configure.ac' and `configure.in' both present.\n"; + warn "warning: proceeding with `configure.ac'.\n"; } - check_configure_ac ('configure.in'); + check_configure_ac ('configure.ac'); } elsif (-f 'configure.in') { diff --git a/bin/autoscan.in b/bin/autoscan.in index 08925af1..54cc1256 100644 --- a/bin/autoscan.in +++ b/bin/autoscan.in @@ -39,19 +39,19 @@ $verbose = 0; %programs_macros = (); %needed_macros = (); -my @kinds = - ('functions', 'headers', 'identifiers', 'programs', 'makevars'); +my @kinds = qw (functions headers identifiers programs makevars); # For each kind, the default macro. my %generic_macro = ( - "functions" => "AC_CHECK_FUNCS", - "headers" => "AC_CHECK_HEADERS", - "identifiers" => "AC_CHECK_TYPES", - "programs" => "AC_CHECK_PROGS" + 'functions' => 'AC_CHECK_FUNCS', + 'headers' => 'AC_CHECK_HEADERS', + 'identifiers' => 'AC_CHECK_TYPES', + 'programs' => 'AC_CHECK_PROGS' ); +my $configure_scan = 'configure.scan'; # find_autoconf # ------------- @@ -88,7 +88,7 @@ sub print_usage () Examine source files in the directory tree rooted at SRCDIR, or the current directory if none is given. Search the source files for -common portability problems and create a file `configure.scan' which +common portability problems and create a file `$configure_scan' which is a preliminary `configure.ac' for that package. -h, --help print this help, then exit @@ -434,7 +434,7 @@ sub scan_sh_file ($) # print_unique ($MACRO, @WHERE) # ----------------------------- -# $MACRO is wanted from $WHERE, hence (i) print $MACRO in configure.scan +# $MACRO is wanted from $WHERE, hence (i) print $MACRO in $configure_scan # if it exists and hasn't been printed already, (ii), remember it's needed. sub print_unique ($@) { @@ -611,7 +611,7 @@ sub output ($) print CONF "AC_OUTPUT\n"; close CONF || - die "$me: closing configure.scan: $!\n"; + die "$me: closing $configure_scan: $!\n"; } @@ -665,7 +665,7 @@ sub check_configure_ac ($) foreach $macro (sort keys %needed_macros) { - print STDERR "warning: missing $macro wanted by: @{$needed_macros{$macro}}\n"; + warn "warning: missing $macro wanted by: @{$needed_macros{$macro}}\n"; } } @@ -687,10 +687,10 @@ if (-f 'configure.ac') { if (-f 'configure.in') { - print STDERR "warning: `configure.ac' and `configure.in' both present.\n"; - print STDERR "warning: proceeding with `configure.ac'.\n"; + warn "warning: `configure.ac' and `configure.in' both present.\n"; + warn "warning: proceeding with `configure.ac'.\n"; } - check_configure_ac ('configure.in'); + check_configure_ac ('configure.ac'); } elsif (-f 'configure.in') {