# "ChangeLog" is reqd by automake(1)
# Don't remove it afterwards as it may still be needed during automatic automake Makefile rebuilds
File::Touch->new("atime_only"=>1)->touch("ChangeLog") if !$Options{"ChangeLog"};
- _system qw(automake --add-missing),@copy_arg;
+ _system qw(automake --add-missing -Wno-portability),@copy_arg;
_system qw(autoconf);
- _writefile "| patch configure",<<'CONFIGURE_SUBST_X_EOF';
+ for my $patch (
+ <<'CONFIGURE_SUBST_X_EOF',
+--- configure-orig 2007-03-27 01:13:44.000000000 +0200
++++ configure 2007-03-27 01:17:07.000000000 +0200
+@@ -3749,7 +3749,13 @@
+ rm -f "$tmp/stdin"
+ case $ac_file in
+ -) cat "$tmp/out"; rm -f "$tmp/out";;
+- *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
++ *) rm -f "$ac_file"; mv "$tmp/out" $ac_file
++ for f in $ac_file_inputs; do
++ if test -x $f; then
++ chmod +x $ac_file
++ fi
++ done
++ ;;
+ esac
+ ;;
+
+CONFIGURE_SUBST_X_EOF
+ <<'CONFIGURE_SUBST_X_EOF',
--- configure-orig Wed Aug 20 12:10:37 2003
+++ configure Wed Aug 20 13:22:51 2003
@@ -21590,6 +21590,11 @@
cat $tmp/out
rm -f $tmp/out
CONFIGURE_SUBST_X_EOF
+ undef(),
+ ) {
+ confess if !$patch;
+ last if eval {
+ _writefile "| patch configure",$patch;
+ 1;
+ };
+ _remove "nocheck","./configure.rej";
+ }
_remove "nocheck","./configure.orig"; # It is usually produced by 'CONFIGURE_SUBST_X'.
# Why it is left there after RedHat autoconf-2.53-8 ?
_remove "nocheck",\1,"autom4te-*.cache";