return if $Options{"ARGV_clean"} || $Options{"ARGV_fullclean"};
$Options{"aclocal_args"}=[qw(-I macros),map((!$_ ? () : @$_),$Options{"aclocal_args"})];
- my $configure_in=_readfile("configure.in");
- do { $$_=1 if !defined($$_) && $configure_in=~/^AM_GNU_GETTEXT\b/m; }
+ my $configure_name;
+ do { $configure_name||=$_ if -f $_ } for ("configure.in");
+ do { $configure_name||=$_ if -f $_ } for ("configure.ac");
+ $configure_name or confess "Cannot find configure.{in,ac}";
+ my $configure_in=_readfile($configure_name);
+ do { $$_=1 if !defined($$_) && $configure_in=~/^\s*AM_GNU_GETTEXT\b/m; }
for (\$Options{"want-gettextize"});
- do { $$_=1 if !defined($$_) && $configure_in=~/^AM_GLIB_GNU_GETTEXT\b/m; }
+ do { $$_=1 if !defined($$_) && $configure_in=~/^\s*AM_GLIB_GNU_GETTEXT\b/m; }
for (\$Options{"want-glib-gettextize"});
- do { $$_=1 if !defined($$_) && $configure_in=~/^AM_PROG_LIBTOOL\b/m; }
+ do { $$_=1 if !defined($$_) && $configure_in=~/^\s*AM_PROG_LIBTOOL\b/m; }
for (\$Options{"want-libtoolize"});
- do { $$_=1 if !defined($$_) && $configure_in=~/^A[CM]_CONFIG_HEADER\b/m; }
+ do { $$_=1 if !defined($$_) && $configure_in=~/^\s*A[CM]_CONFIG_HEADER\b/m; }
for (\$Options{"want-autoheader"});
my @copy_arg=(!$Options{"ARGV_copy"} ? () : "--copy");
."'") {
_system $_ and confess $_;
}
- for ("configure.in","Makefile.am") {
+ for ($configure_name,"Makefile.am") {
STDERR->printflush("gettextize recovery rename \"$_~\"->\"$_\"... ");
rename "$_~","$_" or confess "$!";
STDERR->printflush("ok\n");