[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
FYI: autoscan.pl
From: |
Akim Demaille |
Subject: |
FYI: autoscan.pl |
Date: |
21 Feb 2001 09:53:01 +0100 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.1 (Cuyahoga Valley) |
Some revamping which helped me for the forthcoming proto Perl
autoupdate.
Index: autoscan.pl
===================================================================
RCS file: /cvs/autoconf/autoscan.pl,v
retrieving revision 1.44
diff -u -u -r1.44 autoscan.pl
--- autoscan.pl 2001/02/20 09:24:40 1.44
+++ autoscan.pl 2001/02/21 08:46:10
@@ -75,11 +75,11 @@
# We test "$dir/autoconf" in case we are in the build tree, in which case
# the names are not transformed yet.
foreach my $file ($ENV{"AUTOCONF"} || '',
- "$dir/@autoconf-name@",
- "$dir/autoconf",
- "@bindir@/@autoconf-name@")
+ "$dir/@autoconf-name@",
+ "$dir/autoconf",
+ "@bindir@/@autoconf-name@")
{
- if (-f $file)
+ if (-x $file)
{
$autoconf = $file;
last;
@@ -88,6 +88,28 @@
}
+# $CONFIGURE_AC
+# &find_configure_ac ()
+# ---------------------
+sub find_configure_ac ()
+{
+ if (-f 'configure.ac')
+ {
+ if (-f 'configure.in')
+ {
+ warn "warning: `configure.ac' and `configure.in' both present.\n";
+ warn "warning: proceeding with `configure.ac'.\n";
+ }
+ return 'configure.ac';
+ }
+ elsif (-f 'configure.in')
+ {
+ return 'configure.in';
+ }
+ return;
+}
+
+
# print_usage ()
# --------------
# Display usage (--help).
@@ -632,25 +654,15 @@
# Find the lib files and autoconf.
find_autoconf;
-
+my $configure_ac = find_configure_ac;
parse_args;
init_tables;
find ('.');
scan_files;
output ('configure.scan');
-
-if (-f 'configure.ac')
- {
- if (-f 'configure.in')
- {
- warn "warning: `configure.ac' and `configure.in' both present.\n";
- warn "warning: proceeding with `configure.ac'.\n";
- }
- check_configure_ac ('configure.ac');
- }
-elsif (-f 'configure.in')
+if ($configure_ac)
{
- check_configure_ac ('configure.in');
+ check_configure_ac ($configure_ac);
}
exit 0;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- FYI: autoscan.pl,
Akim Demaille <=