Initial code import from https://www.trinity-look.org/p/1100374. As per note on the website, the code has been abandoned. There is no license file in the source code, but given the package was available on the KDE3 store back in the days, it is reasonable to assume it was distributed under GPL2 license

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/1/head
Michele Calgaro 7 months ago
commit 0eec68a321
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -0,0 +1,6 @@
Authors
-------
Example theme:
David Johnson <david@usermode.org>
Fahrenheit theme:
Peter Clark <theclarks@mail.ru>

15
BUGS

@ -0,0 +1,15 @@
- When moving a shaded window, the window sometimes unshades poorly and
following error occurs:
kwin: X_ConfigureWindow(0x0): BadValue (integer parameter out of range
for operation)
To restore and resize the window, there are two options:
either maximize the window and then resize it, or right-click on the
window while holding down the Alt button and resize the window that way.
I believe that this bug is related to the masking operation, but haven't
been able to hunt it down yet.
- The blank bar to the right of the button area does not accept
double-clicks if you want to shade the window. For now, in order to
shade a window, you need to double-click in the title area only.

@ -0,0 +1,65 @@
Example Installation in a Nutshell:
====================================
1) Type 'make -f Makefile.cvs'
2) Type './configure'
3) Type 'make'
4) Type (as root) 'make install'
Example Installation in More Detail:
=====================================
0) Make sure that the prerequisite KDE 3.2 development libraries and
headers are installed first. These can be found at
<http://www.kde.org>.
1) Unzip and untar the package into its own directory. Change into
this directory, and read the README file. (I'm assuming that
you've read this, the INSTALL file :-))
2) Type './configure --help", and peruse the configure options
available. It may be necessary to use one or more of these options
on your system.
3) Type './configure' to configure the software for your system. If
you're using `csh' on an old version of System V, you might need
to type sh ./configure' instead.
4) Type 'make' to compile the package.
5) If you are not logged in as root, type 'su' and enter the root
password to switch over to the root account. This is not necessary
if you configured the software to install to your home directory/
6) Type 'make install' to install the software.
7) Activate the styles, decorations and color schemes through the
KDE Control Center or the Preferences menu.
8) You can uninstall the software by typing 'make uninstall'.
A Note on the KDE Library
========================
If you are having problems configuring the software, first make sure
that the required KDE 3.2 or greater libraries are installed. Several
systems have broken this into several packages. You will need both
the runtime and the development packages.
If you still have problems, set the KDEDIR environment variable and
the --prefix configure option to the location where you installed
KDE. Also make sure that you are using GNU make and not the standard
make everyone else uses.
Rebuilding the Configuration
============================
If you ever need to rebuild the configuration files, type the
following in thebase directory of the distribution:
make -f Makefile.cvs
You will need the current automake/autoconf set of programs.

@ -0,0 +1,20 @@
SUBDIRS = $(TOPSUBDIRS)
MAINTAINERCLEANFILES = subdirs configure.in acinclude.m4 configure.files
EXTRA_DIST = Makefile.cvs admin
AUTOMAKE_OPTIONS = foreign
$(top_srcdir)/configure.in: configure.in.in $(top_srcdir)/subdirs
cd $(top_srcdir) && $(MAKE) -f admin/Makefile.common configure.in ;
$(top_srcdir)/subdirs:
cd $(top_srcdir) && $(MAKE) -f admin/Makefile.common subdirs
$(top_srcdir)/acinclude.m4: $(top_srcdir)/admin/acinclude.m4.in $(top_srcdir)/admin/libtool.m4.in
@cd $(top_srcdir) && cat admin/acinclude.m4.in admin/libtool.m4.in > acinclude.m4
dist-hook:
cd $(top_distdir) && perl admin/am_edit -padmin
cd $(top_distdir) && $(MAKE) -f admin/Makefile.common subdirs

@ -0,0 +1,7 @@
all:
$(MAKE) -f admin/Makefile.common cvs
dist:
$(MAKE) -f admin/Makefile.common dist
.SILENT:

@ -0,0 +1,70 @@
INTRODUCTION
============
First, a word about Fahrenheit. The theme, like its namesake, is
not meant to be the final word in practicality or usability. Think about
it: why hasn't the US switched to Celcius, a much more practical and
usable temperature scale? It makes much more sense to base a temperature
scale around water (since so much of life literally revolves around
water). Just what is 0°F and 100°F anyways? It makes no sense at all,
other than the inertia of tradition.
Fahrenheit the theme is much the same way, except that it lacks
the temperture scale's inertia, but it also looks (in the author's
opinion) more visually interesting than the standard square box. Be it
the lickable OSX or the crayola WinXP, the fact remains that even by
rounding out the corners, most window decorations are hopelessly mired in
squareville. Now, there are good reasons for square. Square is usable.
Square is practical. Square is comforting and familiar, like a teddy
bear that's gotten the stuffing squeezed out of it. But square is also
boring, overdone, and, like week-old leftovers, there's only so much you
can do with it before you get sick of turkey sandwiches and turkey
quiche and turkey omlettes and cream of turkey soup.
To relieve my boredom, there's Fahrenheit. That's right, this is
about _me_. If you like it, you're more than welcome to use it. If you
don't, then forget about it. It's not for you. Go back to squaredom. I
don't care. Yes, this violates Fitt's law in obscene and unthinkable
ways. The buttons may be too small, but then, I have fine motor control
and don't find it a problem in the least. I find it usable; therefore,
it is usable for me. It wastes space with all the funky curves and bars.
Well, my monitor is 1400x1050, so I've got space to waste.
COMPILING
=========
A straight-forward affair; read the INSTALL file for more details, but
the following ought to be enough:
1) make -f Makefile.cvs
2) ./configure
(Depending on your system, you may need to add '--prefix=/usr'
and if it can't find the location of the Qt libs and includes, those as
well. './configure --help' will tell you what you need to know.)
3) make
4) (as root) make install
If you have problems compiling, make sure that you have the necessary
KDE development files installed. And before complaining that you can't
compile, read through the discussions for other KDE 3.2 borders. There
is a 99.9% chance that your problem already has a long and glorious
precedent set by others.
COLORS
======
There are six color settings that you will want to play with
in the Control Panel:Appearances & Themes:Colors dialog. These are:
- Active Title Bar
- Inactive Title Bar
- Active Window Frame
- Inactive Window Frame
- Active Window Handle
- Inactive Window Handle
The title bar and window frame colors should be self-evident.
Less obviously, however, are the window handle settings. This changes
the color of the grip lines in the upper-right hand corner of the frame.
THANKS
======
Inspiration: Fahrenheit was inspired by the mock-up screenshots
of a hypothetical future BeOS window border, GonX. See the screenshots
at http://cotito.free.fr/projects/.
David Johnson on the kwin mailing list was of great help to me
while writing this decoration. His Example decoration
(http://www.kde-look.org/content/show.php?content=6332) is also a great
framework for creating new decorations as well.

@ -0,0 +1,28 @@
/Doxyfile.am/1.19/Fri Dec 12 14:14:04 2003//
/Doxyfile.global/1.22/Fri Mar 26 13:38:44 2004//
/Makefile.common/1.159/Wed Aug 27 12:21:25 2003//
/acinclude.m4.in/2.448/Tue Mar 30 13:00:33 2004//
/am_edit/1.411/Wed Mar 24 22:26:00 2004//
/bcheck.pl/1.2/Thu Oct 23 12:48:34 2003//
/compile/1.1/Mon Sep 30 12:18:17 2002//
/conf.change.pl/1.11/Wed Nov 19 10:21:14 2003//
/config.guess/1.17/Sat Oct 26 16:44:28 2002//
/config.pl/1.20/Fri Dec 26 17:16:14 2003//
/config.sub/1.19/Sat Oct 26 16:44:28 2002//
/configure.in.bot.end/1.4/Mon Mar 15 19:10:12 2004//
/configure.in.min/1.11/Wed Nov 7 11:17:28 2001//
/cvs-clean.pl/1.3/Tue Aug 12 20:52:03 2003//
/cvs.sh/1.125/Mon Mar 15 10:40:43 2004//
/debianrules/1.117/Fri Feb 27 22:51:51 2004//
/depcomp/1.7/Wed Apr 16 21:53:18 2003//
/deps.am/1.6/Wed Sep 17 18:29:45 2003//
/detect-autoconf.sh/1.10/Wed Feb 11 17:39:24 2004//
/install-sh/1.9/Thu Aug 7 09:41:31 2003//
/libtool.m4.in/1.83/Fri Apr 2 15:39:50 2004//
/ltmain.sh/1.64/Sat Feb 14 03:39:44 2004//
/missing/1.11/Sat Oct 26 16:44:28 2002//
/mkinstalldirs/1.9/Sat Oct 26 16:53:16 2002//
/nmcheck/1.4/Thu Mar 6 18:58:29 2003//
/oldinclude.m4.in/2.2/Wed Jan 7 01:15:32 2004//
/ylwrap/1.5/Fri Oct 5 00:46:36 2001//
D

@ -0,0 +1 @@
kde-common/admin

@ -0,0 +1 @@
:pserver:anonymous@anoncvs.kde.org:/home/kde

@ -0,0 +1,179 @@
## generate API documentation with doxygen
apidox-am-yes:
@if test "$(subdir)" != "."; then \
$(mkinstalldirs) $(top_builddir)/apidocs/$(subdir) ;\
if test ! -x $(top_builddir)/apidocs/common; then \
if test -d $(top_srcdir)/doc/common; then \
common_dir=`cd $(top_srcdir)/doc/common && pwd` ;\
else \
common_dir=$(kde_libs_htmldir)/en/common ;\
fi ;\
$(LN_S) $$common_dir $(top_builddir)/apidocs/common; \
fi ;\
cp $(top_srcdir)/admin/Doxyfile.global Doxyfile; \
echo "PROJECT_NAME = \"$(subdir) Library\"" >> Doxyfile; \
echo "PROJECT_NUMBER = \"Version $(VERSION)\"" >> Doxyfile; \
echo "INPUT = $(srcdir)" >> Doxyfile; \
echo "IMAGE_PATH = $(top_srcdir)/doc/api" >> Doxyfile ;\
echo "OUTPUT_DIRECTORY = $(top_builddir)/apidocs" >> Doxyfile; \
echo "HTML_OUTPUT = $(subdir)/html" >> Doxyfile; \
echo "HTML_HEADER = $(top_builddir)/apidocs/common/header.html" >> Doxyfile;\
echo "HTML_FOOTER = $(top_builddir)/apidocs/common/footer.html" >> Doxyfile;\
echo "HTML_STYLESHEET = $(top_builddir)/apidocs/common/doxygen.css" >> Doxyfile;\
echo "LATEX_OUTPUT = $(subdir)/latex" >> Doxyfile; \
echo "RTF_OUTPUT = $(subdir)/rtf" >> Doxyfile; \
echo "MAN_OUTPUT = $(subdir)/man" >> Doxyfile; \
echo "GENERATE_HTML = $(GENERATE_FLAG)" >> Doxyfile ;\
echo "GENERATE_MAN = $(GENERATE_FLAG)" >> Doxyfile ;\
echo "GENERATE_LATEX = $(GENERATE_FLAG)" >> Doxyfile ;\
if test -n "$(DOXYGEN_EXCLUDE)"; then \
patterns= ;\
dirs= ;\
for item in `echo "$(DOXYGEN_EXCLUDE)"`; do \
if test -d "$(srcdir)/$$item"; then \
dirs="$$dirs $(srcdir)/$$item/" ;\
else \
patterns="$$patterns $$item" ;\
fi ;\
done ;\
echo "EXCLUDE_PATTERNS += $$patterns" >> Doxyfile; \
echo "EXCLUDE += $$dirs" >> Doxyfile ;\
fi ;\
echo "TAGFILES = \\" >> Doxyfile; \
tags='$(DOXYGEN_REFERENCES) qt'; for tag in $$tags; do \
tagpath= ;\
path="../../$$tag" ;\
if test -f $(top_builddir)/apidocs/$$tag/$$tag.tag; then \
tagpath="$(top_builddir)/apidocs/$$tag/$$tag.tag" ;\
else \
tagpath=`ls -1 $(kde_htmldir)/en/*-apidocs/$$tag/$$tag.tag 2> /dev/null` ;\
if test -n "$$tagpath"; then \
path=`echo $$tagpath | sed -e "s,.*/\([^/]*-apidocs\)/$$tag/$$tag.tag,../../../\1/$$tag,"` ;\
fi ;\
fi ;\
if test "$$tag" = qt; then \
echo $$tagpath=$(QTDOCDIR) >> Doxyfile ;\
else if test -n "$$tagpath"; then \
echo "$$tagpath=$$path/html \\" >> Doxyfile ;\
fi ;\
fi ;\
done ;\
echo "GENERATE_TAGFILE = $(top_builddir)/apidocs/$(subdir)/`basename $(subdir)`.tag" >> Doxyfile ;\
echo "IGNORE_PREFIX = K" >> Doxyfile ;\
echo "HAVE_DOT = $(KDE_HAVE_DOT)" >> Doxyfile ;\
$(DOXYGEN) Doxyfile ;\
fi
apidox-am-no:
install-data-local: install-apidox
## install API documentation
install-apidox:
@if test "$(subdir)" != "."; then \
$(mkinstalldirs) $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs/$(subdir)/html ; \
if test -f $(top_builddir)/apidocs/$(subdir)/$(subdir).tag; then \
echo $(INSTALL_DATA) $(top_builddir)/apidocs/$(subdir)/$(subdir).tag $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs/$(subdir); \
$(INSTALL_DATA) $(top_builddir)/apidocs/$(subdir)/$(subdir).tag $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs/$(subdir); \
fi; \
if test -d $(top_builddir)/apidocs/$(subdir)/html; then \
list=`ls $(top_builddir)/apidocs/$(subdir)/html`; \
echo "installing $(top_builddir)/apidocs/$(subdir)/html" ;\
for file in $$list; do \
$(INSTALL_DATA) $(top_builddir)/apidocs/$(subdir)/html/$$file $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs/$(subdir)/html; \
done; \
fi; \
rm -f $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs/common; \
$(LN_S) $(kde_libs_htmldir)/en/common $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs/common; \
else\
if test -d $(top_builddir)/apidocs; then \
$(mkinstalldirs) $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs ;\
list=`cd $(top_builddir)/apidocs && ls -1`; \
echo "installing $(top_builddir)/apidocs/$$file" ;\
for file in $$list; do \
if test -f $(top_builddir)/apidocs/$$file; then \
$(INSTALL_DATA) $(top_builddir)/apidocs/$$file $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs; \
fi; \
done ; fi; \
fi
uninstall-local: uninstall-apidox
## uninstall API documentation
uninstall-apidox:
@if test "$(subdir)" != "."; then \
if test -d $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs/$(subdir); then \
rm -rfv $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs/$(subdir); \
fi\
else\
if test -d $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs; then \
rm -rfv $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs; \
fi\
fi
apidox:
@if test "$(subdir)" != "."; then \
$(MAKE) apidox-am-@KDE_HAS_DOXYGEN@ ;\
else \
$(MAKE) apidox-am-toplevel-@KDE_HAS_DOXYGEN@ ;\
fi
@set fnord $(MAKEFLAGS); amf=$$2; if test -n '$(SUBDIRS)'; then \
list='$(SUBDIRS)'; \
for subdir in $$list; do \
if grep '^include .*Doxyfile.am' $(srcdir)/$$subdir/Makefile.am; then \
echo "Making apidox in $$subdir"; \
if test "$$subdir" != "."; then \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) GENERATE_FLAG=no apidox) || exit 1; \
fi ; fi ;\
done; \
for subdir in $$list; do \
if grep '^include .*Doxyfile.am' $(srcdir)/$$subdir/Makefile.am; then \
echo "Making apidox in $$subdir"; \
if test "$$subdir" != "."; then \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) GENERATE_FLAG=yes apidox) || exit 1; \
fi ; fi ;\
done; \
fi
apidox-am-toplevel-no:
apidox-am-toplevel-yes:
@echo "*** Creating API documentation main page"; \
cp $(top_srcdir)/admin/Doxyfile.global Doxyfile; \
echo "PROJECT_NAME = \"$(DOXYGEN_PROJECT_NAME)\"" >> Doxyfile ; \
echo "PROJECT_NUMBER = \"$(DOXYGEN_PROJECT_NUMBER)\"" >> Doxyfile ; \
echo "INPUT = $(top_srcdir)" >> Doxyfile ; \
echo "OUTPUT_DIRECTORY = $(top_builddir)/apidocs" >> Doxyfile ; \
echo "FILE_PATTERNS = *.dox" >> Doxyfile ; \
echo "RECURSIVE = NO" >> Doxyfile ; \
echo "SOURCE_BROWSER = NO" >> Doxyfile ; \
echo "ALPHABETICAL_INDEX = NO" >> Doxyfile ; \
echo "HTML_OUTPUT = ." >> Doxyfile ; \
echo "HTML_HEADER = apidocs/common/mainheader.html" >> Doxyfile ; \
echo "HTML_FOOTER = apidocs/common/mainfooter.html" >> Doxyfile ; \
echo "HTML_STYLESHEET = apidocs/common/doxygen.css" >> Doxyfile ; \
echo "GENERATE_LATEX = NO" >> Doxyfile ; \
echo "GENERATE_RTF = NO" >> Doxyfile ; \
echo "GENERATE_MAN = NO" >> Doxyfile ; \
echo "GENERATE_XML = NO" >> Doxyfile ; \
echo "GENERATE_AUTOGEN_DEF = NO" >> Doxyfile ; \
echo "ENABLE_PREPROCESSING = NO" >> Doxyfile ; \
echo "CLASS_DIAGRAMS = NO" >> Doxyfile ; \
echo "HAVE_DOT = NO" >> Doxyfile ; \
echo "GENERATE_HTML = YES" >> Doxyfile ;\
$(mkinstalldirs) $(top_builddir)/apidocs ; \
rm -f $(top_builddir)/apidocs/common ; \
if test -d $(top_srcdir)/doc/common; then \
common_dir=`cd $(top_srcdir)/doc/common && pwd` ;\
else \
common_dir=$(kde_libs_htmldir)/en/common ;\
fi ;\
$(LN_S) $$common_dir $(top_builddir)/apidocs/common ;\
doxygen Doxyfile; \
rm -f Doxyfile
.PHONY: apidox-am-yes apidox-am-no install-data-local install-apidox install-apidox uninstall-local uninstall-apidox uninstall-apidox apidox apidox-am-toplevel-no apidox-am-toplevel-yes
# Local Variables:
# mode: makefile
# End:

