Commit c7818100 authored by Joachim Eibl's avatar Joachim Eibl

Initial revision

git-svn-id: c8aa9fed-2811-0410-8543-893ada326672
parent a63547bb
Joachim Eibl <>
This diff is collapsed.
Version 0.81 - 2002/08/18
New features:
- Now KDE3 is also supported. Previously only KDE2 was supported.
- Navigation via click into the overview column now supported.
Fixed bugs:
- Some input files caused a crash in the diff-algorithm.
- The meaning of option "Ignore trivial matches" was inverted.
- When selecting a text in one window, this deselects any previously
active selection in the same or another window.
Version 0.8 - 2002/07/28
This is the first version to be released.
It has all features intended for version 1.0 but so far has only been
tested by the original author.
Basic Installation
These are generic installation instructions.
The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
those values to create a `Makefile' in each directory of the package.
It may also create one or more `.h' files containing system-dependent
definitions. Finally, it creates a shell script `config.status' that
you can run in the future to recreate the current configuration, a file
`config.cache' that saves the results of its tests to speed up
reconfiguring, and a file `config.log' containing compiler output
(useful mainly for debugging `configure').
If you need to do unusual things to compile the package, please try
to figure out how `configure' could check whether to do them, and mail
diffs or instructions to the address given in the `README' so they can
be considered for the next release. If at some point `config.cache'
contains results you don't want to keep, you may remove or edit it.
The file `' is used to create `configure' by a program
called `autoconf'. You only need `' if you want to change
it or regenerate `configure' using a newer version of `autoconf'.
The simplest way to compile this package is:
1. `cd' to the directory containing the package's source code and type
`./configure' to configure the package for your system. If you're
using `csh' on an old version of System V, you might need to type
`sh ./configure' instead to prevent `csh' from trying to execute
`configure' itself.
Running `configure' takes a while. While running, it prints some
messages telling which features it is checking for.
2. Type `make' to compile the package.
3. Type `make install' to install the programs and any data files and
4. You can remove the program binaries and object files from the
source code directory by typing `make clean'.
Compilers and Options
Some systems require unusual options for compilation or linking that
the `configure' script does not know about. You can give `configure'
initial values for variables by setting them in the environment. Using
a Bourne-compatible shell, you can do that on the command line like
CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
Or on systems that have the `env' program, you can do it like this:
env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
Compiling For Multiple Architectures
You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
own directory. To do this, you must use a version of `make' that
supports the `VPATH' variable, such as GNU `make'. `cd' to the
directory where you want the object files and executables to go and run
the `configure' script. `configure' automatically checks for the
source code in the directory that `configure' is in and in `..'.
If you have to use a `make' that does not supports the `VPATH'
variable, you have to compile the package for one architecture at a time
in the source code directory. After you have installed the package for
one architecture, use `make distclean' before reconfiguring for another
Installation Names
By default, `make install' will install the package's files in
`/usr/local/bin', `/usr/local/man', etc. You can specify an
installation prefix other than `/usr/local' by giving `configure' the
option `--prefix=PATH'.
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
give `configure' the option `--exec-prefix=PATH', the package will use
PATH as the prefix for installing programs and libraries.
Documentation and other data files will still use the regular prefix.
If the package supports it, you can cause programs to be installed
with an extra prefix or suffix on their names by giving `configure' the
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
Optional Features
Some packages pay attention to `--enable-FEATURE' options to
`configure', where FEATURE indicates an optional part of the package.
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
is something like `gnu-as' or `x' (for the X Window System). The
`README' should mention any `--enable-' and `--with-' options that the
package recognizes.
For packages that use the X Window System, `configure' can usually
find the X include and library files automatically, but if it doesn't,
you can use the `configure' options `--x-includes=DIR' and
`--x-libraries=DIR' to specify their locations.
Specifying the System Type
There may be some features `configure' can not figure out
automatically, but needs to determine by the type of host the package
will run on. Usually `configure' can figure that out, but if it prints
a message saying it can not guess the host type, give it the
`--host=TYPE' option. TYPE can either be a short name for the system
type, such as `sun4', or a canonical name with three fields:
See the file `config.sub' for the possible values of each field. If
`config.sub' isn't included in this package, then this package doesn't
need to know the host type.
If you are building compiler tools for cross-compiling, you can also
use the `--target=TYPE' option to select the type of system they will
produce code for and the `--build=TYPE' option to select the type of
system on which you are compiling the package.
Sharing Defaults
If you want to set default values for `configure' scripts to share,
you can create a site shell script called `' that gives
default values for variables like `CC', `cache_file', and `prefix'.
`configure' looks for `PREFIX/share/' if it exists, then
`PREFIX/etc/' if it exists. Or, you can set the
`CONFIG_SITE' environment variable to the location of the site script.
A warning: not all `configure' scripts look for a site script.
Operation Controls
`configure' recognizes the following options to control how it
Use and save the results of the tests in FILE instead of
`./config.cache'. Set FILE to `/dev/null' to disable caching, for
debugging `configure'.
Print a summary of the options to `configure', and exit.
Do not print messages saying which checks are being made.
Look for the package's source code in directory DIR. Usually
`configure' can determine that directory automatically.
Print the version of Autoconf used to generate the `configure'
script, and exit.
`configure' also accepts some other, not widely useful, options.
####### kdevelop will overwrite this part!!! (begin)##########
SUBDIRS = kdiff3 po doc
EXTRA_DIST = kdiff3.kdevprj admin AUTHORS COPYING ChangeLog INSTALL README kdiff3.lsm
####### kdevelop will overwrite this part!!! (end)############
# not a GNU package. You can remove this line, if
# have all needed files, that a GNU package needs
$(top_srcdir)/ $(top_srcdir)/subdirs
cd $(top_srcdir) && $(MAKE) -f admin/Makefile.common ;
cd $(top_srcdir) && $(MAKE) -f admin/Makefile.common subdirs
$(top_srcdir)/acinclude.m4: $(top_srcdir)/admin/ $(top_srcdir)/admin/
@cd $(top_srcdir) && cat admin/ admin/ > acinclude.m4
MAINTAINERCLEANFILES = subdirs acinclude.m4 configure.files
$(MAKE) -f admin/Makefile.common package-messages
$(MAKE) -C po merge
cd $(top_distdir) && perl admin/am_edit -padmin
cd $(top_distdir) && $(MAKE) -f admin/Makefile.common subdirs
@echo "This Makefile is only for the CVS repository"
@echo "This will be deleted before making the distribution"
@echo ""
@if test ! -d admin; then \
echo "Please recheckout this module!" ;\
echo "for cvs: use checkout once and after that update again" ;\
echo "for cvsup: checkout kde-common from cvsup and" ;\
echo " link kde-common/admin to ./admin" ;\
exit 1 ;\
$(MAKE) -f admin/Makefile.common cvs
Author: Joachim Eibl (
Copyright: (C) 2002 by Joachim Eibl
KDiff3-Version: 0.81
KDiff3 is a program that
- compares two or three input files,
- shows the differences line by line and character by character (!),
- provides an automatic merge-facility and
- an integrated editor for comfortable solving of merge-conflicts
- and has an intuitive graphical user interface.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
For details see file "COPYING".
Requirements & Installation:
Version 0.81 supports KDE2 and KDE3 but due to some problem with libkio and libkfile
it was necessary to provide different packages for each, but only the configure
script differs.
For KDE2 you need
- kdiff3-0.81_for_KDE2.tar.gz
- KDE2 and QT2-libraries.
- gcc, g++ with version >=2.95
For KDE3 you need
- kdiff3-0.81_for_KDE3.tar.gz
- KDE3 and QT3-libraries.
- gcc, g++ with version >=2.95
Installation for KDE2:
- Make sure your shell-variable QTDIR is correct. (echo $QTDIR).
If it doesn't contain the correct path, type
export QTDIR=your_path_to_qt (e.g. /usr/lib/qt2)
- Unpack the archive: tar xvfz kdiff3-0.81_for_KDE2.tar.gz
- cd into the directory kdiff3-0.81 and type
- ./configure --prefix=/opt/kde2
- make
- make install (You must have root-rights for this step.)
Installation for KDE3:
- Make sure your shell-variable QTDIR is correct. (echo $QTDIR).
If it doesn't contain the correct path, type
export QTDIR=your_path_to_qt (e.g. /usr/lib/qt3)
- Unpack the archive: tar xvfz kdiff3-0.81_for_KDE3.tar.gz
- cd into the directory kdiff3-0.81 and type
- ./configure --prefix=/opt/kde3
- make
- make install (You must have root-rights for this step.)
For details also see the generic instructions in file "INSTALL".
If some icons are not visible or don't seem right, probably the prefix
was wrong. Check where you're KDE2/3 installation is located and
use that directory with the prefix-option of configure.
Start from commandline:
- Comparing 2 files: kdiff3 file1 file2
- Merging 2 files: kdiff3 file1 file2 -o outputfile
- Comparing 3 files: kdiff3 file1 file2 file3
- Merging 3 files: kdiff3 file1 file2 file3 -o outputfile
Note that file1 will be treated as base of file2 and file3.
If you start without arguments, then a dialog will appear where you can
select your files via a filebrowser.
For more documentation, see the help-menu or the subdirectory doc.
Have fun!
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
#!/usr/bin/perl -w
# this script patches a config.status file, to use our own perl script
# in the main loop
# we do it this way to circumvent hacking (and thereby including)
# autoconf function (which are GPL) into our LGPL
# written by Michael Matz <>
# adapted by Dirk Mueller <>
# 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's
use File::Basename;
my $ac_aux_dir = dirname($0);
my ($flag);
local $ac_version = 0;
my $vpath_seen = 0;
$flag = 0;
while (<>) {
# usage of $flag: 0 -- we have seen nothing yet
# 1 -- we are in (1)
# 2 -- we have ended (1)
# 3 -- we are in (2)
# 4 -- we ended (2)
if ($flag == 4) {
} elsif ($flag == 0) {
# 1. begins with (including): "ac_max_sed_\S+\s*=\s*[0-9]+..."
# ends with (excluding) "CONFIG_FILE=..."
# in later autoconf (2.14.1) there is no CONFIG_FILES= line,
# but instead the (2) directly follow (1)
if (/^\s*ac_max_sed_([a-z]+).*=\s*([0-9]+)/ ) {
$flag = 1;
if ($1 eq 'lines') {
# lets hope its different with 2141,
# wasn't able to verify that
if ($2 eq '48') {
$ac_version = 250;
else {
$ac_version = 2141;
} elsif ($1 eq 'cmds') {
$ac_version = 213;
# hmm, we don't know the autoconf version, but we try anyway
} else {
} elsif ($flag == 1) {
if (/^\s*CONFIG_FILES=/ && ($ac_version != 250)) {
$flag = 2;
} elsif (/^\s*for\s+ac_file\s+in\s+.*CONFIG_FILES/ ) {
$flag = 3;
} elsif ($flag == 2) {
# 2. begins with: "for ac_file in.*CONFIG_FILES" (the next 'for' after (1))
# end with: "rm -f conftest.s\*"
# on autoconf 250, it ends with '# CONFIG_HEADER section'
if (/^\s*for\s+ac_file\s+in\s+.*CONFIG_FILES/ ) {
$flag = 3;
} else {
} elsif ($flag == 3) {
if (/^\s*rm\s+-f\s+conftest/ ) {
$flag = 4;
} elsif (/^\s*rm\s+-f\s+.*ac_cs_root/ ) {
$flag = 4;
#die "hhhhhhh";
if ($ac_version != 2141) {
print STDERR "hmm, don't know autoconf version\n";
} elsif (/^\#\s*CONFIG_HEADER section.*/) {
$flag = 4;
if($ac_version != 250) {
print STDERR "hmm, something went wrong :-(\n";
} elsif (/VPATH/ ) {
$vpath_seen = 1;
die "wrong input (flag != 4)" unless $flag == 4;
print STDERR "hmm, don't know autoconf version\n" unless $ac_version;
sub insert_main_loop {
if ($ac_version == 250) {
else {
sub insert_main_loop_250 {
print <<EOF;
#echo Doing the fast build of Makefiles -- autoconf $ac_version
if ($vpath_seen) {
print <<EOF;
# VPATH subst was seen in original config.status main loop
echo '/^[ ]*VPATH[ ]*=[^:]*\$/d' >>\$tmp/subs.sed
print <<EOF;
rm -f \$tmp/subs.files
for ac_file in .. \$CONFIG_FILES ; do
if test "x\$ac_file" != x..; then
echo \$ac_file >> \$tmp/subs.files
if test -f \$tmp/subs.files ; then
perl $ac_aux_dir/ "\$tmp/subs.sed" "\$tmp/subs.files" "\$srcdir" "\$INSTALL"
rm -f \$tmp/subs.files
sub insert_main_loop_213 {
print <<EOF;
#echo Doing the fast build of Makefiles -- autoconf $ac_version
if test "x\$ac_cs_root" = "x" ; then
if ($vpath_seen) {
print <<EOF;
# VPATH subst was seen in original config.status main loop
echo '/^[ ]*VPATH[ ]*=[^:]*\$/d' >> \$ac_cs_root.subs
print <<EOF;
rm -f \$ac_cs_root.sacfiles
for ac_file in .. \$CONFIG_FILES ; do
if test "x\$ac_file" != x..; then
echo \$ac_file >> \$ac_cs_root.sacfiles
if test -f \$ac_cs_root.sacfiles ; then
perl $ac_aux_dir/ "\$ac_cs_root.subs" "\$ac_cs_root.sacfiles" "\$ac_given_srcdir" "\$ac_given_INSTALL"
rm -f \$ac_cs_root.s*
This diff is collapsed.
# a script for use by autoconf to make the Makefiles
# from the's
# the original autoconf mechanism first splits all substitutions into groups
# of ca. 90, and than invokes sed for _every_ and every group
# (so around 2-3 times per So this takes forever, as sed
# has to recompile the regexps every time.
# this script does better. It changes all Makefile.ins in one process.
# in kdelibs the time for building Makefile went down from 2:59 min to 13 sec!
# written by Michael Matz <>
# adapted by Dirk Mueller <>
# the first part was done by looking at the config.status files generated
# by configure.
my $ac_subs=$ARGV[0];
my $ac_sacfiles = $ARGV[1];
my $ac_given_srcdir=$ARGV[2];
my $ac_given_INSTALL=$ARGV[3];
#print "ac_subs=$ac_subs\n";
#print "ac_sacfiles=$ac_sacfiles\n";
#print "ac_given_srcdir=$ac_given_srcdir\n";
#print "ac_given_INSTALL=$ac_given_INSTALL\n";
my ($srcdir, $top_srcdir);
my $bad_perl = ($] < 5.005);
open(CF, "< $ac_subs") || die "can't open $ac_subs: $!";
my @subs = <CF>;
chomp @subs;
if ($bad_perl) {
print "Using perl older than version 5.005\n";
foreach my $pat (@subs) {
if ( ($pat =~ /s%([^%]*)%([^%]*)%g/ )
|| ($pat =~ m%/([^/]*)/([^/]*)/g% )
|| ($pat =~ /s%([^%]*)%([^%]*)%;t/ )
|| ($pat =~ m%/([^/]*)/([^/]*)/;t% )
|| ($pat =~ /s,([^,]*),(.*),;t/)
) {
# form : s%bla%blubb%g
# or s%bla%blubb%;t t (autoconf > 2.13 and < 2.52 ?)
# or s,bla,blubb,;t t (autoconf 2.52)
my $srch = $1;
my $repl = $2;
$repl =~ s/\\(.)/$1/g;
push @comp_subs, make_closure($srch, $repl);
} elsif ( ($pat =~ /%([^%]*)%d/ )
|| ($pat =~ m%/([^/]*)/d% )
) {
push @comp_subs, make_closure($1, "");
} else {
die "Uhh. Malformed pattern in $ac_subs ($pat)"
unless ( $pat =~ /^\s*$/ ); # ignore white lines
} else {
foreach my $pat (@subs) {
if ( ($pat =~ /s%([^%]*)%([^%]*)%g/ ) ||
($pat =~ /s%([^%]*)%([^%]*)%;t/ ) ||
($pat =~ /s,([^,]*),(.*),;t/) ) {
# form : s%bla%blubb%g
# or s%bla%blubb%;t t (autoconf > 2.13 and < 2.52 ?)
# or s,bla,blubb,;t t (autoconf 2.52)
my $srch = $1;
my $repl = $2;
push @comp_match, eval "qr/\Q$srch\E/"; # compile match pattern
$repl =~ s/\\(.)/$1/g;
push @comp_subs, $repl;
} elsif ( ($pat =~ /%([^%]*)%d/ )
|| ($pat =~ m%/([^/]*)/d% )
) {
push @comp_match, eval "qr/\Q$1\E/";
push @comp_subs, "";
} else {
die "Uhh. Malformed pattern in $ac_cs_root.subs ($pat)"
unless ( $pat =~ /^\s*$/ ); # ignore white lines
undef @subs;
# read the list of files to be patched, form:
# ./Makefile arts/Makefile arts/examples/Makefile arts/flow/Makefile
open(CF, "< $ac_sacfiles") || die "can't open $ac_sacfiles: $!";
my @ac_files = <CF>;
chomp @ac_files;
my $ac_file;
foreach $ac_file (@ac_files) {
next if $ac_file =~ /\.\./;
next if $ac_file =~ /^\s*$/;
my $ac_file_in;
my ($ac_dir, $ac_dots, $ac_dir_suffix);
if ($ac_file =~ /.*:.*/ ) {
($ac_file_in = $ac_file) =~ s%[^:]*:%%;
$ac_file =~ s%:.*%%;
} else {
$ac_file_in = $ac_file.".in";
# Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
# Remove last slash and all that follows it. Not all systems have dirname.
($ac_dir = $ac_file) =~ s%/[^/][^/]*$%%;
if ( ($ac_dir ne $ac_file) && ($ac_dir ne ".")) {
# The file is in a subdirectory.
if (! -d "$ac_dir") { mkdir "$ac_dir", 0777; }
($ac_dir_suffix = $ac_dir) =~ s%^./%%;
# A "../" for each directory in $ac_dir_suffix.
($ac_dots = $ac_dir_suffix) =~ s%/[^/]*%../%g;
} else {
if ($ac_given_srcdir eq ".") {
if ($ac_dots) {
( $top_srcdir = $ac_dots) =~ s%/$%%;
} else { $top_srcdir="."; }
} elsif ($ac_given_srcdir =~ m%^/%) {
$top_srcdir = $ac_given_srcdir;
} else {
$srcdir = $ac_dots.$ac_given_srcdir.$ac_dir_suffix;
$top_srcdir = $ac_dots.$ac_given_srcdir;
if ($ac_given_INSTALL) {
if ($ac_given_INSTALL =~ m%^/% ) {
$INSTALL = $ac_given_INSTALL;
} else {
$INSTALL = $ac_dots.$ac_given_INSTALL;
print "fast creating $ac_file\n";
unlink $ac_file;
my $ac_comsub="";
my $fname=$ac_file_in;
$fname =~ s%.*/%%;
my $configure_input="Generated automatically from $fname by";
if ($ac_file =~ /.*[Mm]akefile.*/) {
$ac_comsub="# ".$configure_input."\n"; # for the first line in $ac_file
my $ac_file_inputs;
($ac_file_inputs = $ac_file_in) =~ s%^%$ac_given_srcdir/%;
$ac_file_inputs =~ s%:% $ac_given_srcdir/%g;
patch_file($ac_file, $ac_file_inputs, $ac_comsub);
sub patch_file {
my ($outf, $infiles, $firstline) = @_;
my $filedata;
my @infiles=split(' ', $infiles);
my $i=0;
if ($firstline) {
$filedata = $firstline;
foreach my $name (@infiles) {
if (open(CF, "< $name")) {
while (<CF>) {
$filedata .= $_;
} else {
print STDERR "can't open $name: $!"."\n";
$filedata =~ s%\@configure_input\@%$configure_input%g;
$filedata =~ s%\@srcdir\@%$srcdir%g;
$filedata =~ s%\@top_srcdir\@%$top_srcdir%g;
$filedata =~ s%\@INSTALL\@%$INSTALL%g;
if ($bad_perl) {
while ($i <= $#comp_subs) {
my $ref = $comp_subs[$i];
} else {
while ($i <= $#comp_match) {
$filedata =~ s/$comp_match[$i]/$comp_subs[$i]/g;
open(CF, "> $outf") || die "can't create $outf: $!";
print CF $filedata;
sub make_closure {
my ($pat, $sub) = @_;
$pat =~ s/\@/\\@/g; # @bla@ -> \@bla\@
$pat =~ s/\$/\\\$/g; # $bla -> \$bla
$sub =~ s/\@/\\@/g;
$sub =~ s/\$/\\\$/g;
my $ret = eval "return sub { my \$ref=shift; \$\$ref =~ s%$pat%$sub%g; }";
if ($@) {
print "can't create CODE: $@\n";
return $ret;
This diff is collapsed.