From 30ece5837b50f59a9d2ae1cb55838a8c7dea0cab Mon Sep 17 00:00:00 2001 From: Laurent Montel Date: Tue, 28 May 2002 07:51:41 +0000 Subject: Fix compile with qt3 --- krootwarning/admin/conf.change.pl | 70 ++++++++++++++++++++++++++++++++++----- 1 file changed, 62 insertions(+), 8 deletions(-) (limited to 'krootwarning/admin/conf.change.pl') diff --git a/krootwarning/admin/conf.change.pl b/krootwarning/admin/conf.change.pl index 7793be4..bb7dcc1 100644 --- a/krootwarning/admin/conf.change.pl +++ b/krootwarning/admin/conf.change.pl @@ -4,17 +4,34 @@ # in the main loop # we do it this way to circumvent hacking (and thereby including) # autoconf function (which are GPL) into our LGPL acinclude.m4.in -# written by Michael Matz +# written by Michael Matz +# adapted by Dirk Mueller +# +# This file is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. + +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Library General Public License for more details. + +# You should have received a copy of the GNU Library General Public License +# along with this library; see the file COPYING.LIB. If not, write to +# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. # we have to change two places # 1. the splitting of the substitutions into chunks of 90 (or even 48 in # later autoconf's # 2. the big main loop which patches all Makefile.in's + use File::Basename; my $ac_aux_dir = dirname($0); my ($flag); -my $ac_version = 0; +local $ac_version = 0; my $vpath_seen = 0; $flag = 0; @@ -69,17 +86,17 @@ while (<>) { } elsif ($flag == 3) { if (/^\s*rm\s+-f\s+conftest/ ) { $flag = 4; - insert_main_loop(); + &insert_main_loop(); } elsif (/^\s*rm\s+-f\s+.*ac_cs_root/ ) { $flag = 4; - insert_main_loop(); + &insert_main_loop(); #die "hhhhhhh"; if ($ac_version != 2141) { print STDERR "hmm, don't know autoconf version\n"; } } elsif (/^\#\s*CONFIG_HEADER section.*/) { $flag = 4; - insert_main_loop(); + &insert_main_loop(); if($ac_version != 250) { print STDERR "hmm, something went wrong :-(\n"; } @@ -91,9 +108,46 @@ while (<>) { die "wrong input (flag != 4)" unless $flag == 4; print STDERR "hmm, don't know autoconf version\n" unless $ac_version; -die "autoconf 2.50 is currently not supported" if $ac_version == 250; sub insert_main_loop { + + if ($ac_version == 250) { + &insert_main_loop_250(); + } + else { + &insert_main_loop_213(); + } +} + +sub insert_main_loop_250 { + + print <>\$tmp/subs.sed +EOF + } + print <> \$tmp/subs.files + fi + done + if test -f \$tmp/subs.files ; then + perl $ac_aux_dir/config.pl "\$tmp/subs.sed" "\$tmp/subs.files" "\$srcdir" "\$INSTALL" + fi + rm -f \$tmp/subs.files + +fi +EOF + return; +} + +sub insert_main_loop_213 { print <> \$ac_cs_root.subs EOF @@ -114,7 +168,7 @@ for ac_file in .. \$CONFIG_FILES ; do fi done if test -f \$ac_cs_root.sacfiles ; then - perl $ac_aux_dir/config.pl "\$ac_cs_root" "\$ac_given_srcdir" "\$ac_given_INSTALL" + perl $ac_aux_dir/config.pl "\$ac_cs_root.subs" "\$ac_cs_root.sacfiles" "\$ac_given_srcdir" "\$ac_given_INSTALL" fi rm -f \$ac_cs_root.s* -- cgit v1.2.1