File diff suppressed because it is too large Load Diff

@ -0,0 +1,35 @@
### Makefile.common
###
### Copyright (C) 2002 by the KDE developers
### All the real work is done by the shellscript cvs.sh
SHELL=/bin/sh
cvs dist cvs-clean configure configure.in configure.files subdirs package-messages package-merge Makefile.am acinclude.m4:
@admindir=$(admindir); \
if test "x$$admindir" = x; then \
admindir=.; until test -f $$admindir/admin/cvs.sh; do \
admindir=$$admindir/..; \
if test `cd $$admindir && pwd` = / ; then break; fi; \
done; \
admindir=$$admindir/admin; \
if test -f $$admindir/cvs.sh; then :; else \
echo "Can't find the admin/ directory in any parent of the"; \
echo "current directory. Please set it with admindir=..."; \
exit 1; \
fi; \
fi; \
if test "$@" = "package-merge"; then \
MAKE="$(MAKE)" POFILES="$(POFILES)" PACKAGE="$(PACKAGE)" \
$(SHELL) $$admindir/cvs.sh package-merge ;\
else \
MAKE="$(MAKE)" $(SHELL) $$admindir/cvs.sh $@ ;\
fi
configure.in: configure.files subdirs
configure.files: subdirs
.SILENT:
.PHONY: cvs dist cvs-clean package-merge package-messages

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -0,0 +1,156 @@
#!/usr/bin/perl -w
use DB_File;
use Fcntl ':flock';
if (!defined($ARGV[0])) {
print "usage: requires .class dump as parameter!\n";
exit;
}
sub bailout
{
untie %bcheckdb if(defined(%bcheckdb));
if(defined(MYLOCK)) {
flock MYLOCK, LOCK_UN;
close(MYLOCK);
}
print @_;
exit 5;
}
sub ask_user
{
my ($dbkey, $dbchunk) = @_;
if (defined($ENV{"BCHECK_UPDATE"})) {
$bcheckdb{$dbkey} = $dbchunk;
return;
}
&bailout("BC problem detected") if (! -t STDIN);
print "(I)gnore / (Q)uit / (U)pdate: ";
my $key;
while(defined(read STDIN, $key, 1)) {
$key = lc($key);
print "got: >$key<\n";
return if ($key eq 'i');
&bailout("BC problem. aborted") if ($key eq 'q');
if ($key eq 'u') {
$bcheckdb{$dbkey} = $dbchunk;
return;
}
print "\n(I)gnore / (Q)uit / (U)pdate: ";
}
}
sub diff_chunk($$)
{
my ($oldl, $newl) = @_;
my @old = split /^/m, $oldl;
my @new = split /^/m, $newl;
my $haschanges = 0;
my $max = $#old > $#new ? $#old : $#new;
die "whoops. key different" if ($old[0] ne $new[0]);
if ($#old != $#new) {
warn ("Structural difference.\n");
print @old;
print "-----------------------------------------------\n";
print @new;
$haschanges = 1;
return $haschanges;
}
print $old[0];
my ($class) = ($old[0] =~ /^(?:Class |Vtable for )(\S+)/);
my $c = 1;
while ($c < $max) {
my ($o, $n) = ($old[$c], $new[$c]);
chomp $o;
chomp $n;
$c++;
next if ($o eq $n);
if(defined($class) and $n =~ /^(\d+\s+)\w+(::\S+\s*.*)$/) {
next if ($n eq "$1$class$2");
}
$haschanges = 1;
print "-$o\n+$n\n\n";
}
return $haschanges;
}
local $dblock = $ENV{"HOME"} . "/bcheck.lock";
my $dbfile = $ENV{"HOME"} . "/bcheck.db";
my $cdump = $ARGV[0];
die "file $cdump is not readable: $!" if (! -f $cdump);
# make sure the advisory lock exists
open(MYLOCK, ">$dblock");
print MYLOCK "";
flock MYLOCK, LOCK_EX;
tie %bcheckdb, 'DB_File', $dbfile;
my $chunk = "";
open (IN, "<$cdump") or die "cannot open $cdump: $!";
while (<IN>) {
chop;
s/0x[0-9a-fA-F]+/0x......../g;
s/base size=/size=/g;
s/base align=/align=/g;
$chunk .= $_ . "\n";
if(/^\s*$/) {
my @lines = split /^/m, $chunk;
my $key = $lines[0];
chomp $key;
if($key !~ /<anonymous struct>/ &&
$key !~ /<anonymous union>/) {
if(defined($bcheckdb{$key})) {
my $dbversion = $bcheckdb{$key};
if($dbversion ne $chunk) {
&ask_user($key, $chunk) if(&diff_chunk($dbversion, $chunk));
}
}
else {
$bcheckdb{$key} = $chunk;
print "NEW: $key\n";
}
}
$chunk = "";
next;
}
}
close(IN);
untie %bcheckdb;
flock MYLOCK, LOCK_UN;
close(MYLOCK);
exit 0;

@ -0,0 +1,99 @@
#! /bin/sh
# Wrapper for compilers which do not understand `-c -o'.
# Copyright 1999, 2000 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>.
#
# 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, 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
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# 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.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# Usage:
# compile PROGRAM [ARGS]...
# `-o FOO.o' is removed from the args passed to the actual compile.
prog=$1
shift
ofile=
cfile=
args=
while test $# -gt 0; do
case "$1" in
-o)
# configure might choose to run compile as `compile cc -o foo foo.c'.
# So we do something ugly here.
ofile=$2
shift
case "$ofile" in
*.o | *.obj)
;;
*)
args="$args -o $ofile"
ofile=
;;
esac
;;
*.c)
cfile=$1
args="$args $1"
;;
*)
args="$args $1"
;;
esac
shift
done
if test -z "$ofile" || test -z "$cfile"; then
# If no `-o' option was seen then we might have been invoked from a
# pattern rule where we don't need one. That is ok -- this is a
# normal compilation that the losing compiler can handle. If no
# `.c' file was seen then we are probably linking. That is also
# ok.
exec "$prog" $args
fi
# Name of file we expect compiler to create.
cofile=`echo $cfile | sed -e 's|^.*/||' -e 's/\.c$/.o/'`
# Create the lock directory.
# Note: use `[/.-]' here to ensure that we don't use the same name
# that we are using for the .o file. Also, base the name on the expected
# object file name, since that is what matters with a parallel build.
lockdir=`echo $cofile | sed -e 's|[/.-]|_|g'`.d
while true; do
if mkdir $lockdir > /dev/null 2>&1; then
break
fi
sleep 1
done
# FIXME: race condition here if user kills between mkdir and trap.
trap "rmdir $lockdir; exit 1" 1 2 15
# Run the compile.
"$prog" $args
status=$?
if test -f "$cofile"; then
mv "$cofile" "$ofile"
fi
rmdir $lockdir
exit $status

