diff options
Diffstat (limited to 'autogen.sh')
-rwxr-xr-x | autogen.sh | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/autogen.sh b/autogen.sh index 4d5037062c36..30b1ae409d71 100755 --- a/autogen.sh +++ b/autogen.sh @@ -11,6 +11,8 @@ sub clean() print "cleaned the build tree\n"; } +my $aclocal; + # check we have various vital tools sub sanity_checks($) { @@ -20,7 +22,7 @@ sub sanity_checks($) ( 'pkg-config' => "pkg-config is required to be installed", 'autoconf' => "autoconf is required", - 'aclocal' => "aclocal is required", + $aclocal => "$aclocal is required", ); for my $elem (@path) { @@ -105,8 +107,14 @@ for my $arg (@cmdline_args) { push @args, $arg; } } +for my $arg (@args) { + if ($arg =~ /^([A-Z]+)=(.*)/) { + $ENV{$1} = $2; + } +} -system ("touch ChangeLog"); +# Alloc $ACLOCAL to specify which aclocal to use +$aclocal = $ENV{ACLOCAL} ? $ENV{ACLOCAL} : 'aclocal'; my $system = `uname -s`; chomp $system; @@ -119,7 +127,7 @@ $aclocal_flags = "-I ./m4/mac" if (($aclocal_flags eq "") && ($system eq 'Darwin $ENV{AUTOMAKE_EXTRA_FLAGS} = '--warnings=no-portability' if (!($system eq 'Darwin')); -system ("aclocal $aclocal_flags") && die "Failed to run aclocal"; +system ("$aclocal $aclocal_flags") && die "Failed to run aclocal"; unlink ("configure"); system ("autoconf") && die "Failed to run autoconf"; die "failed to generate configure" if (! -x "configure"); |