2007-06-25 15:47:28 +00:00
|
|
|
#!/usr/bin/env perl
|
|
|
|
#
|
|
|
|
# @todo Rewrite this in sh
|
|
|
|
#
|
|
|
|
# This perl script invokes autoreconf after setting ACLOCAL and AUTOMAKE to reasonably modern values.
|
|
|
|
# (>= aclocal-1.6, automake-1.6).
|
|
|
|
#
|
|
|
|
# It is careful to avoid mixing versions of the two tools.
|
|
|
|
#
|
|
|
|
# If you don't have perl, find sufficiently recent and matching versions of aclocal and automake, and invoke
|
|
|
|
# something like this (under bash):
|
|
|
|
#
|
|
|
|
# ACLOCAL=/usr/bin/aclocal-1.8 AUTOMAKE=/usr/bin/automake-1.8 autoreconf
|
|
|
|
#
|
|
|
|
# Stasis used to ship with the following two scripts; the first uses the system default, the second uses automake 1.8:
|
|
|
|
#
|
|
|
|
qq(
|
|
|
|
|
2004-06-24 21:10:31 +00:00
|
|
|
#!/bin/sh
|
2009-04-18 04:33:38 +00:00
|
|
|
rm -f configure.in
|
2009-04-18 04:10:30 +00:00
|
|
|
ln -s configure.in.automake configure.in
|
2004-06-24 21:10:31 +00:00
|
|
|
rm -f config.cache
|
|
|
|
rm -f acconfig.h
|
2004-07-06 01:22:18 +00:00
|
|
|
aclocal -I m4
|
2004-06-24 21:10:31 +00:00
|
|
|
autoconf
|
|
|
|
autoheader
|
2004-07-06 01:22:18 +00:00
|
|
|
libtoolize --automake
|
|
|
|
automake -a
|
2004-06-24 21:10:31 +00:00
|
|
|
exit
|
2007-06-25 15:47:28 +00:00
|
|
|
|
|
|
|
);
|
|
|
|
#
|
|
|
|
#
|
|
|
|
qq(
|
|
|
|
|
|
|
|
#!/bin/sh
|
2009-04-18 22:09:22 +00:00
|
|
|
rm -f configure.in
|
2009-04-18 04:10:30 +00:00
|
|
|
ln -s configure.in.automake configure.in
|
2007-06-25 15:47:28 +00:00
|
|
|
rm -f config.cache
|
|
|
|
rm -f acconfig.h
|
|
|
|
aclocal-1.8 -I m4
|
|
|
|
autoconf
|
|
|
|
autoheader
|
|
|
|
libtoolize --automake
|
|
|
|
automake-1.8 -a
|
|
|
|
exit
|
|
|
|
|
|
|
|
);
|
|
|
|
#
|
2009-04-18 04:10:30 +00:00
|
|
|
# The following uses system defaults, but no longer depends on libtool or automake.
|
|
|
|
# It is the recommended approach.
|
|
|
|
#
|
|
|
|
qq(
|
|
|
|
#!/bin/sh
|
2009-04-18 22:09:22 +00:00
|
|
|
rm -f configure.in
|
2009-04-18 04:10:30 +00:00
|
|
|
ln -s configure.in.lite configure.in
|
|
|
|
rm -f config.cache
|
|
|
|
rm -f acconfig.h
|
|
|
|
aclocal -I m4
|
|
|
|
autoconf
|
|
|
|
autoheader
|
|
|
|
);
|
|
|
|
#
|
|
|
|
|
|
|
|
warn qq(
|
|
|
|
This script is obsolete; stasis no longer requires automake or libtool.
|
|
|
|
|
|
|
|
To build with cmake, run:
|
|
|
|
|
|
|
|
./bootstrap
|
|
|
|
mkdir build ; cd build ; cmake ..
|
|
|
|
make -j4
|
|
|
|
);
|
2007-06-25 15:47:28 +00:00
|
|
|
|
2008-11-07 08:15:51 +00:00
|
|
|
my $aclocal_base = `which aclocal` || die "aclocal not found!";
|
|
|
|
my $automake_base = `which automake` || die "automake not found!";
|
2007-06-25 15:47:28 +00:00
|
|
|
|
|
|
|
chomp $aclocal_base;
|
|
|
|
chomp $automake_base;
|
|
|
|
|
2007-12-19 03:22:20 +00:00
|
|
|
my @good_versions = qw(1.10 1.9 1.8 1.7 1.6);
|
2007-06-25 15:47:28 +00:00
|
|
|
|
|
|
|
foreach my $i (@ARGV) {
|
|
|
|
if ($i eq "-h" || $i eq "--help") {
|
|
|
|
print
|
|
|
|
qq(Usage: $0 [options]
|
|
|
|
|
|
|
|
This program is a thin wrapper on top of autoreconf. It looks for an
|
|
|
|
appropriate version of aclocal and automake, and then invokes autoreconf.
|
|
|
|
|
|
|
|
It takes the same options as autoreconf, whose usage string is repeated below:
|
|
|
|
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
my $version;
|
|
|
|
foreach my $i (@good_versions) {
|
|
|
|
if ((-x "$aclocal_base-$i") && (-x "$automake_base-$i")) {
|
|
|
|
$version = $i;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if(! $version ) {
|
|
|
|
print
|
|
|
|
qq(
|
|
|
|
*****************************************************************************************
|
|
|
|
No appropriate version of automake was found.
|
|
|
|
|
|
|
|
Please install a version between 1.6 and 1.9, or add a directory containing automake-1.n
|
|
|
|
and aclocal-1.n to your path.
|
|
|
|
|
|
|
|
Proceeding with system's default automake. Expect trouble.
|
|
|
|
*****************************************************************************************
|
|
|
|
|
|
|
|
|
|
|
|
);
|
|
|
|
} else {
|
|
|
|
$ENV{ACLOCAL} = "$aclocal_base-$version";
|
|
|
|
$ENV{AUTOMAKE} = "$automake_base-$version";
|
|
|
|
}
|
2009-04-18 04:10:30 +00:00
|
|
|
|
2009-04-18 05:36:17 +00:00
|
|
|
my $rmNEWS = 1;
|
|
|
|
my $rmChangeLog = 1;
|
|
|
|
if(-f "NEWS") { $rmNEWS = 0; } else { system("touch NEWS"); }
|
|
|
|
if(-f "ChangeLog") { $rmChangeLog = 0; } else { system("touch ChangeLog"); }
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-04-18 22:09:22 +00:00
|
|
|
system("rm -f configure.in");
|
2009-04-18 04:10:30 +00:00
|
|
|
system("ln -s configure.in.automake configure.in");
|
|
|
|
|
2007-07-19 16:35:42 +00:00
|
|
|
system ("autoreconf -i", @ARGV);
|
2009-04-18 05:36:17 +00:00
|
|
|
|
|
|
|
if($rmNEWS) { system("rm NEWS"); }
|
|
|
|
if($rmChangeLog) { system("rm ChangeLog"); }
|
|
|
|
|
|
|
|
|