@ -0,0 +1,191 @@
#!/usr/bin/env perl
# 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 acinclude.m4.in
# written by Michael Matz <matz@kde.org>
# adapted by Dirk Mueller <mueller@kde.org>
#
# 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 strict;
use File::Basename;
my $ac_aux_dir = dirname($0);
my ($flag);
my $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) {
print;
} 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 {
print;
}
} elsif ($flag == 1) {
if (/^\s*CONFIG_FILES=/ && ($ac_version != 250)) {
print;
$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'
#
# gg: if a post-processing commands section is found first,
# stop there and insert a new loop to honour the case/esac.
# (pattern: /^\s+#\sRun the commands associated with the file./)
if (/^\s*for\s+ac_file\s+in\s+.*CONFIG_FILES/ ) {
$flag = 3;
} else {
print;
}
} elsif ($flag == 3) {
if (/^\s*rm\s+-f\s+conftest/ ) {
$flag = 4;
&insert_main_loop();
} elsif (/^\s*rm\s+-f\s+.*ac_cs_root/ ) {
$flag = 4;
&insert_main_loop();
#die "hhhhhhh";
if ($ac_version != 2141) {
print STDERR "hmm, don't know autoconf version\n";
}
} elsif (/^\#\s*CONFIG_(HEADER|COMMANDS) section.*|^\s+#\s(Run) the commands associated/) {
$flag = 4;
my $commands = defined $2;
&insert_main_loop();
$commands && insert_command_loop();
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) {
&insert_main_loop_250();
}
else {
&insert_main_loop_213();
}
}
sub insert_main_loop_250 {
print <<EOF;
#echo Doing the fast build of Makefiles -- autoconf $ac_version
EOF
if ($vpath_seen) {
print <<EOF;
# VPATH subst was seen in original config.status main loop
echo '/^[ ]*VPATH[ ]*=[^:]*\$/d' >>\$tmp/subs.sed
EOF
}
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
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 <<EOF;
#echo Doing the fast build of Makefiles -- autoconf $ac_version
if test "x\$ac_cs_root" = "x" ; then
ac_cs_root=conftest
fi
EOF
if ($vpath_seen) {
print <<EOF;
# VPATH subst was seen in original config.status main loop
echo '/^[ ]*VPATH[ ]*=[^:]*\$/d' >> \$ac_cs_root.subs
EOF
}
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
fi
done
if test -f \$ac_cs_root.sacfiles ; then
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*
EOF
return;
}
sub insert_command_loop {
print <<EOF;
for ac_file in .. \$CONFIG_FILES ; do
EOF
}

1363
admin/config.guess vendored

File diff suppressed because it is too large Load Diff

@ -0,0 +1,236 @@
#!/usr/bin/env perl
# a script for use by autoconf to make the Makefiles
# from the Makefile.in's
#
# the original autoconf mechanism first splits all substitutions into groups
# of ca. 90, and than invokes sed for _every_ Makefile.in and every group
# (so around 2-3 times per Makefile.in). 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 <matz@kde.org>
# adapted by Dirk Mueller <mueller@kde.org>
# 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.
use strict;
use File::Path;
my $ac_subs=$ARGV[0];
my $ac_sacfiles = $ARGV[1];
my $ac_given_srcdir=$ARGV[2];
my $ac_given_INSTALL=$ARGV[3];
my @comp_match;
my @comp_subs;
#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 $configure_input;
my ($srcdir, $top_srcdir);
my $INSTALL;
my $bad_perl = ($] < 5.005);
my $created_file_count = 0;
open(CF, "< $ac_subs") || die "can't open $ac_subs: $!";
my @subs = <CF>;
close(CF);
chomp @subs;
@comp_match=();
@comp_subs=();
if ($bad_perl) {
print "Using perl older than version 5.005\n";
foreach my $pat (@subs) {
if ( ($pat =~ m/s%([^%]*)%([^%]*)%g/ )
|| ($pat =~ m/s%([^%]*)%([^%]*)%;t/ )
|| ($pat =~ m/s,([^,]*),(.*),;t/)
|| ($pat =~ m%s/([^/]*)/([^/]*)/g% )
|| ($pat =~ m%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_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>;
close(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") { mkpath "$ac_dir", 0, 0777; }
($ac_dir_suffix = $ac_dir) =~ s%^./%%;
$ac_dir_suffix="/".$ac_dir_suffix;
# A "../" for each directory in $ac_dir_suffix.
($ac_dots = $ac_dir_suffix) =~ s%/[^/]*%../%g;
} else {
$ac_dir_suffix="";
$ac_dots="";
}
if ($ac_given_srcdir eq ".") {
$srcdir=".";
if ($ac_dots) {
( $top_srcdir = $ac_dots) =~ s%/$%%;
} else { $top_srcdir="."; }
} elsif ($ac_given_srcdir =~ m%^/%) {
$srcdir=$ac_given_srcdir.$ac_dir_suffix;
$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%.*/%%;
$configure_input="$ac_file. Generated from $fname by config.pl.";
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);
++$created_file_count;
}
print "config.pl: fast created $created_file_count file(s).\n";
sub patch_file {
my ($outf, $infiles) = @_;
my $filedata;
my @infiles=split(' ', $infiles);
my $i=0;
foreach my $name (@infiles) {
if (open(CF, "< $name")) {
while (<CF>) {
$filedata .= $_;
}
close(CF);
} 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];
&$ref(\$filedata);
$i++;
}
} else {
while ($i <= $#comp_match) {
$filedata =~ s/$comp_match[$i]/$comp_subs[$i]/g;
$i++;
}
}
open(CF, "> $outf") || die "can't create $outf: $!";
print CF $filedata;
close(CF);
}
sub make_closure {
my ($pat, $sub) = @_;
my $ret = eval "return sub { my \$ref=shift; \$\$ref =~ s%\Q$pat\E%\Q$sub\E%g; }";
if ($@) {
print "can't create CODE: $@\n";
}
return $ret;
}

1470
admin/config.sub vendored

File diff suppressed because it is too large Load Diff

@ -0,0 +1,30 @@
# Check if KDE_SET_PREFIX was called, and --prefix was passed to configure
if test -n "$kde_libs_prefix" -a -n "$given_prefix"; then
# And if so, warn when they don't match
if test "$kde_libs_prefix" != "$given_prefix"; then
# And if kde doesn't know about the prefix yet
echo ":"`kde-config --path exe`":" | grep ":$given_prefix/bin/:" 2>&1 >/dev/null
if test $? -ne 0; then
echo ""
echo "Warning: you chose to install this package in $given_prefix,"
echo "but KDE was found in $kde_libs_prefix."
echo "For this to work, you will need to tell KDE about the new prefix, by ensuring"
echo "that KDEDIRS contains it, e.g. export KDEDIRS=$given_prefix:$kde_libs_prefix"
echo "Then restart KDE."
echo ""
fi
fi
fi
if test "$all_tests" = "bad"; then
if test ! "$cache_file" = "/dev/null"; then
echo ""
echo "Please remove the file $cache_file after changing your setup"
echo "so that configure will find the changes next time."
echo ""
fi
else
echo ""
echo "Good - your configure finished. Start make now"
echo ""
fi

@ -0,0 +1,57 @@
dnl This file is part of the KDE libraries/packages
dnl Copyright (C) 2001 Stephan Kulow (coolo@kde.org)
dnl This file is free software; you can redistribute it and/or
dnl modify it under the terms of the GNU Library General Public
dnl License as published by the Free Software Foundation; either
dnl version 2 of the License, or (at your option) any later version.
dnl This library is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
dnl Library General Public License for more details.
dnl You should have received a copy of the GNU Library General Public License
dnl along with this library; see the file COPYING.LIB. If not, write to
dnl the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
dnl Boston, MA 02111-1307, USA.
# Original Author was Kalle@kde.org
# I lifted it in some mater. (Stephan Kulow)
# I used much code from Janos Farkas
dnl Process this file with autoconf to produce a configure script.
AC_INIT(acinclude.m4) dnl a source file from your sub dir
dnl This is so we can use kde-common
AC_CONFIG_AUX_DIR(admin)
dnl This ksh/zsh feature conflicts with `cd blah ; pwd`
unset CDPATH
dnl Checking host/target/build systems, for make, install etc.
AC_CANONICAL_SYSTEM
dnl Perform program name transformation
AC_ARG_PROGRAM
dnl Automake doc recommends to do this only here. (Janos)
AM_INIT_AUTOMAKE(@MODULENAME@, @VERSION@) dnl searches for some needed programs
KDE_SET_PREFIX
dnl generate the config header
AM_CONFIG_HEADER(config.h) dnl at the distribution this done
dnl Checks for programs.
AC_CHECK_COMPILERS
AC_ENABLE_SHARED(yes)
AC_ENABLE_STATIC(no)
KDE_PROG_LIBTOOL
dnl for NLS support. Call them in this order!
dnl WITH_NLS is for the po files
AM_KDE_WITH_NLS
dnl KDE_USE_QT
AC_PATH_KDE

@ -0,0 +1,87 @@
#! /usr/bin/perl
#
# This script recursively (beginning with the current directory)
# wipes out everything not registered in CVS.
#
# written by Oswald Buddenhagen <ossi@kde.org>
# inspired by the "old" cvs-clean target from Makefile.common
#
# This file is free software in terms of the BSD license. That means
# that you can do anything with it except removing this license or
# the above copyright notice. There is NO WARRANTY of any kind.
#
sub rmrf()
{
my $fn = shift;
lstat ($fn);
if (-d _) {
if (opendir (DIR, $fn)) {
for my $efn (grep (!/^\.\.?$/, readdir (DIR))) {
&rmrf ($fn."/".$efn);
}
closedir (DIR);
rmdir ($fn);
}
} else {
unlink ($fn);
}
}
sub newfiles()
{
my ($indir, $incvs) = @_;
for my $n (keys (%$incvs)) { delete $$indir{$n} }
return sort (keys (%$indir));
}
sub cvsclean()
{
my $dir = shift;
my (%dirsdir, %filesdir, %dirscvs, %filescvs);
my $dnam = $dir ? $dir : ".";
if (!opendir (DIR, $dnam)) {
print STDERR "Cannot enter \"".$dnam."\".\n";
return;
}
for my $fn (grep (!/^\.\.?$/, readdir (DIR))) {
if (-d $dir.$fn) {
$fn eq "CVS" or $dirsdir{$fn} = 1;
} else {
$filesdir{$fn} = 1;
}
}
closedir (DIR);
if (!open (FILE, "<".$dir."CVS/Entries")) {
print STDERR "No CVS information in \"".$dnam."\".\n";
return;
}
while (<FILE>) {
m%^D/([^/]+)/.*$% and $dirscvs{$1} = 1;
m%^/([^/]+)/.*$% and $filescvs{$1} = 1;
}
close (FILE);
if (open (FILE, "<".$dir."CVS/Entries.Log")) {
while (<FILE>) {
m%^A D/([^/]+)/.*$% and $dirscvs{$1} = 1;
m%^A /([^/]+)/.*$% and $filescvs{$1} = 1;
m%^R D/([^/]+)/.*$% and delete $dirscvs{$1};
m%^R /([^/]+)/.*$% and delete $filescvs{$1};
}
close (FILE);
}
for my $fn (&newfiles (\%filesdir, \%filescvs)) {
print ("F ".$dir.$fn."\n");
&rmrf ($dir.$fn);
}
for my $fn (&newfiles (\%dirsdir, \%dirscvs)) {
print ("D ".$dir.$fn."\n");
&rmrf ($dir.$fn);
}
for my $fn (sort (keys (%dirscvs))) {
&cvsclean ($dir.$fn."/");
}
}
&cvsclean ("");

@ -0,0 +1,668 @@
#! /bin/sh
#
# cvs.sh
#
# This file contains support code from Makefile.common
# It defines a shell function for each known target
# and then does a case to call the correct function.
call_and_fix_autoconf()
{
$AUTOCONF || exit 1
if test -r configure.in.in ; then
perl -pi -e "print \"if test \\\"x\\\$with_fast_perl\\\" = \\\"xyes\\\"; then\
\\n perl -i.bak \\\$ac_aux_dir/conf.change.pl \\\$CONFIG_STATUS\
\\\\\\n || mv \\\$CONFIG_STATUS.bak \\\$CONFIG_STATUS\
\\n rm -f \\\$CONFIG_STATUS.bak\\nfi\
\\n\" if /^\\s*chmod\\s+.*\\+x\\s+.*CONFIG_STATUS/; s,^#line.*LINENO.*\$,/* \$& */, ;" configure
fi
}
strip_makefile()
{
if test ! -f $makefile_wo; then
perl -e '$in=0; while ( <> ) { $in = 1 if ($_ =~ m/^if / ); print $_ unless ($in || $_ =~ m/^include /); $in = 0 if ($_ =~ m/^endif/); }' < $makefile_am > $makefile_wo
fi
}
check_autotool_versions()
{
required_autoconf_version="2.53 or newer"
AUTOCONF_VERSION=`$AUTOCONF --version | head -n 1`
case $AUTOCONF_VERSION in
Autoconf*2.5* | autoconf*2.5* ) : ;;
"" )
echo "*** AUTOCONF NOT FOUND!."
echo "*** KDE requires autoconf $required_autoconf_version"
exit 1
;;
* )
echo "*** YOU'RE USING $AUTOCONF_VERSION."
echo "*** KDE requires autoconf $required_autoconf_version"
exit 1
;;
esac
AUTOHEADER_VERSION=`$AUTOHEADER --version | head -n 1`
case $AUTOHEADER_VERSION in
Autoconf*2.5* | autoheader*2.5* ) : ;;
"" )
echo "*** AUTOHEADER NOT FOUND!."
echo "*** KDE requires autoheader $required_autoconf_version"
exit 1
;;
* )
echo "*** YOU'RE USING $AUTOHEADER_VERSION."
echo "*** KDE requires autoheader $required_autoconf_version"
exit 1
;;
esac
AUTOMAKE_STRING=`$AUTOMAKE --version | head -n 1`
required_automake_version="1.6.1 or newer"
case $AUTOMAKE_STRING in
automake*1.5d* | automake*1.5* | automake*1.5-* )
echo "*** YOU'RE USING $AUTOMAKE_STRING."
echo "*** KDE requires automake $required_automake_version"
exit 1
;;
automake*1.6.* | automake*1.7* | automake*1.8* ) : ;;
"" )
echo "*** AUTOMAKE NOT FOUND!."
echo "*** KDE requires automake $required_automake_version"
exit 1
;;
unsermake* ) :
echo "*** YOU'RE USING UNSERMAKE."
echo "*** GOOD LUCK!! :)"
;;
* )
echo "*** YOU'RE USING $AUTOMAKE_STRING."
echo "*** KDE requires automake $required_automake_version"
exit 1
;;
esac
unset required_automake_version
}
cvs()
{
check_autotool_versions
acinclude_m4
### Make new subdirs and configure.in.
### The make calls could be optimized away here,
### with a little thought.
if test -r configure.in.in; then
rm -f configure.in
echo "*** Creating list of subdirectories"
create_subdirs
if test -r Makefile.am.in; then
echo "*** Creating Makefile.am"
if grep '\$(top_srcdir)/Makefile.am:' $makefile_am >/dev/null; then
strip_makefile
$MAKE -f $makefile_wo top_srcdir=. ./Makefile.am || exit 1
else
Makefile_am
fi
fi
configure_files
echo "*** Creating configure.in"
if grep '\$(top_srcdir)/configure.in:' $makefile_am >/dev/null; then
strip_makefile
$MAKE -f $makefile_wo top_srcdir=. ./configure.in || exit 1
else
configure_in
fi
fi
echo "*** Creating aclocal.m4"
$ACLOCAL $ACLOCALFLAGS || exit 1
echo "*** Creating configure"
call_and_fix_autoconf
if egrep "^AM_CONFIG_HEADER" configure.in >/dev/null 2>&1; then
echo "*** Creating config.h template"
$AUTOHEADER || exit 1
fi
echo "*** Creating Makefile templates"
$AUTOMAKE || exit 1
if test -z "$UNSERMAKE"; then
echo "*** Postprocessing Makefile templates"
perl -w admin/am_edit || exit 1
fi
if egrep "^cvs-local:" $makefile_am >/dev/null; then \
strip_makefile
$MAKE -f $makefile_wo cvs-local top_srcdir=. || exit 1
fi
echo "*** Creating date/time stamp"
touch stamp-h.in
echo "*** Finished"
echo " Don't forget to run ./configure"
echo " If you haven't done so in a while, run ./configure --help"
}
dist()
{
check_autotool_versions
###
### First build all of the files necessary to do just "make"
###
acinclude_m4
if test -r configure.in.in; then
rm -f configure.in
create_subdirs
if test -r Makefile.am.in; then
if grep '\$(top_srcdir)/Makefile.am:' $makefile_am >/dev/null; then
strip_makefile
$MAKE -f $makefile_wo top_srcdir=. ./Makefile.am || exit 1
else
Makefile_am
fi
fi
configure_files
if grep '\$(top_srcdir)/configure.in:' $makefile_am >/dev/null; then
strip_makefile
$MAKE -f $makefile_wo top_srcdir=. ./configure.in || exit 1
else
configure_in
fi
fi
$ACLOCAL $ACLOCALFLAGS
if egrep "^AM_CONFIG_HEADER" configure.in >/dev/null 2>&1; then
echo "*** Creating config.h template"
$AUTOHEADER || exit 1
fi
$AUTOMAKE --foreign
perl -w admin/am_edit
call_and_fix_autoconf
touch stamp-h.in
if grep "^cvs-local:" $makefile_am >/dev/null; then
strip_makefile
$MAKE -f $makefile_wo cvs-local top_srcdir=.
fi
###
### Then make messages
###
if test -d po; then
LIST=`find ./po -name "*.po"`
for i in $LIST; do
file2=`echo $i | sed -e "s#\.po#\.gmo#"`
msgfmt -o $file2 $i || touch $file2
done
fi
if grep "^cvs-dist-local:" $makefile_am >/dev/null; then
strip_makefile
$MAKE -f $makefile_wo cvs-dist-local top_srcdir=.
fi
}
subdir_dist()
{
$ACLOCAL $ACLOCALFLAGS
$AUTOHEADER
$AUTOMAKE
perl -w ../admin/am_edit --path=../admin
call_and_fix_autoconf
touch stamp-h.in
}
configure_in()
{
rm -f configure.in configure.in.new
kde_use_qt_param=
test -f configure.files || { echo "need configure.files for configure.in"; exit 1; }
list=`fgrep -v "configure.in.bot" < configure.files | fgrep -v "configure.in.mid"`
: > configure.in.new
for file in $list; do
echo "dnl =======================================================" >> configure.in.new
echo "dnl FILE: $file" >> configure.in.new
echo "dnl =======================================================" >> configure.in.new
echo "" >> configure.in.new
cat $file >> configure.in.new
done
echo "KDE_CREATE_SUBDIRSLIST" >> configure.in.new
if test -f Makefile.am.in; then
subdirs=`cat subdirs`
for dir in $subdirs; do
vdir=`echo $dir | sed -e 's,[-+.@],_,g'`
echo "AM_CONDITIONAL($vdir""_SUBDIR_included, test \"x\$$vdir""_SUBDIR_included\" = xyes)" >> configure.in.new
if test -f "$dir/configure.in"; then
echo "if test \"x\$$vdir""_SUBDIR_included\" = xyes; then " >> configure.in.new
echo " AC_CONFIG_SUBDIRS($dir)" >> configure.in.new
echo "fi" >> configure.in.new
fi
done
fi
echo "AC_CONFIG_FILES([ Makefile ])" >> configure.in.new
if test -n "$UNSERMAKE"; then
echo "AC_CONFIG_FILES([ Makefile.rules ])" >> configure.in.new
echo "AC_CONFIG_FILES([ Makefile.calls ])" >> configure.in.new
fi
if test -f inst-apps; then
topleveldirs=`cat inst-apps`
else
topleveldirs=
for dir in `ls -1d * | sort`; do
if test "$dir" != "debian" && test -d $dir; then
topleveldirs="$topleveldirs $dir"
fi
done
fi
for topleveldir in $topleveldirs; do
if test -f $topleveldir/configure.in; then
continue
fi
if test -f $topleveldir/Makefile.am; then :; else
continue
fi
mfs=`find $topleveldir -name Makefile.am -print | fgrep -v "/." | \
sed -e 's#\./##; s#/Makefile.am$##' | sort | sed -e 's#$#/Makefile#'`
for i in $mfs; do
echo "AC_CONFIG_FILES([ $i ])" >> configure.in.new
if test -n "$UNSERMAKE"; then
echo "AC_CONFIG_FILES([ $i.rules ])" >> configure.in.new
echo "AC_CONFIG_FILES([ $i.calls ])" >> configure.in.new
fi
done
done
files=`cat configure.files`
list=`egrep '^dnl AC_OUTPUT\(.*\)' $files | sed -e "s#^.*dnl AC_OUTPUT(\(.*\))#\1#"`
for file in $list; do
echo "AC_CONFIG_FILES([ $file ])" >> configure.in.new
done
if test -n "$UNSERMAKE"; then
echo "AC_CONFIG_FILES([ MakeVars ])" >> configure.in.new
fi
midfiles=`cat configure.files | fgrep "configure.in.mid"`
test -n "$midfiles" && cat $midfiles >> configure.in.new
echo "AC_OUTPUT" >> configure.in.new
modulename=
if test -f configure.in.in; then
if head -n 2 configure.in.in | egrep "^#MIN_CONFIG\(.*\)$" > /dev/null; then
kde_use_qt_param=`cat configure.in.in | sed -n -e "s/#MIN_CONFIG(\(.*\))/\1/p"`
fi
if head -n 2 configure.in.in | egrep "^#MIN_CONFIG" > /dev/null; then
line=`grep "^AM_INIT_AUTOMAKE(" configure.in.in`
if test -n "$line"; then
modulename=`echo $line | sed -e "s#AM_INIT_AUTOMAKE(\([^,]*\),.*#\1#"`
VERSION=`echo $line | sed -e "s#AM_INIT_AUTOMAKE([^,]*, *\([^)]*\)).*#\1#"`
fi
sed -e "s#AM_INIT_AUTOMAKE([^@].*#dnl PACKAGE set before#" \
configure.in.new > configure.in && mv configure.in configure.in.new
fi
fi
if test -z "$VERSION" || test "$VERSION" = "@VERSION@"; then
VERSION="\"3.2.90\""
fi
if test -z "$modulename" || test "$modulename" = "@MODULENAME@"; then
modulename=`pwd`;
modulename=`basename $modulename`
esc_VERSION=`echo $VERSION | sed -e "s#[^.0-9a-zA-Z]##g"`
modulename=`echo $modulename | sed -e "s#-$esc_VERSION##"`
fi
if test -n "$kde_use_qt_param"; then
sed -e "s#^dnl KDE_USE_QT#KDE_USE_QT($kde_use_qt_param)#" \
configure.in.new > configure.in && mv configure.in configure.in.new
fi
sed -e "s#@MODULENAME@#$modulename#" configure.in.new |
sed -e "s#@VERSION@#$VERSION#" > configure.in
botfiles=`cat configure.files | egrep "configure.in.bot"`
test -n "$botfiles" && cat $botfiles >> configure.in
cat $admindir/configure.in.bot.end >> configure.in
rm -f configure.in.new
}
configure_files()
{
echo "*** Creating configure.files"
admindir=NO
for i in . .. ../.. ../../..; do
if test -x $i/admin; then admindir=$i/admin; break; fi
done
rm -f configure.files
touch configure.files
if test -f configure.in.in && head -n 2 configure.in.in | grep "^#MIN_CONFIG" > /dev/null; then
echo $admindir/configure.in.min >> configure.files
fi
test -f configure.in.in && echo configure.in.in >> configure.files
# we collect files in the subdirs and do some sorting tricks, so subsubdirs come after subdirs
if test -f inst-apps; then
inst=`cat inst-apps`
list=""
for i in $inst; do
list="$list `find $i/ -name "configure.in.in" -o -name "configure.in.bot" -o -name "configure.in.mid" | \
sed -e "s,/configure,/aaaconfigure," | sort | sed -e "s,/aaaconfigure,/configure,"`"
done
else
list=`find . -name "configure.in.in" -o -name "configure.in.bot" -o -name "configure.in.mid" | \
sed -e "s,/configure,/aaaconfigure," | sort | sed -e "s,/aaaconfigure,/configure,"`
fi
for i in $list; do if test -f $i && test `dirname $i` != "." ; then
echo $i >> configure.files
fi; done
test -f configure.in.mid && echo configure.in.mid >> configure.files
test -f configure.in.bot && echo configure.in.bot >> configure.files
if test ! -s configure.files; then
echo "There are no files to build a configure. Please check your checkout."
exit 1
fi
}
create_subdirs()
{
if grep '\$(top_srcdir)/subdirs:' $makefile_am >/dev/null; then
# as many modules contain rules to create subdirs without any
# dependencies make won't create it unless there is no file.
# so we check if that's a dummy rule or one that works
rm -f subdirs.cvs.sh.$$
if test -f subdirs; then
mv subdirs subdirs.cvs.sh.$$
fi
strip_makefile
$MAKE -f $makefile_wo top_srcdir=. ./subdirs || exit 1
if test -f subdirs.cvs.sh.$$; then
if test -s subdirs; then
rm subdirs.cvs.sh.$$
else
mv subdirs.cvs.sh.$$ subdirs
fi
fi
else
subdirs
fi
}
subdirs()
{
dirs=
idirs=
if test -f inst-apps; then
idirs=`cat inst-apps`
else
idirs=`ls -1 | sort`
fi
compilefirst=`sed -ne 's#^COMPILE_FIRST[ ]*=[ ]*##p' $makefile_am | head -n 1`
compilelast=`sed -ne 's#^COMPILE_LAST[ ]*=[ ]*##p' $makefile_am | head -n 1`
for i in $idirs; do
if test -f $i/Makefile.am; then
case " $compilefirst $compilelast " in
*" $i "*) ;;
*) dirs="$dirs $i"
esac
fi
done
: > ./_SUBDIRS
for d in $compilefirst; do
echo $d >> ./_SUBDIRS
done
(for d in $dirs; do
list=`sed -ne "s#^COMPILE_BEFORE_$d""[ ]*=[ ]*##p" $makefile_am | head -n 1`
for s in $list; do
echo $s $d
done
list=`sed -ne "s#^COMPILE_AFTER_$d""[ ]*=[ ]*##p" $makefile_am | head -n 1`
for s in $list; do
echo $d $s
done
echo $d $d
done ) | tsort >> ./_SUBDIRS
for d in $compilelast; do
echo $d >> ./_SUBDIRS
done
if test -r subdirs && cmp -s subdirs _SUBDIRS; then
rm -f _SUBDIRS
fi
test -r _SUBDIRS && mv _SUBDIRS subdirs || true
}
Makefile_am()
{
if test -f Makefile.am.in; then
compilefirst=`sed -ne 's#^COMPILE_FIRST[ ]*=[ ]*##p' $makefile_am | head -n 1`
compilelast=`sed -ne 's#^COMPILE_LAST[ ]*=[ ]*##p' $makefile_am | head -n 1`
idirs=
dirs=
if test -f inst-apps; then
idirs=`cat inst-apps`
else
idirs=`cat subdirs`
fi
for i in $idirs; do
case " $compilefirst $compilelast " in
*" $i "*) ;;
*) dirs="$dirs $i"
esac
done
adds=`fgrep '$(top_srcdir)/acinclude.m4:' Makefile.am.in | sed -e 's,^[^:]*: *,,; s,\$(top_srcdir)/,,g'`
if echo "$adds" | fgrep "*" >/dev/null ; then
adds=`ls -d -1 $adds 2>/dev/null`
fgrep -v '$(top_srcdir)/acinclude.m4:' Makefile.am.in > Makefile.am.in.adds
str='$(top_srcdir)/acinclude.m4:'
for add in $adds; do
str="$str \$(top_srcdir)/$add"
done
echo $str >> Makefile.am.in.adds
else
cat Makefile.am.in > Makefile.am.in.adds
fi
if test -n "$UNSERMAKE"; then
cat Makefile.am.in.adds > Makefile.am
topsubdirs=
for i in $compilefirst $dirs $compilelast; do
vari=`echo $i | sed -e "s,[-+],_,g"`
echo "if $vari""_SUBDIR_included" >> Makefile.am
echo "$vari""_SUBDIR=$i" >> Makefile.am
echo "endif" >> Makefile.am
topsubdirs="$topsubdirs \$($vari""_SUBDIR)"
done
echo "SUBDIRS=$topsubdirs" >> Makefile.am
else
cat Makefile.am.in.adds | \
sed -e 's,^\s*\(COMPILE_BEFORE.*\),# \1,' | \
sed -e 's,^\s*\(COMPILE_AFTER.*\),# \1,' > Makefile.am
echo "SUBDIRS="'$(TOPSUBDIRS)' >> Makefile.am
fi
rm Makefile.am.in.adds
fi
}
acinclude_m4()
{
echo "*** Creating acinclude.m4"
adds=
if grep '\$(top_srcdir)/acinclude.m4:' $makefile_am >/dev/null; then
strip_makefile
rm -f acinclude.m4
adds=`grep '\$(top_srcdir)/acinclude.m4:' $makefile_wo | sed -e 's,^[^:]*: *,,; s,\$(top_srcdir),.,g'`
if echo $adds | fgrep "*" >/dev/null ; then
adds=`ls -d -1 $adds 2>/dev/null`
else
$MAKE -f $makefile_wo top_srcdir=. ./acinclude.m4 || exit 1
fi
else
rm -f acinclude.m4
fi
# if it wasn't created up to now, then we do it better
if test ! -f acinclude.m4; then
cat admin/acinclude.m4.in admin/libtool.m4.in $adds > acinclude.m4
fi
}
cvs_clean()
{
if test -d CVS; then :; else
echo "You don't have a toplevel CVS directory."
echo "You most certainly didn't use cvs to get these sources."
echo "But this function depends on cvs's information."
exit 1
fi
perl $admindir/cvs-clean.pl
}
package_merge()
{
catalogs=$POFILES
for cat in $catalogs; do
msgmerge -o $cat.new $cat $PACKAGE.pot
if test -s $cat.new; then
grep -v "\"POT-Creation" $cat.new > $cat.new.2
grep -v "\"POT-Creation" $cat >> $cat.new.1
if diff $cat.new.1 $cat.new.2; then
rm $cat.new
else
mv $cat.new $cat
fi
rm -f $cat.new.1 $cat.new.2
fi
done
}
package_messages()
{
rm -rf po.backup
mkdir po.backup
for i in `ls -1 po/*.pot 2>/dev/null | sed -e "s#po/##"`; do
egrep -v '^#([^:]|$)' po/$i | egrep '^.*[^ ]+.*$' | grep -v "\"POT-Creation" > po.backup/$i
cat po/$i > po.backup/backup_$i
touch -r po/$i po.backup/backup_$i
rm po/$i
done
podir=${podir:-$PWD/po}
files=`find . -name Makefile.am | xargs egrep -l '^messages:' `
dirs=`for i in $files; do echo \`dirname $i\`; done`
tmpname="$PWD/messages.log"
if test -z "$EXTRACTRC"; then EXTRACTRC=extractrc ; fi
if test -z "$PREPARETIPS"; then PREPARETIPS=preparetips ; fi
export EXTRACTRC PREPARETIPS
for subdir in $dirs; do
test -z "$VERBOSE" || echo "Making messages in $subdir"
(cd $subdir
if test -n "`grep -e '^messages:.*rc.cpp' Makefile.am`"; then
$EXTRACTRC *.rc *.ui *.kcfg > rc.cpp
else
candidates=`ls -1 *.rc *.ui *.kcfg 2>/dev/null`
if test -n "$candidates"; then
echo "$subdir has *.rc, *.ui or *.kcfg files, but not correct messages line"
fi
fi
if test -n "`grep -r KAboutData *.c* *.C* 2>/dev/null`"; then
echo -e 'i18n("_: NAME OF TRANSLATORS\\n"\n"Your names")\ni18n("_: EMAIL OF TRANSLATORS\\n"\n"Your emails")' > _translatorinfo.cpp
else echo " " > _translatorinfo.cpp
fi
perl -e '$mes=0; while (<STDIN>) { next if (/^(if\s|else\s|endif)/); if (/^messages:/) { $mes=1; print $_; next; } if ($mes) { if (/$\\(XGETTEXT\)/ && / -o/) { s/ -o \$\(podir\)/ _translatorinfo.cpp -o \$\(podir\)/ } print $_; } else { print $_; } }' < Makefile.am | egrep -v '^include ' > _transMakefile
$MAKE -s -f _transMakefile podir=$podir EXTRACTRC="$EXTRACTRC" PREPARETIPS="$PREPARETIPS" \
XGETTEXT="${XGETTEXT:-xgettext} -C -ki18n -ktr2i18n -kI18N_NOOP -kaliasLocale -x ${includedir:-${KDEDIR:-/usr/local/kde}/include}/kde.pot" \
messages
exit_code=$?
if test "$exit_code" != 0; then
echo "make exit code: $exit_code"
fi
) 2>&1 | grep -v '^make\[1\]' > $tmpname
test -s $tmpname && { echo $subdir ; cat "$tmpname"; }
test -f $subdir/rc.cpp && rm -f $subdir/rc.cpp
rm -f $subdir/_translatorinfo.cpp
rm -f $subdir/_transMakefile
done
rm -f $tmpname
for i in `ls -1 po.backup/*.pot 2>/dev/null | sed -e "s#po.backup/##" | egrep -v '^backup_'`; do
test -f po/$i || echo "disappeared: $i"
done
for i in `ls -1 po/*.pot 2>/dev/null | sed -e "s#po/##"`; do
sed -e 's,^"Content-Type: text/plain; charset=CHARSET\\n"$,"Content-Type: text/plain; charset=UTF-8\\n",' po/$i > po/$i.new && mv po/$i.new po/$i
msgmerge -q -o po/$i po/$i po/$i
egrep -v '^#([^:]|$)' po/$i | egrep '^.*[^ ]+.*$' | grep -v "\"POT-Creation" > temp.pot
if test -f po.backup/$i && test -n "`diff temp.pot po.backup/$i`"; then
echo "will update $i"
sed -e 's,^"Content-Type: text/plain; charset=CHARSET\\n"$,"Content-Type: text/plain; charset=UTF-8\\n",' po.backup/$backup_$i > po/$i.new && mv po/$i.new po.backup/backup_$i
msgmerge -q po.backup/backup_$i po/$i > temp.pot
mv temp.pot po/$i
else
if test -f po.backup/backup_$i; then
test -z "$VERBOSE" || echo "I'm restoring $i"
mv po.backup/backup_$i po/$i
rm po.backup/$i
else
echo "will add $i"
fi
fi
done
rm -f temp.pot
rm -rf po.backup
}
unset LC_ALL || :
unset LANG || :
unset LC_CTYPE || :
unset LANGUAGE || :
unset CDPATH || :
admindir=`echo "$0" | sed 's%[\\/][^\\/][^\\/]*$%%'`
test "x$admindir" = "x$0" && admindir=.
test "x$MAKE" = x && MAKE=make
makefile_am=Makefile.am
makefile_wo=Makefile.am.wo
if test -f Makefile.am.in; then
makefile_am=Makefile.am.in
makefile_wo=Makefile.am.in.wo
rm -f $makefile_wo
fi
# Suck in the AUTOCONF detection code
. $admindir/detect-autoconf.sh
###
### Main
###
arg=`echo $1 | tr '\-.' __`
case $arg in
cvs | dist | subdir_dist | configure_in | configure_files | subdirs | \
cvs_clean | package_merge | package_messages | Makefile_am | acinclude_m4 ) $arg ;;
configure ) call_and_fix_autoconf ;;
* ) echo "Usage: cvs.sh <target>"
echo "Target can be one of:"
echo " cvs cvs-clean dist"
echo " configure.in configure.files"
echo " package-merge package-messages"
echo ""
echo "Usage: anything but $1"
exit 1 ;;
esac
if test -f $makefile_wo; then
rm $makefile_wo
fi
exit 0

@ -0,0 +1,43 @@
#!/usr/bin/perl -w
use Shell qw(mv cp mkdir rm) ;
use File::Find;
use Cwd;
$origPwd = `pwd`;
chomp $origPwd;
$kde_prefix = "/usr";
$sysconfdir = "/etc";
$kde_includedir = "$kde_prefix/include/kde";
$infodir = "$kde_prefix/share/info";
$mandir = "$kde_prefix/share/man";
$qtdir = "/usr/share/qt3";
$kde_cgidir = "$kde_prefix/lib/cgi-bin";
$kde_confdir = "$sysconfdir/kde3";
$kde_htmldir = "$kde_prefix/share/doc/kde/HTML";
if (defined $ENV{DEB_BUILD_OPTIONS} &&
$ENV{DEB_BUILD_OPTIONS} =~ /\bnostrip\b/) {
$enable_debug="--enable-debug=full";
} else {
$enable_debug="--disable-debug";
}
if (@ARGV && $ARGV[0] eq 'echodirs') {
print STDOUT "export kde_prefix=$kde_prefix\n";
print STDOUT "export sysconfdir=$sysconfdir\n";
print STDOUT "export kde_includedir=$kde_includedir\n";
print STDOUT "export infodir=$infodir\n";
print STDOUT "export mandir=$mandir\n";
print STDOUT "export qtdir=$qtdir\n";
print STDOUT "export kde_cgidir=$kde_cgidir\n";
print STDOUT "export kde_confdir=$kde_confdir\n";
print STDOUT "export kde_htmldir=$kde_htmldir\n";
print STDOUT "configkde=$enable_debug --disable-rpath --prefix=\$(kde_prefix) --sysconfdir=\$(sysconfdir) --includedir=\$(kde_includedir) --infodir=\$(infodir) --mandir=\$(mandir) --with-qt-dir=\$(qtdir)\n";
exit
}

@ -0,0 +1,441 @@
#! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
# Copyright 1999, 2000 Free Software Foundation, Inc.
# 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, 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
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# 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.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
echo "depcomp: Variables source, object and depmode must be set" 1>&2
exit 1
fi
# `libtool' can also be set to `yes' or `no'.
depfile=${depfile-`echo "$object" | sed 's,\([^/]*\)$,.deps/\1,;s/\.\([^.]*\)$/.P\1/'`}
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
rm -f "$tmpdepfile"
# Some modes work just like other modes, but use different flags. We
# parameterize here, but still list the modes in the big case below,
# to make depend.m4 easier to write. Note that we *cannot* use a case
# here, because this file can only contain one case statement.
if test "$depmode" = hp; then
# HP compiler uses -M and no extra arg.
gccflag=-M
depmode=gcc
fi
if test "$depmode" = dashXmstdout; then
# This is just like dashmstdout with a different argument.
dashmflag=-xM
depmode=dashmstdout
fi
case "$depmode" in
gcc3)
## gcc 3 implements dependency tracking that does exactly what
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
## it if -MD -MP comes after the -MF stuff. Hmm.
"$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
mv "$tmpdepfile" "$depfile"
;;
gcc)
## There are various ways to get dependency output from gcc. Here's
## why we pick this rather obscure method:
## - Don't want to use -MD because we'd like the dependencies to end
## up in a subdir. Having to rename by hand is ugly.
## (We might end up doing this anyway to support other compilers.)
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
## -MM, not -M (despite what the docs say).
## - Using -M directly means running the compiler twice (even worse
## than renaming).
if test -z "$gccflag"; then
gccflag=-MD,
fi
"$@" -Wp,"$gccflag$tmpdepfile"
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
echo "$object : \\" > "$depfile"
alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
## The second -e expression handles DOS-style file names with drive letters.
sed -e 's/^[^:]*: / /' \
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
## This next piece of magic avoids the `deleted header file' problem.
## The problem is that when a header file which appears in a .P file
## is deleted, the dependency causes make to die (because there is
## typically no way to rebuild the header). We avoid this by adding
## dummy dependencies for each header file. Too bad gcc doesn't do
## this for us directly.
tr ' ' '
' < "$tmpdepfile" |
## Some versions of gcc put a space before the `:'. On the theory
## that the space means something, we add a space to the output as
## well.
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
hp)
# This case exists only to let depend.m4 do its work. It works by
# looking at the text of this script. This case will never be run,
# since it is checked for above.
exit 1
;;
sgi)
if test "$libtool" = yes; then
"$@" "-Wp,-MDupdate,$tmpdepfile"
else
"$@" -MDupdate "$tmpdepfile"
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
echo "$object : \\" > "$depfile"
# Clip off the initial element (the dependent). Don't try to be
# clever and replace this with sed code, as IRIX sed won't handle
# lines with more than a fixed number of characters (4096 in
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
# the IRIX cc adds comments like `#:fec' to the end of the
# dependency line.
tr ' ' '
' < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
tr '
' ' ' >> $depfile
echo >> $depfile
# The second pass generates a dummy entry for each header file.
tr ' ' '
' < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
>> $depfile
else
# The sourcefile does not contain any dependencies, so just
# store a dummy comment line, to avoid errors with the Makefile
# "include basename.Plo" scheme.
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
aix)
# The C for AIX Compiler uses -M and outputs the dependencies
# in a .u file. This file always lives in the current directory.
# Also, the AIX compiler puts `$object:' at the start of each line;
# $object doesn't have directory information.
stripped=`echo "$object" | sed -e 's,^.*/,,' -e 's/\(.*\)\..*$/\1/'`
tmpdepfile="$stripped.u"
outname="$stripped.o"
if test "$libtool" = yes; then
"$@" -Wc,-M
else
"$@" -M
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
if test -f "$tmpdepfile"; then
# Each line is of the form `foo.o: dependent.h'.
# Do two passes, one to just change these to
# `$object: dependent.h' and one to simply `dependent.h:'.
sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
else
# The sourcefile does not contain any dependencies, so just
# store a dummy comment line, to avoid errors with the Makefile
# "include basename.Plo" scheme.
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
icc)
# Must come before tru64.
# Intel's C compiler understands `-MD -MF file'. However
# icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
# will fill foo.d with something like
# foo.o: sub/foo.c
# foo.o: sub/foo.h
# which is wrong. We want:
# sub/foo.o: sub/foo.c
# sub/foo.o: sub/foo.h
# sub/foo.c:
# sub/foo.h:
"$@" -MD -MF "$tmpdepfile"
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
# Each line is of the form `foo.o: dependent.h'.
# Do two passes, one to just change these to
# `$object: dependent.h' and one to simply `dependent.h:'.
sed -e "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
sed -e "s,^[^:]*: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
rm -f "$tmpdepfile"
;;
tru64)
# The Tru64 AIX compiler uses -MD to generate dependencies as a side
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
# dependencies in `foo.d' instead, so we check for that too.
# Subdirectories are respected.
tmpdepfile1="$object.d"
tmpdepfile2=`echo "$object" | sed -e 's/.o$/.d/'`
if test "$libtool" = yes; then
"$@" -Wc,-MD
else
"$@" -MD
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile1" "$tmpdepfile2"
exit $stat
fi
if test -f "$tmpdepfile1"; then
tmpdepfile="$tmpdepfile1"
else
tmpdepfile="$tmpdepfile2"
fi
if test -f "$tmpdepfile"; then
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
# That's a space and a tab in the [].
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
else
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
#nosideeffect)
# This comment above is used by automake to tell side-effect
# dependency tracking mechanisms from slower ones.
dashmstdout)
# Important note: in order to support this mode, a compiler *must*
# always write the proprocessed file to stdout, regardless of -o,
# because we must use -o when running libtool.
test -z "$dashmflag" && dashmflag=-M
( IFS=" "
case " $* " in
*" --mode=compile "*) # this is libtool, let us make it quiet
for arg
do # cycle over the arguments
case "$arg" in
"--mode=compile")
# insert --quiet before "--mode=compile"
set fnord "$@" --quiet
shift # fnord
;;
esac
set fnord "$@" "$arg"
shift # fnord
shift # "$arg"
done
;;
esac
"$@" $dashmflag | sed 's:^[^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
) &
proc=$!
"$@"
stat=$?
wait "$proc"
if test "$stat" != 0; then exit $stat; fi
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
tr ' ' '
' < "$tmpdepfile" | \
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
dashXmstdout)
# This case only exists to satisfy depend.m4. It is never actually
# run, as this mode is specially recognized in the preamble.
exit 1
;;
makedepend)
# X makedepend
(
shift
cleared=no
for arg in "$@"; do
case $cleared in no)
set ""; shift
cleared=yes
esac
case "$arg" in
-D*|-I*)
set fnord "$@" "$arg"; shift;;
-*)
;;
*)
set fnord "$@" "$arg"; shift;;
esac
done
obj_suffix="`echo $object | sed 's/^.*\././'`"
touch "$tmpdepfile"
${MAKEDEPEND-makedepend} 2>/dev/null -o"$obj_suffix" -f"$tmpdepfile" "$@"
) &
proc=$!
"$@"
stat=$?
wait "$proc"
if test "$stat" != 0; then exit $stat; fi
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
tail +3 "$tmpdepfile" | tr ' ' '
' | \
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile" "$tmpdepfile".bak
;;
cpp)
# Important note: in order to support this mode, a compiler *must*
# always write the proprocessed file to stdout, regardless of -o,
# because we must use -o when running libtool.
( IFS=" "
case " $* " in
*" --mode=compile "*)
for arg
do # cycle over the arguments
case $arg in
"--mode=compile")
# insert --quiet before "--mode=compile"
set fnord "$@" --quiet
shift # fnord
;;
esac
set fnord "$@" "$arg"
shift # fnord
shift # "$arg"
done
;;
esac
"$@" -E |
sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
sed '$ s: \\$::' > "$tmpdepfile"
) &
proc=$!
"$@"
stat=$?
wait "$proc"
if test "$stat" != 0; then exit $stat; fi
rm -f "$depfile"
echo "$object : \\" > "$depfile"
cat < "$tmpdepfile" >> "$depfile"
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
msvisualcpp)
# Important note: in order to support this mode, a compiler *must*
# always write the proprocessed file to stdout, regardless of -o,
# because we must use -o when running libtool.
( IFS=" "
case " $* " in
*" --mode=compile "*)
for arg
do # cycle over the arguments
case $arg in
"--mode=compile")
# insert --quiet before "--mode=compile"
set fnord "$@" --quiet
shift # fnord
;;
esac
set fnord "$@" "$arg"
shift # fnord
shift # "$arg"
done
;;
esac
"$@" -E |
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
) &
proc=$!
"$@"
stat=$?
wait "$proc"
if test "$stat" != 0; then exit $stat; fi
rm -f "$depfile"
echo "$object : \\" > "$depfile"
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
echo " " >> "$depfile"
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
rm -f "$tmpdepfile"
;;
none)
exec "$@"
;;
*)
echo "Unknown depmode $depmode" 1>&2
exit 1
;;
esac
exit 0

@ -0,0 +1,19 @@
$(top_srcdir)/acinclude.m4: $(top_srcdir)/admin/acinclude.m4.in $(top_srcdir)/admin/libtool.m4.in $(top_srcdir)/admin/cvs.sh
@cd $(top_srcdir) && $(SHELL) admin/cvs.sh acinclude_m4
$(top_srcdir)/configure.in: $(top_srcdir)/subdirs $(top_srcdir)/configure.files $(top_srcdir)/admin/cvs.sh
@cd $(top_srcdir) && $(SHELL) admin/cvs.sh configure_in
$(top_srcdir)/configure.files: $(top_srcdir)/subdirs $(CONF_FILES)
@cd $(top_srcdir) && $(SHELL) admin/cvs.sh configure.files $(top_srcdir)/admin/cvs.sh
$(top_srcdir)/Makefile.am: $(top_srcdir)/Makefile.am.in $(top_srcdir)/subdirs $(top_srcdir)/admin/cvs.sh
@cd $(top_srcdir) && $(SHELL) admin/cvs.sh Makefile_am
$(top_srcdir)/subdirs: $(top_srcdir)/Makefile.am.in $(top_srcdir)/admin/cvs.sh
@cd $(top_srcdir) && $(SHELL) admin/cvs.sh subdirs
# defining default rules for files that may not be present
$(top_srcdir)/Makefile.am.in:
$(CONF_FILES):

@ -0,0 +1,103 @@
#! /bin/sh
# Global variables...
AUTOCONF="autoconf"
AUTOHEADER="autoheader"
AUTOM4TE="autom4te"
AUTOMAKE="automake"
ACLOCAL="aclocal"
# We don't use variable here for remembering the type ... strings.
# local variables are not that portable, but we fear namespace issues with
# our includer. The repeated type calls are not that expensive.
checkAutoconf()
{
if test -x "`$WHICH autoconf-2.5x 2>/dev/null`" ; then
AUTOCONF="`$WHICH autoconf-2.5x`"
elif test -x "`$WHICH autoconf-2.57 2>/dev/null`" ; then
AUTOCONF="`$WHICH autoconf-2.57`"
elif test -x "`$WHICH autoconf257 2>/dev/null`" ; then
AUTOCONF="`$WHICH autoconf257`"
elif test -x "`$WHICH autoconf-2.56 2>/dev/null`" ; then
AUTOCONF="`$WHICH autoconf-2.56`"
elif test -x "`$WHICH autoconf-2.55 2>/dev/null`" ; then
AUTOCONF="`$WHICH autoconf-2.55`"
elif test -x "`$WHICH autoconf-2.54 2>/dev/null`" ; then
AUTOCONF="`$WHICH autoconf-2.54`"
elif test -x "`$WHICH autoconf-2.53 2>/dev/null`" ; then
AUTOCONF="`$WHICH autoconf-2.53`"
elif test -x "`$WHICH autoconf-2.53a 2>/dev/null`" ; then
AUTOCONF="`$WHICH autoconf-2.53a`"
elif test -x "`$WHICH autoconf-2.52 2>/dev/null`" ; then
AUTOCONF="`$WHICH autoconf-2.52`"
elif test -x "`$WHICH autoconf2.50 2>/dev/null`" ; then
AUTOCONF="`$WHICH autoconf2.50`"
fi
}
checkAutoheader()
{
if test -x "`$WHICH autoheader-2.5x 2>/dev/null`" ; then
AUTOHEADER="`$WHICH autoheader-2.5x`"
AUTOM4TE="`$WHICH autom4te-2.5x`"
elif test -x "`$WHICH autoheader-2.57 2>/dev/null`" ; then
AUTOHEADER="`$WHICH autoheader-2.57`"
AUTOM4TE="`$WHICH autom4te-2.57`"
elif test -x "`$WHICH autoheader257 2>/dev/null`" ; then
AUTOHEADER="`$WHICH autoheader257`"
AUTOM4TE="`$WHICH autom4te257`"
elif test -x "`$WHICH autoheader-2.56 2>/dev/null`" ; then
AUTOHEADER="`$WHICH autoheader-2.56`"
AUTOM4TE="`$WHICH autom4te-2.56`"
elif test -x "`$WHICH autoheader-2.55 2>/dev/null`" ; then
AUTOHEADER="`$WHICH autoheader-2.55`"
AUTOM4TE="`$WHICH autom4te-2.55`"
elif test -x "`$WHICH autoheader-2.54 2>/dev/null`" ; then
AUTOHEADER="`$WHICH autoheader-2.54`"
AUTOM4TE="`$WHICH autom4te-2.54`"
elif test -x "`$WHICH autoheader-2.53 2>/dev/null`" ; then
AUTOHEADER="`$WHICH autoheader-2.53`"
AUTOM4TE="`$WHICH autom4te-2.53`"
elif test -x "`$WHICH autoheader-2.53a 2>/dev/null`" ; then
AUTOHEADER="`$WHICH autoheader-2.53a`"
AUTOM4TE="`$WHICH autom4te-2.53a`"
elif test -x "`$WHICH autoheader-2.52 2>/dev/null`" ; then
AUTOHEADER="`$WHICH autoheader-2.52`"
elif test -x "`$WHICH autoheader2.50 2>/dev/null`" ; then
AUTOHEADER="`$WHICH autoheader2.50`"
fi
}
checkAutomakeAclocal ()
{
if test -x "`$WHICH automake-1.6 2>/dev/null`" ; then
AUTOMAKE="`$WHICH automake-1.6`"
ACLOCAL="`$WHICH aclocal-1.6`"
elif test -x "`$WHICH automake-1.7 2>/dev/null`" ; then
AUTOMAKE="`$WHICH automake-1.7`"
ACLOCAL="`$WHICH aclocal-1.7`"
elif test -x "`$WHICH automake17 2>/dev/null`" ; then
AUTOMAKE="`$WHICH automake17`"
ACLOCAL="`$WHICH aclocal17`"
fi
if test -n "$UNSERMAKE"; then
AUTOMAKE="$UNSERMAKE"
fi
}
checkWhich ()
{
WHICH=""
for i in "type -p" "which" "type" ; do
T=`$i sh 2> /dev/null`
test -x "$T" && WHICH="$i" && break
done
}
checkWhich
checkAutoconf
checkAutoheader
checkAutomakeAclocal
export WHICH AUTOHEADER AUTOCONF AUTOM4TE AUTOMAKE ACLOCAL

@ -0,0 +1,276 @@
#!/bin/sh
#
# install - install a program, script, or datafile
# This comes from X11R5 (mit/util/scripts/install.sh).
#
# Copyright 1991 by the Massachusetts Institute of Technology
#
# Permission to use, copy, modify, distribute, and sell this software and its
# documentation for any purpose is hereby granted without fee, provided that
# the above copyright notice appear in all copies and that both that
# copyright notice and this permission notice appear in supporting
# documentation, and that the name of M.I.T. not be used in advertising or
# publicity pertaining to distribution of the software without specific,
# written prior permission. M.I.T. makes no representations about the
# suitability of this software for any purpose. It is provided "as is"
# without express or implied warranty.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# `make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
# from scratch. It can only install one file at a time, a restriction
# shared with many OS's install programs.
# set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit="${DOITPROG-}"
# put in absolute paths if you don't have them in your path; or use env. vars.
mvprog="${MVPROG-mv}"
cpprog="${CPPROG-cp}"
chmodprog="${CHMODPROG-chmod}"
chownprog="${CHOWNPROG-chown}"
chgrpprog="${CHGRPPROG-chgrp}"
stripprog="${STRIPPROG-strip}"
rmprog="${RMPROG-rm}"
mkdirprog="${MKDIRPROG-mkdir}"
transformbasename=""
transform_arg=""
instcmd="$mvprog"
chmodcmd="$chmodprog 0755"
chowncmd=""
chgrpcmd=""
stripcmd=""
rmcmd="$rmprog -f"
mvcmd="$mvprog"
src=""
dst=""
dir_arg=""
while [ x"$1" != x ]; do
case $1 in
-c) instcmd=$cpprog
shift
continue;;
-d) dir_arg=true
shift
continue;;
-m) chmodcmd="$chmodprog $2"
shift
shift
continue;;
-o) chowncmd="$chownprog $2"
shift
shift
continue;;
-g) chgrpcmd="$chgrpprog $2"
shift
shift
continue;;
-s) stripcmd=$stripprog
shift
continue;;
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
shift
continue;;
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
shift
continue;;
*) if [ x"$src" = x ]
then
src=$1
else
# this colon is to work around a 386BSD /bin/sh bug
:
dst=$1
fi
shift
continue;;
esac
done
if [ x"$src" = x ]
then
echo "$0: no input file specified" >&2
exit 1
else
:
fi
if [ x"$dir_arg" != x ]; then
dst=$src
src=""
if [ -d "$dst" ]; then
instcmd=:
chmodcmd=""
else
instcmd=$mkdirprog
fi
else
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if [ -f "$src" ] || [ -d "$src" ]
then
:
else
echo "$0: $src does not exist" >&2
exit 1
fi
if [ x"$dst" = x ]
then
echo "$0: no destination specified" >&2
exit 1
else
:
fi
# If destination is a directory, append the input filename; if your system
# does not like double slashes in filenames, you may need to add some logic
if [ -d "$dst" ]
then
dst=$dst/`basename "$src"`
else
:
fi
fi
## this sed command emulates the dirname command
dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
# Make sure that the destination directory exists.
# this part is taken from Noah Friedman's mkinstalldirs script
# Skip lots of stat calls in the usual case.
if [ ! -d "$dstdir" ]; then
defaultIFS='
'
IFS="${IFS-$defaultIFS}"
oIFS=$IFS
# Some sh's can't handle IFS=/ for some reason.
IFS='%'
set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
IFS=$oIFS
pathcomp=''
while [ $# -ne 0 ] ; do
pathcomp=$pathcomp$1
shift
if [ ! -d "$pathcomp" ] ;
then
$mkdirprog "$pathcomp"
else
:
fi
pathcomp=$pathcomp/
done
fi
if [ x"$dir_arg" != x ]
then
$doit $instcmd "$dst" &&
if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dst"; else : ; fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dst"; else : ; fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dst"; else : ; fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dst"; else : ; fi
else
# If we're going to rename the final executable, determine the name now.
if [ x"$transformarg" = x ]
then
dstfile=`basename "$dst"`
else
dstfile=`basename "$dst" $transformbasename |
sed $transformarg`$transformbasename
fi
# don't allow the sed command to completely eliminate the filename
if [ x"$dstfile" = x ]
then
dstfile=`basename "$dst"`
else
:
fi
# Make a couple of temp file names in the proper directory.
dsttmp=$dstdir/#inst.$$#
rmtmp=$dstdir/#rm.$$#
# Trap to clean up temp files at exit.
trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0
trap '(exit $?); exit' 1 2 13 15
# Move or copy the file name to the temp name
$doit $instcmd "$src" "$dsttmp" &&
# and set any options; do chmod last to preserve setuid bits
# If any of these fail, we abort the whole thing. If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $instcmd $src $dsttmp" command.
if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp"; else :;fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp"; else :;fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dsttmp"; else :;fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp"; else :;fi &&
# Now remove or move aside any old file at destination location. We try this
# two ways since rm can't unlink itself on some systems and the destination
# file might be busy for other reasons. In this case, the final cleanup
# might fail but the new file should still install successfully.
{
if [ -f "$dstdir/$dstfile" ]
then
$doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null ||
$doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null ||
{
echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
(exit 1); exit
}
else
:
fi
} &&
# Now rename the file to the real destination.
$doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
fi &&
# The final little trick to "correctly" pass the exit status to the exit trap.
{
(exit 0); exit
}

5858
admin/libtool.m4.in vendored

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -0,0 +1,336 @@
#! /bin/sh
# Common stub for a few missing GNU programs while installing.
# Copyright (C) 1996, 1997, 1999, 2000, 2002 Free Software Foundation, Inc.
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
# 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, 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
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# 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.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
if test $# -eq 0; then
echo 1>&2 "Try \`$0 --help' for more information"
exit 1
fi
run=:
# In the cases where this matters, `missing' is being run in the
# srcdir already.
if test -f configure.ac; then
configure_ac=configure.ac
else
configure_ac=configure.in
fi
case "$1" in
--run)
# Try to run requested program, and just exit if it succeeds.
run=
shift
"$@" && exit 0
;;
esac
# If it does not exist, or fails to run (possibly an outdated version),
# try to emulate it.
case "$1" in
-h|--h|--he|--hel|--help)
echo "\
$0 [OPTION]... PROGRAM [ARGUMENT]...
Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
error status if there is no known handling for PROGRAM.
Options:
-h, --help display this help and exit
-v, --version output version information and exit
--run try to run the given command, and emulate it if it fails
Supported PROGRAM values:
aclocal touch file \`aclocal.m4'
autoconf touch file \`configure'
autoheader touch file \`config.h.in'
automake touch all \`Makefile.in' files
bison create \`y.tab.[ch]', if possible, from existing .[ch]
flex create \`lex.yy.c', if possible, from existing .c
help2man touch the output file
lex create \`lex.yy.c', if possible, from existing .c
makeinfo touch the output file
tar try tar, gnutar, gtar, then tar without non-portable flags
yacc create \`y.tab.[ch]', if possible, from existing .[ch]"
;;
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
echo "missing 0.4 - GNU automake"
;;
-*)
echo 1>&2 "$0: Unknown \`$1' option"
echo 1>&2 "Try \`$0 --help' for more information"
exit 1
;;
aclocal*)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
to install the \`Automake' and \`Perl' packages. Grab them from
any GNU archive site."
touch aclocal.m4
;;
autoconf)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified \`${configure_ac}'. You might want to install the
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
archive site."
touch configure
;;
autoheader)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified \`acconfig.h' or \`${configure_ac}'. You might want
to install the \`Autoconf' and \`GNU m4' packages. Grab them
from any GNU archive site."
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
test -z "$files" && files="config.h"
touch_files=
for f in $files; do
case "$f" in
*:*) touch_files="$touch_files "`echo "$f" |
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
*) touch_files="$touch_files $f.in";;
esac
done
touch $touch_files
;;
automake*)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
You might want to install the \`Automake' and \`Perl' packages.
Grab them from any GNU archive site."
find . -type f -name Makefile.am -print |
sed 's/\.am$/.in/' |
while read f; do touch "$f"; done
;;
autom4te)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is needed, and you do not seem to have it handy on your
system. You might have modified some files without having the
proper tools for further handling them.
You can get \`$1Help2man' as part of \`Autoconf' from any GNU
archive site."
file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
if test -f "$file"; then
touch $file
else
test -z "$file" || exec >$file
echo "#! /bin/sh"
echo "# Created by GNU Automake missing as a replacement of"
echo "# $ $@"
echo "exit 0"
chmod +x $file
exit 1
fi
;;
bison|yacc)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified a \`.y' file. You may need the \`Bison' package
in order for those modifications to take effect. You can get
\`Bison' from any GNU archive site."
rm -f y.tab.c y.tab.h
if [ $# -ne 1 ]; then
eval LASTARG="\${$#}"
case "$LASTARG" in
*.y)
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" y.tab.c
fi
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" y.tab.h
fi
;;
esac
fi
if [ ! -f y.tab.h ]; then
echo >y.tab.h
fi
if [ ! -f y.tab.c ]; then
echo 'main() { return 0; }' >y.tab.c
fi
;;
lex|flex)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified a \`.l' file. You may need the \`Flex' package
in order for those modifications to take effect. You can get
\`Flex' from any GNU archive site."
rm -f lex.yy.c
if [ $# -ne 1 ]; then
eval LASTARG="\${$#}"
case "$LASTARG" in
*.l)
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" lex.yy.c
fi
;;
esac
fi
if [ ! -f lex.yy.c ]; then
echo 'main() { return 0; }' >lex.yy.c
fi
;;
help2man)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified a dependency of a manual page. You may need the
\`Help2man' package in order for those modifications to take
effect. You can get \`Help2man' from any GNU archive site."
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
if test -z "$file"; then
file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
fi
if [ -f "$file" ]; then
touch $file
else
test -z "$file" || exec >$file
echo ".ab help2man is required to generate this page"
exit 1
fi
;;
makeinfo)
if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
# We have makeinfo, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified a \`.texi' or \`.texinfo' file, or any other file
indirectly affecting the aspect of the manual. The spurious
call might also be the consequence of using a buggy \`make' (AIX,
DU, IRIX). You might want to install the \`Texinfo' package or
the \`GNU make' package. Grab either from any GNU archive site."
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
if test -z "$file"; then
file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
fi
touch $file
;;
tar)
shift
if test -n "$run"; then
echo 1>&2 "ERROR: \`tar' requires --run"
exit 1
fi
# We have already tried tar in the generic part.
# Look for gnutar/gtar before invocation to avoid ugly error
# messages.
if (gnutar --version > /dev/null 2>&1); then
gnutar "$@" && exit 0
fi
if (gtar --version > /dev/null 2>&1); then
gtar "$@" && exit 0
fi
firstarg="$1"
if shift; then
case "$firstarg" in
*o*)
firstarg=`echo "$firstarg" | sed s/o//`
tar "$firstarg" "$@" && exit 0
;;
esac
case "$firstarg" in
*h*)
firstarg=`echo "$firstarg" | sed s/h//`
tar "$firstarg" "$@" && exit 0
;;
esac
fi
echo 1>&2 "\
WARNING: I can't seem to be able to run \`tar' with the given arguments.
You may want to install GNU tar or Free paxutils, or check the
command line arguments."
exit 1
;;
*)
echo 1>&2 "\
WARNING: \`$1' is needed, and you do not seem to have it handy on your
system. You might have modified some files without having the
proper tools for further handling them. Check the \`README' file,
it often tells you about the needed prerequirements for installing
this package. You may also peek at any GNU archive site, in case
some other package would contain this missing \`$1' program."
exit 1
;;
esac
exit 0

@ -0,0 +1,111 @@
#! /bin/sh
# mkinstalldirs --- make directory hierarchy
# Author: Noah Friedman <friedman@prep.ai.mit.edu>
# Created: 1993-05-16
# Public domain
errstatus=0
dirmode=""
usage="\
Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..."
# process command line arguments
while test $# -gt 0 ; do
case $1 in
-h | --help | --h*) # -h for help
echo "$usage" 1>&2
exit 0
;;
-m) # -m PERM arg
shift
test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
dirmode=$1
shift
;;
--) # stop option processing
shift
break
;;
-*) # unknown option
echo "$usage" 1>&2
exit 1
;;
*) # first non-opt arg
break
;;
esac
done
for file
do
if test -d "$file"; then
shift
else
break
fi
done
case $# in
0) exit 0 ;;
esac
case $dirmode in
'')
if mkdir -p -- . 2>/dev/null; then
echo "mkdir -p -- $*"
exec mkdir -p -- "$@"
fi
;;
*)
if mkdir -m "$dirmode" -p -- . 2>/dev/null; then
echo "mkdir -m $dirmode -p -- $*"
exec mkdir -m "$dirmode" -p -- "$@"
fi
;;
esac
for file
do
set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
shift
pathcomp=
for d
do
pathcomp="$pathcomp$d"
case $pathcomp in
-*) pathcomp=./$pathcomp ;;
esac
if test ! -d "$pathcomp"; then
echo "mkdir $pathcomp"
mkdir "$pathcomp" || lasterr=$?
if test ! -d "$pathcomp"; then
errstatus=$lasterr
else
if test ! -z "$dirmode"; then
echo "chmod $dirmode $pathcomp"
lasterr=""
chmod "$dirmode" "$pathcomp" || lasterr=$?
if test ! -z "$lasterr"; then
errstatus=$lasterr
fi
fi
fi
fi
pathcomp="$pathcomp/"
done
done
exit $errstatus
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# End:
# mkinstalldirs ends here

@ -0,0 +1,371 @@
#!/usr/bin/perl -w
# Check namespace cleanness of a library.
# Allowed symbols are passed as arguments.
# They may have trailing * = wildcard.
# Wildcards may be also specified as *::* (e.g. K*::* for all KDE classes)
# Symbols are listed as full function unmangled names without arguments,
# e.g. 'foo bar* nspace::*' allows foo(), foo(int), bar(), barbar()
# and all symbols in namespace/class nspace.
# If an argument has comma in it, it's a filename of a file containing
# allowed symbols, one per line.
$thisProg = "$0"; # This programs name
$library = "";
$allowed_symbols = "";
$debug = 0;
$allowed_weak = "";
$weak_specified = 0;
while( defined( $ARGV[ 0 ] ))
{
$_ = shift;
if( /^--verbose$|^-v$/ )
{
$debug = 1;
}
elsif( /^--help$|^-h$/ )
{
print STDOUT "Usage $thisProg [OPTION] ... library [allowed symbols] ...\n",
"\n",
"Check if the given library has only allowed public symbols.\n",
"\n",
" --allowweak=[symbol] allow only these weak symbols\n",
" -v, --verbose verbosely list files processed\n",
" -h, --help print this help, then exit\n";
exit 0;
}
elsif( /^--allowweak=(.*)$/ )
{
$allowed_weak .= " " . $1;
$weak_specified = 1;
}
elsif( /^--allowweak$/ ) # simply list all weak
{
$allowed_weak .= " ";
$weak_specified = 1;
}
elsif( /^--*/ )
{
die "Invalid argument!\n";
}
else
{
if( ! $library )
{
$library = $_;
}
else
{
$allowed_symbols .= " " . $_;
}
}
}
if( ! $weak_specified )
{
$allowed_weak = "*";
# allow all weak symbols by default
# instances of templates and similar stuff - unfortunately includes also things from other libraries,
# so it cannot be on by default
}
print STDERR "library:" . $library . "\n" if $debug;
print STDERR "allowed_symbols:" . $allowed_symbols . "\n" if $debug;
print STDERR "allowed_weak:" . $allowed_weak . "\n" if $debug;
$default_symbols = "_fini _init"; # system symbols
# on my system, every .so has :
# A _DYNAMIC
# A _GLOBAL_OFFSET_TABLE_
# A __bss_start
# A _edata
# A _end
# T _fini
# T _init
# no need to list A symbols in $default_symbols
print STDERR "default_symbols: " . $default_symbols . "\n" if $debug;
print STDOUT "Namespace cleanness check for " . $library . " :\n";
$lib_file = "";
if( $library =~ /\.la$/ )
{
# get the real library file from .la
open( FILEIN, $library ) || die "Couldn't open $! !\n";
while( $line = <FILEIN> )
{
if( $line =~ /library_names=\'([^ ]*).*/o )
{
$lib_file = $1;
}
}
close( FILEIN );
if( ! $lib_file )
{
print STDERR "Library file not found in .la file!\n";
exit 1;
}
my $libpath = $library;
$libpath =~ s%[^/]*$%%;
if( -e $libpath . ".libs/" . $lib_file )
{
$lib_file = $libpath . ".libs/" . $lib_file;
}
else
{
$lib_file = $libpath . $lib_file;
}
}
else
{
$lib_file = $library;
}
print STDERR "libfile: ". $lib_file . "\n" if $debug;
$allowed_symbols .= " " . $default_symbols;
sub process_symbols($\@\%\@);
@wildcards = ();
%exacts = ();
@regwildcards = ();
process_symbols( $allowed_symbols, @wildcards, %exacts, @regwildcards );
@weak_wildcards = ();
%weak_exacts = ();
@weak_regwildcards = ();
process_symbols( $allowed_weak, @weak_wildcards, %weak_exacts, @weak_regwildcards );
# grep is for stripping not exported symbols, which don't have address (=first column)
$nm_command = "nm -BDCg " . $lib_file . " | grep -v '^ ' |";
# TODO how portable is this nmcheck stuff?
print STDERR "nm command:" . $nm_command . "\n" if $debug;
open( FILEIN, $nm_command ) || die "nm command failed\n";
my $exit_code = 0;
while( $line = <FILEIN> )
{
my $type;
my $symbol;
if( $line =~ /^[^ ]* (.) (.*)$/o )
{
$type = $1;
$symbol = $2;
}
else
{
die "Invalid line: " . $line . "\n";
}
print STDERR "Type: " . $type . " , symbol: " . $symbol . "\n" if $debug;
if( $type eq "A" )
{ # these should be system symbols, so ignore them
next;
}
my $orig_symbol = $symbol;
if( $symbol =~ /\(anonymous namespace\)/o )
{ # TODO tell to prefer named namespaces? (shorter symbols)
next;
}
# strip prefixes
# the :: appending is to make "CLASS::*" work also for "vtable for CLASS"
$symbol =~ s/^typeinfo for (.*)$/$1::/o;
$symbol =~ s/^typeinfo fn for (.*)$/$1::/o;
$symbol =~ s/^typeinfo name for (.*)$/$1::/o;
$symbol =~ s/^vtable for (.*)$/$1::/o;
$symbol =~ s/^guard variable for (.*)$/$1::/o;
$symbol =~ s/^reference temporary for (.*)$/$1::/o;
$symbol =~ s/^VTT for (.*)$/$1::/o;
$symbol =~ s/^virtual thunk \[[^\]]*\] to (.*)$/$1::/o;
$symbol =~ s/^non-virtual thunk \[[^\]]*\] to (.*)$/$1::/o;
$symbol =~ s/^covariant return thunk \[[^\]]*\] to (.*)$/$1::/o;
$symbol =~ s/^construction vtable thunk for (.*)$/$1::/o;
$symbol =~ s/^construction vtable for .*-in-(.*) [0-9]*$/$1::/o;
# templates seem to have also return types mangled in their name, and nm prints it too
# they have also template arguments in the symbol
# get rid of both of those
while( $symbol =~ /<.*>/o )
{
$symbol =~ s/<[^<>]*>//o; # strip innermost <>
}
if( $symbol !~ /operator\(\)/o )
{
$symbol =~ s/ ?\(.*\).*$//o; # strip () and all after it
}
else
{
$symbol =~ s/(^|:| )operator\(\) ?\(.*\).*$//o; # strip () and all after it
}
$symbol =~ s/\[.*\] *$//o; # strip [in-charge] etc.
if( $symbol =~ /(^|:| )operator /o )
{
$symbol =~ s/.* ([^\s]*)operator /$1/o; # strip everything before 'X::operator blah'
}
else
{
$symbol =~ s/.* ([^\s]+) *$/$1/o; # get last word (strip return type)
}
# print STDERR "Processed symbol: " . $symbol . "\n" if $debug;
my $found = 0;
if( $exacts{ $symbol } )
{
$found = 1;
}
if( ! $found )
{
for my $wild ( @wildcards )
{
if( index( $symbol, $wild ) == 0 )
{
$found = 1;
last;
}
}
}
if( ! $found )
{
for my $wild ( @regwildcards )
{
if( $symbol =~ /^$wild$/ )
{
$found = 1;
last;
}
}
}
if( ( ! $found ) && ( $type eq "W" || $type eq "V" ))
{
if( $weak_exacts{ $symbol } )
{
$found = 1;
}
if( ! $found )
{
for my $wild ( @weak_wildcards )
{
if( index( $symbol, $wild ) == 0 )
{
$found = 1;
last;
}
}
}
if( ! $found )
{
for my $wild ( @weak_regwildcards )
{
if( $symbol =~ /^$wild$/ )
{
$found = 1;
last;
}
}
}
}
if( ! $found )
{
print STDERR "Public symbol " . $orig_symbol . " is not allowed!\n";
$exit_code = 1;
}
}
close( FILEIN );
print STDOUT $exit_code == 0 ? "OK\n" : "FAILED\n";
exit $exit_code;
sub process_symbols($\@\%\@)
{
my $allowed_symbols = $_[ 0 ];
my $wildcards_ref = $_[ 1 ];
my $exacts_ref = $_[ 2 ];
my $regwildcards_ref = $_[ 3 ];
$allowed_symbols =~ s/^ *//o; # strip whitespace
$allowed_symbols =~ s/ *$//o;
if( $allowed_symbols eq "NONE" )
{
$allowed_symbols = "";
}
my @symbols1 = split( ' ', $allowed_symbols );
my $i = 0;
my @symbols2 = ();
while( defined( $symbols1[ $i ] ))
{
my $symbol = $symbols1[ $i ];
if( $symbol =~ /\./ ) # dot in name -> file
{
open( SYMIN, $symbol ) || die ( "Cannot open file " . $symbol . "!" );
while( $line = <SYMIN> )
{
$line =~ s/^\s*//o; # strip whitespace
$line =~ s/\s*$//o;
if( $line !~ /^$/o # empty line
&& $line !~ /^\s*#/ ) # comment line starting with #
{
$symbols2[ $#symbols2 + 1 ] = $line;
}
}
close( SYMIN );
}
else
{
$symbols2[ $#symbols2 + 1 ] = $symbol;
}
$i++;
}
$i = 0;
while( defined( $symbols2[ $i ] ))
{
my $symbol = $symbols2[ $i ];
if( $symbol =~ /__/
|| $symbol =~ /^_[A-Z]/ )
{ # ISO C++ 2.10.2
die "Symbols containing a double underscore or beginning with an underscore and an upper-case letter are reserved!\n";
}
elsif( $symbol eq "main"
|| $symbol eq "main*" )
{
die "Symbol main is not allowed!\n";
}
if( $symbol =~ /^([^\*]*)\*$/o # trailing * without any * before it
&& $symbol !~ /operator\*$/o )
{
print STDERR "wildcard:" . $symbol . "\n" if $debug;
$wildcards_ref->[ $#{$wildcards_ref} + 1 ] = $1;
}
elsif( $symbol =~ /\*$/o
&& ( $symbol =~ /\*::/o || $symbol =~ /::\*/o )
&& $symbol !~ /^\*/o
&& $symbol !~ /operator\*$/o )
{
print STDERR "regwildcard:" . $symbol . "\n" if $debug;
$symbol =~ s/\*/\.\*/go; # change * to .* (regexp)
$regwildcards_ref->[ $#{$regwildcards_ref} + 1 ] = $symbol;
}
else
{
print STDERR "exact:" . $symbol . "\n" if $debug;
$exacts_ref->{ $symbol } = 1;
}
$i++;
}
}

@ -0,0 +1,192 @@
### -*- autoconf -*-
dnl This file is part of the KDE libraries/packages
dnl Copyright (C) 1997 Janos Farkas (chexum@shadow.banki.hu)
dnl (C) 1997,98,99 Stephan Kulow (coolo@kde.org)
dnl This file is free software; you can redistribute it and/or
dnl modify it under the terms of the GNU Library General Public
dnl License as published by the Free Software Foundation; either
dnl version 2 of the License, or (at your option) any later version.
dnl This library is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
dnl Library General Public License for more details.
dnl You should have received a copy of the GNU Library General Public License
dnl along with this library; see the file COPYING.LIB. If not, write to
dnl the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
dnl Boston, MA 02111-1307, USA.
AC_DEFUN([KDE_CHECK_MICO],
[
AC_REQUIRE([KDE_CHECK_LIBDL])
AC_REQUIRE([KDE_MISC_TESTS])
AC_MSG_CHECKING(for MICO)
if test -z "$MICODIR"; then
kde_micodir=/usr/local
else
kde_micodir="$MICODIR"
fi
AC_ARG_WITH(micodir,
[ --with-micodir=micodir where mico is installed ],
kde_micodir=$withval,
kde_micodir=$kde_micodir
)
AC_CACHE_VAL(kde_cv_mico_incdir,
[
mico_incdirs="$kde_micodir/include /usr/include /usr/local/include /usr/local/include /opt/local/include $kde_extra_includes"
AC_FIND_FILE(CORBA.h, $mico_incdirs, kde_cv_mico_incdir)
])
kde_micodir=`echo $kde_cv_mico_incdir | sed -e 's#/include##'`
if test ! -r $kde_micodir/include/CORBA.h; then
AC_MSG_ERROR([No CORBA.h found, specify another micodir])
fi
AC_MSG_RESULT($kde_micodir)
MICO_INCLUDES=-I$kde_micodir/include
AC_SUBST(MICO_INCLUDES)
MICO_LDFLAGS=-L$kde_micodir/lib
AC_SUBST(MICO_LDFLAGS)
micodir=$kde_micodir
AC_SUBST(micodir)
AC_MSG_CHECKING([for MICO version])
AC_CACHE_VAL(kde_cv_mico_version,
[
AC_LANG_C
cat >conftest.$ac_ext <<EOF
#include <stdio.h>
#include <mico/version.h>
int main() {
printf("MICO_VERSION=%s\n",MICO_VERSION);
return (0);
}
EOF
ac_compile='${CC-gcc} $CFLAGS $MICO_INCLUDES conftest.$ac_ext -o conftest'
if AC_TRY_EVAL(ac_compile); then
if eval `./conftest 2>&5`; then
kde_cv_mico_version=$MICO_VERSION
else
AC_MSG_ERROR([your system is not able to execute a small application to
find MICO version! Check $kde_micodir/include/mico/version.h])
fi
else
AC_MSG_ERROR([your system is not able to compile a small application to
find MICO version! Check $kde_micodir/include/mico/version.h])
fi
])
dnl installed MICO version
mico_v_maj=`echo $kde_cv_mico_version | sed -e 's/^\(.*\)\..*\..*$/\1/'`
mico_v_mid=`echo $kde_cv_mico_version | sed -e 's/^.*\.\(.*\)\..*$/\1/'`
mico_v_min=`echo $kde_cv_mico_version | sed -e 's/^.*\..*\.\(.*\)$/\1/'`
if test "x$1" = "x"; then
req_version="2.3.0"
else
req_version=$1
fi
dnl required MICO version
req_v_maj=`echo $req_version | sed -e 's/^\(.*\)\..*\..*$/\1/'`
req_v_mid=`echo $req_version | sed -e 's/^.*\.\(.*\)\..*$/\1/'`
req_v_min=`echo $req_version | sed -e 's/^.*\..*\.\(.*\)$/\1/'`
if test "$mico_v_maj" -lt "$req_v_maj" || \
( test "$mico_v_maj" -eq "$req_v_maj" && \
test "$mico_v_mid" -lt "$req_v_mid" ) || \
( test "$mico_v_mid" -eq "$req_v_mid" && \
test "$mico_v_min" -lt "$req_v_min" )
then
AC_MSG_ERROR([found MICO version $kde_cv_mico_version but version $req_version \
at least is required. You should upgrade MICO.])
else
AC_MSG_RESULT([$kde_cv_mico_version (minimum version $req_version, ok)])
fi
LIBMICO="-lmico$kde_cv_mico_version $LIBCRYPT $LIBSOCKET $LIBDL"
AC_SUBST(LIBMICO)
if test -z "$IDL"; then
IDL='$(kde_bindir)/cuteidl'
fi
AC_SUBST(IDL)
IDL_DEPENDENCIES='$(kde_includes)/CUTE.h'
AC_SUBST(IDL_DEPENDENCIES)
idldir="\$(includedir)/idl"
AC_SUBST(idldir)
])
AC_DEFUN([KDE_CHECK_MINI_STL],
[
AC_REQUIRE([KDE_CHECK_MICO])
AC_MSG_CHECKING(if we use mico's mini-STL)
AC_CACHE_VAL(kde_cv_have_mini_stl,
[
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
kde_save_cxxflags="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS $MICO_INCLUDES"
AC_TRY_COMPILE(
[
#include <mico/config.h>
],
[
#ifdef HAVE_MINI_STL
#error "nothing"
#endif
],
kde_cv_have_mini_stl=no,
kde_cv_have_mini_stl=yes)
CXXFLAGS="$kde_save_cxxflags"
AC_LANG_RESTORE
])
if test "x$kde_cv_have_mini_stl" = "xyes"; then
AC_MSG_RESULT(yes)
$1
else
AC_MSG_RESULT(no)
$2
fi
])
])
AC_DEFUN([KDE_CHECK_ANSI],
[
])
AC_DEFUN([KDE_CHECK_INSURE],
[
AC_ARG_ENABLE(insure, [ --enable-insure use insure++ for debugging [default=no]],
[
if test $enableval = "no"; dnl
then ac_use_insure="no"
else ac_use_insure="yes"
fi
], [ac_use_insure="no"])
AC_MSG_CHECKING(if we will use Insure++ to debug)
AC_MSG_RESULT($ac_use_insure)
if test "$ac_use_insure" = "yes"; dnl
then CC="insure"; CXX="insure"; dnl CFLAGS="$CLAGS -fno-rtti -fno-exceptions "????
fi
])
AC_DEFUN([KDE_CHECK_NEWLIBS],
[
])

@ -0,0 +1,143 @@
#! /bin/sh
# ylwrap - wrapper for lex/yacc invocations.
# Copyright 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>.
#
# 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, 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
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# 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.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# Usage:
# ylwrap INPUT [OUTPUT DESIRED]... -- PROGRAM [ARGS]...
# * INPUT is the input file
# * OUTPUT is file PROG generates
# * DESIRED is file we actually want
# * PROGRAM is program to run
# * ARGS are passed to PROG
# Any number of OUTPUT,DESIRED pairs may be used.
# The input.
input="$1"
shift
case "$input" in
[\\/]* | ?:[\\/]*)
# Absolute path; do nothing.
;;
*)
# Relative path. Make it absolute.
input="`pwd`/$input"
;;
esac
# The directory holding the input.
input_dir=`echo "$input" | sed -e 's,\([\\/]\)[^\\/]*$,\1,'`
# Quote $INPUT_DIR so we can use it in a regexp.
# FIXME: really we should care about more than `.' and `\'.
input_rx=`echo "$input_dir" | sed -e 's,\\\\,\\\\\\\\,g' -e 's,\\.,\\\\.,g'`
echo "got $input_rx"
pairlist=
while test "$#" -ne 0; do
if test "$1" = "--"; then
shift
break
fi
pairlist="$pairlist $1"
shift
done
# The program to run.
prog="$1"
shift
# Make any relative path in $prog absolute.
case "$prog" in
[\\/]* | ?:[\\/]*) ;;
*[\\/]*) prog="`pwd`/$prog" ;;
esac
# FIXME: add hostname here for parallel makes that run commands on
# other machines. But that might take us over the 14-char limit.
dirname=ylwrap$$
trap "cd `pwd`; rm -rf $dirname > /dev/null 2>&1" 1 2 3 15
mkdir $dirname || exit 1
cd $dirname
$prog ${1+"$@"} "$input"
status=$?
if test $status -eq 0; then
set X $pairlist
shift
first=yes
# Since DOS filename conventions don't allow two dots,
# the DOS version of Bison writes out y_tab.c instead of y.tab.c
# and y_tab.h instead of y.tab.h. Test to see if this is the case.
y_tab_nodot="no"
if test -f y_tab.c || test -f y_tab.h; then
y_tab_nodot="yes"
fi
while test "$#" -ne 0; do
from="$1"
# Handle y_tab.c and y_tab.h output by DOS
if test $y_tab_nodot = "yes"; then
if test $from = "y.tab.c"; then
from="y_tab.c"
else
if test $from = "y.tab.h"; then
from="y_tab.h"
fi
fi
fi
if test -f "$from"; then
# If $2 is an absolute path name, then just use that,
# otherwise prepend `../'.
case "$2" in
[\\/]* | ?:[\\/]*) target="$2";;
*) target="../$2";;
esac
# Edit out `#line' or `#' directives. We don't want the
# resulting debug information to point at an absolute srcdir;
# it is better for it to just mention the .y file with no
# path.
sed -e "/^#/ s,$input_rx,," "$from" > "$target" || status=$?
else
# A missing file is only an error for the first file. This
# is a blatant hack to let us support using "yacc -d". If -d
# is not specified, we don't want an error when the header
# file is "missing".
if test $first = yes; then
status=1
fi
fi
shift
shift
first=no
done
else
status=$?
fi
# Remove the directory.
cd ..
rm -rf $dirname
exit $status

@ -0,0 +1,20 @@
AUTOMAKE_OPTIONS = foreign
SUBDIRS = pics
KDE_CXXFLAGS = -DQT_PLUGIN
INCLUDES = $(all_includes) -I$(kde_includes)/kwin
kwindir = $(kde_datadir)/kwin/
kwin_DATA = fahrenheit.desktop
noinst_HEADERS = fahrenheitclient.h
kde_module_LTLIBRARIES = kwin3_fahrenheit.la
kwin3_fahrenheit_la_SOURCES = fahrenheitclient.cc
kwin3_fahrenheit_la_LIBADD = $(kde_libraries)/libkdecorations.la
kwin3_fahrenheit_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -lkdecore -module
kwin3_fahrenheit_la_METASOURCES = AUTO
DISTCLEANFILES = $(kwin3_fahrenheit_la_METASOURCES)

@ -0,0 +1,5 @@
# KDE Desktop Entry
[Desktop Entry]
Encoding=UTF-8
Name=Fahrenheit
X-KDE-Library=kwin3_fahrenheit

File diff suppressed because it is too large Load Diff

@ -0,0 +1,166 @@
//////////////////////////////////////////////////////////////////////////////
// fahrenheitclient.h
// -------------------
// Fahrenheit window decoration for KDE
// -------------------
// Copyright (c) 2003, 2004 David Johnson <david@usermode.org>
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to
// deal in the Software without restriction, including without limitation the
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
// sell copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//////////////////////////////////////////////////////////////////////////////
#ifndef FAHRENHEITCLIENT_H
#define FAHRENHEITCLIENT_H
#include <qbutton.h>
#include <kdecoration.h>
#include <kdecorationfactory.h>
class QSpacerItem;
class QPoint;
namespace Fahrenheit {
class FahrenheitClient;
enum ButtonType {
ButtonHelp=0,
ButtonMax,
ButtonMin,
ButtonClose,
ButtonMenu,
ButtonSticky,
ButtonTypeCount
};
// FahrenheitFactory /////////////////////////////////////////////////////////////
class FahrenheitFactory: public KDecorationFactory
{
public:
FahrenheitFactory();
virtual ~FahrenheitFactory();
virtual KDecoration *createDecoration(KDecorationBridge *b);
virtual bool reset(unsigned long changed);
static bool initialized();
static Qt::AlignmentFlags titleAlign();
private:
bool readConfig();
private:
static bool initialized_;
static Qt::AlignmentFlags titlealign_;
};
inline bool FahrenheitFactory::initialized()
{ return initialized_; }
inline Qt::AlignmentFlags FahrenheitFactory::titleAlign()
{ return titlealign_; }
// FahrenheitButton //////////////////////////////////////////////////////////////
class FahrenheitButton : public QButton
{
public:
FahrenheitButton(FahrenheitClient *parent=0, const char *name=0,
const QString &tip=NULL,
ButtonType type=ButtonHelp,
QString pixmap=NULL);
~FahrenheitButton();
void setPixmap(QString pixmap);
QSize sizeHint() const;
int lastMousePress() const;
void reset();
private:
void enterEvent(QEvent *e);
void leaveEvent(QEvent *e);
void mousePressEvent(QMouseEvent *e);
void mouseReleaseEvent(QMouseEvent *e);
void drawButton(QPainter *painter);
private:
FahrenheitClient *client_;
ButtonType type_;
QPixmap *deco_;
int lastmouse_;
};
inline int FahrenheitButton::lastMousePress() const
{ return lastmouse_; }
inline void FahrenheitButton::reset()
{ repaint(false); }
// FahrenheitClient //////////////////////////////////////////////////////////////
class FahrenheitClient : public KDecoration
{
Q_OBJECT
public:
FahrenheitClient(KDecorationBridge *b, KDecorationFactory *f);
virtual ~FahrenheitClient();
virtual void init();
virtual void recalcTitlebar();
virtual void activeChange();
virtual void desktopChange();
virtual void captionChange();
virtual void iconChange();
virtual void maximizeChange();
virtual void shadeChange();
virtual void doShape();
virtual void borders(int &l, int &r, int &t, int &b) const;
virtual void resize(const QSize &size);
virtual QSize minimumSize() const;
virtual Position mousePosition(const QPoint &point) const;
private:
void addButtons(QBoxLayout* layout, const QString& buttons);
bool isTool();
bool eventFilter(QObject *obj, QEvent *e);
void mouseDoubleClickEvent(QMouseEvent *e);
void paintEvent(QPaintEvent *e);
void resizeEvent(QResizeEvent *);
void showEvent(QShowEvent *);
private slots:
void maxButtonPressed();
void menuButtonPressed();
private:
int buttonWidth_;
FahrenheitButton *button[ButtonTypeCount];
QBoxLayout *mainLayout_;
QBoxLayout *topLayout_;
QBoxLayout *menuLayout_;
QBoxLayout *buttonLayout_;
QSpacerItem *titleSpacer_;
QSpacerItem *barSpacer_;
};
} // namespace Fahrenheit
#endif // FAHRENHEITCLIENT_H

@ -0,0 +1,11 @@
linkdir = $(kde_datadir)/kwin/fahrenheit
link_DATA = close.png maximize.png minmax.png minimize.png \
sticky.png unsticky.png help.png
EXTRA_DIST = $(link_DATA)
###KMAKE-start (don't edit or delete this block)
###KMAKE-end

Binary file not shown.

After

Width:  |  Height:  |  Size: 264 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 248 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 292 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 258 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 235 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 277 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 280 B

@ -0,0 +1,3 @@
#MIN_CONFIG
AM_INIT_AUTOMAKE(fahrenheit, 0.1)
Loading…
Cancel
Save