rev 5027 - in kde-extras/kfocus/trunk: . debian debian/patches

Mark Purcell msp at alioth.debian.org
Sat Dec 2 13:18:14 CET 2006


Author: msp
Date: 2006-12-02 13:18:01 +0100 (Sat, 02 Dec 2006)
New Revision: 5027

Added:
   kde-extras/kfocus/trunk/debian/patches/
   kde-extras/kfocus/trunk/debian/patches/kfocus_1.0.2-16.diff
Removed:
   kde-extras/kfocus/trunk/Makefile.am
   kde-extras/kfocus/trunk/Makefile.in
   kde-extras/kfocus/trunk/acinclude.m4
   kde-extras/kfocus/trunk/aclocal.m4
   kde-extras/kfocus/trunk/admin/
   kde-extras/kfocus/trunk/config.h.in
   kde-extras/kfocus/trunk/configure
   kde-extras/kfocus/trunk/configure.files
   kde-extras/kfocus/trunk/configure.in
   kde-extras/kfocus/trunk/doc/
   kde-extras/kfocus/trunk/kfocus/
   kde-extras/kfocus/trunk/po/
   kde-extras/kfocus/trunk/stamp-h.in
Modified:
   kde-extras/kfocus/trunk/debian/changelog
Log:
* Add debian/patches/kfocus_1.0.2-16.diff

Deleted: kde-extras/kfocus/trunk/Makefile.am

Deleted: kde-extras/kfocus/trunk/Makefile.in

Deleted: kde-extras/kfocus/trunk/acinclude.m4

Deleted: kde-extras/kfocus/trunk/aclocal.m4

Deleted: kde-extras/kfocus/trunk/config.h.in

Deleted: kde-extras/kfocus/trunk/configure

Deleted: kde-extras/kfocus/trunk/configure.files

Deleted: kde-extras/kfocus/trunk/configure.in

Modified: kde-extras/kfocus/trunk/debian/changelog
===================================================================
--- kde-extras/kfocus/trunk/debian/changelog	2006-12-02 12:04:43 UTC (rev 5026)
+++ kde-extras/kfocus/trunk/debian/changelog	2006-12-02 12:18:01 UTC (rev 5027)
@@ -7,8 +7,9 @@
     boilerplate
   * echo 4 > debian/compat
   * Switch to cdbs
+  * Add debian/patches/kfocus_1.0.2-16.diff
 
- -- Mark Purcell <msp at debian.org>  Sat,  2 Dec 2006 12:04:14 +0000
+ -- Mark Purcell <msp at debian.org>  Sat,  2 Dec 2006 12:17:47 +0000
 
 kfocus (1.0.2-15) unstable; urgency=low
 

Added: kde-extras/kfocus/trunk/debian/patches/kfocus_1.0.2-16.diff
===================================================================
--- kde-extras/kfocus/trunk/debian/patches/kfocus_1.0.2-16.diff	2006-12-02 12:04:43 UTC (rev 5026)
+++ kde-extras/kfocus/trunk/debian/patches/kfocus_1.0.2-16.diff	2006-12-02 12:18:01 UTC (rev 5027)
@@ -0,0 +1,30020 @@
+--- kfocus-1.0.2.orig/config.h.in
++++ kfocus-1.0.2/config.h.in
+@@ -1,4 +1,7 @@
+-/* config.h.in.  Generated automatically from configure.in by autoheader.  */
++/* config.h.in.  Generated automatically from configure.in by autoheader 2.13.  */
++
++/* The number of bytes in a char.  */
++#undef SIZEOF_CHAR
+ 
+ /* The number of bytes in a char *.  */
+ #undef SIZEOF_CHAR_P
+@@ -9,6 +12,12 @@
+ /* The number of bytes in a long.  */
+ #undef SIZEOF_LONG
+ 
++/* Define if you have the res_init function.  */
++#undef HAVE_RES_INIT
++
++/* Define if you have the <pthread/linuxthreads/pthread.h> header file.  */
++#undef HAVE_PTHREAD_LINUXTHREADS_PTHREAD_H
++
+ /* Name of package */
+ #undef PACKAGE
+ 
+@@ -21,16 +30,24 @@
+ /* Defines if your system has the crypt function */
+ #undef HAVE_CRYPT
+ 
+-/* Define the type of the third argument for getsockname
+- */
++/* Define the real type of socklen_t */
++#undef socklen_t
++
++/* Compatibility define */
+ #undef ksize_t
+ 
+ /* Define if you have libz */
+ #undef HAVE_LIBZ
+ 
++/* Define if you want Xinerama support */
++#undef HAVE_XINERAMA
++
+ /* Define if you have libpng */
+ #undef HAVE_LIBPNG
+ 
+ /* Define if you have libjpeg */
+ #undef HAVE_LIBJPEG
+ 
++/* Define if you have a working libpthread (will enable threaded code) */
++#undef HAVE_LIBPTHREAD
++
+--- kfocus-1.0.2.orig/Makefile.am
++++ kfocus-1.0.2/Makefile.am
+@@ -24,7 +24,7 @@
+ 	$(MAKE) -f admin/Makefile.common package-messages
+ 	$(MAKE) -C po merge
+ 
+-EXTRA_DIST = admin 
++## EXTRA_DIST = admin 
+ 
+ dist-hook:
+ 	cd $(top_distdir) && perl admin/am_edit -padmin
+--- kfocus-1.0.2.orig/stamp-h.in
++++ kfocus-1.0.2/stamp-h.in
+@@ -0,0 +1 @@
++timestamp
+--- kfocus-1.0.2.orig/aclocal.m4
++++ kfocus-1.0.2/aclocal.m4
+@@ -1,14 +1,15 @@
+-dnl aclocal.m4 generated automatically by aclocal 1.4
++# aclocal.m4 generated automatically by aclocal 1.5
+ 
+-dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
+-dnl This file is free software; the Free Software Foundation
+-dnl gives unlimited permission to copy and/or distribute it,
+-dnl with or without modifications, as long as this notice is preserved.
+-
+-dnl This program is distributed in the hope that it will be useful,
+-dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+-dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+-dnl PARTICULAR PURPOSE.
++# Copyright 1996, 1997, 1998, 1999, 2000, 2001
++# Free Software Foundation, Inc.
++# This file is free software; the Free Software Foundation
++# gives unlimited permission to copy and/or distribute it,
++# with or without modifications, as long as this notice is preserved.
++
++# This program is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
++# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
++# PARTICULAR PURPOSE.
+ 
+ 
+ dnl    This file is part of the KDE libraries/packages
+@@ -39,6 +40,138 @@
+ dnl Single-module modifications are best placed in configure.in for kdelibs
+ dnl and kdebase or configure.in.in if present.
+ 
++dnl ------------------------------------------------------------------------
++dnl Forward compatibility macros (make autoconf 2.13 look like 2.50),
++dnl thanks to Raja R Harinath.
++dnl ------------------------------------------------------------------------
++dnl
++ifdef([_AC_PATH_X_XMKMF],[],
++   [AC_DEFUN([_AC_PATH_X_XMKMF],[AC_PATH_X_XMKMF])])
++ifdef([AC_OUTPUT_SUBDIRS],[],
++   [AC_DEFUN([AC_OUTPUT_SUBDIRS],[subdirs=$1; _AC_OUTPUT_SUBDIRS])])
++
++# KDE_PATH_X_DIRECT
++dnl Internal subroutine of AC_PATH_X.
++dnl Set ac_x_includes and/or ac_x_libraries.
++AC_DEFUN(KDE_PATH_X_DIRECT,
++[if test "$ac_x_includes" = NO; then
++  # Guess where to find include files, by looking for this one X11 .h file.
++  test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
++
++  # First, try using that file with no special directory specified.
++AC_TRY_CPP([#include <$x_direct_test_include>],
++[# We can compile using X headers with no special include directory.
++ac_x_includes=],
++[# Look for the header file in a standard set of common directories.
++# Check X11 before X11Rn because it is often a symlink to the current release.
++  for ac_dir in               \
++    /usr/X11/include          \
++    /usr/X11R6/include        \
++    /usr/X11R5/include        \
++    /usr/X11R4/include        \
++                              \
++    /usr/include/X11          \
++    /usr/include/X11R6        \
++    /usr/include/X11R5        \
++    /usr/include/X11R4        \
++                              \
++    /usr/local/X11/include    \
++    /usr/local/X11R6/include  \
++    /usr/local/X11R5/include  \
++    /usr/local/X11R4/include  \
++                              \
++    /usr/local/include/X11    \
++    /usr/local/include/X11R6  \
++    /usr/local/include/X11R5  \
++    /usr/local/include/X11R4  \
++                              \
++    /usr/X386/include         \
++    /usr/x386/include         \
++    /usr/XFree86/include/X11  \
++                              \
++    /usr/include              \
++    /usr/local/include        \
++    /usr/unsupported/include  \
++    /usr/athena/include       \
++    /usr/local/x11r5/include  \
++    /usr/lpp/Xamples/include  \
++                              \
++    /usr/openwin/include      \
++    /usr/openwin/share/include \
++    ; \
++  do
++    if test -r "$ac_dir/$x_direct_test_include"; then
++      ac_x_includes=$ac_dir
++      break
++    fi
++  done])
++fi # $ac_x_includes = NO
++
++if test "$ac_x_libraries" = NO; then
++  # Check for the libraries.
++
++  test -z "$x_direct_test_library" && x_direct_test_library=Xt
++  test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
++
++  # See if we find them without any special options.
++  # Don't add to $LIBS permanently.
++  ac_save_LIBS="$LIBS"
++  LIBS="-l$x_direct_test_library $LIBS"
++AC_TRY_LINK(, [${x_direct_test_function}()],
++[LIBS="$ac_save_LIBS"
++# We can link X programs with no special library path.
++ac_x_libraries=],
++[LIBS="$ac_save_LIBS"
++# First see if replacing the include by lib works.
++# Check X11 before X11Rn because it is often a symlink to the current release.
++for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
++    /usr/X11/lib          \
++    /usr/X11R6/lib        \
++    /usr/X11R5/lib        \
++    /usr/X11R4/lib        \
++                          \
++    /usr/lib/X11          \
++    /usr/lib/X11R6        \
++    /usr/lib/X11R5        \
++    /usr/lib/X11R4        \
++                          \
++    /usr/local/X11/lib    \
++    /usr/local/X11R6/lib  \
++    /usr/local/X11R5/lib  \
++    /usr/local/X11R4/lib  \
++                          \
++    /usr/local/lib/X11    \
++    /usr/local/lib/X11R6  \
++    /usr/local/lib/X11R5  \
++    /usr/local/lib/X11R4  \
++                          \
++    /usr/X386/lib         \
++    /usr/x386/lib         \
++    /usr/XFree86/lib/X11  \
++                          \
++    /usr/lib              \
++    /usr/local/lib        \
++    /usr/unsupported/lib  \
++    /usr/athena/lib       \
++    /usr/local/x11r5/lib  \
++    /usr/lpp/Xamples/lib  \
++    /lib/usr/lib/X11	  \
++                          \
++    /usr/openwin/lib      \
++    /usr/openwin/share/lib \
++    ; \
++do
++dnl Don't even attempt the hair of trying to link an X program!
++  for ac_extension in a so sl; do
++    if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
++      ac_x_libraries=$ac_dir
++      break 2
++    fi
++  done
++done])
++fi # $ac_x_libraries = NO
++])
++
+ 
+ dnl ------------------------------------------------------------------------
+ dnl Find a file (or one of more files in a list of dirs)
+@@ -51,7 +184,9 @@
+ do
+   for j in $1;
+   do
++    echo "configure: __oline__: $i/$j" >&AC_FD_CC
+     if test -r "$i/$j"; then
++      echo "taking that" >&AC_FD_CC
+       $3=$i
+       break 2
+     fi
+@@ -155,16 +290,25 @@
+    fi
+ 
+    KDE_FIND_PATH(moc, MOC, [$qt_bindirs], [KDE_MOC_ERROR_MESSAGE])
+-   KDE_FIND_PATH(uic, UIC, [$qt_bindirs], [UIC="" ; KDE_UIC_ERROR_MESSAGE])
+-   if test -z "$UIC" ; then
+-     if test -z "$UIC_NOT_NEEDED" ; then
++   if test -z "$UIC_NOT_NEEDED"; then
++     KDE_FIND_PATH(uic, UIC, [$qt_bindirs], [UIC=""])
++     if test -z "$UIC" ; then
++       KDE_UIC_ERROR_MESSAGE
+        exit 1
+-     else
+-       UIC="echo uic not available: "
+      fi
++   else
++     UIC="echo uic not available: "
+    fi
++
+    AC_SUBST(MOC)
+    AC_SUBST(UIC)
++
++   UIC_TR="i18n"
++   if test $kde_qtver = 3; then
++     UIC_TR="tr2i18n"
++   fi
++
++   AC_SUBST(UIC_TR)
+ ])
+ 
+ AC_DEFUN(KDE_1_CHECK_PATHS,
+@@ -234,6 +378,8 @@
+ 	kde_servicesdir=\"$kde_servicesdir\" \
+ 	kde_servicetypesdir=\"$kde_servicetypesdir\" \
+ 	kde_moduledir=\"$kde_moduledir\" \
++   kde_styledir=\"$kde_styledir\" \
++	kde_widgetdir=\"$kde_widgetdir\" \
+ 	kde_result=$1"
+ ])
+ 
+@@ -287,7 +433,17 @@
+     kde_servicetypesdir='\${prefix}/share/servicetypes'
+   fi
+   if test -z "$kde_moduledir"; then
+-    kde_moduledir='\${prefix}/lib/kde2'
++    if test "$kde_qtver" = "2"; then
++      kde_moduledir='\${exec_prefix}/lib/kde2'
++    else
++      kde_moduledir='\${exec_prefix}/lib/kde3'
++    fi
++  fi
++  if test -z "$kde_styledir"; then
++    kde_styledir='\${exec_prefix}/lib/kde3/plugins/styles'
++  fi
++  if test -z "$kde_widgetdir"; then
++    kde_widgetdir='\${exec_prefix}/lib/kde3/plugins/designer'
+   fi
+ 
+   KDE_SET_PATHS(defaults)
+@@ -313,7 +469,8 @@
+    test -z "$kde_wallpaperdir" || test -z "$kde_templatesdir" ||
+    test -z "$kde_bindir" || test -z "$kde_servicesdir" ||
+    test -z "$kde_servicetypesdir" || test -z "$kde_moduledir" ||
+-   test "$kde_have_all_paths" != "yes"; then
++   test -z "$kde_styledir" || test -z "kde_widgetdir" 
++   test "x$kde_have_all_paths" != "xyes"; then
+      kde_have_all_paths=no
+   fi
+ ])
+@@ -326,9 +483,9 @@
+ ])
+ 
+ AC_DEFUN(KDE_SUBST_PROGRAMS,
+-[AC_REQUIRE([AC_CREATE_KFSSTND])dnl
++[
+ 
+-        kde_default_bindirs="/usr/bin /usr/local/bin /opt/local/bin /usr/X11R6/bin /opt/kde/bin /opt/kde2/bin /usr/kde/bin /usr/local/kde/bin"
++        kde_default_bindirs="/usr/bin /usr/local/bin /opt/local/bin /usr/X11R6/bin /opt/kde/bin /opt/kde3/bin /usr/kde/bin /usr/local/kde/bin"
+         if test -n "$KDEDIRS"; then
+            kde_save_IFS=$IFS
+            IFS=:
+@@ -341,18 +498,30 @@
+         KDE_FIND_PATH(dcopidl, DCOPIDL, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl)])
+         KDE_FIND_PATH(dcopidl2cpp, DCOPIDL2CPP, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl2cpp)])
+         KDE_FIND_PATH(mcopidl, MCOPIDL, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(mcopidl)])
+-        KDE_FIND_PATH(kdb2html, KDB2HTML, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(kdb2html)])
+         KDE_FIND_PATH(artsc-config, ARTSCCONFIG, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(artsc-config)])
+-        KDE_FIND_PATH(kde-config, KDECONFIG, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(kde-config)])
++        KDE_FIND_PATH(kde-config, KDECONFIG, [$kde_default_bindirs])
++        KDE_FIND_PATH(meinproc, MEINPROC, [$kde_default_bindirs])
++      
++        if test -n "$MEINPROC" && test ! "$MEINPROC" = "compiled"; then  
++ 	    kde_sharedirs="/usr/share/kde /usr/local/share /usr/share /opt/kde3/share /opt/kde/share $prefix/share"
++            test -n "$KDEDIR" && kde_sharedirs="$KDEDIR/share $kde_sharedirs"
++            AC_FIND_FILE(apps/ksgmltools2/customization/kde-chunk.xsl, $kde_sharedirs, KDE_XSL_STYLESHEET)
++	    if test "$KDE_XSL_STYLESHEET" = "NO"; then
++		KDE_XSL_STYLESHEET=""
++	    else
++                KDE_XSL_STYLESHEET="$KDE_XSL_STYLESHEET/apps/ksgmltools2/customization/kde-chunk.xsl"
++	    fi
++        fi
+ 
+         DCOP_DEPENDENCIES='$(DCOPIDL)'
+         AC_SUBST(DCOPIDL)
+         AC_SUBST(DCOPIDL2CPP)
+         AC_SUBST(DCOP_DEPENDENCIES)
+         AC_SUBST(MCOPIDL)
+-        AC_SUBST(KDB2HTML)
+         AC_SUBST(ARTSCCONFIG)
+         AC_SUBST(KDECONFIG)
++	AC_SUBST(MEINPROC)
++ 	AC_SUBST(KDE_XSL_STYLESHEET)
+ 
+         if test -x "$KDECONFIG"; then # it can be "compiled"
+           kde_libs_prefix=`$KDECONFIG --prefix`
+@@ -393,6 +562,8 @@
+   kde_mimedir= kde_toolbardir= kde_wallpaperdir= kde_templatesdir=
+   kde_bindir= kde_servicesdir= kde_servicetypesdir= kde_moduledir=
+   kde_have_all_paths=
++  kde_styledir=
++  kde_widgetdir=
+   KDE_SET_DEFAULT_PATHS($1)
+   eval "$kde_cv_all_paths"
+   KDE_CHECK_PATHS_FOR_COMPLETENESS
+@@ -433,6 +604,8 @@
+ AC_SUBST(kde_servicesdir)
+ AC_SUBST(kde_servicetypesdir)
+ AC_SUBST(kde_moduledir)
++AC_SUBST(kde_styledir)
++AC_SUBST(kde_widgetdir)
+ if test "$kde_qtver" = 1; then
+   kde_minidir="$kde_icondir/mini"
+ else
+@@ -449,7 +622,9 @@
+ [
+    AC_LANG_C
+    dnl Checks for libraries.
+-   AC_CHECK_LIB(compat, main, [LIBCOMPAT="-lcompat"]) dnl for FreeBSD
++   AC_CHECK_LIB(util, main, [LIBUTIL="-lutil"]) dnl for *BSD 
++   AC_SUBST(LIBUTIL)
++   AC_CHECK_LIB(compat, main, [LIBCOMPAT="-lcompat"]) dnl for *BSD
+    AC_SUBST(LIBCOMPAT)
+    kde_have_crypt=
+    AC_CHECK_LIB(crypt, crypt, [LIBCRYPT="-lcrypt"; kde_have_crypt=yes],
+@@ -463,7 +638,7 @@
+    if test $kde_have_crypt = yes; then
+       AC_DEFINE_UNQUOTED(HAVE_CRYPT, 1, [Defines if your system has the crypt function])
+    fi
+-   AC_CHECK_KSIZE_T
++   AC_CHECK_SOCKLEN_T
+    AC_LANG_C
+    AC_CHECK_LIB(dnet, dnet_ntoa, [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"])
+    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
+@@ -489,12 +664,27 @@
+    AC_CHECK_FUNC(shmat, ,
+      AC_CHECK_LIB(ipc, shmat, X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"))
+    
+-   # Solaris 2.6 needs -lresolv for res_init
+-   AC_CHECK_FUNC(res_init, ,
+-     AC_CHECK_LIB(resolv, res_init, X_EXTRA_LIBS="$X_EXTRA_LIBS -lresolv"))
++   # Solaris 2.6 and others need -lresolv for res_init
++   AC_CHECK_FUNCS(res_init, , [
++     kde_libs_safe="$LIBS"
++     LIBS="$LIBS $X_EXTRA_LIBS -lresolv"
++     AC_TRY_LINK(
++[
++#include <resolv.h>
++],
++[ 
++res_init(); 
++],
++        LIBRESOLV="-lresolv"
++        X_EXTRA_LIBS="$X_EXTRA_LIBS $LIBRESOLV"
++        AC_DEFINE(HAVE_RES_INIT, 1, [Define if you have the res_init function])
++     )
++     LIBS=$kde_libs_safe
++   ])
+ 
+    LIBSOCKET="$X_EXTRA_LIBS"
+    AC_SUBST(LIBSOCKET)
++   AC_SUBST(LIBRESOLV)
+    AC_SUBST(X_EXTRA_LIBS)
+    AC_CHECK_LIB(ucb, killpg, [LIBUCB="-lucb"]) dnl for Solaris2.4
+    AC_SUBST(LIBUCB)
+@@ -519,8 +709,24 @@
+ dnl
+ AC_DEFUN(K_PATH_X,
+ [
+-AC_REQUIRE([AC_PROG_CPP])dnl
+ AC_REQUIRE([KDE_MISC_TESTS])dnl
++
++AC_ARG_ENABLE(
++  embedded,
++  [  --enable-embedded       link to Qt-embedded, don't use X],
++  kde_use_qt_emb=$enableval,
++  kde_use_qt_emb=no
++)
++
++AC_ARG_ENABLE(
++  qtopia,
++  [  --enable-qtopia       link to Qt-embedded, link to the Qtopia Environment],
++  kde_use_qt_emb_palm=$enableval,
++  kde_use_qt_emb_palm=no
++)
++
++if test "$kde_use_qt_emb" = "no"; then
++
+ AC_MSG_CHECKING(for X)
+ AC_LANG_SAVE
+ AC_LANG_C
+@@ -541,17 +747,22 @@
+ ac_x_libraries=$kde_x_libraries
+ ac_x_includes=$kde_x_includes
+ 
+-AC_PATH_X_DIRECT
++KDE_PATH_X_DIRECT
+ dnl AC_PATH_X_XMKMF picks /usr/lib as the path for the X libraries.
+ dnl Unfortunately, if compiling with the N32 ABI, this is not the correct
+ dnl location. The correct location is /usr/lib32 or an undefined value
+ dnl (the linker is smart enough to pick the correct default library).
+ dnl Things work just fine if you use just AC_PATH_X_DIRECT.
++dnl Solaris has a similar problem. AC_PATH_X_XMKMF forces x_includes to
++dnl /usr/openwin/include, which doesn't work. /usr/include does work, so
++dnl x_includes should be left alone.
+ case "$host" in
+ mips-sgi-irix6*)
+   ;;
++*-*-solaris*)
++  ;;
+ *)
+-  AC_PATH_X_XMKMF
++  _AC_PATH_X_XMKMF
+   if test -z "$ac_x_includes"; then
+     ac_x_includes="."
+   fi
+@@ -584,6 +795,7 @@
+ kde_cv_have_x="have_x=yes \
+          kde_x_includes=$kde_x_includes kde_x_libraries=$kde_x_libraries"
+ ])dnl
++
+ eval "$kde_cv_have_x"
+ 
+ if test "$have_x" != yes; then
+@@ -646,6 +858,9 @@
+ 
+ AC_TRY_LINK([
+ #include <stdio.h>
++#ifdef STDC_HEADERS
++# include <stdlib.h>
++#endif
+ ],
+ [
+ printf("hello Xext\n");
+@@ -666,9 +881,84 @@
+ them either.])
+ fi
+ 
+-])
++AC_MSG_CHECKING(for Xinerama)
++
++ AC_ARG_WITH(xinerama,
++  [  --with-xinerama         enable support for Xinerama ],
++  [
++    no_xinerama=no
++  ], [
++    no_xinerama=yes
++  ]
++)
++
++kde_save_LDFLAGS="$LDFLAGS"
++kde_save_CFLAGS="$CFLAGS"
++kde_save_LIBS="$LIBS"
++LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS"
++CFLAGS="$CFLAGS -I$x_includes"
++LIBS="-lXinerama -lXext"
++
++if test "x$no_xinerama" = "xno"; then
++
++  AC_CACHE_VAL(ac_cv_have_xinerama,
++  [
++	  AC_TRY_LINK([#include <X11/Xlib.h>
++  			#include <X11/extensions/Xinerama.h>],
++	  	  [XineramaIsActive(NULL);],
++		  [ac_cv_have_xinerama="yes"],
++		  [ac_cv_have_xinerama="no"])
++  ])
++else
++  ac_cv_have_xinerama=no;
++fi
++
++AC_MSG_RESULT($ac_cv_have_xinerama)
++
++LIBXINERAMA=""
++
++if test "$ac_cv_have_xinerama" = "yes"; then
++  AC_DEFINE(HAVE_XINERAMA, 1, [Define if you want Xinerama support])
++  LIBXINERAMA="-lXinerama"
++fi
++
++AC_SUBST(LIBXINERAMA)
++
++LDFLAGS="$kde_save_LDFLAGS"
++CFLAGS="$kde_save_CFLAGS"
++LIBS="$kde_save_LIBS"
++
++LIB_XEXT="-lXext"
++QTE_NORTTI=""
++
++else
++  dnl We're using QT Embedded
++  CXXFLAGS="$CXXFLAGS -fno-rtti -DQWS"
++  CFLAGS="$CFLAGS -DQWS"
++  LDFLAGS="$LDFLAGS -DQWS"
++  QTE_NORTTI="-fno-rtti -DQWS"
++  X_PRE_LIBS=""
++  LIB_X11=""
++  LIB_XEXT=""
++  LIBSM=""
++  X_INCLUDES=""
++  X_LDFLAGS=""
++  x_includes=""
++  x_libraries=""
++  AC_SUBST(X_PRE_LIBS)
++  AC_SUBST(LIB_X11)
++  AC_SUBST(LIBSM)
++  AC_SUBST(X_INCLUDES)
++  AC_SUBST(X_LDFLAGS)
++  AC_SUBST(x_includes)
++  AC_SUBST(x_libraries)
++fi
++AC_SUBST(QTE_NORTTI)
++AC_SUBST(LIB_XEXT)
++
+ 
+ AC_LANG_RESTORE
++
+ ])
+ 
+ AC_DEFUN(KDE_PRINT_QT_PROGRAM,
+@@ -678,8 +968,6 @@
+ #include "confdefs.h"
+ #include <qglobal.h>
+ #include <qapplication.h>
+-#include <qapp.h>
+-#include <qobjcoll.h>
+ EOF
+ if test "$kde_qtver" = "2"; then
+ cat >> conftest.$ac_ext <<EOF
+@@ -693,7 +981,14 @@
+ #include <qiconview.h>
+ EOF
+ fi
++fi
+ 
++if test "$kde_qtver" = "3"; then
++cat >> conftest.$ac_ext <<EOF
++#include <qcursor.h>
++#include <qstylefactory.h>
++#include <private/qucomextra_p.h>
++EOF
+ fi
+ 
+ echo "#if ! ($kde_qt_verstring)" >> conftest.$ac_ext
+@@ -706,6 +1001,7 @@
+ if test "$kde_qtver" = "2"; then
+ cat >> conftest.$ac_ext <<EOF
+     QStringList *t = new QStringList();
++    Q_UNUSED(t);
+ EOF
+ if test $kde_qtsubver -gt 0; then
+ cat >> conftest.$ac_ext <<EOF
+@@ -713,10 +1009,15 @@
+     iv.setWordWrapIconText(false);
+     QString s;
+     s.setLatin1("Elvis is alive", 14);
+-    int magnolia = QEvent::Speech; /* new in 2.2 beta2 */
+ EOF
+ fi
+ fi
++if test "$kde_qtver" = "3"; then
++cat >> conftest.$ac_ext <<EOF
++    (void)QStyleFactory::create(QString::null);
++    QCursor c(Qt::WhatsThisCursor);
++EOF
++fi
+ cat >> conftest.$ac_ext <<EOF
+     return 0;
+ }
+@@ -725,36 +1026,33 @@
+ 
+ AC_DEFUN(KDE_USE_QT,
+ [
+-
+ if test -z "$1"; then
+-  kde_qtver=2
++  kde_qtver=3
+   kde_qtsubver=1
+ else
+-  kde_qtsubver=`echo "$1" | sed -e 's#[0-9]\+\.\([0-9]\+\).*#\1#'`
++  kde_qtsubver=`echo "$1" | sed -e 's#[0-9][0-9]*\.\([0-9][0-9]*\).*#\1#'`
+   # following is the check if subversion isn´t found in passed argument
+   if test "$kde_qtsubver" = "$1"; then
+     kde_qtsubver=1
+   fi
+-  kde_qtver=`echo "$1" | sed -e 's#^\([0-9]\+\)\..*#\1#'`
++  kde_qtver=`echo "$1" | sed -e 's#^\([0-9][0-9]*\)\..*#\1#'`
+   if test "$kde_qtver" = "1"; then
+     kde_qtsubver=42
+-  else
+-   # this is the version number fallback to 2.1, unless major version is 1 or 2
+-   if test "$kde_qtver" != "2"; then
+-    kde_qtver=2
+-    kde_qtsubver=1
+-   fi
+   fi
+ fi
+ 
+ if test -z "$2"; then
+-  if test $kde_qtver = 2; then
++  if test "$kde_qtver" = "2"; then
+     if test $kde_qtsubver -gt 0; then
+       kde_qt_minversion=">= Qt 2.2.2"
+     else
+       kde_qt_minversion=">= Qt 2.0.2"
+     fi
+-  else
++  fi
++  if test "$kde_qtver" = "3"; then
++    kde_qt_minversion=">= Qt 3.0.1"
++  fi
++  if test "$kde_qtver" = "1"; then
+     kde_qt_minversion=">= 1.42 and < 2.0"
+   fi
+ else
+@@ -762,22 +1060,30 @@
+ fi
+ 
+ if test -z "$3"; then
++   if test $kde_qtver = 3; then
++     kde_qt_verstring="QT_VERSION >= 301"
++   fi
+    if test $kde_qtver = 2; then
+-    if test $kde_qtsubver -gt 0; then
+-      kde_qt_verstring="QT_VERSION >= 222"
+-    else
+-      kde_qt_verstring="QT_VERSION >= 200"
+-    fi
+-   else
++     if test $kde_qtsubver -gt 0; then
++       kde_qt_verstring="QT_VERSION >= 222"
++     else
++       kde_qt_verstring="QT_VERSION >= 200"
++     fi
++   fi
++   if test $kde_qtver = 1; then
+     kde_qt_verstring="QT_VERSION >= 142 && QT_VERSION < 200"
+-  fi
++   fi
+ else
+    kde_qt_verstring=$3
+ fi
+ 
++if test $kde_qtver = 3; then
++  kde_qt_dirs="$QTDIR /usr/lib/qt3 /usr/lib/qt"
++fi
+ if test $kde_qtver = 2; then
+    kde_qt_dirs="$QTDIR /usr/lib/qt2 /usr/lib/qt"
+-else
++fi
++if test $kde_qtver = 1; then
+    kde_qt_dirs="$QTDIR /usr/lib/qt"
+ fi
+ ])
+@@ -798,7 +1104,11 @@
+ 
+ CXXFLAGS="$CXXFLAGS -I$qt_includes"
+ LDFLAGS="$LDFLAGS $X_LDFLAGS"
++if test "x$kde_use_qt_emb" != "xyes"; then
+ LIBS="$LIBQT -lXext -lX11 $LIBSOCKET"
++else
++LIBS="$LIBQT $LIBSOCKET"
++fi
+ LD_LIBRARY_PATH=
+ export LD_LIBRARY_PATH
+ LIBRARY_PATH=
+@@ -852,86 +1162,117 @@
+ 
+ AC_ARG_ENABLE(
+   mt,
+-  [  --enable-mt             link to threaded Qt (experimental)],
++  [  --disable-mt            link to non-threaded Qt (deprecated)],
+   kde_use_qt_mt=$enableval,
+-  kde_use_qt_mt=no
++  [
++    if test $kde_qtver = 3; then
++      kde_use_qt_mt=yes
++    else
++      kde_use_qt_mt=no
++    fi
++  ]
+ )
+ 
+ USING_QT_MT=""
+ 
+ dnl ------------------------------------------------------------------------
+-dnl If we got --enable-qt-mt then adjust some vars for the host.
++dnl If we not get --disable-qt-mt then adjust some vars for the host.
+ dnl ------------------------------------------------------------------------
+ 
++KDE_MT_LDFLAGS=
++KDE_MT_LIBS=
+ if test "x$kde_use_qt_mt" = "xyes"; then
+-
+-  case $host in
+-  *-*-linux-*)
+-    if test "x$GCC" = "xyes"; then
+-      CPPFLAGS="$CPPFLAGS -DQT_THREAD_SUPPORT -pthread"
+-      X_EXTRA_LIBS="$X_EXTRA_LIBS -pthread"
+-    else
+-      AC_MSG_WARN([Compiler is not gcc. MT support disabled.])
+-    fi
+-    ;;
+-  *)
+-    AC_MSG_WARN([MT not yet supported on $host - disabled.])
+-    ;;
+-  esac
+-
++  KDE_CHECK_THREADING
++  if test "x$kde_use_threading" = "xyes"; then
++    CPPFLAGS="$USE_THREADS -DQT_THREAD_SUPPORT $CPPFLAGS"
++    KDE_MT_LDFLAGS="$USE_THREADS"
++    KDE_MT_LIBS="$LIBPTHREAD"
++  else
++    kde_use_qt_mt=no
++  fi
+ fi
++AC_SUBST(KDE_MT_LDFLAGS)
++AC_SUBST(KDE_MT_LIBS)
+ 
+ kde_qt_was_given=yes
+ 
+ dnl ------------------------------------------------------------------------
+ dnl If we haven't been told how to link to Qt, we work it out for ourselves.
+ dnl ------------------------------------------------------------------------
+-
+ if test -z "$LIBQT_GLOB"; then
+-
+-  LIBQT_GLOB="libqt.*"
+-
++  if test "x$kde_use_qt_emb" = "xyes"; then
++    LIBQT_GLOB="libqte.*"
++  else
++    LIBQT_GLOB="libqt.*"
++  fi
+ fi
+ 
+ if test -z "$LIBQT"; then
++dnl ------------------------------------------------------------
++dnl If we got --enable-embedded then adjust the Qt library name.
++dnl ------------------------------------------------------------
++  if test "x$kde_use_qt_emb" = "xyes"; then
++    qtlib="qte"
++  else
++    qtlib="qt"
++  fi
++
++  kde_int_qt="-l$qtlib"
++else
++  kde_int_qt="$LIBQT"
++  kde_lib_qt_set=yes
++fi
+ 
+-  LIBQT="-lqt"
+-  kde_int_qt="-lqt"
++if test -z "$LIBQPE"; then
++dnl ------------------------------------------------------------
++dnl If we got --enable-palmtop then add -lqpe to the link line
++dnl ------------------------------------------------------------
++  if test "x$kde_use_qt_emb" = "xyes"; then
++    if test "x$kde_use_qt_emb_palm" = "xyes"; then
++      LIB_QPE="-lqpe"
++    else
++      LIB_QPE=""
++    fi
++  else
++    LIB_QPE=""
++  fi
++fi
+ 
+ dnl ------------------------------------------------------------------------
+ dnl If we got --enable-qt-mt then adjust the Qt library name for the host.
+ dnl ------------------------------------------------------------------------
+ 
+-  if test "x$kde_use_qt_mt" = "xyes"; then
+-
+-      case $host in
+-      *-*-linux-*)
+-        if test "x$GCC" = "xyes"; then
+-          LIBQT="-lqt-mt"
+-          kde_int_qt="-lqt-mt"
+-          LIBQT_GLOB="libqt-mt.*"
+-          USING_QT_MT="using -mt"
+-        fi
+-      ;;
+-      esac
++if test "x$kde_use_qt_mt" = "xyes"; then
++  if test -z "$LIBQT"; then
++    LIBQT="-l$qtlib-mt"
++    kde_int_qt="-l$qtlib-mt"
++  else
++    LIBQT="$qtlib-mt"
++    kde_int_qt="$qtlib-mt"
+   fi
+-
+-  kde_qt_was_given=no
+-
++  LIBQT_GLOB="lib$qtlib-mt.*"
++  USING_QT_MT="using -mt"
+ else
+-  kde_int_qt="$LIBQT"
++  LIBQT="-l$qtlib"
+ fi
+ 
+-if test $kde_qtver = 2; then
++if test $kde_qtver != 1; then
+ 
+   AC_REQUIRE([AC_FIND_PNG])
+   AC_REQUIRE([AC_FIND_JPEG])
+   LIBQT="$LIBQT $LIBPNG $LIBJPEG"
+ fi
+ 
++if test $kde_qtver = 3; then
++  AC_REQUIRE([KDE_CHECK_LIBDL])
++  LIBQT="$LIBQT $LIBDL"
++fi
++
+ AC_MSG_CHECKING([for Qt])
+ 
++if test "x$kde_use_qt_emb" != "xyes"; then
+ LIBQT="$LIBQT $X_PRE_LIBS -lXext -lX11 $LIBSM $LIBSOCKET"
++fi
+ ac_qt_includes=NO ac_qt_libraries=NO ac_qt_bindir=NO
+ qt_libraries=""
+ qt_includes=""
+@@ -963,12 +1304,12 @@
+ for dir in $kde_qt_dirs; do
+    qt_incdirs="$qt_incdirs $dir/include $dir"
+ done
+-qt_incdirs="$QTINC $qt_incdirs /usr/local/qt/include /usr/include/qt /usr/include /usr/X11R6/include/X11/qt /usr/X11R6/include/qt $x_includes"
++qt_incdirs="$QTINC $qt_incdirs /usr/local/qt/include /usr/include/qt /usr/include /usr/X11R6/include/X11/qt /usr/X11R6/include/qt /usr/X11R6/include/qt2 $x_includes"
+ if test ! "$ac_qt_includes" = "NO"; then
+    qt_incdirs="$ac_qt_includes $qt_incdirs"
+ fi
+ 
+-if test "$kde_qtver" = "2"; then
++if test "$kde_qtver" != "1"; then
+   kde_qt_header=qstyle.h
+ else
+   kde_qt_header=qglobal.h
+@@ -1004,8 +1345,8 @@
+ ac_libs_safe="$LIBS"
+ 
+ CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
+-LDFLAGS="$LDFLAGS -L$qt_libdir $all_libraries $USER_LDFLAGS"
+-LIBS="$LIBS $LIBQT"
++LDFLAGS="$LDFLAGS -L$qt_libdir $all_libraries $USER_LDFLAGS $KDE_MT_LDFLAGS"
++LIBS="$LIBS $LIBQT $KDE_MT_LIBS"
+ 
+ KDE_PRINT_QT_PROGRAM
+ 
+@@ -1025,6 +1366,7 @@
+ if test "$ac_qt_includes" = NO || test "$ac_qt_libraries" = NO; then
+   ac_cv_have_qt="have_qt=no"
+   ac_qt_notfound=""
++  missing_qt_mt=""
+   if test "$ac_qt_includes" = NO; then
+     if test "$ac_qt_libraries" = NO; then
+       ac_qt_notfound="(headers and libraries)";
+@@ -1032,11 +1374,17 @@
+       ac_qt_notfound="(headers)";
+     fi
+   else
+-    ac_qt_notfound="(libraries)";
++    if test "x$kde_use_qt_mt" = "xyes"; then
++       missing_qt_mt="
++Make sure that you have compiled Qt with thread support!"
++       ac_qt_notfound="(library $qtlib-mt)";
++    else
++       ac_qt_notfound="(library $qtlib)";
++    fi
+   fi
+ 
+   AC_MSG_ERROR([Qt ($kde_qt_minversion) $ac_qt_notfound not found. Please check your installation!
+-For more details about this problem, look at the end of config.log.])
++For more details about this problem, look at the end of config.log.$missing_qt_mt])
+ else
+   have_qt="yes"
+ fi
+@@ -1063,7 +1411,7 @@
+ AC_SUBST(qt_includes)
+ 
+ if test "$qt_includes" = "$x_includes" || test -z "$qt_includes"; then
+- QT_INCLUDES="";
++ QT_INCLUDES=""
+ else
+  QT_INCLUDES="-I$qt_includes"
+  all_includes="$QT_INCLUDES $all_includes"
+@@ -1075,14 +1423,23 @@
+  QT_LDFLAGS="-L$qt_libraries"
+  all_libraries="$all_libraries $QT_LDFLAGS"
+ fi
++test -z "$KDE_MT_LDFLAGS" || all_libraries="$all_libraries $KDE_MT_LDFLAGS"
+ 
+ AC_SUBST(QT_INCLUDES)
+ AC_SUBST(QT_LDFLAGS)
+ AC_PATH_QT_MOC_UIC
+ 
++if test "x$kde_use_qt_emb" != "xyes"; then
+ LIB_QT="$kde_int_qt "'$(LIBPNG) $(LIBJPEG) -lXext $(LIB_X11) $(LIBSM)'
++else
++LIB_QT="$kde_int_qt "'$(LIBPNG) $(LIBJPEG)'
++fi
++test -z "$KDE_MT_LIBS" || LIB_QT="$LIB_QT $KDE_MT_LIBS"
++
+ AC_SUBST(LIB_QT)
++AC_SUBST(LIB_QPE)
+ 
++AC_SUBST(kde_qtver)
+ ])
+ 
+ AC_DEFUN(AC_PATH_QT,
+@@ -1165,7 +1522,7 @@
+ 
+ if test -z "$1"; then
+ 
+-kde_incdirs="/usr/lib/kde/include /usr/local/kde/include /usr/kde/include /usr/include/kde /usr/include /opt/kde2/include /opt/kde/include $x_includes $qt_includes"
++kde_incdirs="/usr/lib/kde/include /usr/local/kde/include /usr/local/include /usr/kde/include /usr/include/kde /usr/include /opt/kde3/include /opt/kde/include $x_includes $qt_includes"
+ test -n "$KDEDIR" && kde_incdirs="$KDEDIR/include $KDEDIR/include/kde $KDEDIR $kde_incdirs"
+ kde_incdirs="$ac_kde_includes $kde_incdirs"
+ AC_FIND_FILE($kde_check_header, $kde_incdirs, kde_incdir)
+@@ -1177,7 +1534,7 @@
+ So, check this please and use another prefix!])
+ fi
+ 
+-kde_libdirs="/usr/lib/kde/lib /usr/local/kde/lib /usr/kde/lib /usr/lib/kde /usr/lib /usr/X11R6/lib /opt/kde2/lib /opt/kde/lib /usr/X11R6/kde/lib"
++kde_libdirs="/usr/lib/kde/lib /usr/local/kde/lib /usr/kde/lib /usr/lib/kde /usr/lib/kde3 /usr/lib /usr/X11R6/lib /usr/local/lib /opt/kde3/lib /opt/kde/lib /usr/X11R6/kde/lib"
+ test -n "$KDEDIR" && kde_libdirs="$KDEDIR/lib $KDEDIR $kde_libdirs"
+ kde_libdirs="$ac_kde_libraries $kde_libdirs"
+ AC_FIND_FILE($kde_check_lib, $kde_libdirs, kde_libdir)
+@@ -1234,7 +1591,7 @@
+ AC_SUBST(kde_libraries)
+ AC_SUBST(kde_includes)
+ 
+-if test "$kde_includes" = "$x_includes" || test "$kde_includes" = "$qt_includes" ; then
++if test "$kde_includes" = "$x_includes" || test "$kde_includes" = "$qt_includes"  || test "$kde_includes" = "/usr/include"; then
+  KDE_INCLUDES=""
+ else
+  KDE_INCLUDES="-I$kde_includes"
+@@ -1320,6 +1677,9 @@
+     AC_LANG_SAVE
+     AC_LANG_CPLUSPLUS
+ cat > conftest.$ac_ext <<EOF
++#ifdef STDC_HEADERS
++# include <stdlib.h>
++#endif
+ #include <stdio.h>
+ #include "confdefs.h"
+ #include <kapp.h>
+@@ -1342,6 +1702,8 @@
+     printf("kde_servicesdir=\\"/tmp/dummy\\"\n");
+     printf("kde_servicetypesdir=\\"/tmp/dummy\\"\n");
+     printf("kde_moduledir=\\"/tmp/dummy\\"\n");
++    printf("kde_styledir=\\"/tmp/dummy\\"\n");
++    printf("kde_widgetdir=\\"/tmp/dummy\\"\n");
+     return 0;
+     }
+ EOF
+@@ -1410,10 +1772,10 @@
+      LIBS="$LIBS $all_libraries $LIBJPEG $LIBTIFF $LIBPNG $LIBQT -lm"
+      AC_CHECK_LIB(kimgio, kimgioRegister, [
+       LIBKIMGIO_EXISTS=yes],LIBKIMGIO_EXISTS=no)
+-      LIBS="$kde_save_LIBS"
+-      AC_LANG_RESTORE
++     LIBS="$kde_save_LIBS"
++     AC_LANG_RESTORE
+    else
+-      LIBKIMGIO_EXISTS=yes
++     LIBKIMGIO_EXISTS=yes
+    fi
+ 
+    if test "$LIBKIMGIO_EXISTS" = "yes"; then
+@@ -1430,13 +1792,35 @@
+    AC_REQUIRE([KDE_CHECK_LIBDL])
+    AC_REQUIRE([K_PATH_X])
+ 
+-if test $kde_qtver = 2; then
++if test $kde_qtver = 3; then
++   LIB_KDECORE='-lkdecore'
++   AC_SUBST(LIB_KDECORE)
++   LIB_KDEUI='-lkdeui'
++   AC_SUBST(LIB_KDEUI)
++   LIB_KIO='-lkio'
++   AC_SUBST(LIB_KIO)
++   LIB_SMB='-lsmb'
++   AC_SUBST(LIB_SMB)
++   LIB_KAB='-lkab'
++   AC_SUBST(LIB_KAB)
++   LIB_KHTML='-lkhtml'
++   AC_SUBST(LIB_KHTML)
++   LIB_KSPELL='-lkspell'
++   AC_SUBST(LIB_KSPELL)
++   LIB_KPARTS='-lkparts'
++   AC_SUBST(LIB_KPARTS)
++   LIB_KDEPRINT='-lkdeprint'
++   AC_SUBST(LIB_KDEPRINT)
++# these are for backward compatibility
++   LIB_KSYCOCA='-lkio'
++   AC_SUBST(LIB_KSYCOCA)
++   LIB_KFILE='-lkio'
++   AC_SUBST(LIB_KFILE)
++elif test $kde_qtver = 2; then
+    LIB_KDECORE='-lkdecore'
+    AC_SUBST(LIB_KDECORE)
+    LIB_KDEUI='-lkdeui'
+    AC_SUBST(LIB_KDEUI)
+-   LIB_KFORMULA='-lkformula'
+-   AC_SUBST(LIB_KFORMULA)
+    LIB_KIO='-lkio'
+    AC_SUBST(LIB_KIO)
+    LIB_KSYCOCA='-lksycoca'
+@@ -1453,8 +1837,8 @@
+    AC_SUBST(LIB_KSPELL)
+    LIB_KPARTS='-lkparts'
+    AC_SUBST(LIB_KPARTS)
+-   LIB_KWRITE='-lkwrite'
+-   AC_SUBST(LIB_KWRITE)
++   LIB_KDEPRINT='-lkdeprint'
++   AC_SUBST(LIB_KDEPRINT)
+ else
+    LIB_KDECORE='-lkdecore -lXext $(LIB_QT)'
+    AC_SUBST(LIB_KDECORE)
+@@ -1628,7 +2012,7 @@
+   [Define if you have gethostname prototype])
+ fi
+ if eval "test \"`echo $ac_cv_func_gethostname`\" = yes"; then
+-  AC_DEFINE(HAVE_GETHOSTNAME, 1, [Define if you have getdomainname])
++  AC_DEFINE(HAVE_GETHOSTNAME, 1, [Define if you have gethostname])
+ fi
+ ])
+ 
+@@ -1689,7 +2073,11 @@
+    [AC_MSG_CHECKING([for giflib])
+ AC_CACHE_VAL(ac_cv_lib_gif,
+ [ac_save_LIBS="$LIBS"
++if test "x$kde_use_qt_emb" != "xyes"; then
+ LIBS="$all_libraries -lgif -lX11 $LIBSOCKET"
++else
++LIBS="$all_libraries -lgif"
++fi
+ AC_TRY_LINK(dnl
+ [
+ #ifdef __cplusplus
+@@ -1764,24 +2152,10 @@
+ KDE_FIND_JPEG_HELPER(6b, 6b,
+    KDE_FIND_JPEG_HELPER(normal, [],
+     [
+-dnl what to do, if the normal way fails:
+-	if test -f "$kde_libraries/libjpeg.so"; then
+-	   test -f ./libjpegkde.so || $LN_S $kde_libraries/libjpeg.so ./libjpegkde.so
+-	   ac_cv_lib_jpeg="-L\${topdir} -ljpegkde"
+-	else if test -f "$kde_libraries/libjpeg.sl"; then
+-	   test -f ./libjpegkde.sl ||$LN_S $kde_libraries/libjpeg.sl ./libjpegkde.sl
+-	   ac_cv_lib_jpeg="-L\${topdir} -ljpegkde"	
+-	else if test -f "$kde_libraries/libjpeg.a"; then
+-	   test -f ./libjpegkde.a || $LN_S $kde_libraries/libjpeg.a ./libjpegkde.a
+-	   ac_cv_lib_jpeg="-L\${topdir} -ljpegkde"
+-        else
+-	  ac_cv_lib_jpeg=
+-	fi
+-      fi
+-   fi
+-
+-   LIBJPEG=$ac_cv_lib_jpeg
+-]))
++       LIBJPEG=
++    ]
++   )
++)
+ 
+ dnl then search the headers (can't use simply AC_TRY_xxx, as jpeglib.h
+ dnl requires system dependent includes loaded before it)
+@@ -1856,7 +2230,11 @@
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ kde_save_LIBS="$LIBS"
++if test "x$kde_use_qt_emb" != "xyes"; then
+ LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lX11 $LIBSOCKET -lm"
++else
++LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lm"
++fi
+ kde_save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
+ 
+@@ -1911,7 +2289,11 @@
+ AC_CACHE_VAL(ac_cv_lib_png,
+ [
+ kde_save_LIBS="$LIBS"
++if test "x$kde_use_qt_emb" != "xyes"; then
+ LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm -lX11 $LIBSOCKET"
++else
++LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm"
++fi
+ kde_save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
+ AC_LANG_C
+@@ -1977,19 +2359,17 @@
+ 
+ AC_DEFUN(KDE_CHECK_COMPILER_FLAG,
+ [
+-AC_REQUIRE([AC_CHECK_COMPILERS])
+ AC_MSG_CHECKING(whether $CXX supports -$1)
+-kde_cache=`echo $1 | sed 'y%.=/+-%___p_%'`
++kde_cache=`echo $1 | sed 'y% .=/+-%____p_%'`
+ AC_CACHE_VAL(kde_cv_prog_cxx_$kde_cache,
+ [
+-echo 'int main() { return 0; }' >conftest.cc
+-eval "kde_cv_prog_cxx_$kde_cache=no"
+-if test -z "`$CXX -$1 -c conftest.cc 2>&1`"; then
+-  if test -z "`$CXX -$1 -o conftest conftest.o 2>&1`"; then
+-    eval "kde_cv_prog_cxx_$kde_cache=yes"
+-  fi
+-fi
+-rm -f conftest*
++  AC_LANG_SAVE
++  AC_LANG_CPLUSPLUS
++  save_CXXFLAGS="$CXXFLAGS"
++  CXXFLAGS="$CXXFLAGS -$1"
++  AC_TRY_LINK([],[ return 0; ], [eval "kde_cv_prog_cxx_$kde_cache=yes"], [])
++  CXXFLAGS="$save_CXXFLAGS"
++  AC_LANG_RESTORE
+ ])
+ if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
+  AC_MSG_RESULT(yes)
+@@ -2002,28 +2382,6 @@
+ fi
+ ])
+ 
+-AC_DEFUN(KDE_PROG_CC_PG,
+-[ AC_CACHE_CHECK(whether ${CC-cc} accepts -pg, kde_cv_prog_cc_pg,
+-  [echo 'void f(){}' > conftest.c
+-   if test -z "`${CC-cc} -pg -c conftest.c 2>&1`"; then
+-     kde_cv_prog_cc_pg=yes
+-   else
+-     kde_cv_prog_cc_pg=no
+-   fi
+-   rm -f conftest*
+-])])
+-
+-AC_DEFUN(KDE_PROG_CXX_PG,
+-[ AC_CACHE_CHECK(whether ${CXX-g++} accepts -pg, kde_cv_prog_cxx_pg,
+-  [echo 'void f(){}' > conftest.cc
+-   if test -z "`${CXX-g++} -pg -c conftest.cc 2>&1`"; then
+-     kde_cv_prog_cxx_pg=yes
+-   else
+-     kde_cv_prog_cxx_pg=no
+-   fi
+-  rm -f conftest*
+-])])
+-
+ dnl AC_REMOVE_FORBIDDEN removes forbidden arguments from variables
+ dnl use: AC_REMOVE_FORBIDDEN(CC, [-forbid -bad-option whatever])
+ dnl it's all white-space separated
+@@ -2050,31 +2408,38 @@
+ dnl AC_VALIDIFY_CXXFLAGS checks for forbidden flags the user may have given
+ AC_DEFUN(AC_VALIDIFY_CXXFLAGS,
+ [dnl
++if test "x$kde_use_qt_emb" != "xyes"; then
+  AC_REMOVE_FORBIDDEN(CXX, [-fno-rtti -rpath])
+  AC_REMOVE_FORBIDDEN(CXXFLAGS, [-fno-rtti -rpath])
++else
++ AC_REMOVE_FORBIDDEN(CXX, [-rpath])
++ AC_REMOVE_FORBIDDEN(CXXFLAGS, [-rpath])
++fi
+ ])
+ 
+ AC_DEFUN(AC_CHECK_COMPILERS,
+ [
+-  dnl this is somehow a fat lie, but prevents other macros from double checking
+-  AC_PROVIDE([AC_PROG_CC])
+-  AC_PROVIDE([AC_PROG_CPP])
+-  AC_PROVIDE([AC_PROG_CXX])
+-  AC_PROVIDE([AC_PROG_CXXCPP])
+-
+-  AC_ARG_ENABLE(debug,[  --enable-debug          enables debug symbols [default=no]],
++  AC_ARG_ENABLE(debug,[  --enable-debug[=ARG]    enables debug symbols (yes|no|full) [default=no]],
+   [
+-   if test $enableval = "no"; dnl
+-     then
+-       kde_use_debug_code="no"
+-       kde_use_debug_define=yes
+-     else
+-       kde_use_debug_code="yes"
+-       kde_use_debug_define=no
+-   fi
+-  ], [kde_use_debug_code="no"
++    case $enableval in
++      yes)
++        kde_use_debug_code="yes"
++        kde_use_debug_define=no
++        ;;
++      full)
++        kde_use_debug_code="full"
++        kde_use_debug_define=no
++        ;;
++      *)
++        kde_use_debug_code="no"
++        kde_use_debug_define=yes
++        ;;
++    esac
++  ], 
++    [kde_use_debug_code="no"
+       kde_use_debug_define=no
+-    ])
++  ])
++
+   dnl Just for configure --help
+   AC_ARG_ENABLE(dummyoption,[  --disable-debug         disables debug output and debug symbols [default=no]],[],[])
+ 
+@@ -2087,271 +2452,187 @@
+     fi
+    ], [kde_use_strict_options="no"])
+ 
++  AC_ARG_ENABLE(warnings,[  --enable-warnings         compiles with -Wall and similiar],
++   [
++    if test $enableval = "no"; then
++         kde_use_warnings="no"
++       else
++         kde_use_warnings="yes"
++    fi
++   ], [kde_use_warnings="no"])
++
++  dnl enable warnings for debug build
++  if test "$kde_use_debug_code" != "no"; then
++    kde_use_warnings=yes
++  fi
++
+   AC_ARG_ENABLE(profile,[  --enable-profile        creates profiling infos [default=no]],
+-     [kde_use_profiling=$enableval],
+-     [kde_use_profiling="no"]
++    [kde_use_profiling=$enableval],
++    [kde_use_profiling="no"]
+   )
+ 
+-dnl this was AC_PROG_CC. I had to include it manualy, since I had to patch it
+-  AC_MSG_CHECKING(for a C-Compiler)
+-  dnl if there is one, print out. if not, don't matter
+-  AC_MSG_RESULT($CC)
+-
+-  if test -z "$CC"; then AC_CHECK_PROG(CC, gcc, gcc) fi
+-  if test -z "$CC"; then AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc) fi
+-  if test -z "$CC"; then AC_CHECK_PROG(CC, xlc, xlc) fi
+-  test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
+-
+-  AC_PROG_CC_WORKS
+-  AC_PROG_CC_GNU
++  dnl this prevents stupid AC_PROG_CC to add "-g" to the default CFLAGS
++  CFLAGS=" $CFLAGS"
+ 
+-  if test $ac_cv_prog_gcc = yes; then
+-    GCC=yes
+-  else
+-    GCC=
+-  fi
++  AC_PROG_CC 
+ 
+-  USER_CFLAGS=$CFLAGS
+-  CFLAGS=
++  AC_PROG_CPP
+ 
+-  if test -z "$CFLAGS"; then
+-    if test "$kde_use_debug_code" = "yes"; then
+-      AC_PROG_CC_G
+-      if test $ac_cv_prog_cc_g = yes; then
+-	CFLAGS="-g"
+-	case $host in
+-   	*-*-linux-gnu)	
+-           CFLAGS="$CFLAGS -ansi -W -Wall -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE -D_BSD_SOURCE"
+-         ;;
+-        esac
+-      fi
+-    else
+-      if test "$GCC" = "yes"; then
+-        CFLAGS="-O2"
++  if test "$GCC" = "yes"; then
++    if test "$kde_use_debug_code" != "no"; then
++      if test $kde_use_debug_code = "full"; then
++        CFLAGS="-g3 $CFLAGS"
+       else
+-        CFLAGS=""
+-      fi
+-      if test "$kde_use_debug_define" = "yes"; then
+-        CFLAGS="$CFLAGS -DNDEBUG"
+-	dnl damn buggy compilers :-(
+-	dnl if test "$GCC" = "yes"; then
+-    	dnl  CFLAGS="$CFLAGS -fomit-frame-pointer"
+-	dnl   CXXFLAGS="$CXXFLAGS -fomit-frame-pointer"
+-	dnl fi
+-      fi
+-    fi
+-
+-    if test "$kde_use_profiling" = yes; then
+-      KDE_PROG_CC_PG
+-      if test "$kde_cv_prog_cc_pg" = yes; then
+-        CFLAGS="$CFLAGS -pg"
++        CFLAGS="-g -O2 $CFLAGS"
+       fi
++    else
++      CFLAGS="-O2 $CFLAGS"
+     fi
++  fi
+ 
+-    if test "$GCC" = "yes"; then
+-     CFLAGS="$CFLAGS"
+-
+-     if test "$kde_use_strict_options" = "yes"; then
+-	CFLAGS="$CFLAGS -W -Wall -ansi -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings"
+-     fi
+-    fi
+-
++  if test "$kde_use_debug_define" = "yes"; then
++    CFLAGS="-DNDEBUG $CFLAGS"
+   fi
+ 
++
+   case "$host" in
+-  *-*-sysv4.2uw*) CFLAGS="$CFLAGS -D_UNIXWARE";;
+-  *-*-sysv5uw7*) CFLAGS="$CFLAGS -D_UNIXWARE7";;
++  *-*-sysv4.2uw*) CFLAGS="-D_UNIXWARE $CFLAGS";;
++  *-*-sysv5uw7*) CFLAGS="-D_UNIXWARE7 $CFLAGS";;
+   esac
+ 
+-  if test -n "$USER_CFLAGS"; then
+-    CFLAGS="$CFLAGS $USER_CFLAGS"
+-  fi
+-
+   if test -z "$LDFLAGS" && test "$kde_use_debug_code" = "no" && test "$GCC" = "yes"; then
+      LDFLAGS=""
+   fi
+ 
++  CXXFLAGS=" $CXXFLAGS"
+ 
+-dnl this is AC_PROG_CPP. I had to include it here, since autoconf checks
+-dnl dependecies between AC_PROG_CPP and AC_PROG_CC (or is it automake?)
++  AC_PROG_CXX
+ 
+-  AC_MSG_CHECKING(how to run the C preprocessor)
+-  # On Suns, sometimes $CPP names a directory.
+-  if test -n "$CPP" && test -d "$CPP"; then
+-    CPP=
+-  fi
+-  if test -z "$CPP"; then
+-  AC_CACHE_VAL(ac_cv_prog_CPP,
+-  [  # This must be in double quotes, not single quotes, because CPP may get
+-    # substituted into the Makefile and "${CC-cc}" will confuse make.
+-    CPP="${CC-cc} -E"
+-    # On the NeXT, cc -E runs the code through the compiler's parser,
+-    # not just through cpp.
+-    dnl Use a header file that comes with gcc, so configuring glibc
+-    dnl with a fresh cross-compiler works.
+-    AC_TRY_CPP([#include <assert.h>
+-    Syntax Error], ,
+-    CPP="${CC-cc} -E -traditional-cpp"
+-    AC_TRY_CPP([#include <assert.h>
+-    Syntax Error], , CPP=/lib/cpp))
+-    ac_cv_prog_CPP="$CPP"])dnl
+-    CPP="$ac_cv_prog_CPP"
+-  else
+-    ac_cv_prog_CPP="$CPP"
+-  fi
+-  AC_MSG_RESULT($CPP)
+-  AC_SUBST(CPP)dnl
+-
+-
+-  AC_MSG_CHECKING(for a C++-Compiler)
+-  dnl if there is one, print out. if not, don't matter
+-  AC_MSG_RESULT($CXX)
+-
+-  if test -z "$CXX"; then AC_CHECK_PROG(CXX, g++, g++) fi
+-  if test -z "$CXX"; then AC_CHECK_PROG(CXX, CC, CC) fi
+-  if test -z "$CXX"; then AC_CHECK_PROG(CXX, xlC, xlC) fi
+-  if test -z "$CXX"; then AC_CHECK_PROG(CXX, DCC, DCC) fi
+-  test -z "$CXX" && AC_MSG_ERROR([no acceptable C++-compiler found in \$PATH])
+-
+-  AC_PROG_CXX_WORKS
+-  AC_PROG_CXX_GNU
+-
+-  if test $ac_cv_prog_gxx = yes; then
+-    GXX=yes
+-  fi
+-
+-  USER_CXXFLAGS=$CXXFLAGS
+-  CXXFLAGS=""
+-
+-  if test -z "$CXXFLAGS"; then
+-    if test "$kde_use_debug_code" = "yes"; then
+-      AC_PROG_CXX_G
+-      if test $ac_cv_prog_cxx_g = yes; then
+-        CXXFLAGS="-g"
+-	case $host in  dnl
+-   	*-*-linux-gnu)
+-           CXXFLAGS="$CXXFLAGS -ansi -D_XOPEN_SOURCE -D_BSD_SOURCE -Wbad-function-cast -Wcast-align -Wundef -Wconversion"
+-         ;;
+-        esac
++  if test "$GXX" = "yes" || test "$CXX" = "KCC"; then
++    if test "$kde_use_debug_code" != "no"; then
++      if test "$CXX" = "KCC"; then
++        CXXFLAGS="+K0 -Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings $CXXFLAGS"
++      else
++        if test "$kde_use_debug_code" = "full"; then
++          CXXFLAGS="-g3 $CXXFLAGS"
++        else
++          CXXFLAGS="-g -O2 $CXXFLAGS"
++        fi
+       fi
++      KDE_CHECK_COMPILER_FLAG(fno-builtin,[CXXFLAGS="-fno-builtin $CXXFLAGS"])
++
++      dnl convenience compiler flags
++      KDE_CHECK_COMPILER_FLAG(Woverloaded-virtual, [WOVERLOADED_VIRTUAL="-Woverloaded-virtual"], [WOVERLOADED_VRITUAL=""])
++      AC_SUBST(WOVERLOADED_VIRTUAL)
+     else
+-      if test "$GXX" = "yes"; then
+-         CXXFLAGS="-O2"
+-      fi
+-      if test "$kde_use_debug_define" = "yes"; then
+-         CXXFLAGS="$CXXFLAGS -DNDEBUG"
+-      fi
++      if test "$CXX" = "KCC"; then
++        CXXFLAGS="+K3 $CXXFLAGS"
++      else
++        CXXFLAGS="-O2 $CXXFLAGS"
++      fi  
+     fi
++  fi
+ 
+-    if test "$kde_use_profiling" = yes; then
+-      KDE_PROG_CXX_PG
+-      if test "$kde_cv_prog_cxx_pg" = yes; then
+-        CXXFLAGS="$CXXFLAGS -pg"
+-      fi
+-    fi
+-    
+-    KDE_CHECK_COMPILER_FLAG(fno-exceptions,
++  if test "$kde_use_debug_define" = "yes"; then
++    CXXFLAGS="-DNDEBUG -DNO_DEBUG $CXXFLAGS"
++  fi  
++
++  if test "$kde_use_profiling" = "yes"; then
++    KDE_CHECK_COMPILER_FLAG(pg,
+     [
+-      CXXFLAGS="$CXXFLAGS -fno-exceptions"
++      CFLAGS="-pg $CFLAGS"
++      CXXFLAGS="-pg $CXXFLAGS"
+     ])
+-      
+-dnl WABA: Nothing wrong with RTTI, keep it on.
+-dnl    KDE_CHECK_COMPILER_FLAG(fno-rtti,
+-dnl	[
+-dnl	  CXXFLAGS="$CXXFLAGS -fno-rtti"
+-dnl	])
+-
+-    KDE_CHECK_COMPILER_FLAG(fno-check-new,
+-	[
+-	  CXXFLAGS="$CXXFLAGS -fno-check-new"
+-	])
+-
+-    if test "$GXX" = "yes"; then
+-       CXXFLAGS="$CXXFLAGS"
+-
+-       if test true || test "$kde_use_debug_code" = "yes"; then
+-	 CXXFLAGS="$CXXFLAGS -Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings"
++  fi
+ 
+-         KDE_CHECK_COMPILER_FLAG(Wno-long-long,
+-	 [
+-	   CXXFLAGS="$CXXFLAGS -Wno-long-long"
+-	 ])
+-         KDE_CHECK_COMPILER_FLAG(Wnon-virtual-dtor,
+-         [
+-           CXXFLAGS="$CXXFLAGS -Wnon-virtual-dtor"
+-         ])
+-         KDE_CHECK_COMPILER_FLAG(fno-builtin,
+-         [
+-           CXXFLAGS="$CXXFLAGS -fno-builtin"
+-         ])
+-	
+-       fi
++  if test "$kde_use_warnings" = "yes"; then
++      if test "$GCC" = "yes"; then
++        case $host in
++          *-*-linux-gnu)	
++            CFLAGS="-ansi -W -Wall -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE $CFLAGS"
++            CXXFLAGS="-ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion $CXXFLAGS"
++          ;;
++        esac
++        CXXFLAGS="-Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings $CXXFLAGS"
++        KDE_CHECK_COMPILER_FLAG(Wundef,[CXXFLAGS="-Wundef $CXXFLAGS"])
++        KDE_CHECK_COMPILER_FLAG(Wbad-function-cast,[CXXFLAGS="-Wbad-function-cast $CXXFLAGS"])
++        KDE_CHECK_COMPILER_FLAG(Wno-long-long,[CXXFLAGS="-Wno-long-long $CXXFLAGS"])
++        KDE_CHECK_COMPILER_FLAG(Wnon-virtual-dtor,[CXXFLAGS="-Wnon-virtual-dtor $CXXFLAGS"])
++     fi
++  fi
+ 
+-       if test "$kde_use_strict_options" = "yes"; then
+-	CXXFLAGS="$CXXFLAGS -Wcast-qual -Wbad-function-cast -Wshadow -Wcast-align"
+-       fi
++  if test "$GCC" = "yes" && test "$kde_use_strict_options" = "yes"; then
++    CXXFLAGS="-Wcast-qual -Wshadow -Wcast-align $CXXFLAGS"
++  fi
++    
++  if test "$GXX" = "yes"; then
++    KDE_CHECK_COMPILER_FLAG(fno-exceptions,[CXXFLAGS="$CXXFLAGS -fno-exceptions"])
++    KDE_CHECK_COMPILER_FLAG(fno-check-new, [CXXFLAGS="$CXXFLAGS -fno-check-new"])
++    KDE_CHECK_COMPILER_FLAG(fexceptions, [USE_EXCEPTIONS="-fexceptions"], USE_EXCEPTIONS=	)
++  fi
++  if test "$CXX" = "KCC"; then
++    dnl unfortunately we currently cannot disable exception support in KCC
++    dnl because doing so is binary incompatible and Qt by default links with exceptions :-(
++    dnl KDE_CHECK_COMPILER_FLAG(-no_exceptions,[CXXFLAGS="$CXXFLAGS --no_exceptions"])
++    dnl KDE_CHECK_COMPILER_FLAG(-exceptions, [USE_EXCEPTIONS="--exceptions"], USE_EXCEPTIONS=	)
+ 
+-       if test "$kde_very_strict" = "yes"; then
+-         CXXFLAGS="$CXXFLAGS -Wold-style-cast -Wredundant-decls -Wconversion"
+-       fi
++    AC_ARG_ENABLE(pch,[  --enable-pch            enables precompiled header support (currently only KCC) [default=no]],
++    [
++      kde_use_pch=$enableval
++    ],[kde_use_pch=no])
++ 
++    if test "$kde_use_pch" = "yes"; then
++      dnl TODO: support --pch-dir!
++      KDE_CHECK_COMPILER_FLAG(-pch,[CXXFLAGS="$CXXFLAGS --pch"])
++      dnl the below works (but the dir must exist), but it's
++      dnl useless for a whole package.
++      dnl The are precompiled headers for each source file, so when compiling
++      dnl from scratch, it doesn't make a difference, and they take up
++      dnl around ~5Mb _per_ sourcefile.
++      dnl KDE_CHECK_COMPILER_FLAG(-pch_dir /tmp,
++      dnl   [CXXFLAGS="$CXXFLAGS --pch_dir `pwd`/pcheaders"])
+     fi
+-  fi
++    dnl this flag controls inlining. by default KCC inlines in optimisation mode
++    dnl all implementations that are defined inside the class {} declaration. 
++    dnl because of templates-compatibility with broken gcc compilers, this
++    dnl can cause excessive inlining. This flag limits it to a sane level
++    KDE_CHECK_COMPILER_FLAG(-inline_keyword_space_time=6,[CXXFLAGS="$CXXFLAGS --inline_keyword_space_time=6"])
++    KDE_CHECK_COMPILER_FLAG(-inline_auto_space_time=2,[CXXFLAGS="$CXXFLAGS --inline_auto_space_time=2"])
++    KDE_CHECK_COMPILER_FLAG(-inline_implicit_space_time=2.0,[CXXFLAGS="$CXXFLAGS --inline_implicit_space_time=2.0"])
++    KDE_CHECK_COMPILER_FLAG(-inline_generated_space_time=2.0,[CXXFLAGS="$CXXFLAGS --inline_generated_space_time=2.0"])
++    dnl Some source files are shared between multiple executables
++    dnl (or libraries) and some of those need template instantiations.
++    dnl In that case KCC needs to compile those sources with
++    dnl --one_instantiation_per_object.  To make it easy for us we compile
++    dnl _all_ objects with that flag (--one_per is a shorthand).
++    KDE_CHECK_COMPILER_FLAG(-one_per, [CXXFLAGS="$CXXFLAGS --one_per"])
++  fi
++  AC_SUBST(USE_EXCEPTIONS)
++  dnl obsolete macro - provided to keep things going
++  USE_RTTI=
++  AC_SUBST(USE_RTTI)
+ 
+-    KDE_CHECK_COMPILER_FLAG(fexceptions,
+-	[
+-	  USE_EXCEPTIONS="-fexceptions"
+-	],
+-	  USE_EXCEPTIONS=
+-	)
+-    AC_SUBST(USE_EXCEPTIONS)
+-
+-    KDE_CHECK_COMPILER_FLAG(frtti,
+-	[
+-	  USE_RTTI="-frtti"
+-	],
+-	  USE_RTTI=
+-	)
+-    AC_SUBST(USE_RTTI)
+-
+-    case "$host" in
+-      *-*-irix*)  test "$GXX" = yes && CXXFLAGS="$CXXFLAGS -D_LANGUAGE_C_PLUS_PLUS -D__LANGUAGE_C_PLUS_PLUS" ;;
+-      *-*-sysv4.2uw*) CXXFLAGS="$CXXFLAGS -D_UNIXWARE";;
+-      *-*-sysv5uw7*) CXXFLAGS="$CXXFLAGS -D_UNIXWARE7";;
++  case "$host" in
++      *-*-irix*)  test "$GXX" = yes && CXXFLAGS="-D_LANGUAGE_C_PLUS_PLUS -D__LANGUAGE_C_PLUS_PLUS $CXXFLAGS" ;;
++      *-*-sysv4.2uw*) CXXFLAGS="-D_UNIXWARE $CXXFLAGS";;
++      *-*-sysv5uw7*) CXXFLAGS="-D_UNIXWARE7 $CXXFLAGS";;
+       *-*-solaris*) 
+         if test "$GXX" = yes; then
+-          libstdcpp=`gcc -print-file-name=libstdc++.so`
++          libstdcpp=`$CXX -print-file-name=libstdc++.so`
+           if test ! -f $libstdcpp; then
+              AC_MSG_ERROR([You've compiled gcc without --enable-shared. This doesn't work with KDE. Please recompile gcc with --enable-shared to receive a libstdc++.so])
+           fi
+         fi
+         ;;
+-    esac
+-
+-    if test -n "$USER_CXXFLAGS"; then
+-       CXXFLAGS="$CXXFLAGS $USER_CXXFLAGS"
+-    fi
++  esac
+ 
+-    AC_VALIDIFY_CXXFLAGS
++  AC_VALIDIFY_CXXFLAGS
+ 
+-    AC_MSG_CHECKING(how to run the C++ preprocessor)
+-    if test -z "$CXXCPP"; then
+-      AC_CACHE_VAL(ac_cv_prog_CXXCPP,
+-      [
+-         AC_LANG_SAVE[]dnl
+-         AC_LANG_CPLUSPLUS[]dnl
+-         CXXCPP="${CXX-g++} -E"
+-         AC_TRY_CPP([#include <stdlib.h>], , CXXCPP=/lib/cpp)
+-         ac_cv_prog_CXXCPP="$CXXCPP"
+-         AC_LANG_RESTORE[]dnl
+-     ])dnl
+-     CXXCPP="$ac_cv_prog_CXXCPP"
+-    fi
+-    AC_MSG_RESULT($CXXCPP)
+-    AC_SUBST(CXXCPP)dnl
++  AC_PROG_CXXCPP
+ 
+-    # the following is to allow programs, that are known to
+-    # have problems when compiled with -O2
+-    if test -n "$CXXFLAGS"; then
++  # the following is to allow programs, that are known to
++  # have problems when compiled with -O2
++  if test -n "$CXXFLAGS"; then
+       kde_safe_IFS=$IFS
+       IFS=" "
+       NOOPT_CXXFLAGS=""
+@@ -2365,15 +2646,37 @@
+         esac
+       done
+       IFS=$kde_safe_IFS
+-    fi
+-    AC_SUBST(NOOPT_CXXFLAGS)
++  fi
+ 
+-    KDE_CHECK_FINAL
++  if test -n "$CFLAGS"; then
++      kde_safe_IFS=$IFS
++      IFS=" "
++      NOOPT_CFLAGS=""
++      for i in $CFLAGS; do
++        case $i in
++          -O*)
++                ;;
++          *)
++                NOOPT_CFLAGS="$NOOPT_CFLAGS $i"
++                ;;
++        esac
++      done
++      IFS=$kde_safe_IFS
++  fi
++
++  if test "x$kde_use_qt_emb" = "xyes"; then
++    NOOPT_CXXFLAGS="$NOOPT_CXXFLAGS -fno-rtti -DQWS"
++  fi
++
++  AC_SUBST(NOOPT_CXXFLAGS)
++  AC_SUBST(NOOPT_CFLAGS)
++
++  KDE_CHECK_FINAL
+ 
+-    ifdef([AM_DEPENDENCIES], AC_REQUIRE([KDE_ADD_DEPENDENCIES]), [])
++  ifdef([AM_DEPENDENCIES], AC_REQUIRE([KDE_ADD_DEPENDENCIES]), [])
+ 
+-    KDE_CXXFLAGS=
+-    AC_SUBST(KDE_CXXFLAGS)
++  KDE_CXXFLAGS=
++  AC_SUBST(KDE_CXXFLAGS)
+ ])
+ 
+ AC_DEFUN(KDE_ADD_DEPENDENCIES,
+@@ -2402,7 +2705,7 @@
+ 
+ LIBTOOL_SHELL="/bin/sh ./libtool"
+ #  LIBTOOL="$LIBTOOL --silent"
+-KDE_PLUGIN="-avoid-version -module -no-undefined"
++KDE_PLUGIN="-avoid-version -module -no-undefined \$(KDE_RPATH) \$(KDE_MT_LDFLAGS)"
+ AC_SUBST(KDE_PLUGIN)
+ ])
+ 
+@@ -2410,6 +2713,7 @@
+ [  AC_CHECK_SIZEOF(int, 4)dnl
+   AC_CHECK_SIZEOF(long, 4)dnl
+   AC_CHECK_SIZEOF(char *, 4)dnl
++  AC_CHECK_SIZEOF(char, 1)dnl
+ ])dnl
+ 
+ AC_DEFUN(KDE_DO_IT_ALL,
+@@ -2453,47 +2757,39 @@
+ ])
+ 
+ dnl Check for the type of the third argument of getsockname
+-AC_DEFUN(AC_CHECK_KSIZE_T,
+-[AC_MSG_CHECKING(for the third argument of getsockname)
+-AC_CACHE_VAL(ac_cv_ksize_t,
+-AC_LANG_SAVE
+-AC_LANG_CPLUSPLUS
+-[AC_TRY_COMPILE([
++AC_DEFUN(AC_CHECK_SOCKLEN_T, [
++  AC_MSG_CHECKING(for socklen_t)
++  AC_CACHE_VAL(ac_cv_socklen_t, [
++    AC_LANG_SAVE
++    AC_LANG_CPLUSPLUS
++    AC_TRY_COMPILE([
+ #include <sys/types.h>
+ #include <sys/socket.h>
+-],[
++      ],[
+ socklen_t a=0;
+ getsockname(0,(struct sockaddr*)0, &a);
+-],
+-ac_cv_ksize_t=socklen_t,
+-ac_cv_ksize_t=)
+-if test -z "$ac_cv_ksize_t"; then
+-ac_safe_cxxflags="$CXXFLAGS"
+-if test "$GCC" = "yes"; then
+-  CXXFLAGS="-Werror $CXXFLAGS"
+-fi
+-AC_TRY_COMPILE([
++      ],
++      ac_cv_socklen_t=socklen_t,
++      AC_TRY_COMPILE([
+ #include <sys/types.h>
+ #include <sys/socket.h>
+-],[
++        ],[
+ int a=0;
+ getsockname(0,(struct sockaddr*)0, &a);
+-],
+-ac_cv_ksize_t=int,
+-ac_cv_ksize_t=size_t)
+-CXXFLAGS="$ac_safe_cxxflags"
+-fi
+-AC_LANG_RESTORE
+-])
+-
+-if test -z "$ac_cv_ksize_t"; then
+-  ac_cv_ksize_t=int
+-fi
++        ],
++        ac_cv_socklen_t=int,
++        ac_cv_socklen_t=size_t
++      )
++    )
++    AC_LANG_RESTORE
++  ])
+ 
+-AC_MSG_RESULT($ac_cv_ksize_t)
+-AC_DEFINE_UNQUOTED(ksize_t, $ac_cv_ksize_t,
+-      [Define the type of the third argument for getsockname]
+-)
++  AC_MSG_RESULT($ac_cv_socklen_t)
++  if test "$ac_cv_socklen_t" != "socklen_t"; then
++    AC_DEFINE_UNQUOTED(socklen_t, $ac_cv_socklen_t,
++        [Define the real type of socklen_t])
++  fi
++  AC_DEFINE_UNQUOTED(ksize_t, socklen_t, [Compatibility define])
+ 
+ ])
+ 
+@@ -2611,7 +2907,7 @@
+ dnl From Jim Meyering.
+ dnl FIXME: migrate into libit.
+ 
+-AC_DEFUN(AM_FUNC_OBSTACK,
++AC_DEFUN([AM_FUNC_OBSTACK],
+ [AC_CACHE_CHECK([for obstacks], am_cv_func_obstack,
+  [AC_TRY_LINK([#include "obstack.h"],
+ 	      [struct obstack *mem;obstack_free(mem,(char *) 0)],
+@@ -2627,7 +2923,7 @@
+ dnl From Jim Meyering.  Use this if you use the GNU error.[ch].
+ dnl FIXME: Migrate into libit
+ 
+-AC_DEFUN(AM_FUNC_ERROR_AT_LINE,
++AC_DEFUN([AM_FUNC_ERROR_AT_LINE],
+ [AC_CACHE_CHECK([for error_at_line], am_cv_lib_error_at_line,
+  [AC_TRY_LINK([],[error_at_line(0, 0, "", 0, "");],
+               am_cv_lib_error_at_line=yes,
+@@ -2724,7 +3020,11 @@
+     AC_LANG_C
+     ac_save_ldflags="$LDFLAGS"
+     ac_save_cflags="$CFLAGS"
+-    LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm -lX11 -lXext $LIBZ $LIBSOCKET"
++    if test "x$kde_use_qt_emb" != "xyes"; then
++      LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm -lX11 -lXext $LIBZ $LIBSOCKET"
++    else
++      LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm $LIBZ $LIBSOCKET"
++    fi
+     CFLAGS="$CFLAGS $X_INCLUDES $USER_INCLUDES"
+     test -n "$XPM_INCLUDE" && CFLAGS="-I$XPM_INCLUDE $CFLAGS"
+     AC_TRY_LINK([#include <X11/xpm.h>],[],
+@@ -2776,41 +3076,46 @@
+    dnl 'yes' means DPMS_LIB="", '-lXdpms' means DPMS_LIB="-lXdpms".
+    AC_CACHE_VAL(ac_cv_have_dpms,
+    [
+-    AC_LANG_C
+-    ac_save_ldflags="$LDFLAGS"
+-    ac_save_cflags="$CFLAGS"
+-    ac_save_libs="$LIBS"
+-    LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries -lX11 -lXext $LIBSOCKET"
+-    CFLAGS="$CFLAGS $X_INCLUDES"
+-    test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
+-    AC_TRY_LINK([
+-	#include <X11/Xproto.h>
+-	#include <X11/X.h>
+-	#include <X11/Xlib.h>
+-	#include <X11/extensions/dpms.h>
+-	int foo_test_dpms()
+-	{ return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
+-	ac_cv_have_dpms="yes", [
+-            LDFLAGS="$ac_save_ldflags"
+-            CFLAGS="$ac_save_cflags"
+-            LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries -lX11 -lXext $LIBSOCKET"
+-            LIBS="$LIBS -lXdpms"
+-            CFLAGS="$CFLAGS $X_INCLUDES"
+-            test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
+-            AC_TRY_LINK([
+-	        #include <X11/Xproto.h>
+-        	#include <X11/X.h>
+-        	#include <X11/Xlib.h>
+-        	#include <X11/extensions/dpms.h>
+-        	int foo_test_dpms()
+-        	{ return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
+-        	[
+-                ac_cv_have_dpms="-lXdpms"
+-                ],ac_cv_have_dpms="no")
+-            ])
+-    LDFLAGS="$ac_save_ldflags"
+-    CFLAGS="$ac_save_cflags"
+-    LIBS="$ac_save_libs"
++    if test "x$kde_use_qt_emb" = "xyes"; then
++      AC_MSG_RESULT(no)
++      ac_cv_have_dpms="no"
++    else
++      AC_LANG_C
++      ac_save_ldflags="$LDFLAGS"
++      ac_save_cflags="$CFLAGS"
++      ac_save_libs="$LIBS"
++      LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries -lX11 -lXext $LIBSOCKET"
++      CFLAGS="$CFLAGS $X_INCLUDES"
++      test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
++      AC_TRY_LINK([
++	  #include <X11/Xproto.h>
++	  #include <X11/X.h>
++	  #include <X11/Xlib.h>
++	  #include <X11/extensions/dpms.h>
++	  int foo_test_dpms()
++	  { return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
++	  ac_cv_have_dpms="yes", [
++              LDFLAGS="$ac_save_ldflags"
++              CFLAGS="$ac_save_cflags"
++              LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries -lX11 -lXext $LIBSOCKET"
++              LIBS="$LIBS -lXdpms"
++              CFLAGS="$CFLAGS $X_INCLUDES"
++              test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
++              AC_TRY_LINK([
++	          #include <X11/Xproto.h>
++        	  #include <X11/X.h>
++        	  #include <X11/Xlib.h>
++        	  #include <X11/extensions/dpms.h>
++        	  int foo_test_dpms()
++        	  { return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
++        	  [
++                  ac_cv_have_dpms="-lXdpms"
++                  ],ac_cv_have_dpms="no")
++              ])
++      LDFLAGS="$ac_save_ldflags"
++      CFLAGS="$ac_save_cflags"
++      LIBS="$ac_save_libs"
++    fi
+    ])dnl
+ 
+   if test "$ac_cv_have_dpms" = no; then
+@@ -2850,7 +3155,10 @@
+ 
+  AC_ARG_WITH(gl, [  --without-gl            disable 3D GL modes],
+ 	gl_test=$withval, gl_test="yes")
+- if test "x$gl_test" = xno; then
++ if test "x$kde_use_qt_emb" = "xyes"; then
++   # GL and Qt Embedded is a no-go for now.
++   ac_cv_have_gl=no
++ elif test "x$gl_test" = xno; then
+    ac_cv_have_gl=no
+  else
+    AC_MSG_CHECKING(for GL)
+@@ -2859,15 +3167,19 @@
+     AC_LANG_C
+     ac_save_ldflags="$LDFLAGS"
+     ac_save_cflags="$CFLAGS"
+-    LDFLAGS="$LDFLAGS $GL_LDFLAGS $X_LDFLAGS $all_libraries -lMesaGL -lMesaGLU -lX11 -lXext -lm $LIBSOCKET"
++    LDFLAGS="$LDFLAGS $GL_LDFLAGS $X_LDFLAGS $all_libraries -lMesaGL -lMesaGLU"
++    test "x$kde_use_qt_emb" != xyes && LDFLAGS="$LDFLAGS -lX11"
++    LDFLAGS="$LDFLAGS $LIB_XEXT -lm $LIBSOCKET"
+     CFLAGS="$CFLAGS $X_INCLUDES"
+     test -n "$GL_INCLUDE" && CFLAGS="-I$GL_INCLUDE $CFLAGS"
+     AC_TRY_LINK([#include <GL/gl.h>
+-#include <GL/glu.h>           
++#include <GL/glu.h>
+ ], [],
+ 	ac_cv_have_gl="mesa", ac_cv_have_gl="no")
+     if test "x$ac_cv_have_gl" = "xno"; then
+-      LDFLAGS="$ac_save_ldflags $X_LDFLAGS $GL_LDFLAGS $all_libraries -lGL -lGLU -lX11 -lXext -lm $LIBSOCKET"
++      LDFLAGS="$ac_save_ldflags $X_LDFLAGS $GL_LDFLAGS $all_libraries -lGL -lGLU"
++      test "x$kde_use_qt_emb" != xyes && LDFLAGS="$LDFLAGS -lX11"
++      LDFLAGS="$LDFLAGS $LIB_XEXT -lm $LIBSOCKET"
+       CFLAGS="$ac_save_cflags $X_INCLUDES"
+       test -n "$GL_INCLUDE" && CFLAGS="-I$GL_INCLUDE $CFLAGS"
+       AC_TRY_LINK([#include <GL/gl.h>
+@@ -2912,153 +3224,163 @@
+  AC_SUBST(GLLIB)
+ ])
+ 
+- dnl PAM pam
+-
+- dnl Should test for PAM (Pluggable Authentication Modules)
+- AC_DEFUN(AC_PATH_PAM_DIRECT,
+- [
+- test -z "$pam_direct_test_library" && pam_direct_test_library=pam
+- test -z "$pam_direct_test_include" && pam_direct_test_include=security/pam_appl.h
+-
+-   for ac_dir in               \
+-                               \
+-     /usr/local/include        \
+-     /usr/include              \
+-     /usr/unsupported/include  \
+-     /opt/include              \
+-     /usr/pam/include          \
+-     /usr/local/pam/include    \
+-     /usr/lib/pam/include      \
+- 			      \
+-     $extra_include            \
+-     ; \
+-   do
+-     if test -r "$ac_dir/$pam_direct_test_include"; then
+-       no_pam= ac_pam_includes=$ac_dir
+-       break
+-     fi
+-   done
+ 
+- # First see if replacing the include by lib works.
+- for ac_dir in `echo "$ac_pam_includes" | sed s/include/lib/` \
+-                           \
+-     /lib                  \
+-     /usr/lib              \
+-     /usr/local/lib        \
+-     /usr/unsupported/lib  \
+-     /lib/security         \
+-     /usr/security/lib     \
+-     $extra_lib            \
+-     ; \
+- do
+-   for ac_extension in a so sl; do
+-     if test -r $ac_dir/lib${pam_direct_test_library}.$ac_extension; then
+-       no_pam= ac_pam_libraries=$ac_dir
+-       break 2
+-     fi
+-   done
+- done
+-])
++ dnl shadow password and PAM magic - maintained by ossi at kde.org
+ 
+-AC_DEFUN(AC_PATH_PAM,
+- [
++AC_DEFUN(KDE_PAM, [
+   AC_REQUIRE([KDE_CHECK_LIBDL])
+-  AC_REQUIRE_CPP()dnl
+-
+-dnl AC_CHECK_LIB(pam_misc, main, [PAM_MISC_LIB="-lpam_misc"
+-dnl              AC_DEFINE_UNQUOTED(HAVE_PAM_MISC, 1, [Define if you have a PAM implementation with the pam_misc library])], [], [-lpam $LIBDL])
+ 
+- AC_MSG_CHECKING(for PAM)
+- AC_ARG_WITH(pam,
+-[  --with-pam[=ARG]        enable support for PAM: ARG=[yes|no|service name]],
+-  [
+-    if test "x$withval" = "xyes"; then
+-      no_pam=
+-      default_pam=yes
+-    elif test "x$withval" = "xno"; then
+-      no_pam=yes
+-    else
+-      no_pam=
+-      pam_service="$withval"
+-        if test -z "$pam_service"; then
+-        default_pam=yes
+-        else
+-        default_pam=
+-        fi
++  AC_ARG_WITH(pam,
++    [  --with-pam[=ARG]        enable support for PAM: ARG=[yes|no|service name]],
++    [ if test "x$withval" = "xyes"; then
++        use_pam=yes
++        pam_service=kde
++      elif test "x$withval" = "xno"; then
++        use_pam=no
++      else
++        use_pam=yes
++        pam_service=$withval
+       fi
+-  ], no_pam=yes
+- )
++      ac_cv_path_pam="use_pam=$use_pam pam_service=$pam_service"
++    ], [
++      AC_CACHE_VAL(ac_cv_path_pam,
++        [ use_pam=no
++          AC_CHECK_LIB(pam, pam_start,
++            [ AC_CHECK_HEADER(security/pam_appl.h,
++                [ use_pam=yes
++                  pam_service=kde ]) 
++            ], , $LIBDL)
++          ac_cv_path_pam="use_pam=$use_pam pam_service=$pam_service"
++        ])
++    ])
++  eval "$ac_cv_path_pam"
+ 
+- if test ! "$no_pam" = yes; then
++  AC_MSG_CHECKING(for PAM)
++  if test "x$use_pam" = xno; then
++    AC_MSG_RESULT(no)
++    PAMLIBS=""
++  else
++    AC_MSG_RESULT(yes)
++    AC_DEFINE(HAVE_PAM, 1, [Defines if you have PAM (Pluggable Authentication Modules)])
++    PAMLIBS="$PAM_MISC_LIB -lpam $LIBDL"
+ 
+- AC_CACHE_VAL(ac_cv_path_pam,
+- [
+- ac_pam_includes=NONE
+- ac_pam_libraries=NONE
+- if test -z "$pam_libraries"; then
+-   pam_libraries=NONE
+- fi
+- if test -z "$pam_includes"; then
+-   pam_includes=NONE
+- fi
++    dnl test whether struct pam_message is const (Linux) or not (Sun)
++    AC_MSG_CHECKING(for const pam_message)
++    AC_EGREP_HEADER([struct pam_message], security/pam_appl.h,
++      [ AC_EGREP_HEADER([const struct pam_message], security/pam_appl.h,
++                        [AC_MSG_RESULT([const: Linux-type PAM])],
++                        [AC_MSG_RESULT([nonconst: Sun-type PAM])
++                        AC_DEFINE(PAM_MESSAGE_NONCONST, 1, [Define if your PAM support takes non-const arguments (Solaris)])]
++                        )],
++      [AC_MSG_RESULT([not found - assume const, Linux-type PAM])])
++  fi
+ 
+- AC_PATH_PAM_DIRECT
++  AC_SUBST(PAMLIBS)
++])
+ 
+- test "x$pam_includes" = xNONE && pam_includes=$ac_pam_includes
+- test "x$pam_libraries" = xNONE && pam_libraries=$ac_pam_libraries
++dnl DEF_PAM_SERVICE(arg name, full name, define name)
++AC_DEFUN(DEF_PAM_SERVICE, [
++  AC_ARG_WITH($1-pam,
++    [  --with-$1-pam=[val]    override PAM service from --with-pam for $2],
++    [ if test "x$use_pam" = xyes; then
++        $3_PAM_SERVICE="$withval"
++      else
++        AC_MSG_ERROR([Cannot use use --with-$1-pam, as no PAM was detected.
++You may want to enforce it by using --with-pam.])
++      fi
++    ], 
++    [ if test "x$use_pam" = xyes; then
++        $3_PAM_SERVICE="$pam_service"
++      fi
++    ])
++    if test -n "$$3_PAM_SERVICE"; then
++      AC_MSG_RESULT([The PAM service used by $2 will be $$3_PAM_SERVICE])
++      AC_DEFINE_UNQUOTED($3_PAM_SERVICE, "$$3_PAM_SERVICE", [The PAM service to be used by $2])
++    fi
++    AC_SUBST($3_PAM_SERVICE)
++])
+ 
+- if test ! "x$pam_includes" = xNONE && test ! "x$pam_libraries" = xNONE; then
+-   ac_pam_libs="-lpam $PAM_MISC_LIB $LIBDL"
+-   ac_cv_path_pam="no_pam= ac_pam_includes=$ac_pam_includes ac_pam_libraries=$ac_pam_libraries ac_pam_libs=\"$ac_pam_libs\""
+- else
+-   ac_cv_path_pam="no_pam=yes"
+- fi
+- ])
++AC_DEFUN(KDE_SHADOWPASSWD, [
++  AC_REQUIRE([KDE_PAM])
+ 
+- eval "$ac_cv_path_pam"
++  AC_CHECK_LIB(shadow, getspent,
++    [ LIBSHADOW="-lshadow"
++      ac_use_shadow=yes
++    ],
++    [ dnl for UnixWare
++      AC_CHECK_LIB(gen, getspent, 
++        [ LIBGEN="-lgen"
++          ac_use_shadow=yes
++        ], 
++        [ AC_CHECK_FUNC(getspent, 
++            [ ac_use_shadow=yes ],
++            [ ac_use_shadow=no ])
++	])
++    ])
++  AC_SUBST(LIBSHADOW)
++  AC_SUBST(LIBGEN)
++  
++  AC_MSG_CHECKING([for shadow passwords])
++
++  AC_ARG_WITH(shadow,
++    [  --with-shadow		  If you want shadow password support ],
++    [ if test "x$withval" != "xno"; then
++        use_shadow=yes
++      else
++        use_shadow=no
++      fi
++    ], [
++      use_shadow="$ac_use_shadow"
++    ])
+ 
+- fi
++  if test "x$use_shadow" = xyes; then
++    AC_MSG_RESULT(yes)
++    AC_DEFINE(HAVE_SHADOW, 1, [Define if you use shadow passwords])
++  else
++    AC_MSG_RESULT(no)
++    LIBSHADOW=
++    LIBGEN=
++  fi
+ 
+- if test "$no_pam" = yes; then
+-   AC_MSG_RESULT(no)
+- else
+-   AC_DEFINE(HAVE_PAM, 1, [Defines if you have PAM (Pluggable Authentication Modules); Redhat-Users!])
+-   PAMLIBS="$ac_pam_libs"
+-   test "x$pam_includes" = xNONE && pam_includes=$ac_pam_includes
+-   test "x$pam_libraries" = xNONE && pam_libraries=$ac_pam_libraries
+-   AC_MSG_RESULT([libraries $pam_libraries, headers $pam_includes])
+- if test "$default_pam" = yes; then
+-   AC_MSG_RESULT(["default pam service name will be used"])
+- else
+-   AC_DEFINE_UNQUOTED(KDE_PAM_SERVICE,"$pam_service", [Define to change the default name of the PAM service used by KDE])
+-   AC_MSG_RESULT(["pam service name will be: " $pam_service])
+- fi
+-dnl test whether struct pam_message is const (Linux) or not (Sun)
+-   pam_appl_h="$ac_pam_includes/security/pam_appl.h"
+-   AC_MSG_CHECKING(for const pam_message)
+-   AC_EGREP_HEADER([struct pam_message],
+-      $pam_appl_h,
+-      [ AC_EGREP_HEADER([const struct pam_message],
+-                        $pam_appl_h,
+-                        [AC_MSG_RESULT(["const: Linux-type PAM"]) ],
+-                        [AC_MSG_RESULT(["nonconst: Sun-type PAM"])
+-                        AC_DEFINE(PAM_MESSAGE_NONCONST, 1, [Define if your PAM support takes non-const arguments (Solaris)])]
+-                        )],
+-       [AC_MSG_RESULT(["not found - assume const, Linux-type PAM"])]
+-       )
+- fi
++  dnl finally make the relevant binaries setuid root, if we have shadow passwds.
++  dnl this still applies, if we could use it indirectly through pam.
++  if test "x$use_shadow" = xyes || 
++     ( test "x$use_pam" = xyes && test "x$ac_use_shadow" = xyes ); then
++      case $host in
++      *-*-freebsd* | *-*-netbsd* | *-*-openbsd*)
++	SETUIDFLAGS="-m 4755 -o root";;
++      *)
++	SETUIDFLAGS="-m 4755";;
++      esac
++  fi
++  AC_SUBST(SETUIDFLAGS)
+ 
+- if test "x$pam_libraries" != x && test "x$pam_libraries" != xNONE ; then
+-     PAMLIBPATHS="-L$pam_libraries"
+- fi
+- if test "x$pam_includes" != x && test "x$pam_includes" != xNONE ; then
+-     PAMINC="-I$pam_includes"
+- fi
++])
+ 
+- AC_SUBST(PAMINC)
+- AC_SUBST(PAMLIBS)
+- AC_SUBST(PAMLIBPATHS)
++AC_DEFUN(KDE_PASSWDLIBS, [
++  AC_REQUIRE([KDE_MISC_TESTS]) dnl for LIBCRYPT
++  AC_REQUIRE([KDE_PAM])
++  AC_REQUIRE([KDE_SHADOWPASSWD])
+ 
++  if test "x$use_pam" = "xyes"; then 
++    PASSWDLIBS="$PAMLIBS"
++  else
++    PASSWDLIBS="$LIBCRYPT $LIBSHADOW $LIBGEN"
++  fi
++
++  dnl FreeBSD uses a shadow-like setup, where /etc/passwd holds the users, but
++  dnl /etc/master.passwd holds the actual passwords.  /etc/master.passwd requires
++  dnl root to read, so kcheckpass needs to be root (even when using pam, since pam
++  dnl may need to read /etc/master.passwd).
++  case $host in
++  *-*-freebsd*)
++    SETUIDFLAGS="-m 4755 -o root"
++    ;;
++  *)
++    ;;
++  esac
++
++  AC_SUBST(PASSWDLIBS)
+ ])
+ 
+ AC_DEFUN(KDE_CHECK_LIBDL,
+@@ -3361,21 +3683,20 @@
+     case $host_os in
+  	solaris*)
+ 		KDE_CHECK_COMPILER_FLAG(mt, [USE_THREADS="-mt"])
+-                CPPFLAGS="$CPPFLAGS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_SOLARIS"
+-                echo "Setting Solaris pthread compilation options"
++                CPPFLAGS="$CPPFLAGS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_SOLARIS -DSVR4"
+     		;;
+         freebsd*)
+                 CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
+-                echo "Setting FreeBSD pthread compilation options"
+                 ;;
+         aix*)
+                 CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
+                 LIBPTHREAD="$LIBPTHREAD -lc_r"
+-                echo "Setting AIX pthread compilation options"
+                 ;;
+         linux*) CPPFLAGS="$CPPFLAGS -D_REENTRANT"
+-                USE_THREADS="$USE_THREADS -DPIC -fPIC"
+-                echo "Setting Linux pthread compilation options"
++                if test "$CXX" = "KCC"; then
++                  CXXFLAGS="$CXXFLAGS --thread_safe"
++		  NOOPT_CXXFLAGS="$NOOPT_CXXFLAGS --thread_safe"
++                fi
+                 ;;
+ 	*)
+ 		;;
+@@ -3390,13 +3711,16 @@
+   AC_REQUIRE([KDE_CHECK_PTHREAD_OPTION])
+   dnl default is yes if libpthread is found and no if no libpthread is available
+   if test -z "$LIBPTHREAD"; then
+-    kde_check_threading_default=no
++    if test -z "$USE_THREADS"; then
++      kde_check_threading_default=no
++    else
++      kde_check_threading_default=yes
++    fi
+   else
+     kde_check_threading_default=yes
+   fi
+   AC_ARG_ENABLE(threading, [  --disable-threading     disables threading even if libpthread found ],
+    kde_use_threading=$enableval, kde_use_threading=$kde_check_threading_default)
+-
+   if test "x$kde_use_threading" = "xyes"; then
+     AC_DEFINE(HAVE_LIBPTHREAD, 1, [Define if you have a working libpthread (will enable threaded code)])
+   fi
+@@ -3454,13 +3778,10 @@
+ 
+ ])
+ 
+-AC_DEFUN(KDE_CHECK_PYTHON,
++AC_DEFUN(KDE_CHECK_PYTHON_DIR,
+ [
+-AC_REQUIRE([KDE_CHECK_LIBDL])
+-AC_REQUIRE([KDE_CHECK_LIBPTHREAD])
+-
+ AC_MSG_CHECKING([for Python directory])
+-
++ 
+ AC_CACHE_VAL(kde_cv_pythondir,
+ [
+   if test -z "$PYTHONDIR"; then
+@@ -3469,15 +3790,22 @@
+     kde_cv_pythondir="$PYTHONDIR"
+   fi
+ ])
+-
++ 
+ AC_ARG_WITH(pythondir,
+ [  --with-pythondir=pythondir   use python installed in pythondir ],
+ [
+   ac_python_dir=$withval
+ ], ac_python_dir=$kde_cv_pythondir
+ )
+-
++ 
+ AC_MSG_RESULT($ac_python_dir)
++])
++
++AC_DEFUN(KDE_CHECK_PYTHON_INTERN,
++[
++AC_REQUIRE([KDE_CHECK_LIBDL])
++AC_REQUIRE([KDE_CHECK_LIBPTHREAD])
++AC_REQUIRE([KDE_CHECK_PYTHON_DIR])
+ 
+ if test -z "$1"; then
+   version="1.5"
+@@ -3493,7 +3821,7 @@
+   AC_FIND_FILE(python$version/Python.h, $python_incdirs, python_incdir)
+   python_incdir=$python_incdir/python$version
+   if test ! -r $python_incdir/Python.h; then
+-    AC_MSG_ERROR(Python.h not found.)
++    python_incdir=no
+   fi
+ fi
+ 
+@@ -3505,47 +3833,70 @@
+   AC_FIND_FILE(python$version/config/libpython$version.a, $python_libdirs, python_libdir)
+   python_libdir=$python_libdir/python$version/config
+   if test ! -r $python_libdir/libpython$version.a; then
+-    AC_MSG_ERROR(libpython$version.a not found.)
++    python_libdir=no
+   fi
+ fi
+ 
+ PYTHONLIB=-L$python_libdir
++kde_orig_LIBPYTHON=$LIBPYTHON
+ if test -z "$LIBPYTHON"; then
+-LIBPYTHON=-lpython$version
++  LIBPYTHON=-lpython$version
+ fi
+ 
+ python_libdirs="$ac_python_dir/lib /usr/lib /usr/local /usr/lib $kde_extra_libs"
+ AC_FIND_FILE(python$version/copy.py, $python_libdirs, python_moddir)
+ python_moddir=$python_moddir/python$version
+ if test ! -r $python_moddir/copy.py; then
+-  AC_MSG_ERROR(python module directory not found.)
++  python_moddir=no
+ fi
+ 
+ PYTHONMODDIR=$python_moddir
+ 
+ AC_MSG_RESULT(header $python_incdir library $python_libdir modules $python_moddir)
+ 
+-dnl Note: this test is very weak
+-kde_python_link_found=no
+-KDE_TRY_LINK_PYTHON(normal)
+-KDE_TRY_LINK_PYTHON(m, -lm)
+-KDE_TRY_LINK_PYTHON(pthread, $LIBPTHREAD)
+-KDE_TRY_LINK_PYTHON(tcl, -ltcl)
+-KDE_TRY_LINK_PYTHON(m_and_thread, [$LIBPTHREAD -lm], [],
++if test x$python_incdir = xno ||  test x$python_libdir = xno ||  test x$python_moddir = xno; then
++   LIBPYTHON=$kde_orig_LIBPYTHON
++   test "x$PYTHONLIB" = "x-Lno" && PYTHONLIB=""
++   test "x$PYTHONINC" = "x-Ino" && PYTHONINC=""
++   $2
++else 
++  dnl Note: this test is very weak
++  kde_python_link_found=no
++  KDE_TRY_LINK_PYTHON(normal)
++  KDE_TRY_LINK_PYTHON(m, -lm)
++  KDE_TRY_LINK_PYTHON(pthread, $LIBPTHREAD)
++  KDE_TRY_LINK_PYTHON(tcl, -ltcl)
++  KDE_TRY_LINK_PYTHON(db2, -ldb2)
++  KDE_TRY_LINK_PYTHON(m_and_thread, [$LIBPTHREAD -lm])
++  KDE_TRY_LINK_PYTHON(m_and_thread_and_util, [$LIBPTHREAD -lm -lutil])
++  KDE_TRY_LINK_PYTHON(m_and_thread_and_db3, [$LIBPTHREAD -lm -ldb-3 -lutil])
++  KDE_TRY_LINK_PYTHON(pthread_and_db3, [$LIBPTHREAD -ldb-3])
++  KDE_TRY_LINK_PYTHON(m_and_thread_and_db, [$LIBPTHREAD -lm -ldb -ltermcap -lutil])
++  KDE_TRY_LINK_PYTHON(pthread_and_dl, [$LIBPTHREAD $LIBDL -lutil -lreadline -lncurses -lm])
++  KDE_TRY_LINK_PYTHON(m_and_thread_and_db_special, [$LIBPTHREAD -lm -ldb -lutil], [],
+ 	[AC_MSG_WARN([it seems, Python depends on another library.
+-    Pleae use \"make LIBPTYHON='-lpython$version -lotherlib'\" to fix this
++    Pleae set LIBPYTHON to '-lpython$version -lotherlib' before calling configure to fix this
+     and contact the authors to let them know about this problem])
+ 	])
+ 
+-LIBPYTHON="$LIBPYTHON $LIBDL $LIBSOCKET"
+-AC_SUBST(PYTHONINC)
+-AC_SUBST(PYTHONLIB)
+-AC_SUBST(LIBPYTHON)
+-AC_SUBST(PYTHONMODDIR)
++  LIBPYTHON="$LIBPYTHON $LIBDL $LIBSOCKET"
++  AC_SUBST(PYTHONINC)
++  AC_SUBST(PYTHONLIB)
++  AC_SUBST(LIBPYTHON)
++  AC_SUBST(PYTHONMODDIR)
++  AC_DEFINE(HAVE_PYTHON, 1, [Define if you have the development files for python])
++fi
+ 
+ ])
+ 
+ 
++AC_DEFUN(KDE_CHECK_PYTHON,
++[
++  KDE_CHECK_PYTHON_INTERN("2.1", [KDE_CHECK_PYTHON_INTERN("2.0",
++        [ KDE_CHECK_PYTHON_INTERN($1, $2) ])
++  ])
++])
++
+ AC_DEFUN(KDE_CHECK_STL_SGI,
+ [
+     AC_MSG_CHECKING([if STL implementation is SGI like])
+@@ -3587,7 +3938,7 @@
+    AC_MSG_RESULT($kde_cv_stl_type_hp)
+ 
+    if test "$kde_cv_stl_type_hp" = "yes"; then
+-	AC_DEFINE_UNQUOTED(HAVE_HP_STL, 1, [Define if you have a STL implementation by SGI])
++	AC_DEFINE_UNQUOTED(HAVE_HP_STL, 1, [Define if you have a STL implementation by HP])
+    fi
+ ])
+ 
+@@ -3603,7 +3954,7 @@
+        KDE_CHECK_STL_HP
+ 
+        if test "$kde_cv_stl_type_hp" = "no"; then
+-         AC_MSG_ERROR("no known STL type found")
++         AC_MSG_ERROR("no known STL type found - did you forget to install libstdc++[-devel] ?")
+        fi
+     fi
+ 
+@@ -3826,6 +4177,9 @@
+ [
+ AC_LANG_C
+ cat > conftest.$ac_ext <<EOF
++#ifdef STDC_HEADERS
++# include <stdlib.h>
++#endif
+ #include <stdio.h>
+ #include <sys/param.h>
+ #ifndef MAXPATHLEN
+@@ -3894,16 +4248,6 @@
+    AC_LANG_RESTORE
+ ])
+ 
+-AC_DEFUN(KDE_CHECK_QWSPRITEFIELD,
+-[
+-  KDE_CHECK_HEADER(QwSpriteField.h, ,
+-  [
+-    AC_MSG_WARN([you don't have QwSpriteField.h somewhere. Please install
+-       QwSpriteField out of kdesupport.])
+-      $1
+-  ])
+-])
+-
+ AC_DEFUN(KDE_FAST_CONFIGURE,
+ [
+   dnl makes configure fast (needs perl)
+@@ -4029,6 +4373,7 @@
+   foo = foo+1;
+   ],
+   kde_cv_c_long_long=yes, kde_cv_c_long_long=no)
++  AC_LANG_RESTORE
+ ])
+ AC_MSG_RESULT($kde_cv_c_long_long)
+ if test "$kde_cv_c_long_long" = yes; then
+@@ -4036,6 +4381,307 @@
+ fi
+ ])
+ 
++AC_DEFUN(KDE_CHECK_LIB,
++[
++     kde_save_LIBS="$LIBS"
++     LIBS="$LIBS $all_libraries"
++     case $host_os in
++      aix*) LIBS="-brtl $LIBS"
++	test "$GCC" = yes && LIBS="-Wl,$LIBS"
++	;;
++     esac
++     AC_CHECK_LIB($1, $2, $3, $4, $5)
++     LIBS="$kde_save_LIBS"
++])
++
++
++
++
++AC_DEFUN(KDE_CHECK_INITGROUPS,
++[ 
++  AC_REQUIRE([AC_CANONICAL_HOST])
++  AC_CHECK_FUNCS(initgroups)
++  if test "x$ac_cv_func_initgroups" = "xyes"; then
++    case $host_os in
++      aix*) AC_LANG_SAVE
++            AC_LANG_CPLUSPLUS
++            AC_MSG_CHECKING([for initgroups prototype])
++            AC_CACHE_VAL(kde_cv_check_initgroups_proto,
++            [ AC_TRY_COMPILE(
++              [ #include <grp.h>
++              ],
++              [ char buffer[10];
++                gid_t id;
++                int x = initgroups(buffer,id);
++              ],
++              kde_cv_check_initgroups_proto=yes,
++              kde_cv_check_initgroups_proto=no)
++            ])
++            AC_MSG_RESULT($kde_cv_check_initgroups_proto)
++            AC_LANG_RESTORE
++            ;;
++      *)
++            kde_cv_check_initgroups_proto=yes
++            ;;
++    esac
++  else
++    kde_cv_check_initgroups_proto=no
++  fi
++  if test "x$kde_cv_check_initgroups_proto" = "xyes"; then
++    kde_check_initgroups_proto=1
++  else
++    kde_check_initgroups_proto=0
++  fi
++  AC_DEFINE_UNQUOTED(HAVE_INITGROUPS_PROTO,$kde_check_initgroups_proto,
++           [initgroups may exist but not its prototype (e.g. AIX<4.3.3:8)])
++])
++
++
++AC_DEFUN(KDE_CHECK_JAVA_DIR,
++[
++AC_MSG_CHECKING([for Java directory])
++
++AC_ARG_WITH(java,
++[  --with-java=javadir     use java installed in javadir, --without-java disables ],
++[  ac_java_dir=$withval
++], ac_java_dir=""
++)
++
++dnl at this point ac_java_dir is either a dir, 'no' to disable, or '' to say look in $PATH
++if test "x$ac_java_dir" = xno; then
++   kde_cv_java_bindir=no
++   kde_cv_java_includedir=no
++   kde_java_libjvmdir=no
++   kde_java_libhpidir=no
++else
++  if test "x$ac_java_dir" = x; then
++    dnl No option set -> look in $PATH
++    AC_CACHE_VAL(kde_cv_java_bindir,
++    [
++      dnl First look for javac in $PATH. If not found we'll look at the option.
++      KDE_FIND_PATH(javac, JAVAC, [], [])
++      if test -n "$JAVAC"; then
++          kde_cv_java_bindir=`echo $JAVAC | sed -e 's,/javac$,/,'`
++          dnl this substitution might not work - well, we test for jni.h below
++          kde_cv_java_includedir=`echo $kde_cv_java_bindir | sed -e 's,bin/$,include/,'`
++      else
++          kde_cv_java_bindir=no
++      fi
++    ])
++  else
++    dnl config option set
++    kde_cv_java_bindir=$ac_java_dir/bin
++    kde_cv_java_includedir=$ac_java_dir/include
++  fi
++fi
++
++dnl At this point kde_cv_java_bindir and kde_cv_java_includedir are either set or "no"
++if test ! "x$kde_cv_java_bindir" = xno; then
++
++  dnl Look for libjvm.so
++  kde_java_libjvmdir=`find $kde_cv_java_bindir/.. -name libjvm.so | sed 's,libjvm.so,,'|head -n 1`
++  dnl Look for libhpi.so and avoid green threads
++  kde_java_libhpidir=`find $kde_cv_java_bindir/.. -name libhpi.so | grep -v green | sed 's,libhpi.so,,'`
++
++  dnl Now check everything's fine under there
++
++  if test ! -x "$kde_cv_java_bindir/javac"; then
++    AC_MSG_ERROR([javac not found under $kde_cv_java_bindir - it seems you passed a wrong --with-java.])
++  fi
++  if test ! -x "$kde_cv_java_bindir/javah"; then
++    AC_MSG_ERROR([javah not found under $kde_cv_java_bindir. javac was found though! Use --with-java or --without-java.])
++  fi
++  if test ! -x "$kde_cv_java_bindir/jar"; then
++    AC_MSG_ERROR([jar not found under $kde_cv_java_bindir. javac was found though! Use --with-java or --without-java.])
++  fi
++  if test ! -r "$kde_cv_java_includedir/jni.h"; then
++    AC_MSG_ERROR([jni.h not found under $kde_cv_java_includedir. Use --with-java or --without-java.])
++  fi
++  if test ! -r "$kde_java_libjvmdir/libjvm.so"; then
++    AC_MSG_ERROR([libjvm.so not found under $kde_java_libjvmdir. Use --without-java.])
++  fi
++  if test ! -r "$kde_java_libhpidir/libhpi.so"; then
++    AC_MSG_ERROR([libhpi.so not found under $kde_java_libhpidir. Use --without-java.])
++  fi
++
++  jni_includes="-I$kde_cv_java_includedir"
++  dnl Strange thing, jni.h requires jni_md.h which is under genunix here..
++  dnl and under linux here..
++  test -d "$kde_cv_java_includedir/linux" && jni_includes="$jni_includes -I$kde_cv_java_includedir/linux"
++  test -d "$kde_cv_java_includedir/genunix" && jni_includes="$jni_includes -I$kde_cv_java_includedir/genunix"
++
++  dnl Check for JNI version
++  AC_LANG_SAVE
++  AC_LANG_CPLUSPLUS
++  ac_cxxflags_safe="$CXXFLAGS"
++  CXXFLAGS="$CXXFLAGS $all_includes $jni_includes"
++
++  AC_TRY_COMPILE([
++#include <jni.h>
++	    ],
++	    [
++#ifndef JNI_VERSION_1_2
++Syntax Error
++#endif
++	    ],[ kde_jni_works=yes ],
++            [ kde_jni_works=no ])
++
++  if test $kde_jni_works = no; then
++    AC_MSG_ERROR([Incorrect version of $kde_cv_java_includedir/jni.h.
++	          You need to have Java Development Kit (JDK) version 1.2. 
++	
++	          Use --with-java to specify another location.
++	          Use --without-java to configure without java support.
++        	  Or download a newer JDK and try again. 
++	          See e.g. http://java.sun.com/products/jdk/1.2 ])
++  fi
++
++  CXXFLAGS="$ac_cxxflags_safe"    
++  AC_LANG_RESTORE
++
++  dnl All tests ok, inform and subst the variables
++  AC_MSG_RESULT([javac/javah/jar in $kde_cv_java_bindir, jni.h in $kde_cv_java_includedir])
++
++  JAVAC=$kde_cv_java_bindir/javac
++  AC_SUBST(JAVAC)
++  JAVAH=$kde_cv_java_bindir/javah
++  AC_SUBST(JAVAH)
++  JAR=$kde_cv_java_bindir/jar
++  AC_SUBST(JAR)
++  AC_SUBST(jni_includes)
++  JVMLIBS="-L$kde_java_libjvmdir -ljvm -L$kde_cv_java_libhpidir -lhpi"
++  AC_SUBST(JVMLIBS)
++fi
++])
++
++dnl this is a redefinition of autoconf 2.5x's AC_FOREACH.
++dnl When the argument list becomes big, as in KDE for AC_OUTPUT in
++dnl big packages, m4_foreach is dog-slow.  So use our own version of
++dnl it.  (matz at kde.org)
++m4_define([mm_foreach],
++[m4_pushdef([$1])_mm_foreach($@)m4_popdef([$1])])
++m4_define([mm_car], [[$1]])
++m4_define([mm_car2], [[$@]])
++m4_define([_mm_foreach],
++[m4_if(m4_quote($2), [], [],
++       [m4_define([$1], [mm_car($2)])$3[]_mm_foreach([$1],
++                                                     mm_car2(m4_shift($2)),
++                                                     [$3])])])
++m4_define([AC_FOREACH],
++[mm_foreach([$1], m4_split(m4_normalize([$2])), [$3])])
++
++AC_DEFUN(KDE_NEED_FLEX,
++[
++AC_REQUIRE([AM_PROG_LEX])
++if test -z "$LEXLIB"; then
++    AC_MSG_ERROR([You need to have flex installed.])
++fi
++AC_SUBST(LEXLIB)
++])
++
++AC_DEFUN(AC_PATH_QTOPIA,
++[
++  dnl TODO: use AC_CACHE_VAL
++
++  if test -z "$1"; then
++    qtopia_minver_maj=1
++    qtopia_minver_min=5
++    qtopia_minver_pat=0
++  else
++    qtopia_minver_maj=`echo "$1" | sed -e "s/^\(.*\)\..*\..*$/\1/"`
++    qtopia_minver_min=`echo "$1" | sed -e "s/^.*\.\(.*\)\..*$/\1/"`
++    qtopia_minver_pat=`echo "$1" | sed -e "s/^.*\..*\.\(.*\)$/\1/"`
++  fi
++
++  qtopia_minver="$qtopia_minver_maj$qtopia_minver_min$qtopia_minver_pat"
++  qtopia_minverstr="$qtopia_minver_maj.$qtopia_minver_min.$qtopia_minver_pat"
++
++  AC_REQUIRE([AC_PATH_QT])
++
++  AC_MSG_CHECKING([for Qtopia])
++
++  LIB_QTOPIA="-lqpe"
++  AC_SUBST(LIB_QTOPIA)
++
++  kde_qtopia_dirs="$QPEDIR /opt/Qtopia"
++
++  ac_qtopia_incdir=NO
++
++  AC_ARG_WITH(qtopia-dir,
++              [  --with-qtopia-dir=DIR   where the root of Qtopia is installed ],
++              [  ac_qtopia_incdir="$withval"/include] ) 
++  
++  qtopia_incdirs=""
++  for dir in $kde_qtopia_dirs; do
++    qtopia_incdirs="$qtopia_incdirs $dir/include"
++  done
++
++  if test ! "$ac_qtopia_incdir" = "NO"; then
++    qtopia_incdirs="$ac_qtopia_incdir $qtopia_incdirs"
++  fi
++
++  qtopia_incdir=""
++  AC_FIND_FILE(qpe/qpeapplication.h, $qtopia_incdirs, qtopia_incdir)
++  ac_qtopia_incdir="$qtopia_incdir"
++
++  if test -z "$qtopia_incdir"; then
++    AC_MSG_ERROR([Cannot find Qtopia headers. Please check your installation.])
++  fi
++
++  qtopia_ver_maj=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION "\(.*\)\..*\..*".*,\1,p'`;
++  qtopia_ver_min=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION ".*\.\(.*\)\..*".*,\1,p'`;
++  qtopia_ver_pat=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION ".*\..*\.\(.*\)".*,\1,p'`;
++
++  qtopia_ver="$qtopia_ver_maj$qtopia_ver_min$qtopia_ver_pat"
++  qtopia_verstr="$qtopia_ver_maj.$qtopia_ver_min.$qtopia_ver_pat"
++  if test "$qtopia_ver" -lt "$qtopia_minver"; then
++    AC_MSG_ERROR([found Qtopia version $qtopia_verstr but version $qtopia_minverstr
++is required.])
++  fi
++
++  AC_LANG_SAVE
++  AC_LANG_CPLUSPLUS
++
++  ac_cxxflags_safe="$CXXFLAGS"
++  ac_ldflags_safe="$LDFLAGS"
++  ac_libs_safe="$LIBS"
++
++  CXXFLAGS="$CXXFLAGS -I$qtopia_incdir $all_includes"
++  LDFLAGS="$LDFLAGS $QT_LDFLAGS $all_libraries $USER_LDFLAGS $KDE_MT_LDFLAGS"
++  LIBS="$LIBS $LIB_QTOPIA $LIBQT"
++
++  cat > conftest.$ac_ext <<EOF
++#include "confdefs.h"
++#include <qpe/qpeapplication.h>
++#include <qpe/version.h>
++
++int main( int argc, char **argv )
++{
++    QPEApplication app( argc, argv );
++    return 0;
++}
++EOF
++
++  if AC_TRY_EVAL(ac_link) && test -s conftest; then
++    rm -f conftest*
++  else
++    rm -f conftest*
++    AC_MSG_ERROR([Cannot link small Qtopia Application. For more details look at
++the end of config.log])
++  fi
++
++  CXXFLAGS="$ac_cxxflags_safe"
++  LDFLAGS="$ac_ldflags_safe"
++  LIBS="$ac_libs_safe"
++
++  AC_LANG_RESTORE
++
++  QTOPIA_INCLUDES="-I$qtopia_incdir"
++  AC_SUBST(QTOPIA_INCLUDES)
++
++  AC_MSG_RESULT([found version $qtopia_verstr with headers at $qtopia_incdir])
++])
++
+ 
+ # serial 46 AC_PROG_LIBTOOL
+ AC_DEFUN([AC_PROG_LIBTOOL],
+@@ -4119,7 +4765,7 @@
+ dnl
+ 
+ # Only perform the check for file, if the check method requires it
+-case "$deplibs_check_method" in
++case $deplibs_check_method in
+ file_magic*)
+   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+     AC_PATH_MAGIC
+@@ -4154,12 +4800,12 @@
+ 
+ # Some flags need to be propagated to the compiler or linker for good
+ # libtool support.
+-case "$host" in
++case $host in
+ *-*-irix6*)
+   # Find out which ABI we are using.
+   echo '[#]line __oline__ "configure"' > conftest.$ac_ext
+   if AC_TRY_EVAL(ac_compile); then
+-    case "`/usr/bin/file conftest.$ac_objext`" in
++    case `/usr/bin/file conftest.$ac_objext` in
+     *32-bit*)
+       LD="${LD-ld} -32"
+       ;;
+@@ -4203,7 +4849,7 @@
+       DllMain (0, 0, 0);],
+       [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
+ 
+-  case "$host/$CC" in
++  case $host/$CC in
+   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
+     # old mingw systems require "-dll" to link a DLL, while more recent ones
+     # require "-mdll"
+@@ -4239,7 +4885,7 @@
+ <<  --enable-shared[=PKGS]  build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
+ changequote([, ])dnl
+ [p=${PACKAGE-default}
+-case "$enableval" in
++case $enableval in
+ yes) enable_shared=yes ;;
+ no) enable_shared=no ;;
+ *)
+@@ -4272,7 +4918,7 @@
+ <<  --enable-static[=PKGS]  build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
+ changequote([, ])dnl
+ [p=${PACKAGE-default}
+-case "$enableval" in
++case $enableval in
+ yes) enable_static=yes ;;
+ no) enable_static=no ;;
+ *)
+@@ -4307,7 +4953,7 @@
+ <<  --enable-fast-install[=PKGS]  optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
+ changequote([, ])dnl
+ [p=${PACKAGE-default}
+-case "$enableval" in
++case $enableval in
+ yes) enable_fast_install=yes ;;
+ no) enable_fast_install=no ;;
+ *)
+@@ -4343,7 +4989,7 @@
+ AC_DEFUN([AC_PATH_TOOL_PREFIX],
+ [AC_MSG_CHECKING([for $1])
+ AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
+-[case "$MAGIC_CMD" in
++[case $MAGIC_CMD in
+   /*)
+   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+   ;;
+@@ -4362,7 +5008,7 @@
+     if test -f $ac_dir/$1; then
+       lt_cv_path_MAGIC_CMD="$ac_dir/$1"
+       if test -n "$file_magic_test_file"; then
+-	case "$deplibs_check_method" in
++	case $deplibs_check_method in
+ 	"file_magic "*)
+ 	  file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
+ 	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+@@ -4434,12 +5080,10 @@
+   *)
+     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+   esac
+-  case "$ac_prog" in
++  case $ac_prog in
+     # Accept absolute paths.
+-changequote(,)dnl
+-    [\\/]* | [A-Za-z]:[\\/]*)
+-      re_direlt='/[^/][^/]*/\.\./'
+-changequote([,])dnl
++    [[\\/]* | [A-Za-z]:[\\/]*)]
++      re_direlt=['/[^/][^/]*/\.\./']
+       # Canonicalize the path of ld
+       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
+       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+@@ -4531,8 +5175,8 @@
+ # If you have `file' or equivalent on your system and you're not sure
+ # whether `pass_all' will *always* work, you probably want this one.
+ 
+-case "$host_os" in
+-aix4*)
++case $host_os in
++aix*)
+   lt_cv_deplibs_check_method=pass_all
+   ;;
+ 
+@@ -4541,9 +5185,7 @@
+   ;;
+ 
+ bsdi4*)
+-  changequote(,)dnl
+-  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
+-  changequote([, ])dnl
++  lt_cv_deplibs_check_method=['file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)']
+   lt_cv_file_magic_cmd='/usr/bin/file -L'
+   lt_cv_file_magic_test_file=/shlib/libc.so
+   ;;
+@@ -4555,19 +5197,24 @@
+ 
+ darwin* | rhapsody*)
+   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
+-  lt_cv_file_magic_cmd=/usr/bin/file
+-  lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
++  lt_cv_file_magic_cmd='/usr/bin/file -L'
++  case "$host_os" in
++  rhapsody* | darwin1.[012])
++    lt_cv_file_magic_test_file='/System/Library/Frameworks/System.framework/System'
++    ;;
++  *) # Darwin 1.3 on
++    lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
++    ;;
++  esac
+   ;;
+ 
+ freebsd* )
+   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+-    case "$host_cpu" in
++    case $host_cpu in
+     i*86 )
+       # Not sure whether the presence of OpenBSD here was a mistake.
+       # Let's accept both of them until this is cleared up.
+-      changequote(,)dnl
+-      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
+-      changequote([, ])dnl
++      lt_cv_deplibs_check_method=['file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library']
+       lt_cv_file_magic_cmd=/usr/bin/file
+       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+       ;;
+@@ -4582,31 +5229,26 @@
+   ;;
+ 
+ hpux10.20*|hpux11*)
+-  # TODO:  Does this work for hpux-11 too?
+-  changequote(,)dnl
+-  lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
+-  changequote([, ])dnl
++  lt_cv_deplibs_check_method=['file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library']
+   lt_cv_file_magic_cmd=/usr/bin/file
+   lt_cv_file_magic_test_file=/usr/lib/libc.sl
+   ;;
+ 
+ irix5* | irix6*)
+-  case "$host_os" in
++  case $host_os in
+   irix5*)
+     # this will be overridden with pass_all, but let us keep it just in case
+     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
+     ;;
+   *)
+-    case "$LD" in
++    case $LD in
+     *-32|*"-32 ") libmagic=32-bit;;
+     *-n32|*"-n32 ") libmagic=N32;;
+     *-64|*"-64 ") libmagic=64-bit;;
+     *) libmagic=never-match;;
+     esac
+     # this will be overridden with pass_all, but let us keep it just in case
+-    changequote(,)dnl
+-    lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
+-    changequote([, ])dnl
++    lt_cv_deplibs_check_method=["file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"]
+     ;;
+   esac
+   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
+@@ -4615,14 +5257,12 @@
+ 
+ # This must be Linux ELF.
+ linux-gnu*)
+-  case "$host_cpu" in
+-  alpha* | i*86 | powerpc* | sparc* | ia64* | s390* )
++  case $host_cpu in
++  alpha* | i*86 | powerpc* | sparc* | ia64* | s390* | m68k* | arm* | mips* | hppa* | sh* )
+     lt_cv_deplibs_check_method=pass_all ;;
+   *)
+     # glibc up to 2.1.1 does not perform some relocations on ARM
+-    changequote(,)dnl
+-    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
+-    changequote([, ])dnl
++    lt_cv_deplibs_check_method=['file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'] ;;
+   esac
+   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
+   ;;
+@@ -4676,14 +5316,12 @@
+   ;;
+ 
+ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+-  case "$host_vendor" in
++  case $host_vendor in
+   ncr)
+     lt_cv_deplibs_check_method=pass_all
+     ;;
+   motorola)
+-    changequote(,)dnl
+-    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
+-    changequote([, ])dnl
++    lt_cv_deplibs_check_method=['file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]']
+     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+     ;;
+   esac
+@@ -4735,7 +5373,7 @@
+ AC_DEFUN([AC_CHECK_LIBM],
+ [AC_REQUIRE([AC_CANONICAL_HOST])dnl
+ LIBM=
+-case "$host" in
++case $host in
+ *-*-beos* | *-*-cygwin* | *-*-pw32*)
+   # These system don't have libm
+   ;;
+@@ -4761,7 +5399,7 @@
+ # top_srcdir appropriately in the Makefiles.
+ AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
+ [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+-  case "$enable_ltdl_convenience" in
++  case $enable_ltdl_convenience in
+   no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
+   "") enable_ltdl_convenience=yes
+       ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
+@@ -4894,57 +5532,119 @@
+ # some checks are only needed if your package does certain things.
+ # But this isn't really a big deal.
+ 
+-# serial 1
++# serial 5
++
++# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
++# written in clear, in which case automake, when reading aclocal.m4,
++# will think it sees a *use*, and therefore will trigger all it's
++# C support machinery.  Also note that it means that autoscan, seeing
++# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
++
+ 
+-dnl Usage:
+-dnl AM_INIT_AUTOMAKE(package,version, [no-define])
++# We require 2.13 because we rely on SHELL being computed by configure.
++AC_PREREQ([2.13])
+ 
+-AC_DEFUN(AM_INIT_AUTOMAKE,
+-[AC_REQUIRE([AC_PROG_INSTALL])
+-PACKAGE=[$1]
+-AC_SUBST(PACKAGE)
+-VERSION=[$2]
+-AC_SUBST(VERSION)
+-dnl test to see if srcdir already configured
+-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
+-  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
++# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
++# -----------------------------------------------------------
++# If MACRO-NAME is provided do IF-PROVIDED, else IF-NOT-PROVIDED.
++# The purpose of this macro is to provide the user with a means to
++# check macros which are provided without letting her know how the
++# information is coded.
++# If this macro is not defined by Autoconf, define it here.
++ifdef([AC_PROVIDE_IFELSE],
++      [],
++      [define([AC_PROVIDE_IFELSE],
++              [ifdef([AC_PROVIDE_$1],
++                     [$2], [$3])])])
++
++
++# AM_INIT_AUTOMAKE(PACKAGE,VERSION, [NO-DEFINE])
++# ----------------------------------------------
++AC_DEFUN([AM_INIT_AUTOMAKE],
++[AC_REQUIRE([AC_PROG_INSTALL])dnl
++# test to see if srcdir already configured
++if test "`CDPATH=:; cd $srcdir && pwd`" != "`pwd`" &&
++   test -f $srcdir/config.status; then
++  AC_MSG_ERROR([source directory already configured; run \"make distclean\" there first])
+ fi
++
++# Define the identity of the package.
++PACKAGE=$1
++AC_SUBST(PACKAGE)dnl
++VERSION=$2
++AC_SUBST(VERSION)dnl
+ ifelse([$3],,
+-AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+-AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
+-AC_REQUIRE([AM_SANITY_CHECK])
+-AC_REQUIRE([AC_ARG_PROGRAM])
+-dnl FIXME This is truly gross.
+-missing_dir=`cd $ac_aux_dir && pwd`
+-AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
+-AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
+-AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
+-AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
+-AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
+-AC_REQUIRE([AC_PROG_MAKE_SET])])
++[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
++AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])
++
++# Autoconf 2.50 wants to disallow AM_ names.  We explicitly allow
++# the ones we care about.
++ifdef([m4_pattern_allow],
++      [m4_pattern_allow([^AM_[A-Z]+FLAGS])])dnl
++
++# Autoconf 2.50 always computes EXEEXT.  However we need to be
++# compatible with 2.13, for now.  So we always define EXEEXT, but we
++# don't compute it.
++AC_SUBST(EXEEXT)
++# Similar for OBJEXT -- only we only use OBJEXT if the user actually
++# requests that it be used.  This is a bit dumb.
++: ${OBJEXT=o}
++AC_SUBST(OBJEXT)
++
++# Some tools Automake needs.
++AC_REQUIRE([AM_SANITY_CHECK])dnl
++AC_REQUIRE([AC_ARG_PROGRAM])dnl
++AM_MISSING_PROG(ACLOCAL, aclocal)
++AM_MISSING_PROG(AUTOCONF, autoconf)
++AM_MISSING_PROG(AUTOMAKE, automake)
++AM_MISSING_PROG(AUTOHEADER, autoheader)
++AM_MISSING_PROG(MAKEINFO, makeinfo)
++AM_MISSING_PROG(AMTAR, tar)
++AM_PROG_INSTALL_SH
++AM_PROG_INSTALL_STRIP
++# We need awk for the "check" target.  The system "awk" is bad on
++# some platforms.
++AC_REQUIRE([AC_PROG_AWK])dnl
++AC_REQUIRE([AC_PROG_MAKE_SET])dnl
++AC_REQUIRE([AM_DEP_TRACK])dnl
++AC_REQUIRE([AM_SET_DEPDIR])dnl
++AC_PROVIDE_IFELSE([AC_PROG_][CC],
++                  [_AM_DEPENDENCIES(CC)],
++                  [define([AC_PROG_][CC],
++                          defn([AC_PROG_][CC])[_AM_DEPENDENCIES(CC)])])dnl
++AC_PROVIDE_IFELSE([AC_PROG_][CXX],
++                  [_AM_DEPENDENCIES(CXX)],
++                  [define([AC_PROG_][CXX],
++                          defn([AC_PROG_][CXX])[_AM_DEPENDENCIES(CXX)])])dnl
++])
+ 
+ #
+ # Check to make sure that the build environment is sane.
+ #
+ 
+-AC_DEFUN(AM_SANITY_CHECK,
++# serial 3
++
++# AM_SANITY_CHECK
++# ---------------
++AC_DEFUN([AM_SANITY_CHECK],
+ [AC_MSG_CHECKING([whether build environment is sane])
+ # Just in case
+ sleep 1
+-echo timestamp > conftestfile
++echo timestamp > conftest.file
+ # Do `set' in a subshell so we don't clobber the current shell's
+ # arguments.  Must try -L first in case configure is actually a
+ # symlink; some systems play weird games with the mod time of symlinks
+ # (eg FreeBSD returns the mod time of the symlink's containing
+ # directory).
+ if (
+-   set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
+-   if test "[$]*" = "X"; then
++   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
++   if test "$[*]" = "X"; then
+       # -L didn't work.
+-      set X `ls -t $srcdir/configure conftestfile`
++      set X `ls -t $srcdir/configure conftest.file`
+    fi
+-   if test "[$]*" != "X $srcdir/configure conftestfile" \
+-      && test "[$]*" != "X conftestfile $srcdir/configure"; then
++   rm -f conftest.file
++   if test "$[*]" != "X $srcdir/configure conftest.file" \
++      && test "$[*]" != "X conftest.file $srcdir/configure"; then
+ 
+       # If neither matched, then we have a broken ls.  This can happen
+       # if, for instance, CONFIG_SHELL is bash and it inherits a
+@@ -4954,7 +5654,7 @@
+ alias in your environment])
+    fi
+ 
+-   test "[$]2" = conftestfile
++   test "$[2]" = conftest.file
+    )
+ then
+    # Ok.
+@@ -4963,45 +5663,424 @@
+    AC_MSG_ERROR([newly created file is older than distributed files!
+ Check your system clock])
+ fi
+-rm -f conftest*
+ AC_MSG_RESULT(yes)])
+ 
+-dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
+-dnl The program must properly implement --version.
+-AC_DEFUN(AM_MISSING_PROG,
+-[AC_MSG_CHECKING(for working $2)
+-# Run test in a subshell; some versions of sh will print an error if
+-# an executable is not found, even if stderr is redirected.
+-# Redirect stdin to placate older versions of autoconf.  Sigh.
+-if ($2 --version) < /dev/null > /dev/null 2>&1; then
+-   $1=$2
+-   AC_MSG_RESULT(found)
++
++# serial 2
++
++# AM_MISSING_PROG(NAME, PROGRAM)
++# ------------------------------
++AC_DEFUN([AM_MISSING_PROG],
++[AC_REQUIRE([AM_MISSING_HAS_RUN])
++$1=${$1-"${am_missing_run}$2"}
++AC_SUBST($1)])
++
++
++# AM_MISSING_HAS_RUN
++# ------------------
++# Define MISSING if not defined so far and test if it supports --run.
++# If it does, set am_missing_run to use it, otherwise, to nothing.
++AC_DEFUN([AM_MISSING_HAS_RUN],
++[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
++test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
++# Use eval to expand $SHELL
++if eval "$MISSING --run true"; then
++  am_missing_run="$MISSING --run "
++else
++  am_missing_run=
++  am_backtick='`'
++  AC_MSG_WARN([${am_backtick}missing' script is too old or missing])
++fi
++])
++
++# AM_AUX_DIR_EXPAND
++
++# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
++# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
++# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
++#
++# Of course, Automake must honor this variable whenever it calls a
++# tool from the auxiliary directory.  The problem is that $srcdir (and
++# therefore $ac_aux_dir as well) can be either absolute or relative,
++# depending on how configure is run.  This is pretty annoying, since
++# it makes $ac_aux_dir quite unusable in subdirectories: in the top
++# source directory, any form will work fine, but in subdirectories a
++# relative path needs to be adjusted first.
++#
++# $ac_aux_dir/missing
++#    fails when called from a subdirectory if $ac_aux_dir is relative
++# $top_srcdir/$ac_aux_dir/missing
++#    fails if $ac_aux_dir is absolute,
++#    fails when called from a subdirectory in a VPATH build with
++#          a relative $ac_aux_dir
++#
++# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
++# are both prefixed by $srcdir.  In an in-source build this is usually
++# harmless because $srcdir is `.', but things will broke when you
++# start a VPATH build or use an absolute $srcdir.
++#
++# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
++# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
++#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
++# and then we would define $MISSING as
++#   MISSING="\${SHELL} $am_aux_dir/missing"
++# This will work as long as MISSING is not called from configure, because
++# unfortunately $(top_srcdir) has no meaning in configure.
++# However there are other variables, like CC, which are often used in
++# configure, and could therefore not use this "fixed" $ac_aux_dir.
++#
++# Another solution, used here, is to always expand $ac_aux_dir to an
++# absolute PATH.  The drawback is that using absolute paths prevent a
++# configured tree to be moved without reconfiguration.
++
++AC_DEFUN([AM_AUX_DIR_EXPAND], [
++# expand $ac_aux_dir to an absolute path
++am_aux_dir=`CDPATH=:; cd $ac_aux_dir && pwd`
++])
++
++# AM_PROG_INSTALL_SH
++# ------------------
++# Define $install_sh.
++AC_DEFUN([AM_PROG_INSTALL_SH],
++[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
++install_sh=${install_sh-"$am_aux_dir/install-sh"}
++AC_SUBST(install_sh)])
++
++# One issue with vendor `install' (even GNU) is that you can't
++# specify the program used to strip binaries.  This is especially
++# annoying in cross-compiling environments, where the build's strip
++# is unlikely to handle the host's binaries.
++# Fortunately install-sh will honor a STRIPPROG variable, so we
++# always use install-sh in `make install-strip', and initialize
++# STRIPPROG with the value of the STRIP variable (set by the user).
++AC_DEFUN([AM_PROG_INSTALL_STRIP],
++[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
++INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
++AC_SUBST([INSTALL_STRIP_PROGRAM])])
++
++# serial 4						-*- Autoconf -*-
++
++
++
++# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
++# written in clear, in which case automake, when reading aclocal.m4,
++# will think it sees a *use*, and therefore will trigger all it's
++# C support machinery.  Also note that it means that autoscan, seeing
++# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
++
++
++
++# _AM_DEPENDENCIES(NAME)
++# ---------------------
++# See how the compiler implements dependency checking.
++# NAME is "CC", "CXX" or "OBJC".
++# We try a few techniques and use that to set a single cache variable.
++#
++# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
++# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
++# dependency, and given that the user is not expected to run this macro,
++# just rely on AC_PROG_CC.
++AC_DEFUN([_AM_DEPENDENCIES],
++[AC_REQUIRE([AM_SET_DEPDIR])dnl
++AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
++AC_REQUIRE([AM_MAKE_INCLUDE])dnl
++AC_REQUIRE([AM_DEP_TRACK])dnl
++
++ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
++       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
++       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc']
++       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
++                   [depcc="$$1"   am_compiler_list=])
++
++AC_CACHE_CHECK([dependency style of $depcc],
++               [am_cv_$1_dependencies_compiler_type],
++[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
++  # We make a subdir and do the tests there.  Otherwise we can end up
++  # making bogus files that we don't know about and never remove.  For
++  # instance it was reported that on HP-UX the gcc test will end up
++  # making a dummy file named `D' -- because `-MD' means `put the output
++  # in D'.
++  mkdir conftest.dir
++  # Copy depcomp to subdir because otherwise we won't find it if we're
++  # using a relative directory.
++  cp "$am_depcomp" conftest.dir
++  cd conftest.dir
++
++  am_cv_$1_dependencies_compiler_type=none
++  if test "$am_compiler_list" = ""; then
++     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
++  fi
++  for depmode in $am_compiler_list; do
++    # We need to recreate these files for each test, as the compiler may
++    # overwrite some of them when testing with obscure command lines.
++    # This happens at least with the AIX C compiler.
++    echo '#include "conftest.h"' > conftest.c
++    echo 'int i;' > conftest.h
++    echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
++
++    case $depmode in
++    nosideeffect)
++      # after this tag, mechanisms are not by side-effect, so they'll
++      # only be used when explicitly requested
++      if test "x$enable_dependency_tracking" = xyes; then
++	continue
++      else
++	break
++      fi
++      ;;
++    none) break ;;
++    esac
++    # We check with `-c' and `-o' for the sake of the "dashmstdout"
++    # mode.  It turns out that the SunPro C++ compiler does not properly
++    # handle `-M -o', and we need to detect this.
++    if depmode=$depmode \
++       source=conftest.c object=conftest.o \
++       depfile=conftest.Po tmpdepfile=conftest.TPo \
++       $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
++       grep conftest.h conftest.Po > /dev/null 2>&1 &&
++       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
++      am_cv_$1_dependencies_compiler_type=$depmode
++      break
++    fi
++  done
++
++  cd ..
++  rm -rf conftest.dir
+ else
+-   $1="$3/missing $2"
+-   AC_MSG_RESULT(missing)
++  am_cv_$1_dependencies_compiler_type=none
+ fi
+-AC_SUBST($1)])
++])
++$1DEPMODE="depmode=$am_cv_$1_dependencies_compiler_type"
++AC_SUBST([$1DEPMODE])
++])
++
++
++# AM_SET_DEPDIR
++# -------------
++# Choose a directory name for dependency files.
++# This macro is AC_REQUIREd in _AM_DEPENDENCIES
++AC_DEFUN([AM_SET_DEPDIR],
++[rm -f .deps 2>/dev/null
++mkdir .deps 2>/dev/null
++if test -d .deps; then
++  DEPDIR=.deps
++else
++  # MS-DOS does not allow filenames that begin with a dot.
++  DEPDIR=_deps
++fi
++rmdir .deps 2>/dev/null
++AC_SUBST(DEPDIR)
++])
++
++
++# AM_DEP_TRACK
++# ------------
++AC_DEFUN([AM_DEP_TRACK],
++[AC_ARG_ENABLE(dependency-tracking,
++[  --disable-dependency-tracking Speeds up one-time builds
++  --enable-dependency-tracking  Do not reject slow dependency extractors])
++if test "x$enable_dependency_tracking" != xno; then
++  am_depcomp="$ac_aux_dir/depcomp"
++  AMDEPBACKSLASH='\'
++fi
++AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
++pushdef([subst], defn([AC_SUBST]))
++subst(AMDEPBACKSLASH)
++popdef([subst])
++])
++
++# Generate code to set up dependency tracking.
++# This macro should only be invoked once -- use via AC_REQUIRE.
++# Usage:
++# AM_OUTPUT_DEPENDENCY_COMMANDS
++
++#
++# This code is only required when automatic dependency tracking
++# is enabled.  FIXME.  This creates each `.P' file that we will
++# need in order to bootstrap the dependency handling code.
++AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],[
++AC_OUTPUT_COMMANDS([
++test x"$AMDEP_TRUE" != x"" ||
++for mf in $CONFIG_FILES; do
++  case "$mf" in
++  Makefile) dirpart=.;;
++  */Makefile) dirpart=`echo "$mf" | sed -e 's|/[^/]*$||'`;;
++  *) continue;;
++  esac
++  grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue
++  # Extract the definition of DEP_FILES from the Makefile without
++  # running `make'.
++  DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
++  test -z "$DEPDIR" && continue
++  # When using ansi2knr, U may be empty or an underscore; expand it
++  U=`sed -n -e '/^U = / s///p' < "$mf"`
++  test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
++  # We invoke sed twice because it is the simplest approach to
++  # changing $(DEPDIR) to its actual value in the expansion.
++  for file in `sed -n -e '
++    /^DEP_FILES = .*\\\\$/ {
++      s/^DEP_FILES = //
++      :loop
++	s/\\\\$//
++	p
++	n
++	/\\\\$/ b loop
++      p
++    }
++    /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
++       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
++    # Make sure the directory exists.
++    test -f "$dirpart/$file" && continue
++    fdir=`echo "$file" | sed -e 's|/[^/]*$||'`
++    $ac_aux_dir/mkinstalldirs "$dirpart/$fdir" > /dev/null 2>&1
++    # echo "creating $dirpart/$file"
++    echo '# dummy' > "$dirpart/$file"
++  done
++done
++], [AMDEP_TRUE="$AMDEP_TRUE"
++ac_aux_dir="$ac_aux_dir"])])
++
++# AM_MAKE_INCLUDE()
++# -----------------
++# Check to see how make treats includes.
++AC_DEFUN([AM_MAKE_INCLUDE],
++[am_make=${MAKE-make}
++cat > confinc << 'END'
++doit:
++	@echo done
++END
++# If we don't find an include directive, just comment out the code.
++AC_MSG_CHECKING([for style of include used by $am_make])
++am__include='#'
++am__quote=
++_am_result=none
++# First try GNU make style include.
++echo "include confinc" > confmf
++# We grep out `Entering directory' and `Leaving directory'
++# messages which can occur if `w' ends up in MAKEFLAGS.
++# In particular we don't look at `^make:' because GNU make might
++# be invoked under some other name (usually "gmake"), in which
++# case it prints its new name instead of `make'.
++if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then
++   am__include=include
++   am__quote=
++   _am_result=GNU
++fi
++# Now try BSD make style include.
++if test "$am__include" = "#"; then
++   echo '.include "confinc"' > confmf
++   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
++      am__include=.include
++      am__quote='"'
++      _am_result=BSD
++   fi
++fi
++AC_SUBST(am__include)
++AC_SUBST(am__quote)
++AC_MSG_RESULT($_am_result)
++rm -f confinc confmf
++])
++
++# serial 3
++
++# AM_CONDITIONAL(NAME, SHELL-CONDITION)
++# -------------------------------------
++# Define a conditional.
++#
++# FIXME: Once using 2.50, use this:
++# m4_match([$1], [^TRUE\|FALSE$], [AC_FATAL([$0: invalid condition: $1])])dnl
++AC_DEFUN([AM_CONDITIONAL],
++[ifelse([$1], [TRUE],
++        [errprint(__file__:__line__: [$0: invalid condition: $1
++])dnl
++m4exit(1)])dnl
++ifelse([$1], [FALSE],
++       [errprint(__file__:__line__: [$0: invalid condition: $1
++])dnl
++m4exit(1)])dnl
++AC_SUBST([$1_TRUE])
++AC_SUBST([$1_FALSE])
++if $2; then
++  $1_TRUE=
++  $1_FALSE='#'
++else
++  $1_TRUE='#'
++  $1_FALSE=
++fi])
++
++
++# AM_PROG_LEX
++# Look for flex, lex or missing, then run AC_PROG_LEX and AC_DECL_YYTEXT
++AC_DEFUN([AM_PROG_LEX],
++[AC_REQUIRE([AM_MISSING_HAS_RUN])
++AC_CHECK_PROGS(LEX, flex lex, [${am_missing_run}flex])
++AC_PROG_LEX
++AC_DECL_YYTEXT])
+ 
+ # Like AC_CONFIG_HEADER, but automatically create stamp file.
+ 
+-AC_DEFUN(AM_CONFIG_HEADER,
+-[AC_PREREQ([2.12])
+-AC_CONFIG_HEADER([$1])
+-dnl When config.status generates a header, we must update the stamp-h file.
+-dnl This file resides in the same directory as the config header
+-dnl that is generated.  We must strip everything past the first ":",
+-dnl and everything past the last "/".
+-AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
+-ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
+-<<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
+-<<am_indx=1
+-for am_file in <<$1>>; do
+-  case " <<$>>CONFIG_HEADERS " in
+-  *" <<$>>am_file "*<<)>>
+-    echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
++# serial 3
++
++# When config.status generates a header, we must update the stamp-h file.
++# This file resides in the same directory as the config header
++# that is generated.  We must strip everything past the first ":",
++# and everything past the last "/".
++
++AC_PREREQ([2.12])
++
++AC_DEFUN([AM_CONFIG_HEADER],
++[ifdef([AC_FOREACH],dnl
++	 [dnl init our file count if it isn't already
++	 m4_ifndef([_AM_Config_Header_Index], m4_define([_AM_Config_Header_Index], [0]))
++	 dnl prepare to store our destination file list for use in config.status
++	 AC_FOREACH([_AM_File], [$1],
++		    [m4_pushdef([_AM_Dest], m4_patsubst(_AM_File, [:.*]))
++		    m4_define([_AM_Config_Header_Index], m4_incr(_AM_Config_Header_Index))
++		    dnl and add it to the list of files AC keeps track of, along
++		    dnl with our hook
++		    AC_CONFIG_HEADERS(_AM_File,
++dnl COMMANDS, [, INIT-CMDS]
++[# update the timestamp
++echo timestamp >"AS_ESCAPE(_AM_DIRNAME(]_AM_Dest[))/stamp-h]_AM_Config_Header_Index["
++][$2]m4_ifval([$3], [, [$3]]))dnl AC_CONFIG_HEADERS
++		    m4_popdef([_AM_Dest])])],dnl
++[AC_CONFIG_HEADER([$1])
++  AC_OUTPUT_COMMANDS(
++   ifelse(patsubst([$1], [[^ ]], []),
++	  [],
++	  [test -z "$CONFIG_HEADERS" || echo timestamp >dnl
++	   patsubst([$1], [^\([^:]*/\)?.*], [\1])stamp-h]),dnl
++[am_indx=1
++for am_file in $1; do
++  case " \$CONFIG_HEADERS " in
++  *" \$am_file "*)
++    am_dir=\`echo \$am_file |sed 's%:.*%%;s%[^/]*\$%%'\`
++    if test -n "\$am_dir"; then
++      am_tmpdir=\`echo \$am_dir |sed 's%^\(/*\).*\$%\1%'\`
++      for am_subdir in \`echo \$am_dir |sed 's%/% %'\`; do
++        am_tmpdir=\$am_tmpdir\$am_subdir/
++        if test ! -d \$am_tmpdir; then
++          mkdir \$am_tmpdir
++        fi
++      done
++    fi
++    echo timestamp > "\$am_dir"stamp-h\$am_indx
+     ;;
+   esac
+-  am_indx=`expr "<<$>>am_indx" + 1`
+-done<<>>dnl>>)
+-changequote([,]))])
++  am_indx=\`expr \$am_indx + 1\`
++done])
++])]) # AM_CONFIG_HEADER
++
++# _AM_DIRNAME(PATH)
++# -----------------
++# Like AS_DIRNAME, only do it during macro expansion
++AC_DEFUN([_AM_DIRNAME],
++       [m4_if(m4_regexp([$1], [^.*[^/]//*[^/][^/]*/*$]), -1,
++	      m4_if(m4_regexp([$1], [^//\([^/]\|$\)]), -1,
++		    m4_if(m4_regexp([$1], [^/.*]), -1,
++			  [.],
++			  m4_patsubst([$1], [^\(/\).*], [\1])),
++		    m4_patsubst([$1], [^\(//\)\([^/].*\|$\)], [\1])),
++	      m4_patsubst([$1], [^\(.*[^/]\)//*[^/][^/]*/*$], [\1]))[]dnl
++]) # _AM_DIRNAME
+ 
+--- kfocus-1.0.2.orig/configure
++++ kfocus-1.0.2/configure
+@@ -11,18 +11,25 @@
+ ac_help=
+ ac_default_prefix=/usr/local
+ # Any additions from configure.in:
++ac_help="$ac_help
++  --disable-dependency-tracking Speeds up one-time builds
++  --enable-dependency-tracking  Do not reject slow dependency extractors"
+ ac_default_prefix=${KDEDIR:-/usr/local/kde}
+ ac_help="$ac_help
+   --disable-fast-perl     disable fast Makefile generation (needs perl)"
+ ac_help="$ac_help
+-  --enable-debug          enables debug symbols [default=no]"
++  --enable-debug[=ARG]    enables debug symbols (yes|no|full) [default=no]"
+ ac_help="$ac_help
+   --disable-debug         disables debug output and debug symbols [default=no]"
+ ac_help="$ac_help
+   --enable-strict         compiles with strict compiler options (may not work!)"
+ ac_help="$ac_help
++  --enable-warnings         compiles with -Wall and similiar"
++ac_help="$ac_help
+   --enable-profile        creates profiling infos [default=no]"
+ ac_help="$ac_help
++  --enable-pch            enables precompiled header support (currently only KCC) [default=no]"
++ac_help="$ac_help
+   --enable-final          build size optimized apps (experimental - needs lots of memory)"
+ ac_help="$ac_help
+   --disable-closure       don't delay template instantiation"
+@@ -39,7 +46,17 @@
+ ac_help="$ac_help
+   --with-pic              try to use only PIC/non-PIC objects [default=use both]"
+ ac_help="$ac_help
+-  --enable-mt             link to threaded Qt (experimental)"
++  --enable-embedded       link to Qt-embedded, don't use X"
++ac_help="$ac_help
++  --enable-qtopia       link to Qt-embedded, link to the Qtopia Environment"
++ac_help="$ac_help
++  --with-xinerama         enable support for Xinerama "
++ac_help="$ac_help
++  --disable-mt            link to non-threaded Qt (deprecated)"
++ac_help="$ac_help
++  --enable-kernel-threads Enable the use of the LinuxThreads port on FreeBSD/i386 only."
++ac_help="$ac_help
++  --disable-threading     disables threading even if libpthread found "
+ ac_help="$ac_help
+   --with-extra-includes=DIR
+                           adds non standard include paths"
+@@ -585,6 +602,8 @@
+ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
+ 
+ 
++unset CDPATH
++
+ 
+ # Do some error checking and defaulting for the host and target type.
+ # The inputs are:
+@@ -613,7 +632,7 @@
+ fi
+ 
+ echo $ac_n "checking host system type""... $ac_c" 1>&6
+-echo "configure:617: checking host system type" >&5
++echo "configure:636: checking host system type" >&5
+ 
+ host_alias=$host
+ case "$host_alias" in
+@@ -634,7 +653,7 @@
+ echo "$ac_t""$host" 1>&6
+ 
+ echo $ac_n "checking target system type""... $ac_c" 1>&6
+-echo "configure:638: checking target system type" >&5
++echo "configure:657: checking target system type" >&5
+ 
+ target_alias=$target
+ case "$target_alias" in
+@@ -652,7 +671,7 @@
+ echo "$ac_t""$target" 1>&6
+ 
+ echo $ac_n "checking build system type""... $ac_c" 1>&6
+-echo "configure:656: checking build system type" >&5
++echo "configure:675: checking build system type" >&5
+ 
+ build_alias=$build
+ case "$build_alias" in
+@@ -695,6 +714,10 @@
+ 
+ 
+ 
++# expand $ac_aux_dir to an absolute path
++am_aux_dir=`CDPATH=:; cd $ac_aux_dir && pwd`
++
++
+     
+           test -n "$INSTALL" && kde_save_INSTALL_given=$INSTALL
+   test -n "$INSTALL_PROGRAM" && kde_save_INSTALL_PROGRAM_given=$INSTALL_PROGRAM
+@@ -711,7 +734,7 @@
+ # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+ # ./install, which can be erroneously created by make from ./install.sh.
+ echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
+-echo "configure:715: checking for a BSD compatible install" >&5
++echo "configure:738: checking for a BSD compatible install" >&5
+ if test -z "$INSTALL"; then
+ if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+@@ -768,7 +791,7 @@
+     # OK, user hasn't given any INSTALL, autoconf found one for us
+     # now we test, if it supports the -p flag
+     echo $ac_n "checking for -p flag to install""... $ac_c" 1>&6
+-echo "configure:772: checking for -p flag to install" >&5
++echo "configure:795: checking for -p flag to install" >&5
+     rm -f confinst.$$.* > /dev/null 2>&1
+     echo "Testtest" > confinst.$$.orig
+     ac_res=no
+@@ -791,23 +814,24 @@
+   fi
+ 
+ echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
+-echo "configure:795: checking whether build environment is sane" >&5
++echo "configure:818: checking whether build environment is sane" >&5
+ # Just in case
+ sleep 1
+-echo timestamp > conftestfile
++echo timestamp > conftest.file
+ # Do `set' in a subshell so we don't clobber the current shell's
+ # arguments.  Must try -L first in case configure is actually a
+ # symlink; some systems play weird games with the mod time of symlinks
+ # (eg FreeBSD returns the mod time of the symlink's containing
+ # directory).
+ if (
+-   set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
++   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+    if test "$*" = "X"; then
+       # -L didn't work.
+-      set X `ls -t $srcdir/configure conftestfile`
++      set X `ls -t $srcdir/configure conftest.file`
+    fi
+-   if test "$*" != "X $srcdir/configure conftestfile" \
+-      && test "$*" != "X conftestfile $srcdir/configure"; then
++   rm -f conftest.file
++   if test "$*" != "X $srcdir/configure conftest.file" \
++      && test "$*" != "X conftest.file $srcdir/configure"; then
+ 
+       # If neither matched, then we have a broken ls.  This can happen
+       # if, for instance, CONFIG_SHELL is bash and it inherits a
+@@ -817,7 +841,7 @@
+ alias in your environment" 1>&2; exit 1; }
+    fi
+ 
+-   test "$2" = conftestfile
++   test "$2" = conftest.file
+    )
+ then
+    # Ok.
+@@ -826,10 +850,53 @@
+    { echo "configure: error: newly created file is older than distributed files!
+ Check your system clock" 1>&2; exit 1; }
+ fi
+-rm -f conftest*
+ echo "$ac_t""yes" 1>&6
++test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
++# Use eval to expand $SHELL
++if eval "$MISSING --run true"; then
++  am_missing_run="$MISSING --run "
++else
++  am_missing_run=
++  am_backtick='`'
++  echo "configure: warning: ${am_backtick}missing' script is too old or missing" 1>&2
++fi
++
++for ac_prog in mawk gawk nawk awk
++do
++# Extract the first word of "$ac_prog", so it can be a program name with args.
++set dummy $ac_prog; ac_word=$2
++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
++echo "configure:870: checking for $ac_word" >&5
++if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
++  echo $ac_n "(cached) $ac_c" 1>&6
++else
++  if test -n "$AWK"; then
++  ac_cv_prog_AWK="$AWK" # Let the user override the test.
++else
++  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
++  ac_dummy="$PATH"
++  for ac_dir in $ac_dummy; do
++    test -z "$ac_dir" && ac_dir=.
++    if test -f $ac_dir/$ac_word; then
++      ac_cv_prog_AWK="$ac_prog"
++      break
++    fi
++  done
++  IFS="$ac_save_ifs"
++fi
++fi
++AWK="$ac_cv_prog_AWK"
++if test -n "$AWK"; then
++  echo "$ac_t""$AWK" 1>&6
++else
++  echo "$ac_t""no" 1>&6
++fi
++
++test -n "$AWK" && break
++done
++
+ echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
+-echo "configure:833: checking whether ${MAKE-make} sets \${MAKE}" >&5
++echo "configure:900: checking whether ${MAKE-make} sets \${MAKE}" >&5
+ set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
+ if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+@@ -855,14 +922,49 @@
+   SET_MAKE="MAKE=${MAKE-make}"
+ fi
+ 
++# Check whether --enable-dependency-tracking or --disable-dependency-tracking was given.
++if test "${enable_dependency_tracking+set}" = set; then
++  enableval="$enable_dependency_tracking"
++  :
++fi
++
++if test "x$enable_dependency_tracking" != xno; then
++  am_depcomp="$ac_aux_dir/depcomp"
++  AMDEPBACKSLASH='\'
++fi
++
++
++if test "x$enable_dependency_tracking" != xno; then
++  AMDEP_TRUE=
++  AMDEP_FALSE='#'
++else
++  AMDEP_TRUE='#'
++  AMDEP_FALSE=
++fi
++
++
+ 
+-PACKAGE=kfocus
+ 
+-VERSION=1.0.2
++rm -f .deps 2>/dev/null
++mkdir .deps 2>/dev/null
++if test -d .deps; then
++  DEPDIR=.deps
++else
++  # MS-DOS does not allow filenames that begin with a dot.
++  DEPDIR=_deps
++fi
++rmdir .deps 2>/dev/null
+ 
+-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
+-  { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
++
++# test to see if srcdir already configured
++if test "`CDPATH=:; cd $srcdir && pwd`" != "`pwd`" &&
++   test -f $srcdir/config.status; then
++  { echo "configure: error: source directory already configured; run \"make distclean\" there first" 1>&2; exit 1; }
+ fi
++
++# Define the identity of the package.
++PACKAGE=kfocus
++VERSION=1.1.0
+ cat >> confdefs.h <<EOF
+ #define PACKAGE "$PACKAGE"
+ EOF
+@@ -872,73 +974,43 @@
+ EOF
+ 
+ 
++# Autoconf 2.50 wants to disallow AM_ names.  We explicitly allow
++# the ones we care about.
++
++# Autoconf 2.50 always computes EXEEXT.  However we need to be
++# compatible with 2.13, for now.  So we always define EXEEXT, but we
++# don't compute it.
++
++# Similar for OBJEXT -- only we only use OBJEXT if the user actually
++# requests that it be used.  This is a bit dumb.
++: ${OBJEXT=o}
++
++
++# Some tools Automake needs.
++
++ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal"}
++
++
++AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
++
++
++AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake"}
+ 
+-missing_dir=`cd $ac_aux_dir && pwd`
+-echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
+-echo "configure:879: checking for working aclocal" >&5
+-# Run test in a subshell; some versions of sh will print an error if
+-# an executable is not found, even if stderr is redirected.
+-# Redirect stdin to placate older versions of autoconf.  Sigh.
+-if (aclocal --version) < /dev/null > /dev/null 2>&1; then
+-   ACLOCAL=aclocal
+-   echo "$ac_t""found" 1>&6
+-else
+-   ACLOCAL="$missing_dir/missing aclocal"
+-   echo "$ac_t""missing" 1>&6
+-fi
+-
+-echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
+-echo "configure:892: checking for working autoconf" >&5
+-# Run test in a subshell; some versions of sh will print an error if
+-# an executable is not found, even if stderr is redirected.
+-# Redirect stdin to placate older versions of autoconf.  Sigh.
+-if (autoconf --version) < /dev/null > /dev/null 2>&1; then
+-   AUTOCONF=autoconf
+-   echo "$ac_t""found" 1>&6
+-else
+-   AUTOCONF="$missing_dir/missing autoconf"
+-   echo "$ac_t""missing" 1>&6
+-fi
+-
+-echo $ac_n "checking for working automake""... $ac_c" 1>&6
+-echo "configure:905: checking for working automake" >&5
+-# Run test in a subshell; some versions of sh will print an error if
+-# an executable is not found, even if stderr is redirected.
+-# Redirect stdin to placate older versions of autoconf.  Sigh.
+-if (automake --version) < /dev/null > /dev/null 2>&1; then
+-   AUTOMAKE=automake
+-   echo "$ac_t""found" 1>&6
+-else
+-   AUTOMAKE="$missing_dir/missing automake"
+-   echo "$ac_t""missing" 1>&6
+-fi
+-
+-echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
+-echo "configure:918: checking for working autoheader" >&5
+-# Run test in a subshell; some versions of sh will print an error if
+-# an executable is not found, even if stderr is redirected.
+-# Redirect stdin to placate older versions of autoconf.  Sigh.
+-if (autoheader --version) < /dev/null > /dev/null 2>&1; then
+-   AUTOHEADER=autoheader
+-   echo "$ac_t""found" 1>&6
+-else
+-   AUTOHEADER="$missing_dir/missing autoheader"
+-   echo "$ac_t""missing" 1>&6
+-fi
+-
+-echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
+-echo "configure:931: checking for working makeinfo" >&5
+-# Run test in a subshell; some versions of sh will print an error if
+-# an executable is not found, even if stderr is redirected.
+-# Redirect stdin to placate older versions of autoconf.  Sigh.
+-if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
+-   MAKEINFO=makeinfo
+-   echo "$ac_t""found" 1>&6
+-else
+-   MAKEINFO="$missing_dir/missing makeinfo"
+-   echo "$ac_t""missing" 1>&6
+-fi
+ 
++AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
++
++
++MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
++
++
++AMTAR=${AMTAR-"${am_missing_run}tar"}
++
++install_sh=${install_sh-"$am_aux_dir/install-sh"}
++
++INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
++
++# We need awk for the "check" target.  The system "awk" is bad on
++# some platforms.
+  
+ 
+   unset CDPATH
+@@ -974,32 +1046,74 @@
+ 
+ 
+ 
+-
++  
+  
+ 
+-    
+-  
+-  
+-  
++
++am_make=${MAKE-make}
++cat > confinc << 'END'
++doit:
++	@echo done
++END
++# If we don't find an include directive, just comment out the code.
++echo $ac_n "checking for style of include used by $am_make""... $ac_c" 1>&6
++echo "configure:1061: checking for style of include used by $am_make" >&5
++am__include='#'
++am__quote=
++_am_result=none
++# First try GNU make style include.
++echo "include confinc" > confmf
++# We grep out `Entering directory' and `Leaving directory'
++# messages which can occur if `w' ends up in MAKEFLAGS.
++# In particular we don't look at `^make:' because GNU make might
++# be invoked under some other name (usually "gmake"), in which
++# case it prints its new name instead of `make'.
++if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then
++   am__include=include
++   am__quote=
++   _am_result=GNU
++fi
++# Now try BSD make style include.
++if test "$am__include" = "#"; then
++   echo '.include "confinc"' > confmf
++   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
++      am__include=.include
++      am__quote='"'
++      _am_result=BSD
++   fi
++fi
++
++
++echo "$ac_t""$_am_result" 1>&6
++rm -f confinc confmf
++
+ 
+   # Check whether --enable-debug or --disable-debug was given.
+ if test "${enable_debug+set}" = set; then
+   enableval="$enable_debug"
+   
+-   if test $enableval = "no";      then
+-       kde_use_debug_code="no"
+-       kde_use_debug_define=yes
+-     else
+-       kde_use_debug_code="yes"
+-       kde_use_debug_define=no
+-   fi
++    case $enableval in
++      yes)
++        kde_use_debug_code="yes"
++        kde_use_debug_define=no
++        ;;
++      full)
++        kde_use_debug_code="full"
++        kde_use_debug_define=no
++        ;;
++      *)
++        kde_use_debug_code="no"
++        kde_use_debug_define=yes
++        ;;
++    esac
+   
+ else
+   kde_use_debug_code="no"
+       kde_use_debug_define=no
+-    
++  
+ fi
+ 
++
+     # Check whether --enable-dummyoption or --disable-dummyoption was given.
+ if test "${enable_dummyoption+set}" = set; then
+   enableval="$enable_dummyoption"
+@@ -1022,6 +1136,25 @@
+ fi
+ 
+ 
++  # Check whether --enable-warnings or --disable-warnings was given.
++if test "${enable_warnings+set}" = set; then
++  enableval="$enable_warnings"
++  
++    if test $enableval = "no"; then
++         kde_use_warnings="no"
++       else
++         kde_use_warnings="yes"
++    fi
++   
++else
++  kde_use_warnings="no"
++fi
++
++
++    if test "$kde_use_debug_code" != "no"; then
++    kde_use_warnings=yes
++  fi
++
+   # Check whether --enable-profile or --disable-profile was given.
+ if test "${enable_profile+set}" = set; then
+   enableval="$enable_profile"
+@@ -1032,14 +1165,12 @@
+ fi
+ 
+ 
+-  echo $ac_n "checking for a C-Compiler""... $ac_c" 1>&6
+-echo "configure:1037: checking for a C-Compiler" >&5
+-    echo "$ac_t""$CC" 1>&6
++    CFLAGS=" $CFLAGS"
+ 
+-  if test -z "$CC"; then # Extract the first word of "gcc", so it can be a program name with args.
++  # Extract the first word of "gcc", so it can be a program name with args.
+ set dummy gcc; ac_word=$2
+ echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+-echo "configure:1043: checking for $ac_word" >&5
++echo "configure:1174: checking for $ac_word" >&5
+ if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+@@ -1064,11 +1195,12 @@
+ else
+   echo "$ac_t""no" 1>&6
+ fi
+- fi
+-  if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args.
++
++if test -z "$CC"; then
++  # Extract the first word of "cc", so it can be a program name with args.
+ set dummy cc; ac_word=$2
+ echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+-echo "configure:1072: checking for $ac_word" >&5
++echo "configure:1204: checking for $ac_word" >&5
+ if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+@@ -1112,11 +1244,14 @@
+ else
+   echo "$ac_t""no" 1>&6
+ fi
+- fi
+-  if test -z "$CC"; then # Extract the first word of "xlc", so it can be a program name with args.
+-set dummy xlc; ac_word=$2
++
++  if test -z "$CC"; then
++    case "`uname -s`" in
++    *win32* | *WIN32*)
++      # Extract the first word of "cl", so it can be a program name with args.
++set dummy cl; ac_word=$2
+ echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+-echo "configure:1120: checking for $ac_word" >&5
++echo "configure:1255: checking for $ac_word" >&5
+ if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+@@ -1128,7 +1263,7 @@
+   for ac_dir in $ac_dummy; do
+     test -z "$ac_dir" && ac_dir=.
+     if test -f $ac_dir/$ac_word; then
+-      ac_cv_prog_CC="xlc"
++      ac_cv_prog_CC="cl"
+       break
+     fi
+   done
+@@ -1141,11 +1276,14 @@
+ else
+   echo "$ac_t""no" 1>&6
+ fi
+- fi
++ ;;
++    esac
++  fi
+   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
++fi
+ 
+-  echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
+-echo "configure:1149: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
++echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
++echo "configure:1287: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+ 
+ ac_ext=c
+ # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+@@ -1156,12 +1294,12 @@
+ 
+ cat > conftest.$ac_ext << EOF
+ 
+-#line 1160 "configure"
++#line 1298 "configure"
+ #include "confdefs.h"
+ 
+ main(){return(0);}
+ EOF
+-if { (eval echo configure:1165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:1303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   ac_cv_prog_cc_works=yes
+   # If we can't run a trivial program, we are probably using a cross compiler.
+   if (./conftest; exit) 2>/dev/null; then
+@@ -1187,12 +1325,12 @@
+   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
+ fi
+ echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
+-echo "configure:1191: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
++echo "configure:1329: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+ echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
+ cross_compiling=$ac_cv_prog_cc_cross
+ 
+-  echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
+-echo "configure:1196: checking whether we are using GNU C" >&5
++echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
++echo "configure:1334: checking whether we are using GNU C" >&5
+ if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+@@ -1201,7 +1339,7 @@
+   yes;
+ #endif
+ EOF
+-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1205: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
++if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1343: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+   ac_cv_prog_gcc=yes
+ else
+   ac_cv_prog_gcc=no
+@@ -1210,19 +1348,17 @@
+ 
+ echo "$ac_t""$ac_cv_prog_gcc" 1>&6
+ 
+-  if test $ac_cv_prog_gcc = yes; then
+-    GCC=yes
+-  else
+-    GCC=
+-  fi
+-
+-  USER_CFLAGS=$CFLAGS
+-  CFLAGS=
++if test $ac_cv_prog_gcc = yes; then
++  GCC=yes
++else
++  GCC=
++fi
+ 
+-  if test -z "$CFLAGS"; then
+-    if test "$kde_use_debug_code" = "yes"; then
+-      echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
+-echo "configure:1226: checking whether ${CC-cc} accepts -g" >&5
++ac_test_CFLAGS="${CFLAGS+set}"
++ac_save_CFLAGS="$CFLAGS"
++CFLAGS=
++echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
++echo "configure:1362: checking whether ${CC-cc} accepts -g" >&5
+ if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+@@ -1237,95 +1373,115 @@
+ fi
+ 
+ echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
+-      if test $ac_cv_prog_cc_g = yes; then
+-	CFLAGS="-g"
+-	case $host in
+-   	*-*-linux-gnu)	
+-           CFLAGS="$CFLAGS -ansi -W -Wall -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE -D_BSD_SOURCE"
+-         ;;
+-        esac
+-      fi
+-    else
+-      if test "$GCC" = "yes"; then
+-        CFLAGS="-O2"
+-      else
+-        CFLAGS=""
+-      fi
+-      if test "$kde_use_debug_define" = "yes"; then
+-        CFLAGS="$CFLAGS -DNDEBUG"
+-		    			      fi
+-    fi
+-
+-    if test "$kde_use_profiling" = yes; then
+-       echo $ac_n "checking whether ${CC-cc} accepts -pg""... $ac_c" 1>&6
+-echo "configure:1262: checking whether ${CC-cc} accepts -pg" >&5
+-if eval "test \"`echo '$''{'kde_cv_prog_cc_pg'+set}'`\" = set"; then
+-  echo $ac_n "(cached) $ac_c" 1>&6
++if test "$ac_test_CFLAGS" = set; then
++  CFLAGS="$ac_save_CFLAGS"
++elif test $ac_cv_prog_cc_g = yes; then
++  if test "$GCC" = yes; then
++    CFLAGS="-g -O2"
++  else
++    CFLAGS="-g"
++  fi
+ else
+-  echo 'void f(){}' > conftest.c
+-   if test -z "`${CC-cc} -pg -c conftest.c 2>&1`"; then
+-     kde_cv_prog_cc_pg=yes
+-   else
+-     kde_cv_prog_cc_pg=no
+-   fi
+-   rm -f conftest*
+-
++  if test "$GCC" = yes; then
++    CFLAGS="-O2"
++  else
++    CFLAGS=
++  fi
+ fi
+ 
+-echo "$ac_t""$kde_cv_prog_cc_pg" 1>&6
+-      if test "$kde_cv_prog_cc_pg" = yes; then
+-        CFLAGS="$CFLAGS -pg"
+-      fi
+-    fi
+-
+-    if test "$GCC" = "yes"; then
+-     CFLAGS="$CFLAGS"
++depcc="$CC"   am_compiler_list=
+ 
+-     if test "$kde_use_strict_options" = "yes"; then
+-	CFLAGS="$CFLAGS -W -Wall -ansi -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings"
+-     fi
++echo $ac_n "checking dependency style of $depcc""... $ac_c" 1>&6
++echo "configure:1396: checking dependency style of $depcc" >&5
++if eval "test \"`echo '$''{'am_cv_CC_dependencies_compiler_type'+set}'`\" = set"; then
++  echo $ac_n "(cached) $ac_c" 1>&6
++else
++  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
++  # We make a subdir and do the tests there.  Otherwise we can end up
++  # making bogus files that we don't know about and never remove.  For
++  # instance it was reported that on HP-UX the gcc test will end up
++  # making a dummy file named `D' -- because `-MD' means `put the output
++  # in D'.
++  mkdir conftest.dir
++  # Copy depcomp to subdir because otherwise we won't find it if we're
++  # using a relative directory.
++  cp "$am_depcomp" conftest.dir
++  cd conftest.dir
++
++  am_cv_CC_dependencies_compiler_type=none
++  if test "$am_compiler_list" = ""; then
++     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
++  fi
++  for depmode in $am_compiler_list; do
++    # We need to recreate these files for each test, as the compiler may
++    # overwrite some of them when testing with obscure command lines.
++    # This happens at least with the AIX C compiler.
++    echo '#include "conftest.h"' > conftest.c
++    echo 'int i;' > conftest.h
++    echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
++
++    case $depmode in
++    nosideeffect)
++      # after this tag, mechanisms are not by side-effect, so they'll
++      # only be used when explicitly requested
++      if test "x$enable_dependency_tracking" = xyes; then
++	continue
++      else
++	break
++      fi
++      ;;
++    none) break ;;
++    esac
++    # We check with `-c' and `-o' for the sake of the "dashmstdout"
++    # mode.  It turns out that the SunPro C++ compiler does not properly
++    # handle `-M -o', and we need to detect this.
++    if depmode=$depmode \
++       source=conftest.c object=conftest.o \
++       depfile=conftest.Po tmpdepfile=conftest.TPo \
++       $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
++       grep conftest.h conftest.Po > /dev/null 2>&1 &&
++       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
++      am_cv_CC_dependencies_compiler_type=$depmode
++      break
+     fi
++  done
+ 
+-  fi
+-
+-  case "$host" in
+-  *-*-sysv4.2uw*) CFLAGS="$CFLAGS -D_UNIXWARE";;
+-  *-*-sysv5uw7*) CFLAGS="$CFLAGS -D_UNIXWARE7";;
+-  esac
+-
+-  if test -n "$USER_CFLAGS"; then
+-    CFLAGS="$CFLAGS $USER_CFLAGS"
+-  fi
++  cd ..
++  rm -rf conftest.dir
++else
++  am_cv_CC_dependencies_compiler_type=none
++fi
+ 
+-  if test -z "$LDFLAGS" && test "$kde_use_debug_code" = "no" && test "$GCC" = "yes"; then
+-     LDFLAGS=""
+-  fi
++fi
+ 
++echo "$ac_t""$am_cv_CC_dependencies_compiler_type" 1>&6
++CCDEPMODE="depmode=$am_cv_CC_dependencies_compiler_type"
+ 
++ 
+ 
+   echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
+-echo "configure:1308: checking how to run the C preprocessor" >&5
+-  # On Suns, sometimes $CPP names a directory.
+-  if test -n "$CPP" && test -d "$CPP"; then
+-    CPP=
+-  fi
+-  if test -z "$CPP"; then
+-  if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
++echo "configure:1464: checking how to run the C preprocessor" >&5
++# On Suns, sometimes $CPP names a directory.
++if test -n "$CPP" && test -d "$CPP"; then
++  CPP=
++fi
++if test -z "$CPP"; then
++if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+     # This must be in double quotes, not single quotes, because CPP may get
+-    # substituted into the Makefile and "${CC-cc}" will confuse make.
+-    CPP="${CC-cc} -E"
+-    # On the NeXT, cc -E runs the code through the compiler's parser,
+-    # not just through cpp.
+-            cat > conftest.$ac_ext <<EOF
+-#line 1323 "configure"
++  # substituted into the Makefile and "${CC-cc}" will confuse make.
++  CPP="${CC-cc} -E"
++  # On the NeXT, cc -E runs the code through the compiler's parser,
++  # not just through cpp.
++  cat > conftest.$ac_ext <<EOF
++#line 1479 "configure"
+ #include "confdefs.h"
+ #include <assert.h>
+-    Syntax Error
++Syntax Error
+ EOF
+ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+-{ (eval echo configure:1329: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++{ (eval echo configure:1485: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+ if test -z "$ac_err"; then
+   :
+@@ -1335,14 +1491,31 @@
+   cat conftest.$ac_ext >&5
+   rm -rf conftest*
+   CPP="${CC-cc} -E -traditional-cpp"
+-    cat > conftest.$ac_ext <<EOF
+-#line 1340 "configure"
++  cat > conftest.$ac_ext <<EOF
++#line 1496 "configure"
++#include "confdefs.h"
++#include <assert.h>
++Syntax Error
++EOF
++ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
++{ (eval echo configure:1502: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
++if test -z "$ac_err"; then
++  :
++else
++  echo "$ac_err" >&5
++  echo "configure: failed program was:" >&5
++  cat conftest.$ac_ext >&5
++  rm -rf conftest*
++  CPP="${CC-cc} -nologo -E"
++  cat > conftest.$ac_ext <<EOF
++#line 1513 "configure"
+ #include "confdefs.h"
+ #include <assert.h>
+-    Syntax Error
++Syntax Error
+ EOF
+ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+-{ (eval echo configure:1346: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++{ (eval echo configure:1519: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+ if test -z "$ac_err"; then
+   :
+@@ -1356,23 +1529,51 @@
+ rm -f conftest*
+ fi
+ rm -f conftest*
+-    ac_cv_prog_CPP="$CPP"
+ fi
+-    CPP="$ac_cv_prog_CPP"
+-  else
+-    ac_cv_prog_CPP="$CPP"
++rm -f conftest*
++  ac_cv_prog_CPP="$CPP"
++fi
++  CPP="$ac_cv_prog_CPP"
++else
++  ac_cv_prog_CPP="$CPP"
++fi
++echo "$ac_t""$CPP" 1>&6
++
++
++  if test "$GCC" = "yes"; then
++    if test "$kde_use_debug_code" != "no"; then
++      if test $kde_use_debug_code = "full"; then
++        CFLAGS="-g3 $CFLAGS"
++      else
++        CFLAGS="-g -O2 $CFLAGS"
++      fi
++    else
++      CFLAGS="-O2 $CFLAGS"
++    fi
++  fi
++
++  if test "$kde_use_debug_define" = "yes"; then
++    CFLAGS="-DNDEBUG $CFLAGS"
+   fi
+-  echo "$ac_t""$CPP" 1>&6
+-  
+ 
+-  echo $ac_n "checking for a C++-Compiler""... $ac_c" 1>&6
+-echo "configure:1370: checking for a C++-Compiler" >&5
+-    echo "$ac_t""$CXX" 1>&6
+ 
+-  if test -z "$CXX"; then # Extract the first word of "g++", so it can be a program name with args.
+-set dummy g++; ac_word=$2
++  case "$host" in
++  *-*-sysv4.2uw*) CFLAGS="-D_UNIXWARE $CFLAGS";;
++  *-*-sysv5uw7*) CFLAGS="-D_UNIXWARE7 $CFLAGS";;
++  esac
++
++  if test -z "$LDFLAGS" && test "$kde_use_debug_code" = "no" && test "$GCC" = "yes"; then
++     LDFLAGS=""
++  fi
++
++  CXXFLAGS=" $CXXFLAGS"
++
++  for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
++do
++# Extract the first word of "$ac_prog", so it can be a program name with args.
++set dummy $ac_prog; ac_word=$2
+ echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+-echo "configure:1376: checking for $ac_word" >&5
++echo "configure:1577: checking for $ac_word" >&5
+ if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+@@ -1384,7 +1585,7 @@
+   for ac_dir in $ac_dummy; do
+     test -z "$ac_dir" && ac_dir=.
+     if test -f $ac_dir/$ac_word; then
+-      ac_cv_prog_CXX="g++"
++      ac_cv_prog_CXX="$ac_prog"
+       break
+     fi
+   done
+@@ -1397,130 +1598,46 @@
+ else
+   echo "$ac_t""no" 1>&6
+ fi
+- fi
+-  if test -z "$CXX"; then # Extract the first word of "CC", so it can be a program name with args.
+-set dummy CC; ac_word=$2
+-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+-echo "configure:1405: checking for $ac_word" >&5
+-if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
+-  echo $ac_n "(cached) $ac_c" 1>&6
+-else
+-  if test -n "$CXX"; then
+-  ac_cv_prog_CXX="$CXX" # Let the user override the test.
++
++test -n "$CXX" && break
++done
++test -n "$CXX" || CXX="gcc"
++
++
++echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
++echo "configure:1609: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
++
++
++ac_ext=C
++# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
++ac_cpp='$CXXCPP $CPPFLAGS'
++ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
++ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
++cross_compiling=$ac_cv_prog_cxx_cross
++
++ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
++
++
++
++cat > conftest.$ac_ext << EOF
++
++#line 1625 "configure"
++#include "confdefs.h"
++
++int main(){return(0);}
++EOF
++if { (eval echo configure:1630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++  ac_cv_prog_cxx_works=yes
++  # If we can't run a trivial program, we are probably using a cross compiler.
++  if (./conftest; exit) 2>/dev/null; then
++    ac_cv_prog_cxx_cross=no
++  else
++    ac_cv_prog_cxx_cross=yes
++  fi
+ else
+-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+-  ac_dummy="$PATH"
+-  for ac_dir in $ac_dummy; do
+-    test -z "$ac_dir" && ac_dir=.
+-    if test -f $ac_dir/$ac_word; then
+-      ac_cv_prog_CXX="CC"
+-      break
+-    fi
+-  done
+-  IFS="$ac_save_ifs"
+-fi
+-fi
+-CXX="$ac_cv_prog_CXX"
+-if test -n "$CXX"; then
+-  echo "$ac_t""$CXX" 1>&6
+-else
+-  echo "$ac_t""no" 1>&6
+-fi
+- fi
+-  if test -z "$CXX"; then # Extract the first word of "xlC", so it can be a program name with args.
+-set dummy xlC; ac_word=$2
+-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+-echo "configure:1434: checking for $ac_word" >&5
+-if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
+-  echo $ac_n "(cached) $ac_c" 1>&6
+-else
+-  if test -n "$CXX"; then
+-  ac_cv_prog_CXX="$CXX" # Let the user override the test.
+-else
+-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+-  ac_dummy="$PATH"
+-  for ac_dir in $ac_dummy; do
+-    test -z "$ac_dir" && ac_dir=.
+-    if test -f $ac_dir/$ac_word; then
+-      ac_cv_prog_CXX="xlC"
+-      break
+-    fi
+-  done
+-  IFS="$ac_save_ifs"
+-fi
+-fi
+-CXX="$ac_cv_prog_CXX"
+-if test -n "$CXX"; then
+-  echo "$ac_t""$CXX" 1>&6
+-else
+-  echo "$ac_t""no" 1>&6
+-fi
+- fi
+-  if test -z "$CXX"; then # Extract the first word of "DCC", so it can be a program name with args.
+-set dummy DCC; ac_word=$2
+-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+-echo "configure:1463: checking for $ac_word" >&5
+-if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
+-  echo $ac_n "(cached) $ac_c" 1>&6
+-else
+-  if test -n "$CXX"; then
+-  ac_cv_prog_CXX="$CXX" # Let the user override the test.
+-else
+-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+-  ac_dummy="$PATH"
+-  for ac_dir in $ac_dummy; do
+-    test -z "$ac_dir" && ac_dir=.
+-    if test -f $ac_dir/$ac_word; then
+-      ac_cv_prog_CXX="DCC"
+-      break
+-    fi
+-  done
+-  IFS="$ac_save_ifs"
+-fi
+-fi
+-CXX="$ac_cv_prog_CXX"
+-if test -n "$CXX"; then
+-  echo "$ac_t""$CXX" 1>&6
+-else
+-  echo "$ac_t""no" 1>&6
+-fi
+- fi
+-  test -z "$CXX" && { echo "configure: error: no acceptable C++-compiler found in \$PATH" 1>&2; exit 1; }
+-
+-  echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
+-echo "configure:1492: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
+-
+-
+-ac_ext=C
+-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+-ac_cpp='$CXXCPP $CPPFLAGS'
+-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+-cross_compiling=$ac_cv_prog_cxx_cross
+-
+-ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+-
+-
+-
+-cat > conftest.$ac_ext << EOF
+-
+-#line 1508 "configure"
+-#include "confdefs.h"
+-
+-int main(){return(0);}
+-EOF
+-if { (eval echo configure:1513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+-  ac_cv_prog_cxx_works=yes
+-  # If we can't run a trivial program, we are probably using a cross compiler.
+-  if (./conftest; exit) 2>/dev/null; then
+-    ac_cv_prog_cxx_cross=no
+-  else
+-    ac_cv_prog_cxx_cross=yes
+-  fi
+-else
+-  echo "configure: failed program was:" >&5
+-  cat conftest.$ac_ext >&5
+-  ac_cv_prog_cxx_works=no
++  echo "configure: failed program was:" >&5
++  cat conftest.$ac_ext >&5
++  ac_cv_prog_cxx_works=no
+ fi
+ rm -fr conftest*
+ ac_ext=c
+@@ -1535,12 +1652,12 @@
+   { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
+ fi
+ echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
+-echo "configure:1539: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
++echo "configure:1656: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
+ echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
+ cross_compiling=$ac_cv_prog_cxx_cross
+ 
+-  echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
+-echo "configure:1544: checking whether we are using GNU C++" >&5
++echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
++echo "configure:1661: checking whether we are using GNU C++" >&5
+ if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+@@ -1549,7 +1666,7 @@
+   yes;
+ #endif
+ EOF
+-if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1553: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
++if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1670: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+   ac_cv_prog_gxx=yes
+ else
+   ac_cv_prog_gxx=no
+@@ -1558,17 +1675,17 @@
+ 
+ echo "$ac_t""$ac_cv_prog_gxx" 1>&6
+ 
+-  if test $ac_cv_prog_gxx = yes; then
+-    GXX=yes
+-  fi
+-
+-  USER_CXXFLAGS=$CXXFLAGS
+-  CXXFLAGS=""
++if test $ac_cv_prog_gxx = yes; then
++  GXX=yes
++else
++  GXX=
++fi
+ 
+-  if test -z "$CXXFLAGS"; then
+-    if test "$kde_use_debug_code" = "yes"; then
+-      echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
+-echo "configure:1572: checking whether ${CXX-g++} accepts -g" >&5
++ac_test_CXXFLAGS="${CXXFLAGS+set}"
++ac_save_CXXFLAGS="$CXXFLAGS"
++CXXFLAGS=
++echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
++echo "configure:1689: checking whether ${CXX-g++} accepts -g" >&5
+ if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+@@ -1583,198 +1700,280 @@
+ fi
+ 
+ echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
+-      if test $ac_cv_prog_cxx_g = yes; then
+-        CXXFLAGS="-g"
+-	case $host in     	*-*-linux-gnu)
+-           CXXFLAGS="$CXXFLAGS -ansi -D_XOPEN_SOURCE -D_BSD_SOURCE -Wbad-function-cast -Wcast-align -Wundef -Wconversion"
+-         ;;
+-        esac
+-      fi
+-    else
+-      if test "$GXX" = "yes"; then
+-         CXXFLAGS="-O2"
+-      fi
+-      if test "$kde_use_debug_define" = "yes"; then
+-         CXXFLAGS="$CXXFLAGS -DNDEBUG"
+-      fi
+-    fi
+-
+-    if test "$kde_use_profiling" = yes; then
+-       echo $ac_n "checking whether ${CXX-g++} accepts -pg""... $ac_c" 1>&6
+-echo "configure:1605: checking whether ${CXX-g++} accepts -pg" >&5
+-if eval "test \"`echo '$''{'kde_cv_prog_cxx_pg'+set}'`\" = set"; then
+-  echo $ac_n "(cached) $ac_c" 1>&6
++if test "$ac_test_CXXFLAGS" = set; then
++  CXXFLAGS="$ac_save_CXXFLAGS"
++elif test $ac_cv_prog_cxx_g = yes; then
++  if test "$GXX" = yes; then
++    CXXFLAGS="-g -O2"
++  else
++    CXXFLAGS="-g"
++  fi
+ else
+-  echo 'void f(){}' > conftest.cc
+-   if test -z "`${CXX-g++} -pg -c conftest.cc 2>&1`"; then
+-     kde_cv_prog_cxx_pg=yes
+-   else
+-     kde_cv_prog_cxx_pg=no
+-   fi
+-  rm -f conftest*
+-
++  if test "$GXX" = yes; then
++    CXXFLAGS="-O2"
++  else
++    CXXFLAGS=
++  fi
+ fi
+ 
+-echo "$ac_t""$kde_cv_prog_cxx_pg" 1>&6
+-      if test "$kde_cv_prog_cxx_pg" = yes; then
+-        CXXFLAGS="$CXXFLAGS -pg"
++depcc="$CXX"  am_compiler_list=
++
++echo $ac_n "checking dependency style of $depcc""... $ac_c" 1>&6
++echo "configure:1723: checking dependency style of $depcc" >&5
++if eval "test \"`echo '$''{'am_cv_CXX_dependencies_compiler_type'+set}'`\" = set"; then
++  echo $ac_n "(cached) $ac_c" 1>&6
++else
++  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
++  # We make a subdir and do the tests there.  Otherwise we can end up
++  # making bogus files that we don't know about and never remove.  For
++  # instance it was reported that on HP-UX the gcc test will end up
++  # making a dummy file named `D' -- because `-MD' means `put the output
++  # in D'.
++  mkdir conftest.dir
++  # Copy depcomp to subdir because otherwise we won't find it if we're
++  # using a relative directory.
++  cp "$am_depcomp" conftest.dir
++  cd conftest.dir
++
++  am_cv_CXX_dependencies_compiler_type=none
++  if test "$am_compiler_list" = ""; then
++     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
++  fi
++  for depmode in $am_compiler_list; do
++    # We need to recreate these files for each test, as the compiler may
++    # overwrite some of them when testing with obscure command lines.
++    # This happens at least with the AIX C compiler.
++    echo '#include "conftest.h"' > conftest.c
++    echo 'int i;' > conftest.h
++    echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
++
++    case $depmode in
++    nosideeffect)
++      # after this tag, mechanisms are not by side-effect, so they'll
++      # only be used when explicitly requested
++      if test "x$enable_dependency_tracking" = xyes; then
++	continue
++      else
++	break
+       fi
++      ;;
++    none) break ;;
++    esac
++    # We check with `-c' and `-o' for the sake of the "dashmstdout"
++    # mode.  It turns out that the SunPro C++ compiler does not properly
++    # handle `-M -o', and we need to detect this.
++    if depmode=$depmode \
++       source=conftest.c object=conftest.o \
++       depfile=conftest.Po tmpdepfile=conftest.TPo \
++       $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
++       grep conftest.h conftest.Po > /dev/null 2>&1 &&
++       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
++      am_cv_CXX_dependencies_compiler_type=$depmode
++      break
+     fi
+-    
+-    
++  done
+ 
+-echo $ac_n "checking whether $CXX supports -fno-exceptions""... $ac_c" 1>&6
+-echo "configure:1628: checking whether $CXX supports -fno-exceptions" >&5
+-kde_cache=`echo fno-exceptions | sed 'y%.=/+-%___p_%'`
+-if eval "test \"`echo '$''{'kde_cv_prog_cxx_$kde_cache'+set}'`\" = set"; then
+-  echo $ac_n "(cached) $ac_c" 1>&6
++  cd ..
++  rm -rf conftest.dir
+ else
+-  
+-echo 'int main() { return 0; }' >conftest.cc
+-eval "kde_cv_prog_cxx_$kde_cache=no"
+-if test -z "`$CXX -fno-exceptions -c conftest.cc 2>&1`"; then
+-  if test -z "`$CXX -fno-exceptions -o conftest conftest.o 2>&1`"; then
+-    eval "kde_cv_prog_cxx_$kde_cache=yes"
+-  fi
++  am_cv_CXX_dependencies_compiler_type=none
+ fi
+-rm -f conftest*
+ 
+ fi
+ 
+-if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
+- echo "$ac_t""yes" 1>&6
+- :
+- 
+-      CXXFLAGS="$CXXFLAGS -fno-exceptions"
+-    
+-else
+- echo "$ac_t""no" 1>&6
+- :
+- 
+-fi
++echo "$ac_t""$am_cv_CXX_dependencies_compiler_type" 1>&6
++CXXDEPMODE="depmode=$am_cv_CXX_dependencies_compiler_type"
+ 
+-      
+ 
+-    
+ 
+-echo $ac_n "checking whether $CXX supports -fno-check-new""... $ac_c" 1>&6
+-echo "configure:1662: checking whether $CXX supports -fno-check-new" >&5
+-kde_cache=`echo fno-check-new | sed 'y%.=/+-%___p_%'`
++  if test "$GXX" = "yes" || test "$CXX" = "KCC"; then
++    if test "$kde_use_debug_code" != "no"; then
++      if test "$CXX" = "KCC"; then
++        CXXFLAGS="+K0 -Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings $CXXFLAGS"
++      else
++        if test "$kde_use_debug_code" = "full"; then
++          CXXFLAGS="-g3 $CXXFLAGS"
++        else
++          CXXFLAGS="-g -O2 $CXXFLAGS"
++        fi
++      fi
++      
++echo $ac_n "checking whether $CXX supports -fno-builtin""... $ac_c" 1>&6
++echo "configure:1803: checking whether $CXX supports -fno-builtin" >&5
++kde_cache=`echo fno-builtin | sed 'y% .=/+-%____p_%'`
+ if eval "test \"`echo '$''{'kde_cv_prog_cxx_$kde_cache'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   
+-echo 'int main() { return 0; }' >conftest.cc
+-eval "kde_cv_prog_cxx_$kde_cache=no"
+-if test -z "`$CXX -fno-check-new -c conftest.cc 2>&1`"; then
+-  if test -z "`$CXX -fno-check-new -o conftest conftest.o 2>&1`"; then
+-    eval "kde_cv_prog_cxx_$kde_cache=yes"
+-  fi
+-fi
+-rm -f conftest*
+-
+-fi
+-
+-if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
+- echo "$ac_t""yes" 1>&6
+- :
+- 
+-	  CXXFLAGS="$CXXFLAGS -fno-check-new"
+-	
+-else
+- echo "$ac_t""no" 1>&6
+- :
+- 
+-fi
+-
++  
++   ac_ext=C
++# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
++ac_cpp='$CXXCPP $CPPFLAGS'
++ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
++ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
++cross_compiling=$ac_cv_prog_cxx_cross
+ 
+-    if test "$GXX" = "yes"; then
+-       CXXFLAGS="$CXXFLAGS"
++ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+ 
+-       if test true || test "$kde_use_debug_code" = "yes"; then
+-	 CXXFLAGS="$CXXFLAGS -Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings"
+ 
+-         
++  save_CXXFLAGS="$CXXFLAGS"
++  CXXFLAGS="$CXXFLAGS -fno-builtin"
++  cat > conftest.$ac_ext <<EOF
++#line 1823 "configure"
++#include "confdefs.h"
+ 
+-echo $ac_n "checking whether $CXX supports -Wno-long-long""... $ac_c" 1>&6
+-echo "configure:1701: checking whether $CXX supports -Wno-long-long" >&5
+-kde_cache=`echo Wno-long-long | sed 'y%.=/+-%___p_%'`
+-if eval "test \"`echo '$''{'kde_cv_prog_cxx_$kde_cache'+set}'`\" = set"; then
+-  echo $ac_n "(cached) $ac_c" 1>&6
++int main() {
++ return 0; 
++; return 0; }
++EOF
++if { (eval echo configure:1830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++  rm -rf conftest*
++  eval "kde_cv_prog_cxx_$kde_cache=yes"
+ else
+-  
+-echo 'int main() { return 0; }' >conftest.cc
+-eval "kde_cv_prog_cxx_$kde_cache=no"
+-if test -z "`$CXX -Wno-long-long -c conftest.cc 2>&1`"; then
+-  if test -z "`$CXX -Wno-long-long -o conftest conftest.o 2>&1`"; then
+-    eval "kde_cv_prog_cxx_$kde_cache=yes"
+-  fi
++  echo "configure: failed program was:" >&5
++  cat conftest.$ac_ext >&5
+ fi
+ rm -f conftest*
++  CXXFLAGS="$save_CXXFLAGS"
++  ac_ext=c
++# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
++ac_cpp='$CPP $CPPFLAGS'
++ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
++cross_compiling=$ac_cv_prog_cc_cross
++
+ 
+ fi
+ 
+ if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  :
+- 
+-	   CXXFLAGS="$CXXFLAGS -Wno-long-long"
+-	 
++ CXXFLAGS="-fno-builtin $CXXFLAGS"
+ else
+  echo "$ac_t""no" 1>&6
+  :
+  
+ fi
+ 
+-         
+ 
+-echo $ac_n "checking whether $CXX supports -Wnon-virtual-dtor""... $ac_c" 1>&6
+-echo "configure:1733: checking whether $CXX supports -Wnon-virtual-dtor" >&5
+-kde_cache=`echo Wnon-virtual-dtor | sed 'y%.=/+-%___p_%'`
++            
++echo $ac_n "checking whether $CXX supports -Woverloaded-virtual""... $ac_c" 1>&6
++echo "configure:1862: checking whether $CXX supports -Woverloaded-virtual" >&5
++kde_cache=`echo Woverloaded-virtual | sed 'y% .=/+-%____p_%'`
+ if eval "test \"`echo '$''{'kde_cv_prog_cxx_$kde_cache'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   
+-echo 'int main() { return 0; }' >conftest.cc
+-eval "kde_cv_prog_cxx_$kde_cache=no"
+-if test -z "`$CXX -Wnon-virtual-dtor -c conftest.cc 2>&1`"; then
+-  if test -z "`$CXX -Wnon-virtual-dtor -o conftest conftest.o 2>&1`"; then
+-    eval "kde_cv_prog_cxx_$kde_cache=yes"
+-  fi
++  
++   ac_ext=C
++# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
++ac_cpp='$CXXCPP $CPPFLAGS'
++ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
++ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
++cross_compiling=$ac_cv_prog_cxx_cross
++
++ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
++
++
++  save_CXXFLAGS="$CXXFLAGS"
++  CXXFLAGS="$CXXFLAGS -Woverloaded-virtual"
++  cat > conftest.$ac_ext <<EOF
++#line 1882 "configure"
++#include "confdefs.h"
++
++int main() {
++ return 0; 
++; return 0; }
++EOF
++if { (eval echo configure:1889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++  rm -rf conftest*
++  eval "kde_cv_prog_cxx_$kde_cache=yes"
++else
++  echo "configure: failed program was:" >&5
++  cat conftest.$ac_ext >&5
+ fi
+ rm -f conftest*
++  CXXFLAGS="$save_CXXFLAGS"
++  ac_ext=c
++# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
++ac_cpp='$CPP $CPPFLAGS'
++ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
++cross_compiling=$ac_cv_prog_cc_cross
++
+ 
+ fi
+ 
+ if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  :
+- 
+-           CXXFLAGS="$CXXFLAGS -Wnon-virtual-dtor"
+-         
++ WOVERLOADED_VIRTUAL="-Woverloaded-virtual"
+ else
+  echo "$ac_t""no" 1>&6
+  :
+- 
++ WOVERLOADED_VRITUAL=""
+ fi
+ 
+-         
++      
++    else
++      if test "$CXX" = "KCC"; then
++        CXXFLAGS="+K3 $CXXFLAGS"
++      else
++        CXXFLAGS="-O2 $CXXFLAGS"
++      fi  
++    fi
++  fi
+ 
+-echo $ac_n "checking whether $CXX supports -fno-builtin""... $ac_c" 1>&6
+-echo "configure:1765: checking whether $CXX supports -fno-builtin" >&5
+-kde_cache=`echo fno-builtin | sed 'y%.=/+-%___p_%'`
++  if test "$kde_use_debug_define" = "yes"; then
++    CXXFLAGS="-DNDEBUG -DNO_DEBUG $CXXFLAGS"
++  fi  
++
++  if test "$kde_use_profiling" = "yes"; then
++    
++echo $ac_n "checking whether $CXX supports -pg""... $ac_c" 1>&6
++echo "configure:1935: checking whether $CXX supports -pg" >&5
++kde_cache=`echo pg | sed 'y% .=/+-%____p_%'`
+ if eval "test \"`echo '$''{'kde_cv_prog_cxx_$kde_cache'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   
+-echo 'int main() { return 0; }' >conftest.cc
+-eval "kde_cv_prog_cxx_$kde_cache=no"
+-if test -z "`$CXX -fno-builtin -c conftest.cc 2>&1`"; then
+-  if test -z "`$CXX -fno-builtin -o conftest conftest.o 2>&1`"; then
+-    eval "kde_cv_prog_cxx_$kde_cache=yes"
+-  fi
++  
++   ac_ext=C
++# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
++ac_cpp='$CXXCPP $CPPFLAGS'
++ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
++ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
++cross_compiling=$ac_cv_prog_cxx_cross
++
++ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
++
++
++  save_CXXFLAGS="$CXXFLAGS"
++  CXXFLAGS="$CXXFLAGS -pg"
++  cat > conftest.$ac_ext <<EOF
++#line 1955 "configure"
++#include "confdefs.h"
++
++int main() {
++ return 0; 
++; return 0; }
++EOF
++if { (eval echo configure:1962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++  rm -rf conftest*
++  eval "kde_cv_prog_cxx_$kde_cache=yes"
++else
++  echo "configure: failed program was:" >&5
++  cat conftest.$ac_ext >&5
+ fi
+ rm -f conftest*
++  CXXFLAGS="$save_CXXFLAGS"
++  ac_ext=c
++# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
++ac_cpp='$CPP $CPPFLAGS'
++ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
++cross_compiling=$ac_cv_prog_cc_cross
++
+ 
+ fi
+ 
+@@ -1782,161 +1981,152 @@
+  echo "$ac_t""yes" 1>&6
+  :
+  
+-           CXXFLAGS="$CXXFLAGS -fno-builtin"
+-         
++      CFLAGS="-pg $CFLAGS"
++      CXXFLAGS="-pg $CXXFLAGS"
++    
+ else
+  echo "$ac_t""no" 1>&6
+  :
+  
+ fi
+ 
+-	
+-       fi
+-
+-       if test "$kde_use_strict_options" = "yes"; then
+-	CXXFLAGS="$CXXFLAGS -Wcast-qual -Wbad-function-cast -Wshadow -Wcast-align"
+-       fi
+-
+-       if test "$kde_very_strict" = "yes"; then
+-         CXXFLAGS="$CXXFLAGS -Wold-style-cast -Wredundant-decls -Wconversion"
+-       fi
+-    fi
+   fi
+ 
+-    
+-
+-echo $ac_n "checking whether $CXX supports -fexceptions""... $ac_c" 1>&6
+-echo "configure:1810: checking whether $CXX supports -fexceptions" >&5
+-kde_cache=`echo fexceptions | sed 'y%.=/+-%___p_%'`
++  if test "$kde_use_warnings" = "yes"; then
++      if test "$GCC" = "yes"; then
++        case $host in
++          *-*-linux-gnu)	
++            CFLAGS="-ansi -W -Wall -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE $CFLAGS"
++            CXXFLAGS="-ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion $CXXFLAGS"
++          ;;
++        esac
++        CXXFLAGS="-Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings $CXXFLAGS"
++        
++echo $ac_n "checking whether $CXX supports -Wundef""... $ac_c" 1>&6
++echo "configure:2007: checking whether $CXX supports -Wundef" >&5
++kde_cache=`echo Wundef | sed 'y% .=/+-%____p_%'`
+ if eval "test \"`echo '$''{'kde_cv_prog_cxx_$kde_cache'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   
+-echo 'int main() { return 0; }' >conftest.cc
+-eval "kde_cv_prog_cxx_$kde_cache=no"
+-if test -z "`$CXX -fexceptions -c conftest.cc 2>&1`"; then
+-  if test -z "`$CXX -fexceptions -o conftest conftest.o 2>&1`"; then
+-    eval "kde_cv_prog_cxx_$kde_cache=yes"
+-  fi
++  
++   ac_ext=C
++# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
++ac_cpp='$CXXCPP $CPPFLAGS'
++ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
++ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
++cross_compiling=$ac_cv_prog_cxx_cross
++
++ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
++
++
++  save_CXXFLAGS="$CXXFLAGS"
++  CXXFLAGS="$CXXFLAGS -Wundef"
++  cat > conftest.$ac_ext <<EOF
++#line 2027 "configure"
++#include "confdefs.h"
++
++int main() {
++ return 0; 
++; return 0; }
++EOF
++if { (eval echo configure:2034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++  rm -rf conftest*
++  eval "kde_cv_prog_cxx_$kde_cache=yes"
++else
++  echo "configure: failed program was:" >&5
++  cat conftest.$ac_ext >&5
+ fi
+ rm -f conftest*
++  CXXFLAGS="$save_CXXFLAGS"
++  ac_ext=c
++# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
++ac_cpp='$CPP $CPPFLAGS'
++ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
++cross_compiling=$ac_cv_prog_cc_cross
++
+ 
+ fi
+ 
+ if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  :
+- 
+-	  USE_EXCEPTIONS="-fexceptions"
+-	
++ CXXFLAGS="-Wundef $CXXFLAGS"
+ else
+  echo "$ac_t""no" 1>&6
+  :
+- USE_EXCEPTIONS=
+-	
++ 
+ fi
+ 
+-    
+-
+-    
+-
+-echo $ac_n "checking whether $CXX supports -frtti""... $ac_c" 1>&6
+-echo "configure:1845: checking whether $CXX supports -frtti" >&5
+-kde_cache=`echo frtti | sed 'y%.=/+-%___p_%'`
++        
++echo $ac_n "checking whether $CXX supports -Wbad-function-cast""... $ac_c" 1>&6
++echo "configure:2065: checking whether $CXX supports -Wbad-function-cast" >&5
++kde_cache=`echo Wbad-function-cast | sed 'y% .=/+-%____p_%'`
+ if eval "test \"`echo '$''{'kde_cv_prog_cxx_$kde_cache'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   
+-echo 'int main() { return 0; }' >conftest.cc
+-eval "kde_cv_prog_cxx_$kde_cache=no"
+-if test -z "`$CXX -frtti -c conftest.cc 2>&1`"; then
+-  if test -z "`$CXX -frtti -o conftest conftest.o 2>&1`"; then
+-    eval "kde_cv_prog_cxx_$kde_cache=yes"
+-  fi
++  
++   ac_ext=C
++# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
++ac_cpp='$CXXCPP $CPPFLAGS'
++ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
++ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
++cross_compiling=$ac_cv_prog_cxx_cross
++
++ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
++
++
++  save_CXXFLAGS="$CXXFLAGS"
++  CXXFLAGS="$CXXFLAGS -Wbad-function-cast"
++  cat > conftest.$ac_ext <<EOF
++#line 2085 "configure"
++#include "confdefs.h"
++
++int main() {
++ return 0; 
++; return 0; }
++EOF
++if { (eval echo configure:2092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++  rm -rf conftest*
++  eval "kde_cv_prog_cxx_$kde_cache=yes"
++else
++  echo "configure: failed program was:" >&5
++  cat conftest.$ac_ext >&5
+ fi
+ rm -f conftest*
++  CXXFLAGS="$save_CXXFLAGS"
++  ac_ext=c
++# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
++ac_cpp='$CPP $CPPFLAGS'
++ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
++cross_compiling=$ac_cv_prog_cc_cross
++
+ 
+ fi
+ 
+ if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  :
+- 
+-	  USE_RTTI="-frtti"
+-	
++ CXXFLAGS="-Wbad-function-cast $CXXFLAGS"
+ else
+  echo "$ac_t""no" 1>&6
+  :
+- USE_RTTI=
+-	
++ 
+ fi
+ 
+-    
+-
+-    case "$host" in
+-      *-*-irix*)  test "$GXX" = yes && CXXFLAGS="$CXXFLAGS -D_LANGUAGE_C_PLUS_PLUS -D__LANGUAGE_C_PLUS_PLUS" ;;
+-      *-*-sysv4.2uw*) CXXFLAGS="$CXXFLAGS -D_UNIXWARE";;
+-      *-*-sysv5uw7*) CXXFLAGS="$CXXFLAGS -D_UNIXWARE7";;
+-      *-*-solaris*) 
+-        if test "$GXX" = yes; then
+-          libstdcpp=`gcc -print-file-name=libstdc++.so`
+-          if test ! -f $libstdcpp; then
+-             { echo "configure: error: You've compiled gcc without --enable-shared. This doesn't work with KDE. Please recompile gcc with --enable-shared to receive a libstdc++.so" 1>&2; exit 1; }
+-          fi
+-        fi
+-        ;;
+-    esac
+-
+-    if test -n "$USER_CXXFLAGS"; then
+-       CXXFLAGS="$CXXFLAGS $USER_CXXFLAGS"
+-    fi
+-
+-      __val=$CXX
+-  __forbid=" -fno-rtti -rpath "
+-  if test -n "$__val"; then
+-    __new=""
+-    ac_save_IFS=$IFS
+-    IFS=" 	"
+-    for i in $__val; do
+-      case "$__forbid" in
+-        *" $i "*) echo "configure: warning: found forbidden $i in CXX, removing it" 1>&2 ;;
+-	*) # Careful to not add spaces, where there were none, because otherwise
+-	   # libtool gets confused, if we change e.g. CXX
+-	   if test -z "$__new" ; then __new=$i ; else __new="$__new $i" ; fi ;;
+-      esac
+-    done
+-    IFS=$ac_save_IFS
+-    CXX=$__new
+-  fi
+-
+-  __val=$CXXFLAGS
+-  __forbid=" -fno-rtti -rpath "
+-  if test -n "$__val"; then
+-    __new=""
+-    ac_save_IFS=$IFS
+-    IFS=" 	"
+-    for i in $__val; do
+-      case "$__forbid" in
+-        *" $i "*) echo "configure: warning: found forbidden $i in CXXFLAGS, removing it" 1>&2 ;;
+-	*) # Careful to not add spaces, where there were none, because otherwise
+-	   # libtool gets confused, if we change e.g. CXX
+-	   if test -z "$__new" ; then __new=$i ; else __new="$__new $i" ; fi ;;
+-      esac
+-    done
+-    IFS=$ac_save_IFS
+-    CXXFLAGS=$__new
+-  fi
+-
+-
+-
+-    echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
+-echo "configure:1934: checking how to run the C++ preprocessor" >&5
+-    if test -z "$CXXCPP"; then
+-      if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
++        
++echo $ac_n "checking whether $CXX supports -Wno-long-long""... $ac_c" 1>&6
++echo "configure:2123: checking whether $CXX supports -Wno-long-long" >&5
++kde_cache=`echo Wno-long-long | sed 'y% .=/+-%____p_%'`
++if eval "test \"`echo '$''{'kde_cv_prog_cxx_$kde_cache'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   
+-                   ac_ext=C
++  
++   ac_ext=C
+ # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ ac_cpp='$CXXCPP $CPPFLAGS'
+ ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+@@ -1945,156 +2135,989 @@
+ 
+ ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+ 
+-         CXXCPP="${CXX-g++} -E"
+-         cat > conftest.$ac_ext <<EOF
+-#line 1951 "configure"
++
++  save_CXXFLAGS="$CXXFLAGS"
++  CXXFLAGS="$CXXFLAGS -Wno-long-long"
++  cat > conftest.$ac_ext <<EOF
++#line 2143 "configure"
+ #include "confdefs.h"
+-#include <stdlib.h>
++
++int main() {
++ return 0; 
++; return 0; }
+ EOF
+-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+-{ (eval echo configure:1956: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+-if test -z "$ac_err"; then
+-  :
++if { (eval echo configure:2150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++  rm -rf conftest*
++  eval "kde_cv_prog_cxx_$kde_cache=yes"
+ else
+-  echo "$ac_err" >&5
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
+-  rm -rf conftest*
+-  CXXCPP=/lib/cpp
+ fi
+ rm -f conftest*
+-         ac_cv_prog_CXXCPP="$CXXCPP"
+-         ac_ext=c
++  CXXFLAGS="$save_CXXFLAGS"
++  ac_ext=c
+ # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ ac_cpp='$CPP $CPPFLAGS'
+ ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+ cross_compiling=$ac_cv_prog_cc_cross
+-     
+-fi
+-     CXXCPP="$ac_cv_prog_CXXCPP"
+-    fi
+-    echo "$ac_t""$CXXCPP" 1>&6
+-    
+-    # the following is to allow programs, that are known to
+-    # have problems when compiled with -O2
+-    if test -n "$CXXFLAGS"; then
+-      kde_safe_IFS=$IFS
+-      IFS=" "
+-      NOOPT_CXXFLAGS=""
+-      for i in $CXXFLAGS; do
+-        case $i in
+-          -O*)
+-                ;;
+-          *)
+-                NOOPT_CXXFLAGS="$NOOPT_CXXFLAGS $i"
+-                ;;
+-        esac
+-      done
+-      IFS=$kde_safe_IFS
+-    fi
+-    
+-
+-    
+-  # Check whether --enable-final or --disable-final was given.
+-if test "${enable_final+set}" = set; then
+-  enableval="$enable_final"
+-  kde_use_final=$enableval
+-else
+-  kde_use_final=no
+-fi
+-
+ 
+-  
+-  REPO=""
+-  NOREPO=""
+-
+-  
+-
+-echo $ac_n "checking whether $CXX supports -frepo""... $ac_c" 1>&6
+-echo "configure:2017: checking whether $CXX supports -frepo" >&5
+-kde_cache=`echo frepo | sed 'y%.=/+-%___p_%'`
+-if eval "test \"`echo '$''{'kde_cv_prog_cxx_$kde_cache'+set}'`\" = set"; then
+-  echo $ac_n "(cached) $ac_c" 1>&6
+-else
+-  
+-echo 'int main() { return 0; }' >conftest.cc
+-eval "kde_cv_prog_cxx_$kde_cache=no"
+-if test -z "`$CXX -frepo -c conftest.cc 2>&1`"; then
+-  if test -z "`$CXX -frepo -o conftest conftest.o 2>&1`"; then
+-    eval "kde_cv_prog_cxx_$kde_cache=yes"
+-  fi
+-fi
+-rm -f conftest*
+ 
+ fi
+ 
+ if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  :
+- 
+-     REPO="-frepo"
+-     NOREPO="-fno-repo"
+-   
++ CXXFLAGS="-Wno-long-long $CXXFLAGS"
+ else
+  echo "$ac_t""no" 1>&6
+  :
+  
+ fi
+ 
+-
+-  if test -z "$REPO"; then
+-  
+-
+-echo $ac_n "checking whether $CXX supports -instances=explicit""... $ac_c" 1>&6
+-echo "configure:2052: checking whether $CXX supports -instances=explicit" >&5
+-kde_cache=`echo instances=explicit | sed 'y%.=/+-%___p_%'`
++        
++echo $ac_n "checking whether $CXX supports -Wnon-virtual-dtor""... $ac_c" 1>&6
++echo "configure:2181: checking whether $CXX supports -Wnon-virtual-dtor" >&5
++kde_cache=`echo Wnon-virtual-dtor | sed 'y% .=/+-%____p_%'`
+ if eval "test \"`echo '$''{'kde_cv_prog_cxx_$kde_cache'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   
+-echo 'int main() { return 0; }' >conftest.cc
+-eval "kde_cv_prog_cxx_$kde_cache=no"
+-if test -z "`$CXX -instances=explicit -c conftest.cc 2>&1`"; then
+-  if test -z "`$CXX -instances=explicit -o conftest conftest.o 2>&1`"; then
+-    eval "kde_cv_prog_cxx_$kde_cache=yes"
+-  fi
++  
++   ac_ext=C
++# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
++ac_cpp='$CXXCPP $CPPFLAGS'
++ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
++ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
++cross_compiling=$ac_cv_prog_cxx_cross
++
++ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
++
++
++  save_CXXFLAGS="$CXXFLAGS"
++  CXXFLAGS="$CXXFLAGS -Wnon-virtual-dtor"
++  cat > conftest.$ac_ext <<EOF
++#line 2201 "configure"
++#include "confdefs.h"
++
++int main() {
++ return 0; 
++; return 0; }
++EOF
++if { (eval echo configure:2208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++  rm -rf conftest*
++  eval "kde_cv_prog_cxx_$kde_cache=yes"
++else
++  echo "configure: failed program was:" >&5
++  cat conftest.$ac_ext >&5
+ fi
+ rm -f conftest*
++  CXXFLAGS="$save_CXXFLAGS"
++  ac_ext=c
++# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
++ac_cpp='$CPP $CPPFLAGS'
++ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
++cross_compiling=$ac_cv_prog_cc_cross
++
+ 
+ fi
+ 
+ if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  :
+- 
+-     REPO="-instances=explicit"
+-     NOREPO="-instances=extern"
+-  
++ CXXFLAGS="-Wnon-virtual-dtor $CXXFLAGS"
+ else
+  echo "$ac_t""no" 1>&6
+  :
+  
+ fi
+ 
++     fi
+   fi
+ 
+-  if test -n "$REPO"; then
+-     cat >> confdefs.h <<EOF
+-#define HAVE_TEMPLATE_REPOSITORY 1
+-EOF
+-
+-     
++  if test "$GCC" = "yes" && test "$kde_use_strict_options" = "yes"; then
++    CXXFLAGS="-Wcast-qual -Wshadow -Wcast-align $CXXFLAGS"
+   fi
+-
++    
++  if test "$GXX" = "yes"; then
++    
++echo $ac_n "checking whether $CXX supports -fno-exceptions""... $ac_c" 1>&6
++echo "configure:2247: checking whether $CXX supports -fno-exceptions" >&5
++kde_cache=`echo fno-exceptions | sed 'y% .=/+-%____p_%'`
++if eval "test \"`echo '$''{'kde_cv_prog_cxx_$kde_cache'+set}'`\" = set"; then
++  echo $ac_n "(cached) $ac_c" 1>&6
++else
+   
+   
++   ac_ext=C
++# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
++ac_cpp='$CXXCPP $CPPFLAGS'
++ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
++ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
++cross_compiling=$ac_cv_prog_cxx_cross
+ 
+-  if test "x$kde_use_final" = "xyes"; then
+-      KDE_USE_FINAL_TRUE=""
+-      KDE_USE_FINAL_FALSE="#"
+-   else
++ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
++
++
++  save_CXXFLAGS="$CXXFLAGS"
++  CXXFLAGS="$CXXFLAGS -fno-exceptions"
++  cat > conftest.$ac_ext <<EOF
++#line 2267 "configure"
++#include "confdefs.h"
++
++int main() {
++ return 0; 
++; return 0; }
++EOF
++if { (eval echo configure:2274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++  rm -rf conftest*
++  eval "kde_cv_prog_cxx_$kde_cache=yes"
++else
++  echo "configure: failed program was:" >&5
++  cat conftest.$ac_ext >&5
++fi
++rm -f conftest*
++  CXXFLAGS="$save_CXXFLAGS"
++  ac_ext=c
++# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
++ac_cpp='$CPP $CPPFLAGS'
++ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
++cross_compiling=$ac_cv_prog_cc_cross
++
++
++fi
++
++if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
++ echo "$ac_t""yes" 1>&6
++ :
++ CXXFLAGS="$CXXFLAGS -fno-exceptions"
++else
++ echo "$ac_t""no" 1>&6
++ :
++ 
++fi
++
++    
++echo $ac_n "checking whether $CXX supports -fno-check-new""... $ac_c" 1>&6
++echo "configure:2305: checking whether $CXX supports -fno-check-new" >&5
++kde_cache=`echo fno-check-new | sed 'y% .=/+-%____p_%'`
++if eval "test \"`echo '$''{'kde_cv_prog_cxx_$kde_cache'+set}'`\" = set"; then
++  echo $ac_n "(cached) $ac_c" 1>&6
++else
++  
++  
++   ac_ext=C
++# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
++ac_cpp='$CXXCPP $CPPFLAGS'
++ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
++ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
++cross_compiling=$ac_cv_prog_cxx_cross
++
++ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
++
++
++  save_CXXFLAGS="$CXXFLAGS"
++  CXXFLAGS="$CXXFLAGS -fno-check-new"
++  cat > conftest.$ac_ext <<EOF
++#line 2325 "configure"
++#include "confdefs.h"
++
++int main() {
++ return 0; 
++; return 0; }
++EOF
++if { (eval echo configure:2332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++  rm -rf conftest*
++  eval "kde_cv_prog_cxx_$kde_cache=yes"
++else
++  echo "configure: failed program was:" >&5
++  cat conftest.$ac_ext >&5
++fi
++rm -f conftest*
++  CXXFLAGS="$save_CXXFLAGS"
++  ac_ext=c
++# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
++ac_cpp='$CPP $CPPFLAGS'
++ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
++cross_compiling=$ac_cv_prog_cc_cross
++
++
++fi
++
++if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
++ echo "$ac_t""yes" 1>&6
++ :
++ CXXFLAGS="$CXXFLAGS -fno-check-new"
++else
++ echo "$ac_t""no" 1>&6
++ :
++ 
++fi
++
++    
++echo $ac_n "checking whether $CXX supports -fexceptions""... $ac_c" 1>&6
++echo "configure:2363: checking whether $CXX supports -fexceptions" >&5
++kde_cache=`echo fexceptions | sed 'y% .=/+-%____p_%'`
++if eval "test \"`echo '$''{'kde_cv_prog_cxx_$kde_cache'+set}'`\" = set"; then
++  echo $ac_n "(cached) $ac_c" 1>&6
++else
++  
++  
++   ac_ext=C
++# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
++ac_cpp='$CXXCPP $CPPFLAGS'
++ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
++ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
++cross_compiling=$ac_cv_prog_cxx_cross
++
++ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
++
++
++  save_CXXFLAGS="$CXXFLAGS"
++  CXXFLAGS="$CXXFLAGS -fexceptions"
++  cat > conftest.$ac_ext <<EOF
++#line 2383 "configure"
++#include "confdefs.h"
++
++int main() {
++ return 0; 
++; return 0; }
++EOF
++if { (eval echo configure:2390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++  rm -rf conftest*
++  eval "kde_cv_prog_cxx_$kde_cache=yes"
++else
++  echo "configure: failed program was:" >&5
++  cat conftest.$ac_ext >&5
++fi
++rm -f conftest*
++  CXXFLAGS="$save_CXXFLAGS"
++  ac_ext=c
++# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
++ac_cpp='$CPP $CPPFLAGS'
++ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
++cross_compiling=$ac_cv_prog_cc_cross
++
++
++fi
++
++if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
++ echo "$ac_t""yes" 1>&6
++ :
++ USE_EXCEPTIONS="-fexceptions"
++else
++ echo "$ac_t""no" 1>&6
++ :
++ USE_EXCEPTIONS=	
++fi
++
++  fi
++  if test "$CXX" = "KCC"; then
++                
++    # Check whether --enable-pch or --disable-pch was given.
++if test "${enable_pch+set}" = set; then
++  enableval="$enable_pch"
++  
++      kde_use_pch=$enableval
++    
++else
++  kde_use_pch=no
++fi
++
++ 
++    if test "$kde_use_pch" = "yes"; then
++            
++echo $ac_n "checking whether $CXX supports --pch""... $ac_c" 1>&6
++echo "configure:2436: checking whether $CXX supports --pch" >&5
++kde_cache=`echo -pch | sed 'y% .=/+-%____p_%'`
++if eval "test \"`echo '$''{'kde_cv_prog_cxx_$kde_cache'+set}'`\" = set"; then
++  echo $ac_n "(cached) $ac_c" 1>&6
++else
++  
++  
++   ac_ext=C
++# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
++ac_cpp='$CXXCPP $CPPFLAGS'
++ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
++ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
++cross_compiling=$ac_cv_prog_cxx_cross
++
++ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
++
++
++  save_CXXFLAGS="$CXXFLAGS"
++  CXXFLAGS="$CXXFLAGS --pch"
++  cat > conftest.$ac_ext <<EOF
++#line 2456 "configure"
++#include "confdefs.h"
++
++int main() {
++ return 0; 
++; return 0; }
++EOF
++if { (eval echo configure:2463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++  rm -rf conftest*
++  eval "kde_cv_prog_cxx_$kde_cache=yes"
++else
++  echo "configure: failed program was:" >&5
++  cat conftest.$ac_ext >&5
++fi
++rm -f conftest*
++  CXXFLAGS="$save_CXXFLAGS"
++  ac_ext=c
++# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
++ac_cpp='$CPP $CPPFLAGS'
++ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
++cross_compiling=$ac_cv_prog_cc_cross
++
++
++fi
++
++if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
++ echo "$ac_t""yes" 1>&6
++ :
++ CXXFLAGS="$CXXFLAGS --pch"
++else
++ echo "$ac_t""no" 1>&6
++ :
++ 
++fi
++
++                                              fi
++                    
++echo $ac_n "checking whether $CXX supports --inline_keyword_space_time=6""... $ac_c" 1>&6
++echo "configure:2495: checking whether $CXX supports --inline_keyword_space_time=6" >&5
++kde_cache=`echo -inline_keyword_space_time=6 | sed 'y% .=/+-%____p_%'`
++if eval "test \"`echo '$''{'kde_cv_prog_cxx_$kde_cache'+set}'`\" = set"; then
++  echo $ac_n "(cached) $ac_c" 1>&6
++else
++  
++  
++   ac_ext=C
++# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
++ac_cpp='$CXXCPP $CPPFLAGS'
++ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
++ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
++cross_compiling=$ac_cv_prog_cxx_cross
++
++ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
++
++
++  save_CXXFLAGS="$CXXFLAGS"
++  CXXFLAGS="$CXXFLAGS --inline_keyword_space_time=6"
++  cat > conftest.$ac_ext <<EOF
++#line 2515 "configure"
++#include "confdefs.h"
++
++int main() {
++ return 0; 
++; return 0; }
++EOF
++if { (eval echo configure:2522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++  rm -rf conftest*
++  eval "kde_cv_prog_cxx_$kde_cache=yes"
++else
++  echo "configure: failed program was:" >&5
++  cat conftest.$ac_ext >&5
++fi
++rm -f conftest*
++  CXXFLAGS="$save_CXXFLAGS"
++  ac_ext=c
++# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
++ac_cpp='$CPP $CPPFLAGS'
++ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
++cross_compiling=$ac_cv_prog_cc_cross
++
++
++fi
++
++if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
++ echo "$ac_t""yes" 1>&6
++ :
++ CXXFLAGS="$CXXFLAGS --inline_keyword_space_time=6"
++else
++ echo "$ac_t""no" 1>&6
++ :
++ 
++fi
++
++    
++echo $ac_n "checking whether $CXX supports --inline_auto_space_time=2""... $ac_c" 1>&6
++echo "configure:2553: checking whether $CXX supports --inline_auto_space_time=2" >&5
++kde_cache=`echo -inline_auto_space_time=2 | sed 'y% .=/+-%____p_%'`
++if eval "test \"`echo '$''{'kde_cv_prog_cxx_$kde_cache'+set}'`\" = set"; then
++  echo $ac_n "(cached) $ac_c" 1>&6
++else
++  
++  
++   ac_ext=C
++# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
++ac_cpp='$CXXCPP $CPPFLAGS'
++ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
++ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
++cross_compiling=$ac_cv_prog_cxx_cross
++
++ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
++
++
++  save_CXXFLAGS="$CXXFLAGS"
++  CXXFLAGS="$CXXFLAGS --inline_auto_space_time=2"
++  cat > conftest.$ac_ext <<EOF
++#line 2573 "configure"
++#include "confdefs.h"
++
++int main() {
++ return 0; 
++; return 0; }
++EOF
++if { (eval echo configure:2580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++  rm -rf conftest*
++  eval "kde_cv_prog_cxx_$kde_cache=yes"
++else
++  echo "configure: failed program was:" >&5
++  cat conftest.$ac_ext >&5
++fi
++rm -f conftest*
++  CXXFLAGS="$save_CXXFLAGS"
++  ac_ext=c
++# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
++ac_cpp='$CPP $CPPFLAGS'
++ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
++cross_compiling=$ac_cv_prog_cc_cross
++
++
++fi
++
++if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
++ echo "$ac_t""yes" 1>&6
++ :
++ CXXFLAGS="$CXXFLAGS --inline_auto_space_time=2"
++else
++ echo "$ac_t""no" 1>&6
++ :
++ 
++fi
++
++    
++echo $ac_n "checking whether $CXX supports --inline_implicit_space_time=2.0""... $ac_c" 1>&6
++echo "configure:2611: checking whether $CXX supports --inline_implicit_space_time=2.0" >&5
++kde_cache=`echo -inline_implicit_space_time=2.0 | sed 'y% .=/+-%____p_%'`
++if eval "test \"`echo '$''{'kde_cv_prog_cxx_$kde_cache'+set}'`\" = set"; then
++  echo $ac_n "(cached) $ac_c" 1>&6
++else
++  
++  
++   ac_ext=C
++# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
++ac_cpp='$CXXCPP $CPPFLAGS'
++ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
++ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
++cross_compiling=$ac_cv_prog_cxx_cross
++
++ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
++
++
++  save_CXXFLAGS="$CXXFLAGS"
++  CXXFLAGS="$CXXFLAGS --inline_implicit_space_time=2.0"
++  cat > conftest.$ac_ext <<EOF
++#line 2631 "configure"
++#include "confdefs.h"
++
++int main() {
++ return 0; 
++; return 0; }
++EOF
++if { (eval echo configure:2638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++  rm -rf conftest*
++  eval "kde_cv_prog_cxx_$kde_cache=yes"
++else
++  echo "configure: failed program was:" >&5
++  cat conftest.$ac_ext >&5
++fi
++rm -f conftest*
++  CXXFLAGS="$save_CXXFLAGS"
++  ac_ext=c
++# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
++ac_cpp='$CPP $CPPFLAGS'
++ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
++cross_compiling=$ac_cv_prog_cc_cross
++
++
++fi
++
++if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
++ echo "$ac_t""yes" 1>&6
++ :
++ CXXFLAGS="$CXXFLAGS --inline_implicit_space_time=2.0"
++else
++ echo "$ac_t""no" 1>&6
++ :
++ 
++fi
++
++    
++echo $ac_n "checking whether $CXX supports --inline_generated_space_time=2.0""... $ac_c" 1>&6
++echo "configure:2669: checking whether $CXX supports --inline_generated_space_time=2.0" >&5
++kde_cache=`echo -inline_generated_space_time=2.0 | sed 'y% .=/+-%____p_%'`
++if eval "test \"`echo '$''{'kde_cv_prog_cxx_$kde_cache'+set}'`\" = set"; then
++  echo $ac_n "(cached) $ac_c" 1>&6
++else
++  
++  
++   ac_ext=C
++# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
++ac_cpp='$CXXCPP $CPPFLAGS'
++ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
++ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
++cross_compiling=$ac_cv_prog_cxx_cross
++
++ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
++
++
++  save_CXXFLAGS="$CXXFLAGS"
++  CXXFLAGS="$CXXFLAGS --inline_generated_space_time=2.0"
++  cat > conftest.$ac_ext <<EOF
++#line 2689 "configure"
++#include "confdefs.h"
++
++int main() {
++ return 0; 
++; return 0; }
++EOF
++if { (eval echo configure:2696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++  rm -rf conftest*
++  eval "kde_cv_prog_cxx_$kde_cache=yes"
++else
++  echo "configure: failed program was:" >&5
++  cat conftest.$ac_ext >&5
++fi
++rm -f conftest*
++  CXXFLAGS="$save_CXXFLAGS"
++  ac_ext=c
++# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
++ac_cpp='$CPP $CPPFLAGS'
++ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
++cross_compiling=$ac_cv_prog_cc_cross
++
++
++fi
++
++if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
++ echo "$ac_t""yes" 1>&6
++ :
++ CXXFLAGS="$CXXFLAGS --inline_generated_space_time=2.0"
++else
++ echo "$ac_t""no" 1>&6
++ :
++ 
++fi
++
++                        
++echo $ac_n "checking whether $CXX supports --one_per""... $ac_c" 1>&6
++echo "configure:2727: checking whether $CXX supports --one_per" >&5
++kde_cache=`echo -one_per | sed 'y% .=/+-%____p_%'`
++if eval "test \"`echo '$''{'kde_cv_prog_cxx_$kde_cache'+set}'`\" = set"; then
++  echo $ac_n "(cached) $ac_c" 1>&6
++else
++  
++  
++   ac_ext=C
++# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
++ac_cpp='$CXXCPP $CPPFLAGS'
++ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
++ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
++cross_compiling=$ac_cv_prog_cxx_cross
++
++ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
++
++
++  save_CXXFLAGS="$CXXFLAGS"
++  CXXFLAGS="$CXXFLAGS --one_per"
++  cat > conftest.$ac_ext <<EOF
++#line 2747 "configure"
++#include "confdefs.h"
++
++int main() {
++ return 0; 
++; return 0; }
++EOF
++if { (eval echo configure:2754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++  rm -rf conftest*
++  eval "kde_cv_prog_cxx_$kde_cache=yes"
++else
++  echo "configure: failed program was:" >&5
++  cat conftest.$ac_ext >&5
++fi
++rm -f conftest*
++  CXXFLAGS="$save_CXXFLAGS"
++  ac_ext=c
++# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
++ac_cpp='$CPP $CPPFLAGS'
++ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
++cross_compiling=$ac_cv_prog_cc_cross
++
++
++fi
++
++if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
++ echo "$ac_t""yes" 1>&6
++ :
++ CXXFLAGS="$CXXFLAGS --one_per"
++else
++ echo "$ac_t""no" 1>&6
++ :
++ 
++fi
++
++  fi
++  
++    USE_RTTI=
++  
++
++  case "$host" in
++      *-*-irix*)  test "$GXX" = yes && CXXFLAGS="-D_LANGUAGE_C_PLUS_PLUS -D__LANGUAGE_C_PLUS_PLUS $CXXFLAGS" ;;
++      *-*-sysv4.2uw*) CXXFLAGS="-D_UNIXWARE $CXXFLAGS";;
++      *-*-sysv5uw7*) CXXFLAGS="-D_UNIXWARE7 $CXXFLAGS";;
++      *-*-solaris*) 
++        if test "$GXX" = yes; then
++          libstdcpp=`$CXX -print-file-name=libstdc++.so`
++          if test ! -f $libstdcpp; then
++             { echo "configure: error: You've compiled gcc without --enable-shared. This doesn't work with KDE. Please recompile gcc with --enable-shared to receive a libstdc++.so" 1>&2; exit 1; }
++          fi
++        fi
++        ;;
++  esac
++
++  if test "x$kde_use_qt_emb" != "xyes"; then
++  __val=$CXX
++  __forbid=" -fno-rtti -rpath "
++  if test -n "$__val"; then
++    __new=""
++    ac_save_IFS=$IFS
++    IFS=" 	"
++    for i in $__val; do
++      case "$__forbid" in
++        *" $i "*) echo "configure: warning: found forbidden $i in CXX, removing it" 1>&2 ;;
++	*) # Careful to not add spaces, where there were none, because otherwise
++	   # libtool gets confused, if we change e.g. CXX
++	   if test -z "$__new" ; then __new=$i ; else __new="$__new $i" ; fi ;;
++      esac
++    done
++    IFS=$ac_save_IFS
++    CXX=$__new
++  fi
++
++  __val=$CXXFLAGS
++  __forbid=" -fno-rtti -rpath "
++  if test -n "$__val"; then
++    __new=""
++    ac_save_IFS=$IFS
++    IFS=" 	"
++    for i in $__val; do
++      case "$__forbid" in
++        *" $i "*) echo "configure: warning: found forbidden $i in CXXFLAGS, removing it" 1>&2 ;;
++	*) # Careful to not add spaces, where there were none, because otherwise
++	   # libtool gets confused, if we change e.g. CXX
++	   if test -z "$__new" ; then __new=$i ; else __new="$__new $i" ; fi ;;
++      esac
++    done
++    IFS=$ac_save_IFS
++    CXXFLAGS=$__new
++  fi
++
++else
++  __val=$CXX
++  __forbid=" -rpath "
++  if test -n "$__val"; then
++    __new=""
++    ac_save_IFS=$IFS
++    IFS=" 	"
++    for i in $__val; do
++      case "$__forbid" in
++        *" $i "*) echo "configure: warning: found forbidden $i in CXX, removing it" 1>&2 ;;
++	*) # Careful to not add spaces, where there were none, because otherwise
++	   # libtool gets confused, if we change e.g. CXX
++	   if test -z "$__new" ; then __new=$i ; else __new="$__new $i" ; fi ;;
++      esac
++    done
++    IFS=$ac_save_IFS
++    CXX=$__new
++  fi
++
++  __val=$CXXFLAGS
++  __forbid=" -rpath "
++  if test -n "$__val"; then
++    __new=""
++    ac_save_IFS=$IFS
++    IFS=" 	"
++    for i in $__val; do
++      case "$__forbid" in
++        *" $i "*) echo "configure: warning: found forbidden $i in CXXFLAGS, removing it" 1>&2 ;;
++	*) # Careful to not add spaces, where there were none, because otherwise
++	   # libtool gets confused, if we change e.g. CXX
++	   if test -z "$__new" ; then __new=$i ; else __new="$__new $i" ; fi ;;
++      esac
++    done
++    IFS=$ac_save_IFS
++    CXXFLAGS=$__new
++  fi
++
++fi
++
++
++  echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
++echo "configure:2880: checking how to run the C++ preprocessor" >&5
++if test -z "$CXXCPP"; then
++if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
++  echo $ac_n "(cached) $ac_c" 1>&6
++else
++   ac_ext=C
++# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
++ac_cpp='$CXXCPP $CPPFLAGS'
++ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
++ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
++cross_compiling=$ac_cv_prog_cxx_cross
++
++ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
++
++  CXXCPP="${CXX-g++} -E"
++  cat > conftest.$ac_ext <<EOF
++#line 2896 "configure"
++#include "confdefs.h"
++#include <stdlib.h>
++EOF
++ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
++{ (eval echo configure:2901: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
++if test -z "$ac_err"; then
++  :
++else
++  echo "$ac_err" >&5
++  echo "configure: failed program was:" >&5
++  cat conftest.$ac_ext >&5
++  rm -rf conftest*
++  CXXCPP=/lib/cpp
++fi
++rm -f conftest*
++  ac_cv_prog_CXXCPP="$CXXCPP"
++ac_ext=c
++# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
++ac_cpp='$CPP $CPPFLAGS'
++ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
++cross_compiling=$ac_cv_prog_cc_cross
++fi
++fi
++CXXCPP="$ac_cv_prog_CXXCPP"
++echo "$ac_t""$CXXCPP" 1>&6
++
++
++  # the following is to allow programs, that are known to
++  # have problems when compiled with -O2
++  if test -n "$CXXFLAGS"; then
++      kde_safe_IFS=$IFS
++      IFS=" "
++      NOOPT_CXXFLAGS=""
++      for i in $CXXFLAGS; do
++        case $i in
++          -O*)
++                ;;
++          *)
++                NOOPT_CXXFLAGS="$NOOPT_CXXFLAGS $i"
++                ;;
++        esac
++      done
++      IFS=$kde_safe_IFS
++  fi
++
++  if test -n "$CFLAGS"; then
++      kde_safe_IFS=$IFS
++      IFS=" "
++      NOOPT_CFLAGS=""
++      for i in $CFLAGS; do
++        case $i in
++          -O*)
++                ;;
++          *)
++                NOOPT_CFLAGS="$NOOPT_CFLAGS $i"
++                ;;
++        esac
++      done
++      IFS=$kde_safe_IFS
++  fi
++
++  if test "x$kde_use_qt_emb" = "xyes"; then
++    NOOPT_CXXFLAGS="$NOOPT_CXXFLAGS -fno-rtti -DQWS"
++  fi
++
++  
++  
++
++  
++  # Check whether --enable-final or --disable-final was given.
++if test "${enable_final+set}" = set; then
++  enableval="$enable_final"
++  kde_use_final=$enableval
++else
++  kde_use_final=no
++fi
++
++
++  
++  REPO=""
++  NOREPO=""
++
++  
++echo $ac_n "checking whether $CXX supports -frepo""... $ac_c" 1>&6
++echo "configure:2983: checking whether $CXX supports -frepo" >&5
++kde_cache=`echo frepo | sed 'y% .=/+-%____p_%'`
++if eval "test \"`echo '$''{'kde_cv_prog_cxx_$kde_cache'+set}'`\" = set"; then
++  echo $ac_n "(cached) $ac_c" 1>&6
++else
++  
++  
++   ac_ext=C
++# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
++ac_cpp='$CXXCPP $CPPFLAGS'
++ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
++ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
++cross_compiling=$ac_cv_prog_cxx_cross
++
++ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
++
++
++  save_CXXFLAGS="$CXXFLAGS"
++  CXXFLAGS="$CXXFLAGS -frepo"
++  cat > conftest.$ac_ext <<EOF
++#line 3003 "configure"
++#include "confdefs.h"
++
++int main() {
++ return 0; 
++; return 0; }
++EOF
++if { (eval echo configure:3010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++  rm -rf conftest*
++  eval "kde_cv_prog_cxx_$kde_cache=yes"
++else
++  echo "configure: failed program was:" >&5
++  cat conftest.$ac_ext >&5
++fi
++rm -f conftest*
++  CXXFLAGS="$save_CXXFLAGS"
++  ac_ext=c
++# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
++ac_cpp='$CPP $CPPFLAGS'
++ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
++cross_compiling=$ac_cv_prog_cc_cross
++
++
++fi
++
++if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
++ echo "$ac_t""yes" 1>&6
++ :
++ 
++     REPO="-frepo"
++     NOREPO="-fno-repo"
++   
++else
++ echo "$ac_t""no" 1>&6
++ :
++ 
++fi
++
++
++  if test -z "$REPO"; then
++  
++echo $ac_n "checking whether $CXX supports -instances=explicit""... $ac_c" 1>&6
++echo "configure:3046: checking whether $CXX supports -instances=explicit" >&5
++kde_cache=`echo instances=explicit | sed 'y% .=/+-%____p_%'`
++if eval "test \"`echo '$''{'kde_cv_prog_cxx_$kde_cache'+set}'`\" = set"; then
++  echo $ac_n "(cached) $ac_c" 1>&6
++else
++  
++  
++   ac_ext=C
++# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
++ac_cpp='$CXXCPP $CPPFLAGS'
++ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
++ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
++cross_compiling=$ac_cv_prog_cxx_cross
++
++ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
++
++
++  save_CXXFLAGS="$CXXFLAGS"
++  CXXFLAGS="$CXXFLAGS -instances=explicit"
++  cat > conftest.$ac_ext <<EOF
++#line 3066 "configure"
++#include "confdefs.h"
++
++int main() {
++ return 0; 
++; return 0; }
++EOF
++if { (eval echo configure:3073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++  rm -rf conftest*
++  eval "kde_cv_prog_cxx_$kde_cache=yes"
++else
++  echo "configure: failed program was:" >&5
++  cat conftest.$ac_ext >&5
++fi
++rm -f conftest*
++  CXXFLAGS="$save_CXXFLAGS"
++  ac_ext=c
++# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
++ac_cpp='$CPP $CPPFLAGS'
++ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
++cross_compiling=$ac_cv_prog_cc_cross
++
++
++fi
++
++if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
++ echo "$ac_t""yes" 1>&6
++ :
++ 
++     REPO="-instances=explicit"
++     NOREPO="-instances=extern"
++  
++else
++ echo "$ac_t""no" 1>&6
++ :
++ 
++fi
++
++  fi
++
++  if test -n "$REPO"; then
++     cat >> confdefs.h <<EOF
++#define HAVE_TEMPLATE_REPOSITORY 1
++EOF
++
++     
++  fi
++
++  
++  
++
++  if test "x$kde_use_final" = "xyes"; then
++      KDE_USE_FINAL_TRUE=""
++      KDE_USE_FINAL_FALSE="#"
++   else
+       KDE_USE_FINAL_TRUE="#"
+       KDE_USE_FINAL_FALSE=""
+   fi
+@@ -2122,16 +3145,16 @@
+   
+ 
+ 
+-    
++  
+ 
+-    KDE_CXXFLAGS=
+-    
++  KDE_CXXFLAGS=
++  
+ 
+ # Check whether --enable-shared or --disable-shared was given.
+ if test "${enable_shared+set}" = set; then
+   enableval="$enable_shared"
+   p=${PACKAGE-default}
+-case "$enableval" in
++case $enableval in
+ yes) enable_shared=yes ;;
+ no) enable_shared=no ;;
+ *)
+@@ -2154,7 +3177,7 @@
+ if test "${enable_static+set}" = set; then
+   enableval="$enable_static"
+   p=${PACKAGE-default}
+-case "$enableval" in
++case $enableval in
+ yes) enable_static=yes ;;
+ no) enable_static=no ;;
+ *)
+@@ -2177,7 +3200,7 @@
+ if test "${enable_fast_install+set}" = set; then
+   enableval="$enable_fast_install"
+   p=${PACKAGE-default}
+-case "$enableval" in
++case $enableval in
+ yes) enable_fast_install=yes ;;
+ no) enable_fast_install=no ;;
+ *)
+@@ -2208,7 +3231,7 @@
+ if test "$GCC" = yes; then
+   # Check if gcc -print-prog-name=ld gives a path.
+   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
+-echo "configure:2212: checking for ld used by GCC" >&5
++echo "configure:3235: checking for ld used by GCC" >&5
+   case $host in
+   *-*-mingw*)
+     # gcc leaves a trailing carriage return which upsets mingw
+@@ -2216,7 +3239,7 @@
+   *)
+     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+   esac
+-  case "$ac_prog" in
++  case $ac_prog in
+     # Accept absolute paths.
+     [\\/]* | [A-Za-z]:[\\/]*)
+       re_direlt='/[^/][^/]*/\.\./'
+@@ -2238,10 +3261,10 @@
+   esac
+ elif test "$with_gnu_ld" = yes; then
+   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
+-echo "configure:2242: checking for GNU ld" >&5
++echo "configure:3265: checking for GNU ld" >&5
+ else
+   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
+-echo "configure:2245: checking for non-GNU ld" >&5
++echo "configure:3268: checking for non-GNU ld" >&5
+ fi
+ if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+@@ -2276,7 +3299,7 @@
+ fi
+ test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
+ echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
+-echo "configure:2280: checking if the linker ($LD) is GNU ld" >&5
++echo "configure:3303: checking if the linker ($LD) is GNU ld" >&5
+ if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+@@ -2293,7 +3316,7 @@
+ 
+ 
+ echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
+-echo "configure:2297: checking for $LD option to reload object files" >&5
++echo "configure:3320: checking for $LD option to reload object files" >&5
+ if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+@@ -2305,7 +3328,7 @@
+ test -n "$reload_flag" && reload_flag=" $reload_flag"
+ 
+ echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
+-echo "configure:2309: checking for BSD-compatible nm" >&5
++echo "configure:3332: checking for BSD-compatible nm" >&5
+ if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+@@ -2343,7 +3366,7 @@
+ echo "$ac_t""$NM" 1>&6
+ 
+ echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
+-echo "configure:2347: checking whether ln -s works" >&5
++echo "configure:3370: checking whether ln -s works" >&5
+ if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+@@ -2364,7 +3387,7 @@
+ fi
+ 
+ echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6
+-echo "configure:2368: checking how to recognise dependant libraries" >&5
++echo "configure:3391: checking how to recognise dependant libraries" >&5
+ if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+@@ -2382,8 +3405,8 @@
+ # If you have `file' or equivalent on your system and you're not sure
+ # whether `pass_all' will *always* work, you probably want this one.
+ 
+-case "$host_os" in
+-aix4*)
++case $host_os in
++aix*)
+   lt_cv_deplibs_check_method=pass_all
+   ;;
+ 
+@@ -2392,8 +3415,8 @@
+   ;;
+ 
+ bsdi4*)
+-    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
+-    lt_cv_file_magic_cmd='/usr/bin/file -L'
++  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
++  lt_cv_file_magic_cmd='/usr/bin/file -L'
+   lt_cv_file_magic_test_file=/shlib/libc.so
+   ;;
+ 
+@@ -2404,18 +3427,25 @@
+ 
+ darwin* | rhapsody*)
+   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
+-  lt_cv_file_magic_cmd=/usr/bin/file
+-  lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
++  lt_cv_file_magic_cmd='/usr/bin/file -L'
++  case "$host_os" in
++  rhapsody* | darwin1.012)
++    lt_cv_file_magic_test_file='/System/Library/Frameworks/System.framework/System'
++    ;;
++  *) # Darwin 1.3 on
++    lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
++    ;;
++  esac
+   ;;
+ 
+ freebsd* )
+   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+-    case "$host_cpu" in
++    case $host_cpu in
+     i*86 )
+       # Not sure whether the presence of OpenBSD here was a mistake.
+       # Let's accept both of them until this is cleared up.
+-            lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
+-            lt_cv_file_magic_cmd=/usr/bin/file
++      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
++      lt_cv_file_magic_cmd=/usr/bin/file
+       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+       ;;
+     esac
+@@ -2429,28 +3459,27 @@
+   ;;
+ 
+ hpux10.20*|hpux11*)
+-  # TODO:  Does this work for hpux-11 too?
+-    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
+-    lt_cv_file_magic_cmd=/usr/bin/file
++  lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
++  lt_cv_file_magic_cmd=/usr/bin/file
+   lt_cv_file_magic_test_file=/usr/lib/libc.sl
+   ;;
+ 
+ irix5* | irix6*)
+-  case "$host_os" in
++  case $host_os in
+   irix5*)
+     # this will be overridden with pass_all, but let us keep it just in case
+     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
+     ;;
+   *)
+-    case "$LD" in
++    case $LD in
+     *-32|*"-32 ") libmagic=32-bit;;
+     *-n32|*"-n32 ") libmagic=N32;;
+     *-64|*"-64 ") libmagic=64-bit;;
+     *) libmagic=never-match;;
+     esac
+     # this will be overridden with pass_all, but let us keep it just in case
+-        lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
+-        ;;
++    lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
++    ;;
+   esac
+   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
+   lt_cv_deplibs_check_method=pass_all
+@@ -2458,13 +3487,13 @@
+ 
+ # This must be Linux ELF.
+ linux-gnu*)
+-  case "$host_cpu" in
+-  alpha* | i*86 | powerpc* | sparc* | ia64* | s390* )
++  case $host_cpu in
++  alpha* | i*86 | powerpc* | sparc* | ia64* | s390* | m68k* | arm* | mips* | hppa* | sh* )
+     lt_cv_deplibs_check_method=pass_all ;;
+   *)
+     # glibc up to 2.1.1 does not perform some relocations on ARM
+-        lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
+-      esac
++    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
++  esac
+   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
+   ;;
+ 
+@@ -2515,13 +3544,13 @@
+   ;;
+ 
+ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+-  case "$host_vendor" in
++  case $host_vendor in
+   ncr)
+     lt_cv_deplibs_check_method=pass_all
+     ;;
+   motorola)
+-        lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
+-        lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
++    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
++    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+     ;;
+   esac
+   ;;
+@@ -2542,15 +3571,15 @@
+ # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
+ 
+ # Only perform the check for file, if the check method requires it
+-case "$deplibs_check_method" in
++case $deplibs_check_method in
+ file_magic*)
+   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
+-echo "configure:2550: checking for ${ac_tool_prefix}file" >&5
++echo "configure:3579: checking for ${ac_tool_prefix}file" >&5
+ if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+-  case "$MAGIC_CMD" in
++  case $MAGIC_CMD in
+   /*)
+   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+   ;;
+@@ -2566,7 +3595,7 @@
+     if test -f $ac_dir/${ac_tool_prefix}file; then
+       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
+       if test -n "$file_magic_test_file"; then
+-	case "$deplibs_check_method" in
++	case $deplibs_check_method in
+ 	"file_magic "*)
+ 	  file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
+ 	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+@@ -2608,11 +3637,11 @@
+ if test -z "$lt_cv_path_MAGIC_CMD"; then
+   if test -n "$ac_tool_prefix"; then
+     echo $ac_n "checking for file""... $ac_c" 1>&6
+-echo "configure:2612: checking for file" >&5
++echo "configure:3641: checking for file" >&5
+ if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+-  case "$MAGIC_CMD" in
++  case $MAGIC_CMD in
+   /*)
+   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+   ;;
+@@ -2628,7 +3657,7 @@
+     if test -f $ac_dir/file; then
+       lt_cv_path_MAGIC_CMD="$ac_dir/file"
+       if test -n "$file_magic_test_file"; then
+-	case "$deplibs_check_method" in
++	case $deplibs_check_method in
+ 	"file_magic "*)
+ 	  file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
+ 	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+@@ -2679,7 +3708,7 @@
+ # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+ set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+ echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+-echo "configure:2683: checking for $ac_word" >&5
++echo "configure:3712: checking for $ac_word" >&5
+ if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+@@ -2711,7 +3740,7 @@
+   # Extract the first word of "ranlib", so it can be a program name with args.
+ set dummy ranlib; ac_word=$2
+ echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+-echo "configure:2715: checking for $ac_word" >&5
++echo "configure:3744: checking for $ac_word" >&5
+ if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+@@ -2746,7 +3775,7 @@
+ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+ set dummy ${ac_tool_prefix}strip; ac_word=$2
+ echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+-echo "configure:2750: checking for $ac_word" >&5
++echo "configure:3779: checking for $ac_word" >&5
+ if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+@@ -2778,7 +3807,7 @@
+   # Extract the first word of "strip", so it can be a program name with args.
+ set dummy strip; ac_word=$2
+ echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+-echo "configure:2782: checking for $ac_word" >&5
++echo "configure:3811: checking for $ac_word" >&5
+ if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+@@ -2842,12 +3871,12 @@
+ 
+ # Some flags need to be propagated to the compiler or linker for good
+ # libtool support.
+-case "$host" in
++case $host in
+ *-*-irix6*)
+   # Find out which ABI we are using.
+-  echo '#line 2849 "configure"' > conftest.$ac_ext
+-  if { (eval echo configure:2850: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+-    case "`/usr/bin/file conftest.$ac_objext`" in
++  echo '#line 3878 "configure"' > conftest.$ac_ext
++  if { (eval echo configure:3879: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++    case `/usr/bin/file conftest.$ac_objext` in
+     *32-bit*)
+       LD="${LD-ld} -32"
+       ;;
+@@ -2867,7 +3896,7 @@
+   SAVE_CFLAGS="$CFLAGS"
+   CFLAGS="$CFLAGS -belf"
+   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
+-echo "configure:2871: checking whether the C compiler needs -belf" >&5
++echo "configure:3900: checking whether the C compiler needs -belf" >&5
+ if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+@@ -2880,14 +3909,14 @@
+ cross_compiling=$ac_cv_prog_cc_cross
+ 
+      cat > conftest.$ac_ext <<EOF
+-#line 2884 "configure"
++#line 3913 "configure"
+ #include "confdefs.h"
+ 
+ int main() {
+ 
+ ; return 0; }
+ EOF
+-if { (eval echo configure:2891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:3920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   rm -rf conftest*
+   lt_cv_cc_needs_belf=yes
+ else
+@@ -2918,12 +3947,12 @@
+ 
+ 
+ echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
+-echo "configure:2922: checking for Cygwin environment" >&5
++echo "configure:3951: checking for Cygwin environment" >&5
+ if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   cat > conftest.$ac_ext <<EOF
+-#line 2927 "configure"
++#line 3956 "configure"
+ #include "confdefs.h"
+ 
+ int main() {
+@@ -2934,7 +3963,7 @@
+ return __CYGWIN__;
+ ; return 0; }
+ EOF
+-if { (eval echo configure:2938: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:3967: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+   ac_cv_cygwin=yes
+ else
+@@ -2951,19 +3980,19 @@
+ CYGWIN=
+ test "$ac_cv_cygwin" = yes && CYGWIN=yes
+ echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
+-echo "configure:2955: checking for mingw32 environment" >&5
++echo "configure:3984: checking for mingw32 environment" >&5
+ if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   cat > conftest.$ac_ext <<EOF
+-#line 2960 "configure"
++#line 3989 "configure"
+ #include "confdefs.h"
+ 
+ int main() {
+ return __MINGW32__;
+ ; return 0; }
+ EOF
+-if { (eval echo configure:2967: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:3996: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+   ac_cv_mingw32=yes
+ else
+@@ -3098,13 +4127,13 @@
+ cross_compiling=$ac_cv_prog_cc_cross
+ 
+ echo $ac_n "checking for object suffix""... $ac_c" 1>&6
+-echo "configure:3102: checking for object suffix" >&5
++echo "configure:4131: checking for object suffix" >&5
+ if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   rm -f conftest*
+ echo 'int i = 1;' > conftest.$ac_ext
+-if { (eval echo configure:3108: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:4137: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   for ac_file in conftest.*; do
+     case $ac_file in
+     *.c) ;;
+@@ -3124,7 +4153,7 @@
+ 
+ 
+ echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
+-echo "configure:3128: checking for executable suffix" >&5
++echo "configure:4157: checking for executable suffix" >&5
+ if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+@@ -3134,10 +4163,10 @@
+   rm -f conftest*
+   echo 'int main () { return 0; }' > conftest.$ac_ext
+   ac_cv_exeext=
+-  if { (eval echo configure:3138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
++  if { (eval echo configure:4167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+     for file in conftest.*; do
+       case $file in
+-      *.c | *.o | *.obj) ;;
++      *.$ac_ext | *.c | *.o | *.obj) ;;
+       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
+       esac
+     done
+@@ -3171,7 +4200,7 @@
+ 
+ LIBTOOL_SHELL="/bin/sh ./libtool"
+ #  LIBTOOL="$LIBTOOL --silent"
+-KDE_PLUGIN="-avoid-version -module -no-undefined"
++KDE_PLUGIN="-avoid-version -module -no-undefined \$(KDE_RPATH) \$(KDE_MT_LDFLAGS)"
+ 
+ 
+ 
+@@ -3180,7 +4209,7 @@
+     # Extract the first word of "msgfmt", so it can be a program name with args.
+ set dummy msgfmt; ac_word=$2
+ echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+-echo "configure:3184: checking for $ac_word" >&5
++echo "configure:4213: checking for $ac_word" >&5
+ if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+@@ -3214,7 +4243,7 @@
+     # Extract the first word of "gmsgfmt", so it can be a program name with args.
+ set dummy gmsgfmt; ac_word=$2
+ echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+-echo "configure:3218: checking for $ac_word" >&5
++echo "configure:4247: checking for $ac_word" >&5
+ if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+@@ -3259,7 +4288,7 @@
+       # Extract the first word of "xgettext", so it can be a program name with args.
+ set dummy xgettext; ac_word=$2
+ echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+-echo "configure:3263: checking for $ac_word" >&5
++echo "configure:4292: checking for $ac_word" >&5
+ if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+@@ -3311,8 +4340,44 @@
+ ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+ cross_compiling=$ac_cv_prog_cc_cross
+ 
+-      echo $ac_n "checking for main in -lcompat""... $ac_c" 1>&6
+-echo "configure:3316: checking for main in -lcompat" >&5
++      echo $ac_n "checking for main in -lutil""... $ac_c" 1>&6
++echo "configure:4345: checking for main in -lutil" >&5
++ac_lib_var=`echo util'_'main | sed 'y%./+-%__p_%'`
++if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
++  echo $ac_n "(cached) $ac_c" 1>&6
++else
++  ac_save_LIBS="$LIBS"
++LIBS="-lutil  $LIBS"
++cat > conftest.$ac_ext <<EOF
++#line 4353 "configure"
++#include "confdefs.h"
++
++int main() {
++main()
++; return 0; }
++EOF
++if { (eval echo configure:4360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++  rm -rf conftest*
++  eval "ac_cv_lib_$ac_lib_var=yes"
++else
++  echo "configure: failed program was:" >&5
++  cat conftest.$ac_ext >&5
++  rm -rf conftest*
++  eval "ac_cv_lib_$ac_lib_var=no"
++fi
++rm -f conftest*
++LIBS="$ac_save_LIBS"
++
++fi
++if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
++  echo "$ac_t""yes" 1>&6
++  LIBUTIL="-lutil"
++else
++  echo "$ac_t""no" 1>&6
++fi
++    
++   echo $ac_n "checking for main in -lcompat""... $ac_c" 1>&6
++echo "configure:4381: checking for main in -lcompat" >&5
+ ac_lib_var=`echo compat'_'main | sed 'y%./+-%__p_%'`
+ if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+@@ -3320,14 +4385,14 @@
+   ac_save_LIBS="$LIBS"
+ LIBS="-lcompat  $LIBS"
+ cat > conftest.$ac_ext <<EOF
+-#line 3324 "configure"
++#line 4389 "configure"
+ #include "confdefs.h"
+ 
+ int main() {
+ main()
+ ; return 0; }
+ EOF
+-if { (eval echo configure:3331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:4396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   rm -rf conftest*
+   eval "ac_cv_lib_$ac_lib_var=yes"
+ else
+@@ -3349,7 +4414,7 @@
+     
+    kde_have_crypt=
+    echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
+-echo "configure:3353: checking for crypt in -lcrypt" >&5
++echo "configure:4418: checking for crypt in -lcrypt" >&5
+ ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
+ if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+@@ -3357,7 +4422,7 @@
+   ac_save_LIBS="$LIBS"
+ LIBS="-lcrypt  $LIBS"
+ cat > conftest.$ac_ext <<EOF
+-#line 3361 "configure"
++#line 4426 "configure"
+ #include "confdefs.h"
+ /* Override any gcc2 internal prototype to avoid an error.  */
+ /* We use char because int might match the return type of a gcc2
+@@ -3368,7 +4433,7 @@
+ crypt()
+ ; return 0; }
+ EOF
+-if { (eval echo configure:3372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:4437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   rm -rf conftest*
+   eval "ac_cv_lib_$ac_lib_var=yes"
+ else
+@@ -3387,7 +4452,7 @@
+ else
+   echo "$ac_t""no" 1>&6
+ echo $ac_n "checking for crypt in -lc""... $ac_c" 1>&6
+-echo "configure:3391: checking for crypt in -lc" >&5
++echo "configure:4456: checking for crypt in -lc" >&5
+ ac_lib_var=`echo c'_'crypt | sed 'y%./+-%__p_%'`
+ if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+@@ -3395,7 +4460,7 @@
+   ac_save_LIBS="$LIBS"
+ LIBS="-lc  $LIBS"
+ cat > conftest.$ac_ext <<EOF
+-#line 3399 "configure"
++#line 4464 "configure"
+ #include "confdefs.h"
+ /* Override any gcc2 internal prototype to avoid an error.  */
+ /* We use char because int might match the return type of a gcc2
+@@ -3406,7 +4471,7 @@
+ crypt()
+ ; return 0; }
+ EOF
+-if { (eval echo configure:3410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:4475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   rm -rf conftest*
+   eval "ac_cv_lib_$ac_lib_var=yes"
+ else
+@@ -3441,13 +4506,15 @@
+ EOF
+ 
+    fi
+-   echo $ac_n "checking for the third argument of getsockname""... $ac_c" 1>&6
+-echo "configure:3446: checking for the third argument of getsockname" >&5
+-if eval "test \"`echo '$''{'ac_cv_ksize_t'+set}'`\" = set"; then
++   
++  echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
++echo "configure:4512: checking for socklen_t" >&5
++  if eval "test \"`echo '$''{'ac_cv_socklen_t'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   
+- ac_ext=C
++    
++     ac_ext=C
+ # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ ac_cpp='$CXXCPP $CPPFLAGS'
+ ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+@@ -3457,79 +4524,75 @@
+ ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+ 
+ 
+-cat > conftest.$ac_ext <<EOF
+-#line 3462 "configure"
++    cat > conftest.$ac_ext <<EOF
++#line 4529 "configure"
+ #include "confdefs.h"
+ 
+ #include <sys/types.h>
+ #include <sys/socket.h>
+-
++      
+ int main() {
+ 
+ socklen_t a=0;
+ getsockname(0,(struct sockaddr*)0, &a);
+-
++      
+ ; return 0; }
+ EOF
+-if { (eval echo configure:3475: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:4542: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+-  ac_cv_ksize_t=socklen_t
++  ac_cv_socklen_t=socklen_t
+ else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
+   rm -rf conftest*
+-  ac_cv_ksize_t=
+-fi
+-rm -f conftest*
+-if test -z "$ac_cv_ksize_t"; then
+-ac_safe_cxxflags="$CXXFLAGS"
+-if test "$GCC" = "yes"; then
+-  CXXFLAGS="-Werror $CXXFLAGS"
+-fi
+-cat > conftest.$ac_ext <<EOF
+-#line 3491 "configure"
++  cat > conftest.$ac_ext <<EOF
++#line 4550 "configure"
+ #include "confdefs.h"
+ 
+ #include <sys/types.h>
+ #include <sys/socket.h>
+-
++        
+ int main() {
+ 
+ int a=0;
+ getsockname(0,(struct sockaddr*)0, &a);
+-
++        
+ ; return 0; }
+ EOF
+-if { (eval echo configure:3504: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:4563: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+-  ac_cv_ksize_t=int
++  ac_cv_socklen_t=int
+ else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
+   rm -rf conftest*
+-  ac_cv_ksize_t=size_t
++  ac_cv_socklen_t=size_t
++      
+ fi
+ rm -f conftest*
+-CXXFLAGS="$ac_safe_cxxflags"
++    
+ fi
+-ac_ext=c
++rm -f conftest*
++    ac_ext=c
+ # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ ac_cpp='$CPP $CPPFLAGS'
+ ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+ cross_compiling=$ac_cv_prog_cc_cross
+ 
+-
++  
+ fi
+ 
+ 
+-if test -z "$ac_cv_ksize_t"; then
+-  ac_cv_ksize_t=int
+-fi
++  echo "$ac_t""$ac_cv_socklen_t" 1>&6
++  if test "$ac_cv_socklen_t" != "socklen_t"; then
++    cat >> confdefs.h <<EOF
++#define socklen_t $ac_cv_socklen_t
++EOF
+ 
+-echo "$ac_t""$ac_cv_ksize_t" 1>&6
+-cat >> confdefs.h <<EOF
+-#define ksize_t $ac_cv_ksize_t
++  fi
++  cat >> confdefs.h <<EOF
++#define ksize_t socklen_t
+ EOF
+ 
+ 
+@@ -3542,7 +4605,7 @@
+ cross_compiling=$ac_cv_prog_cc_cross
+ 
+    echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
+-echo "configure:3546: checking for dnet_ntoa in -ldnet" >&5
++echo "configure:4609: checking for dnet_ntoa in -ldnet" >&5
+ ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
+ if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+@@ -3550,7 +4613,7 @@
+   ac_save_LIBS="$LIBS"
+ LIBS="-ldnet  $LIBS"
+ cat > conftest.$ac_ext <<EOF
+-#line 3554 "configure"
++#line 4617 "configure"
+ #include "confdefs.h"
+ /* Override any gcc2 internal prototype to avoid an error.  */
+ /* We use char because int might match the return type of a gcc2
+@@ -3561,7 +4624,7 @@
+ dnet_ntoa()
+ ; return 0; }
+ EOF
+-if { (eval echo configure:3565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:4628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   rm -rf conftest*
+   eval "ac_cv_lib_$ac_lib_var=yes"
+ else
+@@ -3583,7 +4646,7 @@
+ 
+    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
+       echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
+-echo "configure:3587: checking for dnet_ntoa in -ldnet_stub" >&5
++echo "configure:4650: checking for dnet_ntoa in -ldnet_stub" >&5
+ ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
+ if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+@@ -3591,7 +4654,7 @@
+   ac_save_LIBS="$LIBS"
+ LIBS="-ldnet_stub  $LIBS"
+ cat > conftest.$ac_ext <<EOF
+-#line 3595 "configure"
++#line 4658 "configure"
+ #include "confdefs.h"
+ /* Override any gcc2 internal prototype to avoid an error.  */
+ /* We use char because int might match the return type of a gcc2
+@@ -3602,7 +4665,7 @@
+ dnet_ntoa()
+ ; return 0; }
+ EOF
+-if { (eval echo configure:3606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:4669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   rm -rf conftest*
+   eval "ac_cv_lib_$ac_lib_var=yes"
+ else
+@@ -3624,12 +4687,12 @@
+ 
+    fi
+    echo $ac_n "checking for inet_ntoa""... $ac_c" 1>&6
+-echo "configure:3628: checking for inet_ntoa" >&5
++echo "configure:4691: checking for inet_ntoa" >&5
+ if eval "test \"`echo '$''{'ac_cv_func_inet_ntoa'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   cat > conftest.$ac_ext <<EOF
+-#line 3633 "configure"
++#line 4696 "configure"
+ #include "confdefs.h"
+ /* System header to define __stub macros and hopefully few prototypes,
+     which can conflict with char inet_ntoa(); below.  */
+@@ -3652,7 +4715,7 @@
+ 
+ ; return 0; }
+ EOF
+-if { (eval echo configure:3656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:4719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   rm -rf conftest*
+   eval "ac_cv_func_inet_ntoa=yes"
+ else
+@@ -3673,7 +4736,7 @@
+ 
+    if test $ac_cv_func_inet_ntoa = no; then
+      echo $ac_n "checking for inet_ntoa in -lnsl""... $ac_c" 1>&6
+-echo "configure:3677: checking for inet_ntoa in -lnsl" >&5
++echo "configure:4740: checking for inet_ntoa in -lnsl" >&5
+ ac_lib_var=`echo nsl'_'inet_ntoa | sed 'y%./+-%__p_%'`
+ if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+@@ -3681,7 +4744,7 @@
+   ac_save_LIBS="$LIBS"
+ LIBS="-lnsl  $LIBS"
+ cat > conftest.$ac_ext <<EOF
+-#line 3685 "configure"
++#line 4748 "configure"
+ #include "confdefs.h"
+ /* Override any gcc2 internal prototype to avoid an error.  */
+ /* We use char because int might match the return type of a gcc2
+@@ -3692,7 +4755,7 @@
+ inet_ntoa()
+ ; return 0; }
+ EOF
+-if { (eval echo configure:3696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:4759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   rm -rf conftest*
+   eval "ac_cv_lib_$ac_lib_var=yes"
+ else
+@@ -3714,12 +4777,12 @@
+ 
+    fi
+    echo $ac_n "checking for connect""... $ac_c" 1>&6
+-echo "configure:3718: checking for connect" >&5
++echo "configure:4781: checking for connect" >&5
+ if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   cat > conftest.$ac_ext <<EOF
+-#line 3723 "configure"
++#line 4786 "configure"
+ #include "confdefs.h"
+ /* System header to define __stub macros and hopefully few prototypes,
+     which can conflict with char connect(); below.  */
+@@ -3742,7 +4805,7 @@
+ 
+ ; return 0; }
+ EOF
+-if { (eval echo configure:3746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:4809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   rm -rf conftest*
+   eval "ac_cv_func_connect=yes"
+ else
+@@ -3763,7 +4826,7 @@
+ 
+    if test $ac_cv_func_connect = no; then
+       echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
+-echo "configure:3767: checking for connect in -lsocket" >&5
++echo "configure:4830: checking for connect in -lsocket" >&5
+ ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
+ if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+@@ -3771,7 +4834,7 @@
+   ac_save_LIBS="$LIBS"
+ LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
+ cat > conftest.$ac_ext <<EOF
+-#line 3775 "configure"
++#line 4838 "configure"
+ #include "confdefs.h"
+ /* Override any gcc2 internal prototype to avoid an error.  */
+ /* We use char because int might match the return type of a gcc2
+@@ -3782,7 +4845,7 @@
+ connect()
+ ; return 0; }
+ EOF
+-if { (eval echo configure:3786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:4849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   rm -rf conftest*
+   eval "ac_cv_lib_$ac_lib_var=yes"
+ else
+@@ -3805,12 +4868,12 @@
+    fi
+ 
+    echo $ac_n "checking for remove""... $ac_c" 1>&6
+-echo "configure:3809: checking for remove" >&5
++echo "configure:4872: checking for remove" >&5
+ if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   cat > conftest.$ac_ext <<EOF
+-#line 3814 "configure"
++#line 4877 "configure"
+ #include "confdefs.h"
+ /* System header to define __stub macros and hopefully few prototypes,
+     which can conflict with char remove(); below.  */
+@@ -3833,7 +4896,7 @@
+ 
+ ; return 0; }
+ EOF
+-if { (eval echo configure:3837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:4900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   rm -rf conftest*
+   eval "ac_cv_func_remove=yes"
+ else
+@@ -3854,7 +4917,7 @@
+ 
+    if test $ac_cv_func_remove = no; then
+       echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
+-echo "configure:3858: checking for remove in -lposix" >&5
++echo "configure:4921: checking for remove in -lposix" >&5
+ ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
+ if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+@@ -3862,7 +4925,7 @@
+   ac_save_LIBS="$LIBS"
+ LIBS="-lposix  $LIBS"
+ cat > conftest.$ac_ext <<EOF
+-#line 3866 "configure"
++#line 4929 "configure"
+ #include "confdefs.h"
+ /* Override any gcc2 internal prototype to avoid an error.  */
+ /* We use char because int might match the return type of a gcc2
+@@ -3873,7 +4936,7 @@
+ remove()
+ ; return 0; }
+ EOF
+-if { (eval echo configure:3877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:4940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   rm -rf conftest*
+   eval "ac_cv_lib_$ac_lib_var=yes"
+ else
+@@ -3897,12 +4960,12 @@
+ 
+    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
+    echo $ac_n "checking for shmat""... $ac_c" 1>&6
+-echo "configure:3901: checking for shmat" >&5
++echo "configure:4964: checking for shmat" >&5
+ if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   cat > conftest.$ac_ext <<EOF
+-#line 3906 "configure"
++#line 4969 "configure"
+ #include "confdefs.h"
+ /* System header to define __stub macros and hopefully few prototypes,
+     which can conflict with char shmat(); below.  */
+@@ -3925,7 +4988,7 @@
+ 
+ ; return 0; }
+ EOF
+-if { (eval echo configure:3929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:4992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   rm -rf conftest*
+   eval "ac_cv_func_shmat=yes"
+ else
+@@ -3943,7 +5006,7 @@
+ else
+   echo "$ac_t""no" 1>&6
+ echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
+-echo "configure:3947: checking for shmat in -lipc" >&5
++echo "configure:5010: checking for shmat in -lipc" >&5
+ ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
+ if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+@@ -3951,7 +5014,7 @@
+   ac_save_LIBS="$LIBS"
+ LIBS="-lipc  $LIBS"
+ cat > conftest.$ac_ext <<EOF
+-#line 3955 "configure"
++#line 5018 "configure"
+ #include "confdefs.h"
+ /* Override any gcc2 internal prototype to avoid an error.  */
+ /* We use char because int might match the return type of a gcc2
+@@ -3962,7 +5025,7 @@
+ shmat()
+ ; return 0; }
+ EOF
+-if { (eval echo configure:3966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:5029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   rm -rf conftest*
+   eval "ac_cv_lib_$ac_lib_var=yes"
+ else
+@@ -3985,101 +5048,99 @@
+ fi
+ 
+    
+-   # Solaris 2.6 needs -lresolv for res_init
+-   echo $ac_n "checking for res_init""... $ac_c" 1>&6
+-echo "configure:3991: checking for res_init" >&5
+-if eval "test \"`echo '$''{'ac_cv_func_res_init'+set}'`\" = set"; then
++   # Solaris 2.6 and others need -lresolv for res_init
++   for ac_func in res_init
++do
++echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
++echo "configure:5056: checking for $ac_func" >&5
++if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   cat > conftest.$ac_ext <<EOF
+-#line 3996 "configure"
++#line 5061 "configure"
+ #include "confdefs.h"
+ /* System header to define __stub macros and hopefully few prototypes,
+-    which can conflict with char res_init(); below.  */
++    which can conflict with char $ac_func(); below.  */
+ #include <assert.h>
+ /* Override any gcc2 internal prototype to avoid an error.  */
+ /* We use char because int might match the return type of a gcc2
+     builtin and then its argument prototype would still apply.  */
+-char res_init();
++char $ac_func();
+ 
+ int main() {
+ 
+ /* The GNU C library defines this for functions which it implements
+     to always fail with ENOSYS.  Some functions are actually named
+     something starting with __ and the normal name is an alias.  */
+-#if defined (__stub_res_init) || defined (__stub___res_init)
++#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+ choke me
+ #else
+-res_init();
++$ac_func();
+ #endif
+ 
+ ; return 0; }
+ EOF
+-if { (eval echo configure:4019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:5084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   rm -rf conftest*
+-  eval "ac_cv_func_res_init=yes"
++  eval "ac_cv_func_$ac_func=yes"
+ else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
+   rm -rf conftest*
+-  eval "ac_cv_func_res_init=no"
++  eval "ac_cv_func_$ac_func=no"
+ fi
+ rm -f conftest*
+ fi
+ 
+-if eval "test \"`echo '$ac_cv_func_'res_init`\" = yes"; then
++if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+   echo "$ac_t""yes" 1>&6
+-  :
++    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
++  cat >> confdefs.h <<EOF
++#define $ac_tr_func 1
++EOF
++ 
+ else
+   echo "$ac_t""no" 1>&6
+-echo $ac_n "checking for res_init in -lresolv""... $ac_c" 1>&6
+-echo "configure:4037: checking for res_init in -lresolv" >&5
+-ac_lib_var=`echo resolv'_'res_init | sed 'y%./+-%__p_%'`
+-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+-  echo $ac_n "(cached) $ac_c" 1>&6
+-else
+-  ac_save_LIBS="$LIBS"
+-LIBS="-lresolv  $LIBS"
+-cat > conftest.$ac_ext <<EOF
+-#line 4045 "configure"
++kde_libs_safe="$LIBS"
++     LIBS="$LIBS $X_EXTRA_LIBS -lresolv"
++     cat > conftest.$ac_ext <<EOF
++#line 5108 "configure"
+ #include "confdefs.h"
+-/* Override any gcc2 internal prototype to avoid an error.  */
+-/* We use char because int might match the return type of a gcc2
+-    builtin and then its argument prototype would still apply.  */
+-char res_init();
++
++#include <resolv.h>
+ 
+ int main() {
+-res_init()
++ 
++res_init(); 
++
+ ; return 0; }
+ EOF
+-if { (eval echo configure:4056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:5119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   rm -rf conftest*
+-  eval "ac_cv_lib_$ac_lib_var=yes"
++  LIBRESOLV="-lresolv"
++        X_EXTRA_LIBS="$X_EXTRA_LIBS $LIBRESOLV"
++        cat >> confdefs.h <<\EOF
++#define HAVE_RES_INIT 1
++EOF
++
++     
+ else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
+-  rm -rf conftest*
+-  eval "ac_cv_lib_$ac_lib_var=no"
+ fi
+ rm -f conftest*
+-LIBS="$ac_save_LIBS"
+-
+-fi
+-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+-  echo "$ac_t""yes" 1>&6
+-  X_EXTRA_LIBS="$X_EXTRA_LIBS -lresolv"
+-else
+-  echo "$ac_t""no" 1>&6
+-fi
+-
++     LIBS=$kde_libs_safe
++   
+ fi
++done
+ 
+ 
+    LIBSOCKET="$X_EXTRA_LIBS"
+    
+    
++   
+    echo $ac_n "checking for killpg in -lucb""... $ac_c" 1>&6
+-echo "configure:4083: checking for killpg in -lucb" >&5
++echo "configure:5144: checking for killpg in -lucb" >&5
+ ac_lib_var=`echo ucb'_'killpg | sed 'y%./+-%__p_%'`
+ if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+@@ -4087,7 +5148,7 @@
+   ac_save_LIBS="$LIBS"
+ LIBS="-lucb  $LIBS"
+ cat > conftest.$ac_ext <<EOF
+-#line 4091 "configure"
++#line 5152 "configure"
+ #include "confdefs.h"
+ /* Override any gcc2 internal prototype to avoid an error.  */
+ /* We use char because int might match the return type of a gcc2
+@@ -4098,7 +5159,7 @@
+ killpg()
+ ; return 0; }
+ EOF
+-if { (eval echo configure:4102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:5163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   rm -rf conftest*
+   eval "ac_cv_lib_$ac_lib_var=yes"
+ else
+@@ -4121,11 +5182,11 @@
+ 
+    case $host in     *-*-lynxos* )
+         echo $ac_n "checking LynxOS header file wrappers""... $ac_c" 1>&6
+-echo "configure:4125: checking LynxOS header file wrappers" >&5
++echo "configure:5186: checking LynxOS header file wrappers" >&5
+         CFLAGS="$CFLAGS -D__NO_INCLUDE_WARN__"
+         echo "$ac_t""disabled" 1>&6
+         echo $ac_n "checking for gethostbyname in -lbsd""... $ac_c" 1>&6
+-echo "configure:4129: checking for gethostbyname in -lbsd" >&5
++echo "configure:5190: checking for gethostbyname in -lbsd" >&5
+ ac_lib_var=`echo bsd'_'gethostbyname | sed 'y%./+-%__p_%'`
+ if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+@@ -4133,7 +5194,7 @@
+   ac_save_LIBS="$LIBS"
+ LIBS="-lbsd  $LIBS"
+ cat > conftest.$ac_ext <<EOF
+-#line 4137 "configure"
++#line 5198 "configure"
+ #include "confdefs.h"
+ /* Override any gcc2 internal prototype to avoid an error.  */
+ /* We use char because int might match the return type of a gcc2
+@@ -4144,7 +5205,7 @@
+ gethostbyname()
+ ; return 0; }
+ EOF
+-if { (eval echo configure:4148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:5209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   rm -rf conftest*
+   eval "ac_cv_lib_$ac_lib_var=yes"
+ else
+@@ -4167,7 +5228,7 @@
+     esac
+ 
+      echo $ac_n "checking size of int""... $ac_c" 1>&6
+-echo "configure:4171: checking size of int" >&5
++echo "configure:5232: checking size of int" >&5
+ if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+@@ -4175,9 +5236,10 @@
+   ac_cv_sizeof_int=4
+ else
+   cat > conftest.$ac_ext <<EOF
+-#line 4179 "configure"
++#line 5240 "configure"
+ #include "confdefs.h"
+ #include <stdio.h>
++#include <sys/types.h>
+ main()
+ {
+   FILE *f=fopen("conftestval", "w");
+@@ -4186,7 +5248,7 @@
+   exit(0);
+ }
+ EOF
+-if { (eval echo configure:4190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
++if { (eval echo configure:5252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+ then
+   ac_cv_sizeof_int=`cat conftestval`
+ else
+@@ -4205,7 +5267,7 @@
+ EOF
+ 
+   echo $ac_n "checking size of long""... $ac_c" 1>&6
+-echo "configure:4209: checking size of long" >&5
++echo "configure:5271: checking size of long" >&5
+ if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+@@ -4213,9 +5275,10 @@
+   ac_cv_sizeof_long=4
+ else
+   cat > conftest.$ac_ext <<EOF
+-#line 4217 "configure"
++#line 5279 "configure"
+ #include "confdefs.h"
+ #include <stdio.h>
++#include <sys/types.h>
+ main()
+ {
+   FILE *f=fopen("conftestval", "w");
+@@ -4224,7 +5287,7 @@
+   exit(0);
+ }
+ EOF
+-if { (eval echo configure:4228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
++if { (eval echo configure:5291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+ then
+   ac_cv_sizeof_long=`cat conftestval`
+ else
+@@ -4243,7 +5306,7 @@
+ EOF
+ 
+   echo $ac_n "checking size of char *""... $ac_c" 1>&6
+-echo "configure:4247: checking size of char *" >&5
++echo "configure:5310: checking size of char *" >&5
+ if eval "test \"`echo '$''{'ac_cv_sizeof_char_p'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+@@ -4251,9 +5314,10 @@
+   ac_cv_sizeof_char_p=4
+ else
+   cat > conftest.$ac_ext <<EOF
+-#line 4255 "configure"
++#line 5318 "configure"
+ #include "confdefs.h"
+ #include <stdio.h>
++#include <sys/types.h>
+ main()
+ {
+   FILE *f=fopen("conftestval", "w");
+@@ -4262,7 +5326,7 @@
+   exit(0);
+ }
+ EOF
+-if { (eval echo configure:4266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
++if { (eval echo configure:5330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+ then
+   ac_cv_sizeof_char_p=`cat conftestval`
+ else
+@@ -4280,10 +5344,49 @@
+ #define SIZEOF_CHAR_P $ac_cv_sizeof_char_p
+ EOF
+ 
++  echo $ac_n "checking size of char""... $ac_c" 1>&6
++echo "configure:5349: checking size of char" >&5
++if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then
++  echo $ac_n "(cached) $ac_c" 1>&6
++else
++  if test "$cross_compiling" = yes; then
++  ac_cv_sizeof_char=1
++else
++  cat > conftest.$ac_ext <<EOF
++#line 5357 "configure"
++#include "confdefs.h"
++#include <stdio.h>
++#include <sys/types.h>
++main()
++{
++  FILE *f=fopen("conftestval", "w");
++  if (!f) exit(1);
++  fprintf(f, "%d\n", sizeof(char));
++  exit(0);
++}
++EOF
++if { (eval echo configure:5369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
++then
++  ac_cv_sizeof_char=`cat conftestval`
++else
++  echo "configure: failed program was:" >&5
++  cat conftest.$ac_ext >&5
++  rm -fr conftest*
++  ac_cv_sizeof_char=0
++fi
++rm -fr conftest*
++fi
++
++fi
++echo "$ac_t""$ac_cv_sizeof_char" 1>&6
++cat >> confdefs.h <<EOF
++#define SIZEOF_CHAR $ac_cv_sizeof_char
++EOF
++
+ 
+    
+ echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
+-echo "configure:4287: checking for dlopen in -ldl" >&5
++echo "configure:5390: checking for dlopen in -ldl" >&5
+ ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
+ if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+@@ -4291,7 +5394,7 @@
+   ac_save_LIBS="$LIBS"
+ LIBS="-ldl  $LIBS"
+ cat > conftest.$ac_ext <<EOF
+-#line 4295 "configure"
++#line 5398 "configure"
+ #include "confdefs.h"
+ /* Override any gcc2 internal prototype to avoid an error.  */
+ /* We use char because int might match the return type of a gcc2
+@@ -4302,7 +5405,7 @@
+ dlopen()
+ ; return 0; }
+ EOF
+-if { (eval echo configure:4306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:5409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   rm -rf conftest*
+   eval "ac_cv_lib_$ac_lib_var=yes"
+ else
+@@ -4327,7 +5430,7 @@
+ 
+ 
+ echo $ac_n "checking for shl_unload in -ldld""... $ac_c" 1>&6
+-echo "configure:4331: checking for shl_unload in -ldld" >&5
++echo "configure:5434: checking for shl_unload in -ldld" >&5
+ ac_lib_var=`echo dld'_'shl_unload | sed 'y%./+-%__p_%'`
+ if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+@@ -4335,7 +5438,7 @@
+   ac_save_LIBS="$LIBS"
+ LIBS="-ldld  $LIBS"
+ cat > conftest.$ac_ext <<EOF
+-#line 4339 "configure"
++#line 5442 "configure"
+ #include "confdefs.h"
+ /* Override any gcc2 internal prototype to avoid an error.  */
+ /* We use char because int might match the return type of a gcc2
+@@ -4346,7 +5449,7 @@
+ shl_unload()
+ ; return 0; }
+ EOF
+-if { (eval echo configure:4350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:5453: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   rm -rf conftest*
+   eval "ac_cv_lib_$ac_lib_var=yes"
+ else
+@@ -4375,7 +5478,7 @@
+ 
+ 
+ echo $ac_n "checking for extra includes""... $ac_c" 1>&6
+-echo "configure:4379: checking for extra includes" >&5
++echo "configure:5482: checking for extra includes" >&5
+ # Check whether --with-extra-includes or --without-extra-includes was given.
+ if test "${with_extra_includes+set}" = set; then
+   withval="$with_extra_includes"
+@@ -4406,7 +5509,7 @@
+ 
+ kde_extra_libs=
+ echo $ac_n "checking for extra libs""... $ac_c" 1>&6
+-echo "configure:4410: checking for extra libs" >&5
++echo "configure:5513: checking for extra libs" >&5
+ # Check whether --with-extra-libs or --without-extra-libs was given.
+ if test "${with_extra_libs+set}" = set; then
+   withval="$with_extra_libs"
+@@ -4440,7 +5543,7 @@
+ 
+ 
+ echo $ac_n "checking for libz""... $ac_c" 1>&6
+-echo "configure:4444: checking for libz" >&5
++echo "configure:5547: checking for libz" >&5
+ if eval "test \"`echo '$''{'ac_cv_lib_z'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+@@ -4457,7 +5560,7 @@
+ kde_save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
+ cat > conftest.$ac_ext <<EOF
+-#line 4461 "configure"
++#line 5564 "configure"
+ #include "confdefs.h"
+ 
+ #include<zlib.h>
+@@ -4466,7 +5569,7 @@
+ return (zlibVersion() == ZLIB_VERSION); 
+ ; return 0; }
+ EOF
+-if { (eval echo configure:4470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:5573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   rm -rf conftest*
+   eval "ac_cv_lib_z='-lz'"
+ else
+@@ -4495,8 +5598,31 @@
+ fi
+ 
+ 
++
++# Check whether --enable-embedded or --disable-embedded was given.
++if test "${enable_embedded+set}" = set; then
++  enableval="$enable_embedded"
++  kde_use_qt_emb=$enableval
++else
++  kde_use_qt_emb=no
++
++fi
++
++
++# Check whether --enable-qtopia or --disable-qtopia was given.
++if test "${enable_qtopia+set}" = set; then
++  enableval="$enable_qtopia"
++  kde_use_qt_emb_palm=$enableval
++else
++  kde_use_qt_emb_palm=no
++
++fi
++
++
++if test "$kde_use_qt_emb" = "no"; then
++
+ echo $ac_n "checking for X""... $ac_c" 1>&6
+-echo "configure:4500: checking for X" >&5
++echo "configure:5626: checking for X" >&5
+ 
+ ac_ext=c
+ # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+@@ -4530,12 +5656,12 @@
+ 
+   # First, try using that file with no special directory specified.
+ cat > conftest.$ac_ext <<EOF
+-#line 4534 "configure"
++#line 5660 "configure"
+ #include "confdefs.h"
+ #include <$x_direct_test_include>
+ EOF
+ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+-{ (eval echo configure:4539: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++{ (eval echo configure:5665: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+ if test -z "$ac_err"; then
+   rm -rf conftest*
+@@ -4604,14 +5730,14 @@
+   ac_save_LIBS="$LIBS"
+   LIBS="-l$x_direct_test_library $LIBS"
+ cat > conftest.$ac_ext <<EOF
+-#line 4608 "configure"
++#line 5734 "configure"
+ #include "confdefs.h"
+ 
+ int main() {
+ ${x_direct_test_function}()
+ ; return 0; }
+ EOF
+-if { (eval echo configure:4615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:5741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   rm -rf conftest*
+   LIBS="$ac_save_LIBS"
+ # We can link X programs with no special library path.
+@@ -4674,6 +5800,8 @@
+ case "$host" in
+ mips-sgi-irix6*)
+   ;;
++*-*-solaris*)
++  ;;
+ *)
+   rm -fr conftestdir
+ if mkdir conftestdir; then
+@@ -4729,79 +5857,355 @@
+   kde_x_libraries=$ac_x_libraries
+ fi
+ 
+-if test "$kde_x_includes" = NO; then
+-  { echo "configure: error: Can't find X includes. Please check your installation and add the correct paths!" 1>&2; exit 1; }
+-fi
++if test "$kde_x_includes" = NO; then
++  { echo "configure: error: Can't find X includes. Please check your installation and add the correct paths!" 1>&2; exit 1; }
++fi
++
++if test "$kde_x_libraries" = NO; then
++  { echo "configure: error: Can't find X libraries. Please check your installation and add the correct paths!" 1>&2; exit 1; }
++fi
++
++# Record where we found X for the cache.
++kde_cv_have_x="have_x=yes \
++         kde_x_includes=$kde_x_includes kde_x_libraries=$kde_x_libraries"
++
++fi
++
++eval "$kde_cv_have_x"
++
++if test "$have_x" != yes; then
++  echo "$ac_t""$have_x" 1>&6
++  no_x=yes
++else
++  echo "$ac_t""libraries $kde_x_libraries, headers $kde_x_includes" 1>&6
++fi
++
++if test -z "$kde_x_includes" || test "x$kde_x_includes" = xNONE; then
++  X_INCLUDES=""
++  x_includes=".";  else
++  x_includes=$kde_x_includes
++  X_INCLUDES="-I$x_includes"
++fi
++
++if test -z "$kde_x_libraries" || test "x$kde_x_libraries" = xNONE; then
++  X_LDFLAGS=""
++  x_libraries="/usr/lib";  else
++  x_libraries=$kde_x_libraries
++  X_LDFLAGS="-L$x_libraries"
++fi
++all_includes="$X_INCLUDES"
++all_libraries="$X_LDFLAGS"
++
++
++
++
++
++
++# Check for libraries that X11R6 Xt/Xaw programs need.
++ac_save_LDFLAGS="$LDFLAGS"
++LDFLAGS="$LDFLAGS $X_LDFLAGS"
++# SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
++# check for ICE first), but we must link in the order -lSM -lICE or
++# we get undefined symbols.  So assume we have SM if we have ICE.
++# These have to be linked with before -lX11, unlike the other
++# libraries we check for below, so use a different variable.
++#  --interran at uluru.Stanford.EDU, kb at cs.umb.edu.
++echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
++echo "configure:5915: checking for IceConnectionNumber in -lICE" >&5
++ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
++if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
++  echo $ac_n "(cached) $ac_c" 1>&6
++else
++  ac_save_LIBS="$LIBS"
++LIBS="-lICE $X_EXTRA_LIBS $LIBS"
++cat > conftest.$ac_ext <<EOF
++#line 5923 "configure"
++#include "confdefs.h"
++/* Override any gcc2 internal prototype to avoid an error.  */
++/* We use char because int might match the return type of a gcc2
++    builtin and then its argument prototype would still apply.  */
++char IceConnectionNumber();
++
++int main() {
++IceConnectionNumber()
++; return 0; }
++EOF
++if { (eval echo configure:5934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++  rm -rf conftest*
++  eval "ac_cv_lib_$ac_lib_var=yes"
++else
++  echo "configure: failed program was:" >&5
++  cat conftest.$ac_ext >&5
++  rm -rf conftest*
++  eval "ac_cv_lib_$ac_lib_var=no"
++fi
++rm -f conftest*
++LIBS="$ac_save_LIBS"
++
++fi
++if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
++  echo "$ac_t""yes" 1>&6
++  LIBSM="-lSM -lICE"
++else
++  echo "$ac_t""no" 1>&6
++fi
++
++
++LDFLAGS="$ac_save_LDFLAGS"
++
++
++
++LIB_X11='-lX11 $(LIBSOCKET)'
++
++
++echo $ac_n "checking for libXext""... $ac_c" 1>&6
++echo "configure:5963: checking for libXext" >&5
++if eval "test \"`echo '$''{'kde_cv_have_libXext'+set}'`\" = set"; then
++  echo $ac_n "(cached) $ac_c" 1>&6
++else
++  
++kde_ldflags_safe="$LDFLAGS"
++kde_libs_safe="$LIBS"
++
++LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS"
++LIBS="-lXext -lX11 $LIBSOCKET"
++
++cat > conftest.$ac_ext <<EOF
++#line 5975 "configure"
++#include "confdefs.h"
++
++#include <stdio.h>
++#ifdef STDC_HEADERS
++# include <stdlib.h>
++#endif
++
++int main() {
++
++printf("hello Xext\n");
++
++; return 0; }
++EOF
++if { (eval echo configure:5989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++  rm -rf conftest*
++  kde_cv_have_libXext=yes
++else
++  echo "configure: failed program was:" >&5
++  cat conftest.$ac_ext >&5
++  rm -rf conftest*
++  kde_cv_have_libXext=no
++   
++fi
++rm -f conftest*
++
++LDFLAGS=$kde_ldflags_safe
++LIBS=$kde_libs_safe
++ 
++fi
++
++
++echo "$ac_t""$kde_cv_have_libXext" 1>&6
++
++if test "$kde_cv_have_libXext" = "no"; then
++  { echo "configure: error: We need a working libXext to proceed. Since configure
++can't find it itself, we stop here assuming that make wouldn't find
++them either." 1>&2; exit 1; }
++fi
++
++echo $ac_n "checking for Xinerama""... $ac_c" 1>&6
++echo "configure:6016: checking for Xinerama" >&5
++
++ # Check whether --with-xinerama or --without-xinerama was given.
++if test "${with_xinerama+set}" = set; then
++  withval="$with_xinerama"
++  
++    no_xinerama=no
++  
++else
++  
++    no_xinerama=yes
++  
++
++fi
++
++
++kde_save_LDFLAGS="$LDFLAGS"
++kde_save_CFLAGS="$CFLAGS"
++kde_save_LIBS="$LIBS"
++LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS"
++CFLAGS="$CFLAGS -I$x_includes"
++LIBS="-lXinerama -lXext"
++
++if test "x$no_xinerama" = "xno"; then
++
++  if eval "test \"`echo '$''{'ac_cv_have_xinerama'+set}'`\" = set"; then
++  echo $ac_n "(cached) $ac_c" 1>&6
++else
++  
++	  cat > conftest.$ac_ext <<EOF
++#line 6046 "configure"
++#include "confdefs.h"
++#include <X11/Xlib.h>
++  			#include <X11/extensions/Xinerama.h>
++int main() {
++XineramaIsActive(NULL);
++; return 0; }
++EOF
++if { (eval echo configure:6054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++  rm -rf conftest*
++  ac_cv_have_xinerama="yes"
++else
++  echo "configure: failed program was:" >&5
++  cat conftest.$ac_ext >&5
++  rm -rf conftest*
++  ac_cv_have_xinerama="no"
++fi
++rm -f conftest*
++  
++fi
++
++else
++  ac_cv_have_xinerama=no;
++fi
++
++echo "$ac_t""$ac_cv_have_xinerama" 1>&6
++
++LIBXINERAMA=""
++
++if test "$ac_cv_have_xinerama" = "yes"; then
++  cat >> confdefs.h <<\EOF
++#define HAVE_XINERAMA 1
++EOF
++
++  LIBXINERAMA="-lXinerama"
++fi
++
++
++
++LDFLAGS="$kde_save_LDFLAGS"
++CFLAGS="$kde_save_CFLAGS"
++LIBS="$kde_save_LIBS"
++
++LIB_XEXT="-lXext"
++QTE_NORTTI=""
++
++else
++    CXXFLAGS="$CXXFLAGS -fno-rtti -DQWS"
++  CFLAGS="$CFLAGS -DQWS"
++  LDFLAGS="$LDFLAGS -DQWS"
++  QTE_NORTTI="-fno-rtti -DQWS"
++  X_PRE_LIBS=""
++  LIB_X11=""
++  LIB_XEXT=""
++  LIBSM=""
++  X_INCLUDES=""
++  X_LDFLAGS=""
++  x_includes=""
++  x_libraries=""
++  
++  
++  
++  
++  
++  
++  
++fi
++
++
++
++
++ac_ext=c
++# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
++ac_cpp='$CPP $CPPFLAGS'
++ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
++cross_compiling=$ac_cv_prog_cc_cross
++
+ 
+-if test "$kde_x_libraries" = NO; then
+-  { echo "configure: error: Can't find X libraries. Please check your installation and add the correct paths!" 1>&2; exit 1; }
+-fi
+ 
+-# Record where we found X for the cache.
+-kde_cv_have_x="have_x=yes \
+-         kde_x_includes=$kde_x_includes kde_x_libraries=$kde_x_libraries"
+ 
++if test -z ""; then
++  kde_qtver=3
++  kde_qtsubver=1
++else
++  kde_qtsubver=`echo "" | sed -e 's#[0-9][0-9]*\.\([0-9][0-9]*\).*#\1#'`
++  # following is the check if subversion isn´t found in passed argument
++  if test "$kde_qtsubver" = ""; then
++    kde_qtsubver=1
++  fi
++  kde_qtver=`echo "" | sed -e 's#^\([0-9][0-9]*\)\..*#\1#'`
++  if test "$kde_qtver" = "1"; then
++    kde_qtsubver=42
++  fi
+ fi
+-eval "$kde_cv_have_x"
+ 
+-if test "$have_x" != yes; then
+-  echo "$ac_t""$have_x" 1>&6
+-  no_x=yes
++if test -z ""; then
++  if test "$kde_qtver" = "2"; then
++    if test $kde_qtsubver -gt 0; then
++      kde_qt_minversion=">= Qt 2.2.2"
++    else
++      kde_qt_minversion=">= Qt 2.0.2"
++    fi
++  fi
++  if test "$kde_qtver" = "3"; then
++    kde_qt_minversion=">= Qt 3.0.1"
++  fi
++  if test "$kde_qtver" = "1"; then
++    kde_qt_minversion=">= 1.42 and < 2.0"
++  fi
+ else
+-  echo "$ac_t""libraries $kde_x_libraries, headers $kde_x_includes" 1>&6
++   kde_qt_minversion=
+ fi
+ 
+-if test -z "$kde_x_includes" || test "x$kde_x_includes" = xNONE; then
+-  X_INCLUDES=""
+-  x_includes=".";  else
+-  x_includes=$kde_x_includes
+-  X_INCLUDES="-I$x_includes"
++if test -z ""; then
++   if test $kde_qtver = 3; then
++     kde_qt_verstring="QT_VERSION >= 301"
++   fi
++   if test $kde_qtver = 2; then
++     if test $kde_qtsubver -gt 0; then
++       kde_qt_verstring="QT_VERSION >= 222"
++     else
++       kde_qt_verstring="QT_VERSION >= 200"
++     fi
++   fi
++   if test $kde_qtver = 1; then
++    kde_qt_verstring="QT_VERSION >= 142 && QT_VERSION < 200"
++   fi
++else
++   kde_qt_verstring=
+ fi
+ 
+-if test -z "$kde_x_libraries" || test "x$kde_x_libraries" = xNONE; then
+-  X_LDFLAGS=""
+-  x_libraries="/usr/lib";  else
+-  x_libraries=$kde_x_libraries
+-  X_LDFLAGS="-L$x_libraries"
++if test $kde_qtver = 3; then
++  kde_qt_dirs="$QTDIR /usr/lib/qt3 /usr/lib/qt"
++fi
++if test $kde_qtver = 2; then
++   kde_qt_dirs="$QTDIR /usr/lib/qt2 /usr/lib/qt"
++fi
++if test $kde_qtver = 1; then
++   kde_qt_dirs="$QTDIR /usr/lib/qt"
+ fi
+-all_includes="$X_INCLUDES"
+-all_libraries="$X_LDFLAGS"
+-
+-
+-
+-
+ 
+ 
+-# Check for libraries that X11R6 Xt/Xaw programs need.
+-ac_save_LDFLAGS="$LDFLAGS"
+-LDFLAGS="$LDFLAGS $X_LDFLAGS"
+-# SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
+-# check for ICE first), but we must link in the order -lSM -lICE or
+-# we get undefined symbols.  So assume we have SM if we have ICE.
+-# These have to be linked with before -lX11, unlike the other
+-# libraries we check for below, so use a different variable.
+-#  --interran at uluru.Stanford.EDU, kb at cs.umb.edu.
+-echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
+-echo "configure:4786: checking for IceConnectionNumber in -lICE" >&5
+-ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
++echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
++echo "configure:6190: checking for pthread_create in -lpthread" >&5
++ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
+ if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   ac_save_LIBS="$LIBS"
+-LIBS="-lICE $X_EXTRA_LIBS $LIBS"
++LIBS="-lpthread  $LIBS"
+ cat > conftest.$ac_ext <<EOF
+-#line 4794 "configure"
++#line 6198 "configure"
+ #include "confdefs.h"
+ /* Override any gcc2 internal prototype to avoid an error.  */
+ /* We use char because int might match the return type of a gcc2
+     builtin and then its argument prototype would still apply.  */
+-char IceConnectionNumber();
++char pthread_create();
+ 
+ int main() {
+-IceConnectionNumber()
++pthread_create()
+ ; return 0; }
+ EOF
+-if { (eval echo configure:4805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:6209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   rm -rf conftest*
+   eval "ac_cv_lib_$ac_lib_var=yes"
+ else
+@@ -4816,138 +6220,278 @@
+ fi
+ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+   echo "$ac_t""yes" 1>&6
+-  LIBSM="-lSM -lICE"
++  LIBPTHREAD="-lpthread" 
+ else
+   echo "$ac_t""no" 1>&6
+ fi
+ 
+ 
+-LDFLAGS="$ac_save_LDFLAGS"
+-
+ 
+ 
+-LIB_X11='-lX11 $(LIBSOCKET)'
++    # Check whether --enable-kernel-threads or --disable-kernel-threads was given.
++if test "${enable_kernel_threads+set}" = set; then
++  enableval="$enable_kernel_threads"
++  kde_use_kernthreads=$enableval
++else
++  kde_use_kernthreads=no
++fi
+ 
+ 
+-echo $ac_n "checking for libXext""... $ac_c" 1>&6
+-echo "configure:4834: checking for libXext" >&5
+-if eval "test \"`echo '$''{'kde_cv_have_libXext'+set}'`\" = set"; then
++    if test "$kde_use_kernthreads" = "yes"; then
++      ac_save_CXXFLAGS="$CXXFLAGS"
++      ac_save_CFLAGS="$CXXFLAGS"
++      CXXFLAGS="-I/usr/local/include/pthread/linuxthreads $CXXFLAGS"
++      CFLAGS="-I/usr/local/include/pthread/linuxthreads $CFLAGS"
++      for ac_hdr in pthread/linuxthreads/pthread.h
++do
++ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
++echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
++echo "configure:6250: checking for $ac_hdr" >&5
++if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+-  
+-kde_ldflags_safe="$LDFLAGS"
+-kde_libs_safe="$LIBS"
+-
+-LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS"
+-LIBS="-lXext -lX11 $LIBSOCKET"
++  cat > conftest.$ac_ext <<EOF
++#line 6255 "configure"
++#include "confdefs.h"
++#include <$ac_hdr>
++EOF
++ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
++{ (eval echo configure:6260: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
++if test -z "$ac_err"; then
++  rm -rf conftest*
++  eval "ac_cv_header_$ac_safe=yes"
++else
++  echo "$ac_err" >&5
++  echo "configure: failed program was:" >&5
++  cat conftest.$ac_ext >&5
++  rm -rf conftest*
++  eval "ac_cv_header_$ac_safe=no"
++fi
++rm -f conftest*
++fi
++if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
++  echo "$ac_t""yes" 1>&6
++    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
++  cat >> confdefs.h <<EOF
++#define $ac_tr_hdr 1
++EOF
++ 
++else
++  echo "$ac_t""no" 1>&6
++fi
++done
+ 
++      CXXFLAGS="$ac_save_CXXFLAGS"
++      CFLAGS="$ac_save_CFLAGS"
++      if test "$ac_cv_header_pthread_linuxthreads_pthread_h" = "no"; then
++        kde_use_kernthreads=no
++      else
++                echo $ac_n "checking for pthread_join in -llthread""... $ac_c" 1>&6
++echo "configure:6292: checking for pthread_join in -llthread" >&5
++ac_lib_var=`echo lthread'_'pthread_join | sed 'y%./+-%__p_%'`
++if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
++  echo $ac_n "(cached) $ac_c" 1>&6
++else
++  ac_save_LIBS="$LIBS"
++LIBS="-llthread  $LIBS"
+ cat > conftest.$ac_ext <<EOF
+-#line 4846 "configure"
++#line 6300 "configure"
+ #include "confdefs.h"
+-
+-#include <stdio.h>
++/* Override any gcc2 internal prototype to avoid an error.  */
++/* We use char because int might match the return type of a gcc2
++    builtin and then its argument prototype would still apply.  */
++char pthread_join();
+ 
+ int main() {
+-
+-printf("hello Xext\n");
+-
++pthread_join()
+ ; return 0; }
+ EOF
+-if { (eval echo configure:4857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:6311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   rm -rf conftest*
+-  kde_cv_have_libXext=yes
++  eval "ac_cv_lib_$ac_lib_var=yes"
+ else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
+   rm -rf conftest*
+-  kde_cv_have_libXext=no
+-   
++  eval "ac_cv_lib_$ac_lib_var=no"
+ fi
+ rm -f conftest*
++LIBS="$ac_save_LIBS"
+ 
+-LDFLAGS=$kde_ldflags_safe
+-LIBS=$kde_libs_safe
+- 
+ fi
++if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
++  echo "$ac_t""yes" 1>&6
++  LIBPTHREAD="-llthread -llgcc_r"
++else
++  echo "$ac_t""no" 1>&6
++fi
++         if test "x$LIBPTHREAD" = "x"; then
++          kde_use_kernthreads=no
++        else
++          USE_THREADS="-D_THREAD_SAFE -I/usr/local/include/pthread/linuxthreads"
++        fi
++      fi
++    else 
++      USE_THREADS=""
++      if test -z "$LIBPTHREAD"; then
++        
++echo $ac_n "checking whether $CXX supports -pthread""... $ac_c" 1>&6
++echo "configure:6341: checking whether $CXX supports -pthread" >&5
++kde_cache=`echo pthread | sed 'y% .=/+-%____p_%'`
++if eval "test \"`echo '$''{'kde_cv_prog_cxx_$kde_cache'+set}'`\" = set"; then
++  echo $ac_n "(cached) $ac_c" 1>&6
++else
++  
++  
++   ac_ext=C
++# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
++ac_cpp='$CXXCPP $CPPFLAGS'
++ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
++ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
++cross_compiling=$ac_cv_prog_cxx_cross
+ 
++ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+ 
+-echo "$ac_t""$kde_cv_have_libXext" 1>&6
+ 
+-if test "$kde_cv_have_libXext" = "no"; then
+-  { echo "configure: error: We need a working libXext to proceed. Since configure
+-can't find it itself, we stop here assuming that make wouldn't find
+-them either." 1>&2; exit 1; }
+-fi
++  save_CXXFLAGS="$CXXFLAGS"
++  CXXFLAGS="$CXXFLAGS -pthread"
++  cat > conftest.$ac_ext <<EOF
++#line 6361 "configure"
++#include "confdefs.h"
+ 
++int main() {
++ return 0; 
++; return 0; }
++EOF
++if { (eval echo configure:6368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++  rm -rf conftest*
++  eval "kde_cv_prog_cxx_$kde_cache=yes"
++else
++  echo "configure: failed program was:" >&5
++  cat conftest.$ac_ext >&5
++fi
++rm -f conftest*
++  CXXFLAGS="$save_CXXFLAGS"
++  ac_ext=c
++# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
++ac_cpp='$CPP $CPPFLAGS'
++ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
++cross_compiling=$ac_cv_prog_cc_cross
+ 
+ 
++fi
+ 
+-if test -z ""; then
+-  kde_qtver=2
+-  kde_qtsubver=1
++if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
++ echo "$ac_t""yes" 1>&6
++ :
++ USE_THREADS="-pthread" 
+ else
+-  kde_qtsubver=`echo "" | sed -e 's#[0-9]\+\.\([0-9]\+\).*#\1#'`
+-  # following is the check if subversion isn´t found in passed argument
+-  if test "$kde_qtsubver" = ""; then
+-    kde_qtsubver=1
+-  fi
+-  kde_qtver=`echo "" | sed -e 's#^\([0-9]\+\)\..*#\1#'`
+-  if test "$kde_qtver" = "1"; then
+-    kde_qtsubver=42
+-  else
+-   # this is the version number fallback to 2.1, unless major version is 1 or 2
+-   if test "$kde_qtver" != "2"; then
+-    kde_qtver=2
+-    kde_qtsubver=1
+-   fi
+-  fi
++ echo "$ac_t""no" 1>&6
++ :
++ 
+ fi
+ 
+-if test -z ""; then
+-  if test $kde_qtver = 2; then
+-    if test $kde_qtsubver -gt 0; then
+-      kde_qt_minversion=">= Qt 2.2.2"
+-    else
+-      kde_qt_minversion=">= Qt 2.0.2"
++      fi
+     fi
+-  else
+-    kde_qt_minversion=">= 1.42 and < 2.0"
+-  fi
++
++    case $host_os in
++ 	solaris*)
++		
++echo $ac_n "checking whether $CXX supports -mt""... $ac_c" 1>&6
++echo "configure:6404: checking whether $CXX supports -mt" >&5
++kde_cache=`echo mt | sed 'y% .=/+-%____p_%'`
++if eval "test \"`echo '$''{'kde_cv_prog_cxx_$kde_cache'+set}'`\" = set"; then
++  echo $ac_n "(cached) $ac_c" 1>&6
+ else
+-   kde_qt_minversion=
+-fi
++  
++  
++   ac_ext=C
++# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
++ac_cpp='$CXXCPP $CPPFLAGS'
++ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
++ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
++cross_compiling=$ac_cv_prog_cxx_cross
+ 
+-if test -z ""; then
+-   if test $kde_qtver = 2; then
+-    if test $kde_qtsubver -gt 0; then
+-      kde_qt_verstring="QT_VERSION >= 222"
+-    else
+-      kde_qt_verstring="QT_VERSION >= 200"
+-    fi
+-   else
+-    kde_qt_verstring="QT_VERSION >= 142 && QT_VERSION < 200"
+-  fi
++ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
++
++
++  save_CXXFLAGS="$CXXFLAGS"
++  CXXFLAGS="$CXXFLAGS -mt"
++  cat > conftest.$ac_ext <<EOF
++#line 6424 "configure"
++#include "confdefs.h"
++
++int main() {
++ return 0; 
++; return 0; }
++EOF
++if { (eval echo configure:6431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++  rm -rf conftest*
++  eval "kde_cv_prog_cxx_$kde_cache=yes"
+ else
+-   kde_qt_verstring=
++  echo "configure: failed program was:" >&5
++  cat conftest.$ac_ext >&5
++fi
++rm -f conftest*
++  CXXFLAGS="$save_CXXFLAGS"
++  ac_ext=c
++# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
++ac_cpp='$CPP $CPPFLAGS'
++ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
++cross_compiling=$ac_cv_prog_cc_cross
++
++
+ fi
+ 
+-if test $kde_qtver = 2; then
+-   kde_qt_dirs="$QTDIR /usr/lib/qt2 /usr/lib/qt"
++if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
++ echo "$ac_t""yes" 1>&6
++ :
++ USE_THREADS="-mt"
+ else
+-   kde_qt_dirs="$QTDIR /usr/lib/qt"
++ echo "$ac_t""no" 1>&6
++ :
++ 
+ fi
+ 
++                CPPFLAGS="$CPPFLAGS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_SOLARIS -DSVR4"
++    		;;
++        freebsd*)
++                CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
++                ;;
++        aix*)
++                CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
++                LIBPTHREAD="$LIBPTHREAD -lc_r"
++                ;;
++        linux*) CPPFLAGS="$CPPFLAGS -D_REENTRANT"
++                if test "$CXX" = "KCC"; then
++                  CXXFLAGS="$CXXFLAGS --thread_safe"
++		  NOOPT_CXXFLAGS="$NOOPT_CXXFLAGS --thread_safe"
++                fi
++                ;;
++	*)
++		;;
++    esac
++    
++    
++
+ 
+ 
+ 
+ echo $ac_n "checking for libpng""... $ac_c" 1>&6
+-echo "configure:4945: checking for libpng" >&5
++echo "configure:6485: checking for libpng" >&5
+ if eval "test \"`echo '$''{'ac_cv_lib_png'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   
+ kde_save_LIBS="$LIBS"
++if test "x$kde_use_qt_emb" != "xyes"; then
+ LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm -lX11 $LIBSOCKET"
++else
++LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm"
++fi
+ kde_save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
+ ac_ext=c
+@@ -4958,7 +6502,7 @@
+ cross_compiling=$ac_cv_prog_cc_cross
+ 
+ cat > conftest.$ac_ext <<EOF
+-#line 4962 "configure"
++#line 6506 "configure"
+ #include "confdefs.h"
+     
+     #include<png.h>
+@@ -4971,7 +6515,7 @@
+     
+ ; return 0; }
+ EOF
+-if { (eval echo configure:4975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:6519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   rm -rf conftest*
+   eval "ac_cv_lib_png='-lpng $LIBZ -lm'"
+ else
+@@ -5003,7 +6547,7 @@
+ 
+ 
+ echo $ac_n "checking for libjpeg6b""... $ac_c" 1>&6
+-echo "configure:5007: checking for libjpeg6b" >&5
++echo "configure:6551: checking for libjpeg6b" >&5
+ if eval "test \"`echo '$''{'ac_cv_lib_jpeg_6b'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+@@ -5020,7 +6564,7 @@
+ ac_save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
+ cat > conftest.$ac_ext <<EOF
+-#line 5024 "configure"
++#line 6568 "configure"
+ #include "confdefs.h"
+ /* Override any gcc2 internal prototype to avoid an error.  */
+ struct jpeg_decompress_struct;
+@@ -5041,7 +6585,7 @@
+ jpeg_CreateDecompress(0L, 0, 0);
+ ; return 0; }
+ EOF
+-if { (eval echo configure:5045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:6589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   rm -rf conftest*
+   eval "ac_cv_lib_jpeg_6b=-ljpeg6b"
+ else
+@@ -5064,7 +6608,7 @@
+   echo "$ac_t""no" 1>&6
+   
+ echo $ac_n "checking for libjpeg""... $ac_c" 1>&6
+-echo "configure:5068: checking for libjpeg" >&5
++echo "configure:6612: checking for libjpeg" >&5
+ if eval "test \"`echo '$''{'ac_cv_lib_jpeg_normal'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+@@ -5081,7 +6625,7 @@
+ ac_save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
+ cat > conftest.$ac_ext <<EOF
+-#line 5085 "configure"
++#line 6629 "configure"
+ #include "confdefs.h"
+ /* Override any gcc2 internal prototype to avoid an error.  */
+ struct jpeg_decompress_struct;
+@@ -5102,7 +6646,7 @@
+ jpeg_CreateDecompress(0L, 0, 0);
+ ; return 0; }
+ EOF
+-if { (eval echo configure:5106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:6650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   rm -rf conftest*
+   eval "ac_cv_lib_jpeg_normal=-ljpeg"
+ else
+@@ -5124,26 +6668,13 @@
+ else
+   echo "$ac_t""no" 1>&6
+   
+-	if test -f "$kde_libraries/libjpeg.so"; then
+-	   test -f ./libjpegkde.so || $LN_S $kde_libraries/libjpeg.so ./libjpegkde.so
+-	   ac_cv_lib_jpeg="-L\${topdir} -ljpegkde"
+-	else if test -f "$kde_libraries/libjpeg.sl"; then
+-	   test -f ./libjpegkde.sl ||$LN_S $kde_libraries/libjpeg.sl ./libjpegkde.sl
+-	   ac_cv_lib_jpeg="-L\${topdir} -ljpegkde"	
+-	else if test -f "$kde_libraries/libjpeg.a"; then
+-	   test -f ./libjpegkde.a || $LN_S $kde_libraries/libjpeg.a ./libjpegkde.a
+-	   ac_cv_lib_jpeg="-L\${topdir} -ljpegkde"
+-        else
+-	  ac_cv_lib_jpeg=
+-	fi
+-      fi
+-   fi
+-
+-   LIBJPEG=$ac_cv_lib_jpeg
+-
++       LIBJPEG=
++    
++   
+ fi
+ 
+ 
++
+ fi
+ 
+ 
+@@ -5155,7 +6686,9 @@
+ do
+   for j in jpeglib.h;
+   do
++    echo "configure: 6690: $i/$j" >&5
+     if test -r "$i/$j"; then
++      echo "taking that" >&5
+       jpeg_incdir=$i
+       break 2
+     fi
+@@ -5198,7 +6731,13 @@
+   enableval="$enable_mt"
+   kde_use_qt_mt=$enableval
+ else
+-  kde_use_qt_mt=no
++  
++    if test $kde_qtver = 3; then
++      kde_use_qt_mt=yes
++    else
++      kde_use_qt_mt=no
++    fi
++  
+ 
+ fi
+ 
+@@ -5206,70 +6745,115 @@
+ USING_QT_MT=""
+ 
+ 
++KDE_MT_LDFLAGS=
++KDE_MT_LIBS=
+ if test "x$kde_use_qt_mt" = "xyes"; then
+-
+-  case $host in
+-  *-*-linux-*)
+-    if test "x$GCC" = "xyes"; then
+-      CPPFLAGS="$CPPFLAGS -DQT_THREAD_SUPPORT -pthread"
+-      X_EXTRA_LIBS="$X_EXTRA_LIBS -pthread"
++  
++  
++  
++    if test -z "$LIBPTHREAD"; then
++    if test -z "$USE_THREADS"; then
++      kde_check_threading_default=no
+     else
+-      echo "configure: warning: Compiler is not gcc. MT support disabled." 1>&2
++      kde_check_threading_default=yes
+     fi
+-    ;;
+-  *)
+-    echo "configure: warning: MT not yet supported on $host - disabled." 1>&2
+-    ;;
+-  esac
+-
++  else
++    kde_check_threading_default=yes
++  fi
++  # Check whether --enable-threading or --disable-threading was given.
++if test "${enable_threading+set}" = set; then
++  enableval="$enable_threading"
++  kde_use_threading=$enableval
++else
++  kde_use_threading=$kde_check_threading_default
+ fi
+ 
+-kde_qt_was_given=yes
++  if test "x$kde_use_threading" = "xyes"; then
++    cat >> confdefs.h <<\EOF
++#define HAVE_LIBPTHREAD 1
++EOF
++
++  fi
++
++  if test "x$kde_use_threading" = "xyes"; then
++    CPPFLAGS="$USE_THREADS -DQT_THREAD_SUPPORT $CPPFLAGS"
++    KDE_MT_LDFLAGS="$USE_THREADS"
++    KDE_MT_LIBS="$LIBPTHREAD"
++  else
++    kde_use_qt_mt=no
++  fi
++fi
+ 
+ 
+-if test -z "$LIBQT_GLOB"; then
+ 
+-  LIBQT_GLOB="libqt.*"
++kde_qt_was_given=yes
+ 
++if test -z "$LIBQT_GLOB"; then
++  if test "x$kde_use_qt_emb" = "xyes"; then
++    LIBQT_GLOB="libqte.*"
++  else
++    LIBQT_GLOB="libqt.*"
++  fi
+ fi
+ 
+ if test -z "$LIBQT"; then
++  if test "x$kde_use_qt_emb" = "xyes"; then
++    qtlib="qte"
++  else
++    qtlib="qt"
++  fi
+ 
+-  LIBQT="-lqt"
+-  kde_int_qt="-lqt"
+-
+-
+-  if test "x$kde_use_qt_mt" = "xyes"; then
++  kde_int_qt="-l$qtlib"
++else
++  kde_int_qt="$LIBQT"
++  kde_lib_qt_set=yes
++fi
+ 
+-      case $host in
+-      *-*-linux-*)
+-        if test "x$GCC" = "xyes"; then
+-          LIBQT="-lqt-mt"
+-          kde_int_qt="-lqt-mt"
+-          LIBQT_GLOB="libqt-mt.*"
+-          USING_QT_MT="using -mt"
+-        fi
+-      ;;
+-      esac
++if test -z "$LIBQPE"; then
++  if test "x$kde_use_qt_emb" = "xyes"; then
++    if test "x$kde_use_qt_emb_palm" = "xyes"; then
++      LIB_QPE="-lqpe"
++    else
++      LIB_QPE=""
++    fi
++  else
++    LIB_QPE=""
+   fi
++fi
+ 
+-  kde_qt_was_given=no
+ 
++if test "x$kde_use_qt_mt" = "xyes"; then
++  if test -z "$LIBQT"; then
++    LIBQT="-l$qtlib-mt"
++    kde_int_qt="-l$qtlib-mt"
++  else
++    LIBQT="$qtlib-mt"
++    kde_int_qt="$qtlib-mt"
++  fi
++  LIBQT_GLOB="lib$qtlib-mt.*"
++  USING_QT_MT="using -mt"
+ else
+-  kde_int_qt="$LIBQT"
++  LIBQT="-l$qtlib"
+ fi
+ 
+-if test $kde_qtver = 2; then
++if test $kde_qtver != 1; then
+ 
+   
+   
+   LIBQT="$LIBQT $LIBPNG $LIBJPEG"
+ fi
+ 
++if test $kde_qtver = 3; then
++  
++  LIBQT="$LIBQT $LIBDL"
++fi
++
+ echo $ac_n "checking for Qt""... $ac_c" 1>&6
+-echo "configure:5271: checking for Qt" >&5
++echo "configure:6853: checking for Qt" >&5
+ 
++if test "x$kde_use_qt_emb" != "xyes"; then
+ LIBQT="$LIBQT $X_PRE_LIBS -lXext -lX11 $LIBSM $LIBSOCKET"
++fi
+ ac_qt_includes=NO ac_qt_libraries=NO ac_qt_bindir=NO
+ qt_libraries=""
+ qt_includes=""
+@@ -5312,12 +6896,12 @@
+ for dir in $kde_qt_dirs; do
+    qt_incdirs="$qt_incdirs $dir/include $dir"
+ done
+-qt_incdirs="$QTINC $qt_incdirs /usr/local/qt/include /usr/include/qt /usr/include /usr/X11R6/include/X11/qt /usr/X11R6/include/qt $x_includes"
++qt_incdirs="$QTINC $qt_incdirs /usr/local/qt/include /usr/include/qt /usr/include /usr/X11R6/include/X11/qt /usr/X11R6/include/qt /usr/X11R6/include/qt2 $x_includes"
+ if test ! "$ac_qt_includes" = "NO"; then
+    qt_incdirs="$ac_qt_includes $qt_incdirs"
+ fi
+ 
+-if test "$kde_qtver" = "2"; then
++if test "$kde_qtver" != "1"; then
+   kde_qt_header=qstyle.h
+ else
+   kde_qt_header=qglobal.h
+@@ -5329,7 +6913,9 @@
+ do
+   for j in $kde_qt_header;
+   do
++    echo "configure: 6917: $i/$j" >&5
+     if test -r "$i/$j"; then
++      echo "taking that" >&5
+       qt_incdir=$i
+       break 2
+     fi
+@@ -5374,8 +6960,8 @@
+ ac_libs_safe="$LIBS"
+ 
+ CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
+-LDFLAGS="$LDFLAGS -L$qt_libdir $all_libraries $USER_LDFLAGS"
+-LIBS="$LIBS $LIBQT"
++LDFLAGS="$LDFLAGS -L$qt_libdir $all_libraries $USER_LDFLAGS $KDE_MT_LDFLAGS"
++LIBS="$LIBS $LIBQT $KDE_MT_LIBS"
+ 
+ 
+ 
+@@ -5383,8 +6969,6 @@
+ #include "confdefs.h"
+ #include <qglobal.h>
+ #include <qapplication.h>
+-#include <qapp.h>
+-#include <qobjcoll.h>
+ EOF
+ if test "$kde_qtver" = "2"; then
+ cat >> conftest.$ac_ext <<EOF
+@@ -5398,7 +6982,14 @@
+ #include <qiconview.h>
+ EOF
+ fi
++fi
+ 
++if test "$kde_qtver" = "3"; then
++cat >> conftest.$ac_ext <<EOF
++#include <qcursor.h>
++#include <qstylefactory.h>
++#include <private/qucomextra_p.h>
++EOF
+ fi
+ 
+ echo "#if ! ($kde_qt_verstring)" >> conftest.$ac_ext
+@@ -5411,6 +7002,7 @@
+ if test "$kde_qtver" = "2"; then
+ cat >> conftest.$ac_ext <<EOF
+     QStringList *t = new QStringList();
++    Q_UNUSED(t);
+ EOF
+ if test $kde_qtsubver -gt 0; then
+ cat >> conftest.$ac_ext <<EOF
+@@ -5418,17 +7010,22 @@
+     iv.setWordWrapIconText(false);
+     QString s;
+     s.setLatin1("Elvis is alive", 14);
+-    int magnolia = QEvent::Speech; /* new in 2.2 beta2 */
+ EOF
+ fi
+ fi
++if test "$kde_qtver" = "3"; then
++cat >> conftest.$ac_ext <<EOF
++    (void)QStyleFactory::create(QString::null);
++    QCursor c(Qt::WhatsThisCursor);
++EOF
++fi
+ cat >> conftest.$ac_ext <<EOF
+     return 0;
+ }
+ EOF
+ 
+ 
+-if { (eval echo configure:5432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
++if { (eval echo configure:7029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+   rm -f conftest*
+ else
+   echo "configure: failed program was:" >&5
+@@ -5450,6 +7047,7 @@
+ if test "$ac_qt_includes" = NO || test "$ac_qt_libraries" = NO; then
+   ac_cv_have_qt="have_qt=no"
+   ac_qt_notfound=""
++  missing_qt_mt=""
+   if test "$ac_qt_includes" = NO; then
+     if test "$ac_qt_libraries" = NO; then
+       ac_qt_notfound="(headers and libraries)";
+@@ -5457,11 +7055,17 @@
+       ac_qt_notfound="(headers)";
+     fi
+   else
+-    ac_qt_notfound="(libraries)";
++    if test "x$kde_use_qt_mt" = "xyes"; then
++       missing_qt_mt="
++Make sure that you have compiled Qt with thread support!"
++       ac_qt_notfound="(library $qtlib-mt)";
++    else
++       ac_qt_notfound="(library $qtlib)";
++    fi
+   fi
+ 
+   { echo "configure: error: Qt ($kde_qt_minversion) $ac_qt_notfound not found. Please check your installation!
+-For more details about this problem, look at the end of config.log." 1>&2; exit 1; }
++For more details about this problem, look at the end of config.log.$missing_qt_mt" 1>&2; exit 1; }
+ else
+   have_qt="yes"
+ fi
+@@ -5486,7 +7090,7 @@
+ 
+ 
+ echo $ac_n "checking if Qt compiles without flags""... $ac_c" 1>&6
+-echo "configure:5490: checking if Qt compiles without flags" >&5
++echo "configure:7094: checking if Qt compiles without flags" >&5
+ if eval "test \"`echo '$''{'kde_cv_qt_direct'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+@@ -5510,7 +7114,11 @@
+ 
+ CXXFLAGS="$CXXFLAGS -I$qt_includes"
+ LDFLAGS="$LDFLAGS $X_LDFLAGS"
++if test "x$kde_use_qt_emb" != "xyes"; then
+ LIBS="$LIBQT -lXext -lX11 $LIBSOCKET"
++else
++LIBS="$LIBQT $LIBSOCKET"
++fi
+ LD_LIBRARY_PATH=
+ export LD_LIBRARY_PATH
+ LIBRARY_PATH=
+@@ -5522,8 +7130,6 @@
+ #include "confdefs.h"
+ #include <qglobal.h>
+ #include <qapplication.h>
+-#include <qapp.h>
+-#include <qobjcoll.h>
+ EOF
+ if test "$kde_qtver" = "2"; then
+ cat >> conftest.$ac_ext <<EOF
+@@ -5537,7 +7143,14 @@
+ #include <qiconview.h>
+ EOF
+ fi
++fi
+ 
++if test "$kde_qtver" = "3"; then
++cat >> conftest.$ac_ext <<EOF
++#include <qcursor.h>
++#include <qstylefactory.h>
++#include <private/qucomextra_p.h>
++EOF
+ fi
+ 
+ echo "#if ! ($kde_qt_verstring)" >> conftest.$ac_ext
+@@ -5550,6 +7163,7 @@
+ if test "$kde_qtver" = "2"; then
+ cat >> conftest.$ac_ext <<EOF
+     QStringList *t = new QStringList();
++    Q_UNUSED(t);
+ EOF
+ if test $kde_qtsubver -gt 0; then
+ cat >> conftest.$ac_ext <<EOF
+@@ -5557,17 +7171,22 @@
+     iv.setWordWrapIconText(false);
+     QString s;
+     s.setLatin1("Elvis is alive", 14);
+-    int magnolia = QEvent::Speech; /* new in 2.2 beta2 */
+ EOF
+ fi
+ fi
++if test "$kde_qtver" = "3"; then
++cat >> conftest.$ac_ext <<EOF
++    (void)QStyleFactory::create(QString::null);
++    QCursor c(Qt::WhatsThisCursor);
++EOF
++fi
+ cat >> conftest.$ac_ext <<EOF
+     return 0;
+ }
+ EOF
+ 
+ 
+-if { (eval echo configure:5571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
++if { (eval echo configure:7190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+   kde_cv_qt_direct="yes"
+ else
+   kde_cv_qt_direct="no"
+@@ -5609,7 +7228,7 @@
+ 
+ 
+ if test "$qt_includes" = "$x_includes" || test -z "$qt_includes"; then
+- QT_INCLUDES="";
++ QT_INCLUDES=""
+ else
+  QT_INCLUDES="-I$qt_includes"
+  all_includes="$QT_INCLUDES $all_includes"
+@@ -5621,6 +7240,7 @@
+  QT_LDFLAGS="-L$qt_libraries"
+  all_libraries="$all_libraries $QT_LDFLAGS"
+ fi
++test -z "$KDE_MT_LDFLAGS" || all_libraries="$all_libraries $KDE_MT_LDFLAGS"
+ 
+ 
+ 
+@@ -5636,7 +7256,7 @@
+ 
+    
+    echo $ac_n "checking for moc""... $ac_c" 1>&6
+-echo "configure:5640: checking for moc" >&5
++echo "configure:7260: checking for moc" >&5
+    if test -n "$MOC"; then
+         kde_cv_path="$MOC";
+    else
+@@ -5699,9 +7319,10 @@
+ 
+    fi
+ 
+-   
++   if test -z "$UIC_NOT_NEEDED"; then
++     
+    echo $ac_n "checking for uic""... $ac_c" 1>&6
+-echo "configure:5705: checking for uic" >&5
++echo "configure:7326: checking for uic" >&5
+    if test -n "$UIC"; then
+         kde_cv_path="$UIC";
+    else
+@@ -5748,7 +7369,15 @@
+ 
+    if test -z "$kde_cv_path" || test "$kde_cv_path" = NONE; then
+       echo "$ac_t""not found" 1>&6
+-      UIC="" ; 
++      UIC=""
++   else
++      echo "$ac_t""$kde_cv_path" 1>&6
++      UIC=$kde_cv_path
++
++   fi
++
++     if test -z "$UIC" ; then
++       
+     echo "configure: warning: No Qt ui compiler (uic) found!
+ Please check whether you installed Qt correctly.
+ You need to have a running uic binary.
+@@ -5758,24 +7387,32 @@
+ configure.
+ " 1>&2
+ 
+-   else
+-      echo "$ac_t""$kde_cv_path" 1>&6
+-      UIC=$kde_cv_path
+-
+-   fi
+-
+-   if test -z "$UIC" ; then
+-     if test -z "$UIC_NOT_NEEDED" ; then
+        exit 1
+-     else
+-       UIC="echo uic not available: "
+      fi
++   else
++     UIC="echo uic not available: "
+    fi
++
+    
+    
+ 
++   UIC_TR="i18n"
++   if test $kde_qtver = 3; then
++     UIC_TR="tr2i18n"
++   fi
++
++   
++
+ 
++if test "x$kde_use_qt_emb" != "xyes"; then
+ LIB_QT="$kde_int_qt "'$(LIBPNG) $(LIBJPEG) -lXext $(LIB_X11) $(LIBSM)'
++else
++LIB_QT="$kde_int_qt "'$(LIBPNG) $(LIBJPEG)'
++fi
++test -z "$KDE_MT_LIBS" || LIB_QT="$LIB_QT $KDE_MT_LIBS"
++
++
++
+ 
+ 
+ 
+@@ -5785,7 +7422,7 @@
+ 
+ 
+ echo $ac_n "checking for rpath""... $ac_c" 1>&6
+-echo "configure:5789: checking for rpath" >&5
++echo "configure:7426: checking for rpath" >&5
+ # Check whether --enable-rpath or --disable-rpath was given.
+ if test "${enable_rpath+set}" = set; then
+   enableval="$enable_rpath"
+@@ -5814,7 +7451,7 @@
+ echo "$ac_t""$USE_RPATH" 1>&6
+ 
+ echo $ac_n "checking for KDE""... $ac_c" 1>&6
+-echo "configure:5818: checking for KDE" >&5
++echo "configure:7455: checking for KDE" >&5
+ 
+ if test "${prefix}" != NONE; then
+   kde_includes=${prefix}/include
+@@ -5849,7 +7486,7 @@
+ 
+ if test -z ""; then
+ 
+-kde_incdirs="/usr/lib/kde/include /usr/local/kde/include /usr/kde/include /usr/include/kde /usr/include /opt/kde2/include /opt/kde/include $x_includes $qt_includes"
++kde_incdirs="/usr/lib/kde/include /usr/local/kde/include /usr/local/include /usr/kde/include /usr/include/kde /usr/include /opt/kde3/include /opt/kde/include $x_includes $qt_includes"
+ test -n "$KDEDIR" && kde_incdirs="$KDEDIR/include $KDEDIR/include/kde $KDEDIR $kde_incdirs"
+ kde_incdirs="$ac_kde_includes $kde_incdirs"
+ 
+@@ -5858,7 +7495,9 @@
+ do
+   for j in $kde_check_header;
+   do
++    echo "configure: 7499: $i/$j" >&5
+     if test -r "$i/$j"; then
++      echo "taking that" >&5
+       kde_incdir=$i
+       break 2
+     fi
+@@ -5873,7 +7512,7 @@
+ So, check this please and use another prefix!" 1>&2; exit 1; }
+ fi
+ 
+-kde_libdirs="/usr/lib/kde/lib /usr/local/kde/lib /usr/kde/lib /usr/lib/kde /usr/lib /usr/X11R6/lib /opt/kde2/lib /opt/kde/lib /usr/X11R6/kde/lib"
++kde_libdirs="/usr/lib/kde/lib /usr/local/kde/lib /usr/kde/lib /usr/lib/kde /usr/lib/kde3 /usr/lib /usr/X11R6/lib /usr/local/lib /opt/kde3/lib /opt/kde/lib /usr/X11R6/kde/lib"
+ test -n "$KDEDIR" && kde_libdirs="$KDEDIR/lib $KDEDIR $kde_libdirs"
+ kde_libdirs="$ac_kde_libraries $kde_libdirs"
+ 
+@@ -5882,7 +7521,9 @@
+ do
+   for j in $kde_check_lib;
+   do
++    echo "configure: 7525: $i/$j" >&5
+     if test -r "$i/$j"; then
++      echo "taking that" >&5
+       kde_libdir=$i
+       break 2
+     fi
+@@ -5942,7 +7583,7 @@
+ 
+ 
+ 
+-if test "$kde_includes" = "$x_includes" || test "$kde_includes" = "$qt_includes" ; then
++if test "$kde_includes" = "$x_includes" || test "$kde_includes" = "$qt_includes"  || test "$kde_includes" = "/usr/include"; then
+  KDE_INCLUDES=""
+ else
+  KDE_INCLUDES="-I$kde_includes"
+@@ -5990,7 +7631,7 @@
+ 
+ 
+ echo $ac_n "checking for KDE paths""... $ac_c" 1>&6
+-echo "configure:5994: checking for KDE paths" >&5
++echo "configure:7635: checking for KDE paths" >&5
+ kde_result=""
+ kde_cached_paths=yes
+ if eval "test \"`echo '$''{'kde_cv_all_paths'+set}'`\" = set"; then
+@@ -6046,7 +7687,17 @@
+     kde_servicetypesdir='\${prefix}/share/servicetypes'
+   fi
+   if test -z "$kde_moduledir"; then
+-    kde_moduledir='\${prefix}/lib/kde2'
++    if test "$kde_qtver" = "2"; then
++      kde_moduledir='\${exec_prefix}/lib/kde2'
++    else
++      kde_moduledir='\${exec_prefix}/lib/kde3'
++    fi
++  fi
++  if test -z "$kde_styledir"; then
++    kde_styledir='\${exec_prefix}/lib/kde3/plugins/styles'
++  fi
++  if test -z "$kde_widgetdir"; then
++    kde_widgetdir='\${exec_prefix}/lib/kde3/plugins/designer'
+   fi
+ 
+   
+@@ -6067,6 +7718,8 @@
+ 	kde_servicesdir=\"$kde_servicesdir\" \
+ 	kde_servicetypesdir=\"$kde_servicetypesdir\" \
+ 	kde_moduledir=\"$kde_moduledir\" \
++   kde_styledir=\"$kde_styledir\" \
++	kde_widgetdir=\"$kde_widgetdir\" \
+ 	kde_result=defaults"
+ 
+ 
+@@ -6077,7 +7730,7 @@
+      
+   
+     echo $ac_n "checking for KDE headers installed""... $ac_c" 1>&6
+-echo "configure:6081: checking for KDE headers installed" >&5
++echo "configure:7734: checking for KDE headers installed" >&5
+     
+      ac_ext=C
+ # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+@@ -6090,6 +7743,9 @@
+ 
+ 
+ cat > conftest.$ac_ext <<EOF
++#ifdef STDC_HEADERS
++# include <stdlib.h>
++#endif
+ #include <stdio.h>
+ #include "confdefs.h"
+ #include <kapp.h>
+@@ -6112,12 +7768,14 @@
+     printf("kde_servicesdir=\\"/tmp/dummy\\"\n");
+     printf("kde_servicetypesdir=\\"/tmp/dummy\\"\n");
+     printf("kde_moduledir=\\"/tmp/dummy\\"\n");
++    printf("kde_styledir=\\"/tmp/dummy\\"\n");
++    printf("kde_widgetdir=\\"/tmp/dummy\\"\n");
+     return 0;
+     }
+ EOF
+ 
+  ac_compile='${CXX-g++} -c $CXXFLAGS $all_includes $CPPFLAGS conftest.$ac_ext'
+- if { (eval echo configure:6121: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++ if { (eval echo configure:7779: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+    echo "$ac_t""yes" 1>&6
+  else
+    { echo "configure: error: your system is not able to compile a small KDE application!
+@@ -6154,10 +7812,10 @@
+   fi
+ 
+ echo $ac_n "checking for KDE libraries installed""... $ac_c" 1>&6
+-echo "configure:6158: checking for KDE libraries installed" >&5
++echo "configure:7816: checking for KDE libraries installed" >&5
+ ac_link='$LIBTOOL_SHELL --silent --mode=link ${CXX-g++} -o conftest $CXXFLAGS $all_includes $CPPFLAGS $LDFLAGS $all_libraries conftest.$ac_ext $LIBS -lkdecore $LIBQT $KDE_TEST_RPATH 1>&5'
+ 
+-if { (eval echo configure:6161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
++if { (eval echo configure:7819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+   echo "$ac_t""yes" 1>&6
+ else
+   { echo "configure: error: your system fails at linking a small KDE application!
+@@ -6193,6 +7851,8 @@
+ 	kde_servicesdir=\"$kde_servicesdir\" \
+ 	kde_servicetypesdir=\"$kde_servicetypesdir\" \
+ 	kde_moduledir=\"$kde_moduledir\" \
++   kde_styledir=\"$kde_styledir\" \
++	kde_widgetdir=\"$kde_widgetdir\" \
+ 	kde_result=$kde_result"
+ 
+ 
+@@ -6216,7 +7876,8 @@
+    test -z "$kde_wallpaperdir" || test -z "$kde_templatesdir" ||
+    test -z "$kde_bindir" || test -z "$kde_servicesdir" ||
+    test -z "$kde_servicetypesdir" || test -z "$kde_moduledir" ||
+-   test "$kde_have_all_paths" != "yes"; then
++   test -z "$kde_styledir" || test -z "kde_widgetdir" 
++   test "x$kde_have_all_paths" != "xyes"; then
+      kde_have_all_paths=no
+   fi
+ 
+@@ -6228,6 +7889,8 @@
+   kde_mimedir= kde_toolbardir= kde_wallpaperdir= kde_templatesdir=
+   kde_bindir= kde_servicesdir= kde_servicetypesdir= kde_moduledir=
+   kde_have_all_paths=
++  kde_styledir=
++  kde_widgetdir=
+   
+ if test "$ac_use_path_checking" = "default"; then
+ 
+@@ -6277,7 +7940,17 @@
+     kde_servicetypesdir='\${prefix}/share/servicetypes'
+   fi
+   if test -z "$kde_moduledir"; then
+-    kde_moduledir='\${prefix}/lib/kde2'
++    if test "$kde_qtver" = "2"; then
++      kde_moduledir='\${exec_prefix}/lib/kde2'
++    else
++      kde_moduledir='\${exec_prefix}/lib/kde3'
++    fi
++  fi
++  if test -z "$kde_styledir"; then
++    kde_styledir='\${exec_prefix}/lib/kde3/plugins/styles'
++  fi
++  if test -z "$kde_widgetdir"; then
++    kde_widgetdir='\${exec_prefix}/lib/kde3/plugins/designer'
+   fi
+ 
+   
+@@ -6298,6 +7971,8 @@
+ 	kde_servicesdir=\"$kde_servicesdir\" \
+ 	kde_servicetypesdir=\"$kde_servicetypesdir\" \
+ 	kde_moduledir=\"$kde_moduledir\" \
++   kde_styledir=\"$kde_styledir\" \
++	kde_widgetdir=\"$kde_widgetdir\" \
+ 	kde_result=defaults"
+ 
+ 
+@@ -6308,7 +7983,7 @@
+      
+   
+     echo $ac_n "checking for KDE headers installed""... $ac_c" 1>&6
+-echo "configure:6312: checking for KDE headers installed" >&5
++echo "configure:7987: checking for KDE headers installed" >&5
+     
+      ac_ext=C
+ # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+@@ -6321,6 +7996,9 @@
+ 
+ 
+ cat > conftest.$ac_ext <<EOF
++#ifdef STDC_HEADERS
++# include <stdlib.h>
++#endif
+ #include <stdio.h>
+ #include "confdefs.h"
+ #include <kapp.h>
+@@ -6343,12 +8021,14 @@
+     printf("kde_servicesdir=\\"/tmp/dummy\\"\n");
+     printf("kde_servicetypesdir=\\"/tmp/dummy\\"\n");
+     printf("kde_moduledir=\\"/tmp/dummy\\"\n");
++    printf("kde_styledir=\\"/tmp/dummy\\"\n");
++    printf("kde_widgetdir=\\"/tmp/dummy\\"\n");
+     return 0;
+     }
+ EOF
+ 
+  ac_compile='${CXX-g++} -c $CXXFLAGS $all_includes $CPPFLAGS conftest.$ac_ext'
+- if { (eval echo configure:6352: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++ if { (eval echo configure:8032: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+    echo "$ac_t""yes" 1>&6
+  else
+    { echo "configure: error: your system is not able to compile a small KDE application!
+@@ -6385,10 +8065,10 @@
+   fi
+ 
+ echo $ac_n "checking for KDE libraries installed""... $ac_c" 1>&6
+-echo "configure:6389: checking for KDE libraries installed" >&5
++echo "configure:8069: checking for KDE libraries installed" >&5
+ ac_link='$LIBTOOL_SHELL --silent --mode=link ${CXX-g++} -o conftest $CXXFLAGS $all_includes $CPPFLAGS $LDFLAGS $all_libraries conftest.$ac_ext $LIBS -lkdecore $LIBQT $KDE_TEST_RPATH 1>&5'
+ 
+-if { (eval echo configure:6392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
++if { (eval echo configure:8072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+   echo "$ac_t""yes" 1>&6
+ else
+   { echo "configure: error: your system fails at linking a small KDE application!
+@@ -6424,6 +8104,8 @@
+ 	kde_servicesdir=\"$kde_servicesdir\" \
+ 	kde_servicetypesdir=\"$kde_servicetypesdir\" \
+ 	kde_moduledir=\"$kde_moduledir\" \
++   kde_styledir=\"$kde_styledir\" \
++	kde_widgetdir=\"$kde_widgetdir\" \
+ 	kde_result=$kde_result"
+ 
+ 
+@@ -6443,7 +8125,8 @@
+    test -z "$kde_wallpaperdir" || test -z "$kde_templatesdir" ||
+    test -z "$kde_bindir" || test -z "$kde_servicesdir" ||
+    test -z "$kde_servicetypesdir" || test -z "$kde_moduledir" ||
+-   test "$kde_have_all_paths" != "yes"; then
++   test -z "$kde_styledir" || test -z "kde_widgetdir" 
++   test "x$kde_have_all_paths" != "xyes"; then
+      kde_have_all_paths=no
+   fi
+ 
+@@ -6464,7 +8147,8 @@
+ bindir=$kde_bindir
+ 
+ 
+-        kde_default_bindirs="/usr/bin /usr/local/bin /opt/local/bin /usr/X11R6/bin /opt/kde/bin /opt/kde2/bin /usr/kde/bin /usr/local/kde/bin"
++
++        kde_default_bindirs="/usr/bin /usr/local/bin /opt/local/bin /usr/X11R6/bin /opt/kde/bin /opt/kde3/bin /usr/kde/bin /usr/local/kde/bin"
+         if test -n "$KDEDIRS"; then
+            kde_save_IFS=$IFS
+            IFS=:
+@@ -6476,7 +8160,7 @@
+         kde_default_bindirs="$exec_prefix/bin $prefix/bin $kde_default_bindirs"
+         
+    echo $ac_n "checking for dcopidl""... $ac_c" 1>&6
+-echo "configure:6480: checking for dcopidl" >&5
++echo "configure:8164: checking for dcopidl" >&5
+    if test -n "$DCOPIDL"; then
+         kde_cv_path="$DCOPIDL";
+    else
+@@ -6536,7 +8220,7 @@
+ 
+         
+    echo $ac_n "checking for dcopidl2cpp""... $ac_c" 1>&6
+-echo "configure:6540: checking for dcopidl2cpp" >&5
++echo "configure:8224: checking for dcopidl2cpp" >&5
+    if test -n "$DCOPIDL2CPP"; then
+         kde_cv_path="$DCOPIDL2CPP";
+    else
+@@ -6596,7 +8280,7 @@
+ 
+         
+    echo $ac_n "checking for mcopidl""... $ac_c" 1>&6
+-echo "configure:6600: checking for mcopidl" >&5
++echo "configure:8284: checking for mcopidl" >&5
+    if test -n "$MCOPIDL"; then
+         kde_cv_path="$MCOPIDL";
+    else
+@@ -6655,12 +8339,12 @@
+    fi
+ 
+         
+-   echo $ac_n "checking for kdb2html""... $ac_c" 1>&6
+-echo "configure:6660: checking for kdb2html" >&5
+-   if test -n "$KDB2HTML"; then
+-        kde_cv_path="$KDB2HTML";
++   echo $ac_n "checking for artsc-config""... $ac_c" 1>&6
++echo "configure:8344: checking for artsc-config" >&5
++   if test -n "$ARTSCCONFIG"; then
++        kde_cv_path="$ARTSCCONFIG";
+    else
+-        kde_cache=`echo kdb2html | sed 'y%./+-%__p_%'`
++        kde_cache=`echo artsc-config | sed 'y%./+-%__p_%'`
+ 
+         if eval "test \"`echo '$''{'kde_cv_path_$kde_cache'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+@@ -6676,16 +8360,16 @@
+ 	IFS=$kde_save_IFS
+ 
+         for dir in $dirs; do
+-	  if test -x "$dir/kdb2html"; then
++	  if test -x "$dir/artsc-config"; then
+ 	    if test -n ""
+ 	    then
+-              evalstr="$dir/kdb2html  2>&1 "
++              evalstr="$dir/artsc-config  2>&1 "
+ 	      if eval $evalstr; then
+-                kde_cv_path="$dir/kdb2html"
++                kde_cv_path="$dir/artsc-config"
+                 break
+ 	      fi
+             else
+-		kde_cv_path="$dir/kdb2html"
++		kde_cv_path="$dir/artsc-config"
+                 break
+ 	    fi
+           fi
+@@ -6704,23 +8388,23 @@
+    if test -z "$kde_cv_path" || test "$kde_cv_path" = NONE; then
+       echo "$ac_t""not found" 1>&6
+       
+-    { echo "configure: error: The important program kdb2html was not found!
++    { echo "configure: error: The important program artsc-config was not found!
+ Please check whether you installed KDE correctly.
+ " 1>&2; exit 1; }
+ 
+    else
+       echo "$ac_t""$kde_cv_path" 1>&6
+-      KDB2HTML=$kde_cv_path
++      ARTSCCONFIG=$kde_cv_path
+ 
+    fi
+ 
+         
+-   echo $ac_n "checking for artsc-config""... $ac_c" 1>&6
+-echo "configure:6720: checking for artsc-config" >&5
+-   if test -n "$ARTSCCONFIG"; then
+-        kde_cv_path="$ARTSCCONFIG";
++   echo $ac_n "checking for kde-config""... $ac_c" 1>&6
++echo "configure:8404: checking for kde-config" >&5
++   if test -n "$KDECONFIG"; then
++        kde_cv_path="$KDECONFIG";
+    else
+-        kde_cache=`echo artsc-config | sed 'y%./+-%__p_%'`
++        kde_cache=`echo kde-config | sed 'y%./+-%__p_%'`
+ 
+         if eval "test \"`echo '$''{'kde_cv_path_$kde_cache'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+@@ -6736,16 +8420,16 @@
+ 	IFS=$kde_save_IFS
+ 
+         for dir in $dirs; do
+-	  if test -x "$dir/artsc-config"; then
++	  if test -x "$dir/kde-config"; then
+ 	    if test -n ""
+ 	    then
+-              evalstr="$dir/artsc-config  2>&1 "
++              evalstr="$dir/kde-config  2>&1 "
+ 	      if eval $evalstr; then
+-                kde_cv_path="$dir/artsc-config"
++                kde_cv_path="$dir/kde-config"
+                 break
+ 	      fi
+             else
+-		kde_cv_path="$dir/artsc-config"
++		kde_cv_path="$dir/kde-config"
+                 break
+ 	    fi
+           fi
+@@ -6764,23 +8448,19 @@
+    if test -z "$kde_cv_path" || test "$kde_cv_path" = NONE; then
+       echo "$ac_t""not found" 1>&6
+       
+-    { echo "configure: error: The important program artsc-config was not found!
+-Please check whether you installed KDE correctly.
+-" 1>&2; exit 1; }
+-
+    else
+       echo "$ac_t""$kde_cv_path" 1>&6
+-      ARTSCCONFIG=$kde_cv_path
++      KDECONFIG=$kde_cv_path
+ 
+    fi
+ 
+         
+-   echo $ac_n "checking for kde-config""... $ac_c" 1>&6
+-echo "configure:6780: checking for kde-config" >&5
+-   if test -n "$KDECONFIG"; then
+-        kde_cv_path="$KDECONFIG";
++   echo $ac_n "checking for meinproc""... $ac_c" 1>&6
++echo "configure:8460: checking for meinproc" >&5
++   if test -n "$MEINPROC"; then
++        kde_cv_path="$MEINPROC";
+    else
+-        kde_cache=`echo kde-config | sed 'y%./+-%__p_%'`
++        kde_cache=`echo meinproc | sed 'y%./+-%__p_%'`
+ 
+         if eval "test \"`echo '$''{'kde_cv_path_$kde_cache'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+@@ -6796,16 +8476,16 @@
+ 	IFS=$kde_save_IFS
+ 
+         for dir in $dirs; do
+-	  if test -x "$dir/kde-config"; then
++	  if test -x "$dir/meinproc"; then
+ 	    if test -n ""
+ 	    then
+-              evalstr="$dir/kde-config  2>&1 "
++              evalstr="$dir/meinproc  2>&1 "
+ 	      if eval $evalstr; then
+-                kde_cv_path="$dir/kde-config"
++                kde_cv_path="$dir/meinproc"
+                 break
+ 	      fi
+             else
+-		kde_cv_path="$dir/kde-config"
++		kde_cv_path="$dir/meinproc"
+                 break
+ 	    fi
+           fi
+@@ -6824,16 +8504,37 @@
+    if test -z "$kde_cv_path" || test "$kde_cv_path" = NONE; then
+       echo "$ac_t""not found" 1>&6
+       
+-    { echo "configure: error: The important program kde-config was not found!
+-Please check whether you installed KDE correctly.
+-" 1>&2; exit 1; }
+-
+    else
+       echo "$ac_t""$kde_cv_path" 1>&6
+-      KDECONFIG=$kde_cv_path
++      MEINPROC=$kde_cv_path
+ 
+    fi
+ 
++      
++        if test -n "$MEINPROC" && test ! "$MEINPROC" = "compiled"; then  
++ 	    kde_sharedirs="/usr/share/kde /usr/local/share /usr/share /opt/kde3/share /opt/kde/share $prefix/share"
++            test -n "$KDEDIR" && kde_sharedirs="$KDEDIR/share $kde_sharedirs"
++            
++KDE_XSL_STYLESHEET=NO
++for i in $kde_sharedirs;
++do
++  for j in apps/ksgmltools2/customization/kde-chunk.xsl;
++  do
++    echo "configure: 8524: $i/$j" >&5
++    if test -r "$i/$j"; then
++      echo "taking that" >&5
++      KDE_XSL_STYLESHEET=$i
++      break 2
++    fi
++  done
++done
++
++	    if test "$KDE_XSL_STYLESHEET" = "NO"; then
++		KDE_XSL_STYLESHEET=""
++	    else
++                KDE_XSL_STYLESHEET="$KDE_XSL_STYLESHEET/apps/ksgmltools2/customization/kde-chunk.xsl"
++	    fi
++        fi
+ 
+         DCOP_DEPENDENCIES='$(DCOPIDL)'
+         
+@@ -6842,7 +8543,8 @@
+         
+         
+         
+-        
++	
++ 	
+ 
+         if test -x "$KDECONFIG"; then # it can be "compiled"
+           kde_libs_prefix=`$KDECONFIG --prefix`
+@@ -6878,6 +8580,8 @@
+ 
+ 
+ 
++
++
+ if test "$kde_qtver" = 1; then
+   kde_minidir="$kde_icondir/mini"
+ else
+@@ -6891,12 +8595,34 @@
+    
+    
+ 
+-if test $kde_qtver = 2; then
++if test $kde_qtver = 3; then
+    LIB_KDECORE='-lkdecore'
+    
+    LIB_KDEUI='-lkdeui'
+    
+-   LIB_KFORMULA='-lkformula'
++   LIB_KIO='-lkio'
++   
++   LIB_SMB='-lsmb'
++   
++   LIB_KAB='-lkab'
++   
++   LIB_KHTML='-lkhtml'
++   
++   LIB_KSPELL='-lkspell'
++   
++   LIB_KPARTS='-lkparts'
++   
++   LIB_KDEPRINT='-lkdeprint'
++   
++# these are for backward compatibility
++   LIB_KSYCOCA='-lkio'
++   
++   LIB_KFILE='-lkio'
++   
++elif test $kde_qtver = 2; then
++   LIB_KDECORE='-lkdecore'
++   
++   LIB_KDEUI='-lkdeui'
+    
+    LIB_KIO='-lkio'
+    
+@@ -6914,7 +8640,7 @@
+    
+    LIB_KPARTS='-lkparts'
+    
+-   LIB_KWRITE='-lkwrite'
++   LIB_KDEPRINT='-lkdeprint'
+    
+ else
+    LIB_KDECORE='-lkdecore -lXext $(LIB_QT)'
+@@ -6930,27 +8656,6 @@
+ fi
+ 
+ 
+-
+-if test "$program_transform_name" = s,x,x,; then
+-  program_transform_name=
+-else
+-  # Double any \ or $.  echo might interpret backslashes.
+-  cat <<\EOF_SED > conftestsed
+-s,\\,\\\\,g; s,\$,$$,g
+-EOF_SED
+-  program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
+-  rm -f conftestsed
+-fi
+-test "$program_prefix" != NONE &&
+-  program_transform_name="s,^,${program_prefix},; $program_transform_name"
+-# Use a double $ so make ignores it.
+-test "$program_suffix" != NONE &&
+-  program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
+-
+-# sed with no file args requires a program.
+-test "$program_transform_name" = "" && program_transform_name="s,x,x,"
+-
+-
+ #MIN_CONFIG
+ 
+ 
+@@ -6975,7 +8680,7 @@
+ 
+ for i in $ac_topsubdirs; do
+   echo $ac_n "checking if $i should be compiled""... $ac_c" 1>&6
+-echo "configure:6979: checking if $i should be compiled" >&5
++echo "configure:8684: checking if $i should be compiled" >&5
+   if test -d $srcdir/$i; then
+     install_it="yes"
+     for j in $DO_NOT_COMPILE; do
+@@ -7097,10 +8802,10 @@
+ 
+ trap 'rm -fr `echo "\
+ ./Makefile \
+-doc/Makefile \
+-doc/en/Makefile \
+-kfocus/Makefile \
+-po/Makefile \
++./doc/Makefile \
++./doc/en/Makefile \
++./kfocus/Makefile \
++./po/Makefile \
+  config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+ EOF
+ cat >> $CONFIG_STATUS <<EOF
+@@ -7153,20 +8858,36 @@
+ s%@INSTALL_DATA@%$INSTALL_DATA%g
+ s%@PACKAGE@%$PACKAGE%g
+ s%@VERSION@%$VERSION%g
++s%@EXEEXT@%$EXEEXT%g
++s%@OBJEXT@%$OBJEXT%g
+ s%@ACLOCAL@%$ACLOCAL%g
+ s%@AUTOCONF@%$AUTOCONF%g
+ s%@AUTOMAKE@%$AUTOMAKE%g
+ s%@AUTOHEADER@%$AUTOHEADER%g
+ s%@MAKEINFO@%$MAKEINFO%g
++s%@AMTAR@%$AMTAR%g
++s%@install_sh@%$install_sh%g
++s%@INSTALL_STRIP_PROGRAM@%$INSTALL_STRIP_PROGRAM%g
++s%@AWK@%$AWK%g
+ s%@SET_MAKE@%$SET_MAKE%g
++s%@AMDEP_TRUE@%$AMDEP_TRUE%g
++s%@AMDEP_FALSE@%$AMDEP_FALSE%g
++s%@AMDEPBACKSLASH@%$AMDEPBACKSLASH%g
++s%@DEPDIR@%$DEPDIR%g
+ s%@CONF_FILES@%$CONF_FILES%g
+ s%@CC@%$CC%g
++s%@am__include@%$am__include%g
++s%@am__quote@%$am__quote%g
++s%@CCDEPMODE@%$CCDEPMODE%g
+ s%@CPP@%$CPP%g
+ s%@CXX@%$CXX%g
++s%@CXXDEPMODE@%$CXXDEPMODE%g
++s%@WOVERLOADED_VIRTUAL@%$WOVERLOADED_VIRTUAL%g
+ s%@USE_EXCEPTIONS@%$USE_EXCEPTIONS%g
+ s%@USE_RTTI@%$USE_RTTI%g
+ s%@CXXCPP@%$CXXCPP%g
+ s%@NOOPT_CXXFLAGS@%$NOOPT_CXXFLAGS%g
++s%@NOOPT_CFLAGS@%$NOOPT_CFLAGS%g
+ s%@REPO@%$REPO%g
+ s%@NOREPO@%$NOREPO%g
+ s%@KDE_USE_FINAL_TRUE@%$KDE_USE_FINAL_TRUE%g
+@@ -7174,8 +8895,6 @@
+ s%@KDE_USE_CLOSURE_TRUE@%$KDE_USE_CLOSURE_TRUE%g
+ s%@KDE_USE_CLOSURE_FALSE@%$KDE_USE_CLOSURE_FALSE%g
+ s%@KDE_CXXFLAGS@%$KDE_CXXFLAGS%g
+-s%@OBJEXT@%$OBJEXT%g
+-s%@EXEEXT@%$EXEEXT%g
+ s%@LN_S@%$LN_S%g
+ s%@RANLIB@%$RANLIB%g
+ s%@STRIP@%$STRIP%g
+@@ -7184,9 +8903,11 @@
+ s%@MSGFMT@%$MSGFMT%g
+ s%@GMSGFMT@%$GMSGFMT%g
+ s%@XGETTEXT@%$XGETTEXT%g
++s%@LIBUTIL@%$LIBUTIL%g
+ s%@LIBCOMPAT@%$LIBCOMPAT%g
+ s%@LIBCRYPT@%$LIBCRYPT%g
+ s%@LIBSOCKET@%$LIBSOCKET%g
++s%@LIBRESOLV@%$LIBRESOLV%g
+ s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
+ s%@LIBUCB@%$LIBUCB%g
+ s%@LIBDL@%$LIBDL%g
+@@ -7197,6 +8918,13 @@
+ s%@LIBSM@%$LIBSM%g
+ s%@X_PRE_LIBS@%$X_PRE_LIBS%g
+ s%@LIB_X11@%$LIB_X11%g
++s%@LIBXINERAMA@%$LIBXINERAMA%g
++s%@QTE_NORTTI@%$QTE_NORTTI%g
++s%@LIB_XEXT@%$LIB_XEXT%g
++s%@LIBPTHREAD@%$LIBPTHREAD%g
++s%@USE_THREADS@%$USE_THREADS%g
++s%@KDE_MT_LDFLAGS@%$KDE_MT_LDFLAGS%g
++s%@KDE_MT_LIBS@%$KDE_MT_LIBS%g
+ s%@USER_INCLUDES@%$USER_INCLUDES%g
+ s%@USER_LDFLAGS@%$USER_LDFLAGS%g
+ s%@LIBZ@%$LIBZ%g
+@@ -7208,7 +8936,10 @@
+ s%@QT_LDFLAGS@%$QT_LDFLAGS%g
+ s%@MOC@%$MOC%g
+ s%@UIC@%$UIC%g
++s%@UIC_TR@%$UIC_TR%g
+ s%@LIB_QT@%$LIB_QT%g
++s%@LIB_QPE@%$LIB_QPE%g
++s%@kde_qtver@%$kde_qtver%g
+ s%@KDE_EXTRA_RPATH@%$KDE_EXTRA_RPATH%g
+ s%@KDE_RPATH@%$KDE_RPATH%g
+ s%@kde_libraries@%$kde_libraries%g
+@@ -7222,9 +8953,10 @@
+ s%@DCOPIDL2CPP@%$DCOPIDL2CPP%g
+ s%@DCOP_DEPENDENCIES@%$DCOP_DEPENDENCIES%g
+ s%@MCOPIDL@%$MCOPIDL%g
+-s%@KDB2HTML@%$KDB2HTML%g
+ s%@ARTSCCONFIG@%$ARTSCCONFIG%g
+ s%@KDECONFIG@%$KDECONFIG%g
++s%@MEINPROC@%$MEINPROC%g
++s%@KDE_XSL_STYLESHEET@%$KDE_XSL_STYLESHEET%g
+ s%@kde_libs_prefix@%$kde_libs_prefix%g
+ s%@kde_libs_htmldir@%$kde_libs_htmldir%g
+ s%@kde_htmldir@%$kde_htmldir%g
+@@ -7241,18 +8973,19 @@
+ s%@kde_servicesdir@%$kde_servicesdir%g
+ s%@kde_servicetypesdir@%$kde_servicetypesdir%g
+ s%@kde_moduledir@%$kde_moduledir%g
++s%@kde_styledir@%$kde_styledir%g
++s%@kde_widgetdir@%$kde_widgetdir%g
+ s%@LIB_KDECORE@%$LIB_KDECORE%g
+ s%@LIB_KDEUI@%$LIB_KDEUI%g
+-s%@LIB_KFORMULA@%$LIB_KFORMULA%g
+ s%@LIB_KIO@%$LIB_KIO%g
+-s%@LIB_KSYCOCA@%$LIB_KSYCOCA%g
+ s%@LIB_SMB@%$LIB_SMB%g
+-s%@LIB_KFILE@%$LIB_KFILE%g
+ s%@LIB_KAB@%$LIB_KAB%g
+ s%@LIB_KHTML@%$LIB_KHTML%g
+ s%@LIB_KSPELL@%$LIB_KSPELL%g
+ s%@LIB_KPARTS@%$LIB_KPARTS%g
+-s%@LIB_KWRITE@%$LIB_KWRITE%g
++s%@LIB_KDEPRINT@%$LIB_KDEPRINT%g
++s%@LIB_KSYCOCA@%$LIB_KSYCOCA%g
++s%@LIB_KFILE@%$LIB_KFILE%g
+ s%@LIB_KFM@%$LIB_KFM%g
+ s%@TOPSUBDIRS@%$TOPSUBDIRS%g
+ 
+@@ -7298,10 +9031,10 @@
+ 
+ CONFIG_FILES=\${CONFIG_FILES-"\
+ ./Makefile \
+-doc/Makefile \
+-doc/en/Makefile \
+-kfocus/Makefile \
+-po/Makefile \
++./doc/Makefile \
++./doc/en/Makefile \
++./kfocus/Makefile \
++./po/Makefile \
+ "}
+ EOF
+ cat >> $CONFIG_STATUS <<\EOF
+@@ -7339,7 +9072,6 @@
+ 
+   case "$ac_given_INSTALL" in
+   [/$]*) INSTALL="$ac_given_INSTALL" ;;
+-"") ;;
+   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
+   esac
+ 
+@@ -7471,18 +9203,73 @@
+ 
+ EOF
+ cat >> $CONFIG_STATUS <<EOF
+-
++am_indx=1
++for am_file in config.h; do
++  case " \$CONFIG_HEADERS " in
++  *" \$am_file "*)
++    am_dir=\`echo \$am_file |sed 's%:.*%%;s%[^/]*\$%%'\`
++    if test -n "\$am_dir"; then
++      am_tmpdir=\`echo \$am_dir |sed 's%^\(/*\).*\$%\1%'\`
++      for am_subdir in \`echo \$am_dir |sed 's%/% %'\`; do
++        am_tmpdir=\$am_tmpdir\$am_subdir/
++        if test ! -d \$am_tmpdir; then
++          mkdir \$am_tmpdir
++        fi
++      done
++    fi
++    echo timestamp > "\$am_dir"stamp-h\$am_indx
++    ;;
++  esac
++  am_indx=\`expr \$am_indx + 1\`
++done
++AMDEP_TRUE="$AMDEP_TRUE"
++ac_aux_dir="$ac_aux_dir"
+ 
+ EOF
+ cat >> $CONFIG_STATUS <<\EOF
+-test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
++test -z "$CONFIG_HEADERS" || echo timestamp >	   stamp-h
++
++test x"$AMDEP_TRUE" != x"" ||
++for mf in $CONFIG_FILES; do
++  case "$mf" in
++  Makefile) dirpart=.;;
++  */Makefile) dirpart=`echo "$mf" | sed -e 's|/[^/]*$||'`;;
++  *) continue;;
++  esac
++  grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue
++  # Extract the definition of DEP_FILES from the Makefile without
++  # running `make'.
++  DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
++  test -z "$DEPDIR" && continue
++  # When using ansi2knr, U may be empty or an underscore; expand it
++  U=`sed -n -e '/^U = / s///p' < "$mf"`
++  test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
++  # We invoke sed twice because it is the simplest approach to
++  # changing $(DEPDIR) to its actual value in the expansion.
++  for file in `sed -n -e '
++    /^DEP_FILES = .*\\\\$/ {
++      s/^DEP_FILES = //
++      :loop
++	s/\\\\$//
++	p
++	n
++	/\\\\$/ b loop
++      p
++    }
++    /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
++       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
++    # Make sure the directory exists.
++    test -f "$dirpart/$file" && continue
++    fdir=`echo "$file" | sed -e 's|/[^/]*$||'`
++    $ac_aux_dir/mkinstalldirs "$dirpart/$fdir" > /dev/null 2>&1
++    # echo "creating $dirpart/$file"
++    echo '# dummy' > "$dirpart/$file"
++  done
++done
++
+ 
+ exit 0
+ EOF
+-if test "x$with_fast_perl" = "xyes" ; then
+-  perl -i.bak $ac_aux_dir/conf.change.pl $CONFIG_STATUS || mv $CONFIG_STATUS.bak $CONFIG_STATUS; 
+-  rm -f $CONFIG_STATUS.bak;
+-fi 
+ chmod +x $CONFIG_STATUS
+ rm -fr confdefs* $ac_clean_files
+ test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
+--- kfocus-1.0.2.orig/kfocus/kfocus.h
++++ kfocus-1.0.2/kfocus/kfocus.h
+@@ -62,7 +62,7 @@
+     ~KFocusApp();
+     /** opens a file specified by commandline option
+      */
+-    void openDocumentFile(const KURL& url=0);
++    void openDocumentFile(const KURL&);
+     /** returns a pointer to the current document connected to the KTMainWindow instance and is used by
+      * the View class to access the document object's methods
+      */	
+--- kfocus-1.0.2.orig/kfocus/kfvprojectlist.h
++++ kfocus-1.0.2/kfocus/kfvprojectlist.h
+@@ -72,6 +72,7 @@
+ 	void onProjectListCurrentProjectChanged(KFMProject* project);
+ 	void onProjectListProjectAdded(KFMProject* project);
+ 	void onProjectListProjectRemoved(KFMProject* project, int pos);
++	void onProjectListContentsChanged(void);
+ 	void onCurrentProjectNameChanged();
+ 	void onLbNamesCurrentChanged(QListBoxItem* item);
+ 	void onPbNewClicked();
+--- kfocus-1.0.2.orig/kfocus/kfmproject.cpp
++++ kfocus-1.0.2/kfocus/kfmproject.cpp
+@@ -15,6 +15,8 @@
+  *                                                                         *
+  ***************************************************************************/
+ #include "kfmproject.h"
++#include "kfocustask.h"
++#include "kfmenddate.h"
+ 
+ #include "kfocustasklist.h"
+ #include "kfocuslogbook.h"
+@@ -157,3 +159,59 @@
+ 		n = n.nextSibling();
+ 	}
+ }
++
++/* A project without any tasks is the lowest possible priority.
++ */
++bool KFMProject::operator<(const KFMProject &comp)
++{
++	KFMTask *atask, *btask;
++	
++	atask = taskList_->firstTask();
++	btask = comp.taskList_->firstTask();
++
++	if (atask && !btask) {
++		return 1;
++	} else if (!atask || !btask) {  // Either !a && b or !a && !b
++		return 0;
++	}
++	
++	// Shamelessly stolen from KFMTask::operator<()
++	if (atask->started() && !btask->started()) {
++		return 1;
++	}
++	if (!atask->started() && btask->started()) {
++		return 0;
++	}
++
++	if (*(atask->endDate()) < *(btask->endDate())) {
++		return 1;
++	}
++	else {
++		return 0;
++	}
++}
++
++bool KFMProject::operator==(const KFMProject &comp)
++{
++	KFMTask *atask, *btask;
++
++	atask = taskList_->firstTask();
++	btask = comp.taskList_->firstTask();
++	
++	if (!atask && !btask) {
++		return 1;
++	} else if (!atask || !btask) {
++		return 0;
++	}
++
++	// Shamelessly stolen from KFMTask::operator==()
++	if (atask->started() != btask->started()) {
++		return 0;
++	}
++	
++	if (*(atask->endDate()) == *(btask->endDate())) {
++		return 1;
++	} else {
++		return 0;
++	}
++}
+--- kfocus-1.0.2.orig/kfocus/Makefile.am
++++ kfocus-1.0.2/kfocus/Makefile.am
+@@ -1,7 +1,7 @@
+ ####### kdevelop will overwrite this part!!! (begin)##########
+ bin_PROGRAMS = kfocus
+ kfocus_SOURCES = kfvdate.cpp kfxenddate.cpp kfmenddate.cpp kfmprojectlist.cpp kfvprojectlist.cpp kfvlog.cpp kfvproject.cpp kfocuslogbook.cpp kfmproject.cpp kfocusdialogcompletetask.cpp kdatedialog.cpp kfocuslogentriesview.cpp kfocuslogentry.cpp kfocustasklist.cpp kfocustasksview.cpp kfocustaskpropsview.cpp kfocustask.cpp kfocusview.cpp kfocusdoc.cpp kfocus.cpp main.cpp 
+-kfocus_LDADD   =  -lkfile -lkdeui -lkdecore $(LIB_QT) $(LIBSOCKET)
++kfocus_LDADD   =  -lkio -lkdeui -lkdecore $(LIB_QT) $(LIBSOCKET)
+ 
+ 
+ EXTRA_DIST = main.cpp kfocus.cpp kfocus.h kfocusdoc.cpp kfocusdoc.h kfocusview.cpp kfocusview.h kfocus.desktop lo32-app-kfocus.png lo16-app-kfocus.png kfocustask.cpp kfocustask.h kfocustaskpropsview.cpp kfocustaskpropsview.h kfocustasksview.cpp kfocustasksview.h kfocustasklist.cpp kfocustasklist.h kfocuslogentry.cpp kfocuslogentry.h kfocuslogentriesview.cpp kfocuslogentriesview.h kdatedialog.cpp kdatedialog.h kfocusdialogcompletetask.cpp kfocusdialogcompletetask.h kfmproject.cpp kfmproject.h kfocuslogbook.cpp kfocuslogbook.h kfvproject.h kfvproject.cpp kfvlog.cpp kfvlog.h kfvprojectlist.cpp kfvprojectlist.h kfmprojectlist.cpp kfmprojectlist.h kfocusui.rc kfmenddate.cpp kfmenddate.h kfxenddate.cpp kfxenddate.h kfvdate.cpp kfvdate.h 
+--- kfocus-1.0.2.orig/kfocus/kfvprojectlist.cpp
++++ kfocus-1.0.2/kfocus/kfvprojectlist.cpp
+@@ -147,6 +147,17 @@
+ 	}
+ }
+ 	
++void KFVProjectList::onProjectListContentsChanged() {
++	lbNames_->clear();
++	KFMProject *proj;
++	for (int i = 0; (proj = projectList_->projectAt(i)); i++) {
++		lbNames_->insertItem(proj->name(), i);
++	}
++
++	// Reset highlighted project
++	lbNames_->setCurrentItem(projectList_->currentPosition());
++}
++
+ void KFVProjectList::onCurrentProjectNameChanged(){
+ 	lbNames_->changeItem(projectList_->currentProject()->name(),
+ 			projectList_->currentPosition());
+@@ -222,7 +233,9 @@
+ 					SLOT(onProjectListProjectAdded(KFMProject*)));
+ 			connect(projectList_, SIGNAL(projectRemoved(KFMProject*,int)), this,
+ 					SLOT(onProjectListProjectRemoved(KFMProject*,int)));
+-			
++			connect(projectList, SIGNAL(contentsChanged()), this,
++					SLOT(onProjectListContentsChanged()));
++					
+ 			// Enable self
+ 			setEnabled(true);
+ 		}	
+--- kfocus-1.0.2.orig/kfocus/kfmproject.h
++++ kfocus-1.0.2/kfocus/kfmproject.h
+@@ -46,6 +46,10 @@
+ 	static QString xmlTag();
+ 	QDomElement domElement(QDomDocument* d);
+ 	void domElement(QDomElement eProject);
++
++	/* Comparisons to achieve sortedness */
++	bool operator<(const KFMProject &comparator);
++	bool operator==(const KFMProject &comparator);
+ 	
+ 	/** Get the project id */
+ 	int id() const {return id_;};
+--- kfocus-1.0.2.orig/kfocus/kfmprojectlist.h
++++ kfocus-1.0.2/kfocus/kfmprojectlist.h
+@@ -21,7 +21,7 @@
+ #include <qobject.h>
+ #include <qdom.h>
+ #include <qstring.h>
+-#include <qlist.h>
++#include <qsortedlist.h>
+ 
+ class KFMProject;
+ 
+@@ -102,7 +102,7 @@
+ 	void contentsChanged();
+ 	
+ private:  // Private Attributes
+-	mutable QList<KFMProject> projectList_;
++	mutable QSortedList<KFMProject> projectList_;
+ 	KFMProject* currentProject_;
+ 	
+ 	/** Id to assign to the next project added to the projectlist */
+--- kfocus-1.0.2.orig/kfocus/kfocus.cpp
++++ kfocus-1.0.2/kfocus/kfocus.cpp
+@@ -28,6 +28,7 @@
+ #include <klocale.h>
+ #include <kconfig.h>
+ #include <kstdaction.h>
++#include <kstatusbar.h>
+ 
+ // application specific includes
+ #include "kfocus.h"
+--- kfocus-1.0.2.orig/kfocus/kfmprojectlist.cpp
++++ kfocus-1.0.2/kfocus/kfmprojectlist.cpp
+@@ -49,7 +49,7 @@
+ 		// Note the ids that are in use
+ 		existingProjectId(project->id());
+ 	
+-		projectList_.append(project);
++		projectList_.inSort(project);
+ 		emit projectAdded(project);
+ 		emit contentsChanged();
+ 		
+@@ -195,5 +195,6 @@
+ }
+ 
+ void KFMProjectList::onComponentContentsChanged(){
++	projectList_.sort();
+ 	emit contentsChanged();
+ }
+--- kfocus-1.0.2.orig/kfocus/Makefile.in
++++ kfocus-1.0.2/kfocus/Makefile.in
+@@ -1,7 +1,8 @@
+-# KDE tags expanded automatically by am_edit - $Revision: 1.1.1.1 $ 
+-# Makefile.in generated automatically by automake 1.4 from Makefile.am
++# KDE tags expanded automatically by am_edit - $Revision: 1.4 $ 
++# Makefile.in generated automatically by automake 1.5 from Makefile.am.
+ 
+-# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
++# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
++# Free Software Foundation, Inc.
+ # This Makefile.in is free software; the Free Software Foundation
+ # gives unlimited permission to copy and/or distribute it,
+ # with or without modifications, as long as this notice is preserved.
+@@ -11,8 +12,9 @@
+ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ # PARTICULAR PURPOSE.
+ 
+-####### kdevelop will overwrite this part!!! (begin)##########
++ at SET_MAKE@
+ 
++####### kdevelop will overwrite this part!!! (begin)##########
+ 
+ SHELL = @SHELL@
+ 
+@@ -21,10 +23,6 @@
+ VPATH = @srcdir@
+ prefix = @prefix@
+ exec_prefix = @exec_prefix@
+-#>- 
+-bindir = @bindir@
+-#>+ 3
+-DEPDIR = .deps
+ 
+ bindir = @bindir@
+ sbindir = @sbindir@
+@@ -38,13 +36,9 @@
+ mandir = @mandir@
+ includedir = @includedir@
+ oldincludedir = /usr/include
+-
+-DESTDIR =
+-
+ pkgdatadir = $(datadir)/@PACKAGE@
+ pkglibdir = $(libdir)/@PACKAGE@
+ pkgincludedir = $(includedir)/@PACKAGE@
+-
+ top_builddir = ..
+ 
+ ACLOCAL = @ACLOCAL@
+@@ -53,11 +47,11 @@
+ AUTOHEADER = @AUTOHEADER@
+ 
+ INSTALL = @INSTALL@
+-INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
++INSTALL_PROGRAM = @INSTALL_PROGRAM@
+ INSTALL_DATA = @INSTALL_DATA@
+ INSTALL_SCRIPT = @INSTALL_SCRIPT@
++INSTALL_HEADER = $(INSTALL_DATA)
+ transform = @program_transform_name@
+-
+ NORMAL_INSTALL = :
+ PRE_INSTALL = :
+ POST_INSTALL = :
+@@ -70,9 +64,11 @@
+ host_triplet = @host@
+ target_alias = @target_alias@
+ target_triplet = @target@
++AMTAR = @AMTAR@
+ ARTSCCONFIG = @ARTSCCONFIG@
+ AS = @AS@
+ AUTODIRS = @AUTODIRS@
++AWK = @AWK@
+ CC = @CC@
+ CONF_FILES = @CONF_FILES@
+ CPP = @CPP@
+@@ -81,6 +77,7 @@
+ DCOPIDL = @DCOPIDL@
+ DCOPIDL2CPP = @DCOPIDL2CPP@
+ DCOP_DEPENDENCIES = @DCOP_DEPENDENCIES@
++DEPDIR = @DEPDIR@
+ DLLTOOL = @DLLTOOL@
+ DPMSINC = @DPMSINC@
+ DPMSLIB = @DPMSLIB@
+@@ -92,21 +89,31 @@
+ GMSGFMT = @GMSGFMT@
+ IDL = @IDL@
+ IDL_DEPENDENCIES = @IDL_DEPENDENCIES@
+-KDB2HTML = @KDB2HTML@
++INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
++JAR = @JAR@
++JAVAC = @JAVAC@
++JAVAH = @JAVAH@
++JVMLIBS = @JVMLIBS@
+ KDECONFIG = @KDECONFIG@
+ KDE_CXXFLAGS = @KDE_CXXFLAGS@
+ KDE_EXTRA_RPATH = @KDE_EXTRA_RPATH@
+ KDE_INCLUDES = @KDE_INCLUDES@
+ KDE_LDFLAGS = @KDE_LDFLAGS@
++KDE_MT_LDFLAGS = @KDE_MT_LDFLAGS@
++KDE_MT_LIBS = @KDE_MT_LIBS@
+ KDE_PLUGIN = @KDE_PLUGIN@
+ KDE_RPATH = @KDE_RPATH@
+ KDE_USE_CLOSURE_FALSE = @KDE_USE_CLOSURE_FALSE@
+ KDE_USE_CLOSURE_TRUE = @KDE_USE_CLOSURE_TRUE@
+ KDE_USE_FINAL_FALSE = @KDE_USE_FINAL_FALSE@
+ KDE_USE_FINAL_TRUE = @KDE_USE_FINAL_TRUE@
++KDE_XSL_STYLESHEET = @KDE_XSL_STYLESHEET@
++LEX = @LEX@
++LEXLIB = @LEXLIB@
+ LIBCOMPAT = @LIBCOMPAT@
+ LIBCRYPT = @LIBCRYPT@
+ LIBDL = @LIBDL@
++LIBGEN = @LIBGEN@
+ LIBJPEG = @LIBJPEG@
+ LIBMICO = @LIBMICO@
+ LIBOBJS = @LIBOBJS@
+@@ -114,59 +121,70 @@
+ LIBPTHREAD = @LIBPTHREAD@
+ LIBPYTHON = @LIBPYTHON@
+ LIBQIMGIO = @LIBQIMGIO@
++LIBRESOLV = @LIBRESOLV@
++LIBSHADOW = @LIBSHADOW@
+ LIBSM = @LIBSM@
+ LIBSOCKET = @LIBSOCKET@
+ LIBTIFF = @LIBTIFF@
+ LIBTOOL = @LIBTOOL@
+ LIBUCB = @LIBUCB@
++LIBUTIL = @LIBUTIL@
++LIBXINERAMA = @LIBXINERAMA@
+ LIBZ = @LIBZ@
+ LIB_KAB = @LIB_KAB@
+ LIB_KDECORE = @LIB_KDECORE@
++LIB_KDEPRINT = @LIB_KDEPRINT@
+ LIB_KDEUI = @LIB_KDEUI@
+ LIB_KFILE = @LIB_KFILE@
+ LIB_KFM = @LIB_KFM@
+-LIB_KFORMULA = @LIB_KFORMULA@
+ LIB_KHTML = @LIB_KHTML@
+ LIB_KIMGIO = @LIB_KIMGIO@
+ LIB_KIO = @LIB_KIO@
+ LIB_KPARTS = @LIB_KPARTS@
+ LIB_KSPELL = @LIB_KSPELL@
+ LIB_KSYCOCA = @LIB_KSYCOCA@
+-LIB_KWRITE = @LIB_KWRITE@
++LIB_QPE = @LIB_QPE@
+ LIB_QT = @LIB_QT@
++LIB_QTOPIA = @LIB_QTOPIA@
+ LIB_SMB = @LIB_SMB@
+ LIB_X11 = @LIB_X11@
++LIB_XEXT = @LIB_XEXT@
+ LN_S = @LN_S@
+-MAKEINFO = @MAKEINFO@
+ MCOPIDL = @MCOPIDL@
++MEINPROC = @MEINPROC@
+ MICO_INCLUDES = @MICO_INCLUDES@
+ MICO_LDFLAGS = @MICO_LDFLAGS@
+ MOC = @MOC@
+ MSGFMT = @MSGFMT@
++NOOPT_CFLAGS = @NOOPT_CFLAGS@
+ NOOPT_CXXFLAGS = @NOOPT_CXXFLAGS@
+ NOREPO = @NOREPO@
+ OBJDUMP = @OBJDUMP@
+ OBJEXT = @OBJEXT@
+ PACKAGE = @PACKAGE@
+-PAMINC = @PAMINC@
+-PAMLIBPATHS = @PAMLIBPATHS@
+ PAMLIBS = @PAMLIBS@
++PASSWDLIBS = @PASSWDLIBS@
+ PYTHONINC = @PYTHONINC@
+ PYTHONLIB = @PYTHONLIB@
+ PYTHONMODDIR = @PYTHONMODDIR@
++QTE_NORTTI = @QTE_NORTTI@
++QTOPIA_INCLUDES = @QTOPIA_INCLUDES@
+ QT_INCLUDES = @QT_INCLUDES@
+ QT_LDFLAGS = @QT_LDFLAGS@
+ RANLIB = @RANLIB@
+ REPO = @REPO@
++SETUIDFLAGS = @SETUIDFLAGS@
+ STRIP = @STRIP@
+ TOPSUBDIRS = @TOPSUBDIRS@
+ UIC = @UIC@
++UIC_TR = @UIC_TR@
+ USER_INCLUDES = @USER_INCLUDES@
+ USER_LDFLAGS = @USER_LDFLAGS@
+ USE_EXCEPTIONS = @USE_EXCEPTIONS@
+ USE_RTTI = @USE_RTTI@
+ USE_THREADS = @USE_THREADS@
+ VERSION = @VERSION@
++WOVERLOADED_VIRTUAL = @WOVERLOADED_VIRTUAL@
+ XGETTEXT = @XGETTEXT@
+ XPMINC = @XPMINC@
+ XPMLIB = @XPMLIB@
+@@ -176,7 +194,11 @@
+ X_PRE_LIBS = @X_PRE_LIBS@
+ all_includes = @all_includes@
+ all_libraries = @all_libraries@
++am__include = @am__include@
++am__quote = @am__quote@
+ idldir = @idldir@
++install_sh = @install_sh@
++jni_includes = @jni_includes@
+ kde_appsdir = @kde_appsdir@
+ kde_bindir = @kde_bindir@
+ kde_confdir = @kde_confdir@
+@@ -190,11 +212,14 @@
+ kde_locale = @kde_locale@
+ kde_mimedir = @kde_mimedir@
+ kde_moduledir = @kde_moduledir@
++kde_qtver = @kde_qtver@
+ kde_servicesdir = @kde_servicesdir@
+ kde_servicetypesdir = @kde_servicetypesdir@
+ kde_sounddir = @kde_sounddir@
++kde_styledir = @kde_styledir@
+ kde_templatesdir = @kde_templatesdir@
+ kde_wallpaperdir = @kde_wallpaperdir@
++kde_widgetdir = @kde_widgetdir@
+ micodir = @micodir@
+ qt_includes = @qt_includes@
+ qt_libraries = @qt_libraries@
+@@ -203,7 +228,7 @@
+ 
+ bin_PROGRAMS = kfocus
+ kfocus_SOURCES = kfvdate.cpp kfxenddate.cpp kfmenddate.cpp kfmprojectlist.cpp kfvprojectlist.cpp kfvlog.cpp kfvproject.cpp kfocuslogbook.cpp kfmproject.cpp kfocusdialogcompletetask.cpp kdatedialog.cpp kfocuslogentriesview.cpp kfocuslogentry.cpp kfocustasklist.cpp kfocustasksview.cpp kfocustaskpropsview.cpp kfocustask.cpp kfocusview.cpp kfocusdoc.cpp kfocus.cpp main.cpp 
+-kfocus_LDADD = -lkfile -lkdeui -lkdecore $(LIB_QT) $(LIBSOCKET)
++kfocus_LDADD = -lkio -lkdeui -lkdecore $(LIB_QT) $(LIBSOCKET)
+ 
+ EXTRA_DIST = main.cpp kfocus.cpp kfocus.h kfocusdoc.cpp kfocusdoc.h kfocusview.cpp kfocusview.h kfocus.desktop lo32-app-kfocus.png lo16-app-kfocus.png kfocustask.cpp kfocustask.h kfocustaskpropsview.cpp kfocustaskpropsview.h kfocustasksview.cpp kfocustasksview.h kfocustasklist.cpp kfocustasklist.h kfocuslogentry.cpp kfocuslogentry.h kfocuslogentriesview.cpp kfocuslogentriesview.h kdatedialog.cpp kdatedialog.h kfocusdialogcompletetask.cpp kfocusdialogcompletetask.h kfmproject.cpp kfmproject.h kfocuslogbook.cpp kfocuslogbook.h kfvproject.h kfvproject.cpp kfvlog.cpp kfvlog.h kfvprojectlist.cpp kfvprojectlist.h kfmprojectlist.cpp kfmprojectlist.h kfocusui.rc kfmenddate.cpp kfmenddate.h kfxenddate.cpp kfxenddate.h kfvdate.cpp kfvdate.h 
+ 
+@@ -231,314 +256,347 @@
+ 
+ rcdir = $(kde_datadir)/kfocus
+ rc_DATA = kfocusui.rc
++subdir = ./kfocus
+ mkinstalldirs = $(SHELL) $(top_srcdir)/admin/mkinstalldirs
+-CONFIG_HEADER = ../config.h
+-CONFIG_CLEAN_FILES = 
+-bin_PROGRAMS =  kfocus$(EXEEXT)
+-PROGRAMS =  $(bin_PROGRAMS)
+-
+-
+-DEFS = @DEFS@ -I. -I$(srcdir) -I..
+-CPPFLAGS = @CPPFLAGS@
+-LDFLAGS = @LDFLAGS@
+-LIBS = @LIBS@
+-#>- kfocus_OBJECTS =  kfvdate.$(OBJEXT) kfxenddate.$(OBJEXT) \
+-#>- kfmenddate.$(OBJEXT) kfmprojectlist.$(OBJEXT) kfvprojectlist.$(OBJEXT) \
+-#>- kfvlog.$(OBJEXT) kfvproject.$(OBJEXT) kfocuslogbook.$(OBJEXT) \
+-#>- kfmproject.$(OBJEXT) kfocusdialogcompletetask.$(OBJEXT) \
+-#>- kdatedialog.$(OBJEXT) kfocuslogentriesview.$(OBJEXT) \
+-#>- kfocuslogentry.$(OBJEXT) kfocustasklist.$(OBJEXT) \
+-#>- kfocustasksview.$(OBJEXT) kfocustaskpropsview.$(OBJEXT) \
+-#>- kfocustask.$(OBJEXT) kfocusview.$(OBJEXT) kfocusdoc.$(OBJEXT) \
+-#>- kfocus.$(OBJEXT) main.$(OBJEXT)
+-#>+ 14
++CONFIG_HEADER = $(top_builddir)/config.h
++CONFIG_CLEAN_FILES =
++bin_PROGRAMS = kfocus$(EXEEXT)
++PROGRAMS = $(bin_PROGRAMS)
++
++am_kfocus_OBJECTS = kfvdate.$(OBJEXT) kfxenddate.$(OBJEXT) \
++	kfmenddate.$(OBJEXT) kfmprojectlist.$(OBJEXT) \
++	kfvprojectlist.$(OBJEXT) kfvlog.$(OBJEXT) kfvproject.$(OBJEXT) \
++	kfocuslogbook.$(OBJEXT) kfmproject.$(OBJEXT) \
++	kfocusdialogcompletetask.$(OBJEXT) kdatedialog.$(OBJEXT) \
++	kfocuslogentriesview.$(OBJEXT) kfocuslogentry.$(OBJEXT) \
++	kfocustasklist.$(OBJEXT) kfocustasksview.$(OBJEXT) \
++	kfocustaskpropsview.$(OBJEXT) kfocustask.$(OBJEXT) \
++	kfocusview.$(OBJEXT) kfocusdoc.$(OBJEXT) kfocus.$(OBJEXT) \
++	main.$(OBJEXT)
++#>- kfocus_OBJECTS = $(am_kfocus_OBJECTS)
++#>+ 15
+ kfocus_final_OBJECTS = kfocus.all_cpp.o 
+ kfocus_nofinal_OBJECTS = kfvdate.$(OBJEXT) kfxenddate.$(OBJEXT) \
+-kfmenddate.$(OBJEXT) kfmprojectlist.$(OBJEXT) kfvprojectlist.$(OBJEXT) \
+-kfvlog.$(OBJEXT) kfvproject.$(OBJEXT) kfocuslogbook.$(OBJEXT) \
+-kfmproject.$(OBJEXT) kfocusdialogcompletetask.$(OBJEXT) \
+-kdatedialog.$(OBJEXT) kfocuslogentriesview.$(OBJEXT) \
+-kfocuslogentry.$(OBJEXT) kfocustasklist.$(OBJEXT) \
+-kfocustasksview.$(OBJEXT) kfocustaskpropsview.$(OBJEXT) \
+-kfocustask.$(OBJEXT) kfocusview.$(OBJEXT) kfocusdoc.$(OBJEXT) \
+-kfocus.$(OBJEXT) main.$(OBJEXT)\
+-kdatedialog.moc.o kfocusview.moc.o kfmproject.moc.o kfocuslogentry.moc.o kfocuslogbook.moc.o kfmprojectlist.moc.o kfvproject.moc.o kfocustasksview.moc.o kfocusdoc.moc.o kfocustask.moc.o kfvlog.moc.o kfocus.moc.o kfocuslogentriesview.moc.o kfvdate.moc.o kfmenddate.moc.o kfvprojectlist.moc.o kfocusdialogcompletetask.moc.o kfocustaskpropsview.moc.o kfocustasklist.moc.o  \
+-kfocus_meta_unload.o 
++	kfmenddate.$(OBJEXT) kfmprojectlist.$(OBJEXT) \
++	kfvprojectlist.$(OBJEXT) kfvlog.$(OBJEXT) kfvproject.$(OBJEXT) \
++	kfocuslogbook.$(OBJEXT) kfmproject.$(OBJEXT) \
++	kfocusdialogcompletetask.$(OBJEXT) kdatedialog.$(OBJEXT) \
++	kfocuslogentriesview.$(OBJEXT) kfocuslogentry.$(OBJEXT) \
++	kfocustasklist.$(OBJEXT) kfocustasksview.$(OBJEXT) \
++	kfocustaskpropsview.$(OBJEXT) kfocustask.$(OBJEXT) \
++	kfocusview.$(OBJEXT) kfocusdoc.$(OBJEXT) kfocus.$(OBJEXT) \
++	main.$(OBJEXT)\
++	kfocustask.moc.o kfocustasklist.moc.o kfocusdialogcompletetask.moc.o kfocuslogentry.moc.o kfocusview.moc.o kfvprojectlist.moc.o kfocustasksview.moc.o kfocustaskpropsview.moc.o kfocuslogentriesview.moc.o kfocuslogbook.moc.o kfmproject.moc.o kfocusdoc.moc.o kfmprojectlist.moc.o kfocus.moc.o kfmenddate.moc.o kfvdate.moc.o kdatedialog.moc.o kfvlog.moc.o kfvproject.moc.o  \
++	kfocus_meta_unload.o 
+ @KDE_USE_FINAL_FALSE at kfocus_OBJECTS = $(kfocus_nofinal_OBJECTS)
+ @KDE_USE_FINAL_TRUE at kfocus_OBJECTS = $(kfocus_final_OBJECTS)
+-kfocus_DEPENDENCIES = 
+-CXXFLAGS = @CXXFLAGS@
+-#>- CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+-#>+ 1
+-CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) $(KDE_CXXFLAGS)
+-#>- LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+-#>+ 1
+-LTCXXCOMPILE = $(LIBTOOL) --mode=compile --tag=CXX $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) $(KDE_CXXFLAGS)
+-CXXLD = $(CXX)
+-#>- CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@
+-#>+ 1
+-CXXLINK = $(LIBTOOL) --mode=link --tag=CXX $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(KDE_CXXFLAGS) $(LDFLAGS) -o $@
+-DATA =  $(rc_DATA)
+-
+-DIST_COMMON =  Makefile.am Makefile.in
++kfocus_DEPENDENCIES =
+ 
++DEFS = @DEFS@
++DEFAULT_INCLUDES =  -I. -I$(srcdir) -I$(top_builddir)
++CPPFLAGS = @CPPFLAGS@
++LDFLAGS = @LDFLAGS@
++LIBS = @LIBS@
++depcomp = $(SHELL) $(top_srcdir)/admin/depcomp
++ at AMDEP_TRUE@DEP_FILES = $(DEPDIR)/kdatedialog.Po $(DEPDIR)/kfmenddate.Po \
++	@AMDEP_TRUE@	$(DEPDIR)/kfmproject.Po $(DEPDIR)/kfmprojectlist.Po \
++	@AMDEP_TRUE@	$(DEPDIR)/kfocus.Po \
++	@AMDEP_TRUE@	$(DEPDIR)/kfocusdialogcompletetask.Po \
++	@AMDEP_TRUE@	$(DEPDIR)/kfocusdoc.Po $(DEPDIR)/kfocuslogbook.Po \
++	@AMDEP_TRUE@	$(DEPDIR)/kfocuslogentriesview.Po \
++	@AMDEP_TRUE@	$(DEPDIR)/kfocuslogentry.Po $(DEPDIR)/kfocustask.Po \
++	@AMDEP_TRUE@	$(DEPDIR)/kfocustasklist.Po \
++	@AMDEP_TRUE@	$(DEPDIR)/kfocustaskpropsview.Po \
++	@AMDEP_TRUE@	$(DEPDIR)/kfocustasksview.Po \
++	@AMDEP_TRUE@	$(DEPDIR)/kfocusview.Po $(DEPDIR)/kfvdate.Po \
++	@AMDEP_TRUE@	$(DEPDIR)/kfvlog.Po $(DEPDIR)/kfvproject.Po \
++	@AMDEP_TRUE@	$(DEPDIR)/kfvprojectlist.Po $(DEPDIR)/kfxenddate.Po \
++	@AMDEP_TRUE@	$(DEPDIR)/main.Po
++#>- CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
++#>- $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
++#>+ 2
++CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
++	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) $(KDE_CXXFLAGS)
++#>- LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) \
++#>- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
++#>- $(AM_CXXFLAGS) $(CXXFLAGS)
++#>+ 3
++LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) \
++	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
++	$(AM_CXXFLAGS) $(CXXFLAGS) $(KDE_CXXFLAGS)
++CXXLD = $(CXX)
++#>- CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \
++#>- $(AM_LDFLAGS) $(LDFLAGS) -o $@
++#>+ 2
++CXXLINK = $(LIBTOOL) --mode=link --tag=CXX $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(KDE_CXXFLAGS) \
++	$(AM_LDFLAGS) $(LDFLAGS) -o $@
++CXXFLAGS = @CXXFLAGS@
++DIST_SOURCES = $(kfocus_SOURCES)
++DATA = $(rc_DATA)
+ 
+-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+-
+-TAR = gtar
+-GZIP_ENV = --best
++DIST_COMMON = Makefile.am Makefile.in
+ SOURCES = $(kfocus_SOURCES)
+-OBJECTS = $(kfocus_OBJECTS)
+ 
+-#>- all: all-redirect
++#>- all: all-am
+ #>+ 1
+-all: docs-am  all-redirect
+-.SUFFIXES:
+-.SUFFIXES: .S .c .cpp .lo .o .obj .s
+-$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
+-#>- 	cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps kfocus/Makefile
+-#>+ 2
+-	cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps kfocus/Makefile
+-	cd $(top_srcdir) && perl admin/am_edit kfocus/Makefile.in
+-
+-Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
+-	cd $(top_builddir) \
+-	  && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
++all: docs-am  all-am
+ 
++.SUFFIXES:
++.SUFFIXES: .cpp .lo .o .obj
+ 
+-mostlyclean-binPROGRAMS:
+-
+-clean-binPROGRAMS:
+-	-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
+-
+-distclean-binPROGRAMS:
++mostlyclean-libtool:
++	-rm -f *.lo
+ 
+-maintainer-clean-binPROGRAMS:
++clean-libtool:
++	-rm -rf .libs _libs
+ 
++distclean-libtool:
++	-rm -f libtool
++$(srcdir)/Makefile.in:  Makefile.am  $(top_srcdir)/configure.in $(ACLOCAL_M4)
++#>- 	cd $(top_srcdir) && \
++#>- $(AUTOMAKE) --gnu  ./kfocus/Makefile
++#>+ 3
++	cd $(top_srcdir) && \
++	$(AUTOMAKE) --gnu  ./kfocus/Makefile
++	cd $(top_srcdir) && perl admin/am_edit kfocus/Makefile.in
++Makefile:  $(srcdir)/Makefile.in  $(top_builddir)/config.status
++	cd $(top_builddir) && \
++	CONFIG_HEADERS= CONFIG_LINKS= \
++	CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
+ install-binPROGRAMS: $(bin_PROGRAMS)
+ 	@$(NORMAL_INSTALL)
+ 	$(mkinstalldirs) $(DESTDIR)$(bindir)
+ 	@list='$(bin_PROGRAMS)'; for p in $$list; do \
+-	  if test -f $$p; then \
+-	    echo " $(LIBTOOL)  --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
+-	    $(LIBTOOL)  --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
+-	  else :; fi; \
++	p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
++	if test -f $$p \
++	|| test -f $$p1 \
++	; then \
++	f=`echo $$p1|sed '$(transform);s/$$/$(EXEEXT)/'`; \
++	echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$f"; \
++	$(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$f; \
++	else :; fi; \
+ 	done
+ 
+ uninstall-binPROGRAMS:
+ 	@$(NORMAL_UNINSTALL)
+-	list='$(bin_PROGRAMS)'; for p in $$list; do \
+-	  rm -f $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
++	@list='$(bin_PROGRAMS)'; for p in $$list; do \
++	f=`echo $$p|sed 's/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
++	echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
++	rm -f $(DESTDIR)$(bindir)/$$f; \
+ 	done
+ 
+-.c.o:
+-	$(COMPILE) -c $<
+-
+-# FIXME: We should only use cygpath when building on Windows,
+-# and only if it is available.
+-.c.obj:
+-	$(COMPILE) -c `cygpath -w $<`
+-
+-.s.o:
+-	$(COMPILE) -c $<
+-
+-.S.o:
+-	$(COMPILE) -c $<
++clean-binPROGRAMS:
++	-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
++kfocus$(EXEEXT): $(kfocus_OBJECTS) $(kfocus_DEPENDENCIES) 
++	@rm -f kfocus$(EXEEXT)
++	$(CXXLINK) $(kfocus_LDFLAGS) $(kfocus_OBJECTS) $(kfocus_LDADD) $(LIBS)
+ 
+ mostlyclean-compile:
+-	-rm -f *.o core *.core
+-	-rm -f *.$(OBJEXT)
+-
+-clean-compile:
++	-rm -f *.$(OBJEXT) core *.core
+ 
+ distclean-compile:
+ 	-rm -f *.tab.c
+ 
+-maintainer-clean-compile:
++ at AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/kdatedialog.Po at am__quote@
++ at AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/kfmenddate.Po at am__quote@
++ at AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/kfmproject.Po at am__quote@
++ at AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/kfmprojectlist.Po at am__quote@
++ at AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/kfocus.Po at am__quote@
++ at AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/kfocusdialogcompletetask.Po at am__quote@
++ at AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/kfocusdoc.Po at am__quote@
++ at AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/kfocuslogbook.Po at am__quote@
++ at AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/kfocuslogentriesview.Po at am__quote@
++ at AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/kfocuslogentry.Po at am__quote@
++ at AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/kfocustask.Po at am__quote@
++ at AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/kfocustasklist.Po at am__quote@
++ at AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/kfocustaskpropsview.Po at am__quote@
++ at AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/kfocustasksview.Po at am__quote@
++ at AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/kfocusview.Po at am__quote@
++ at AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/kfvdate.Po at am__quote@
++ at AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/kfvlog.Po at am__quote@
++ at AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/kfvproject.Po at am__quote@
++ at AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/kfvprojectlist.Po at am__quote@
++ at AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/kfxenddate.Po at am__quote@
++ at AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/main.Po at am__quote@
+ 
+-.c.lo:
+-	$(LIBTOOL) --mode=compile $(COMPILE) -c $<
++distclean-depend:
++	-rm -rf $(DEPDIR)
+ 
+-.s.lo:
+-	$(LIBTOOL) --mode=compile $(COMPILE) -c $<
+-
+-.S.lo:
+-	$(LIBTOOL) --mode=compile $(COMPILE) -c $<
+-
+-mostlyclean-libtool:
+-	-rm -f *.lo
+-
+-clean-libtool:
+-	-rm -rf .libs _libs
+-
+-distclean-libtool:
+-
+-maintainer-clean-libtool:
+-
+-kfocus$(EXEEXT): $(kfocus_OBJECTS) $(kfocus_DEPENDENCIES)
+-	@rm -f kfocus$(EXEEXT)
+-	$(CXXLINK) $(kfocus_LDFLAGS) $(kfocus_OBJECTS) $(kfocus_LDADD) $(LIBS)
+ .cpp.o:
+-	$(CXXCOMPILE) -c $<
++ at AMDEP_TRUE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
++ at AMDEP_TRUE@	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
++ at AMDEP_TRUE@	$(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
++	$(CXXCOMPILE) -c -o $@ `test -f $< || echo '$(srcdir)/'`$<
++
+ .cpp.obj:
+-	$(CXXCOMPILE) -c `cygpath -w $<`
+-.cpp.lo:
+-	$(LTCXXCOMPILE) -c $<
++ at AMDEP_TRUE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
++ at AMDEP_TRUE@	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
++ at AMDEP_TRUE@	$(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
++	$(CXXCOMPILE) -c -o $@ `cygpath -w $<`
+ 
++.cpp.lo:
++ at AMDEP_TRUE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
++ at AMDEP_TRUE@	depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@
++ at AMDEP_TRUE@	$(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
++	$(LTCXXCOMPILE) -c -o $@ `test -f $< || echo '$(srcdir)/'`$<
++CXXDEPMODE = @CXXDEPMODE@
++uninstall-info-am:
+ install-rcDATA: $(rc_DATA)
+ 	@$(NORMAL_INSTALL)
+ 	$(mkinstalldirs) $(DESTDIR)$(rcdir)
+ 	@list='$(rc_DATA)'; for p in $$list; do \
+-	  if test -f $(srcdir)/$$p; then \
+-	    echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(rcdir)/$$p"; \
+-	    $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(rcdir)/$$p; \
+-	  else if test -f $$p; then \
+-	    echo " $(INSTALL_DATA) $$p $(DESTDIR)$(rcdir)/$$p"; \
+-	    $(INSTALL_DATA) $$p $(DESTDIR)$(rcdir)/$$p; \
+-	  fi; fi; \
++	if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
++	f="`echo $$p | sed -e 's|^.*/||'`"; \
++	echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(rcdir)/$$f"; \
++	$(INSTALL_DATA) $$d$$p $(DESTDIR)$(rcdir)/$$f; \
+ 	done
+ 
+ uninstall-rcDATA:
+ 	@$(NORMAL_UNINSTALL)
+-	list='$(rc_DATA)'; for p in $$list; do \
+-	  rm -f $(DESTDIR)$(rcdir)/$$p; \
++	@list='$(rc_DATA)'; for p in $$list; do \
++	f="`echo $$p | sed -e 's|^.*/||'`"; \
++	echo " rm -f $(DESTDIR)$(rcdir)/$$f"; \
++	rm -f $(DESTDIR)$(rcdir)/$$f; \
+ 	done
+ 
+ tags: TAGS
+ 
+-ID: $(HEADERS) $(SOURCES) $(LISP)
+-	list='$(SOURCES) $(HEADERS)'; \
+-	unique=`for i in $$list; do echo $$i; done | \
+-	  awk '    { files[$$0] = 1; } \
+-	       END { for (i in files) print i; }'`; \
+-	here=`pwd` && cd $(srcdir) \
+-	  && mkid -f$$here/ID $$unique $(LISP)
++ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
++	list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
++	unique=`for i in $$list; do \
++	if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
++	done | \
++	$(AWK) '    { files[$$0] = 1; } \
++	END { for (i in files) print i; }'`; \
++	mkid -fID $$unique $(LISP)
+ 
+-TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) $(LISP)
++TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
++	$(TAGS_FILES) $(LISP)
+ 	tags=; \
+ 	here=`pwd`; \
+-	list='$(SOURCES) $(HEADERS)'; \
+-	unique=`for i in $$list; do echo $$i; done | \
+-	  awk '    { files[$$0] = 1; } \
+-	       END { for (i in files) print i; }'`; \
++	list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
++	unique=`for i in $$list; do \
++	if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
++	done | \
++	$(AWK) '    { files[$$0] = 1; } \
++	END { for (i in files) print i; }'`; \
+ 	test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
+-	  || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags  $$unique $(LISP) -o $$here/TAGS)
+-
+-mostlyclean-tags:
++	|| etags $(ETAGS_ARGS) $$tags  $$unique $(LISP)
+ 
+-clean-tags:
++GTAGS:
++	here=`CDPATH=: && cd $(top_builddir) && pwd` \
++	&& cd $(top_srcdir) \
++	&& gtags -i $(GTAGS_ARGS) $$here
+ 
+ distclean-tags:
+-	-rm -f TAGS ID
++	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
+ 
+-maintainer-clean-tags:
++DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ 
+-distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+-
+-subdir = kfocus
++top_distdir = ..
++distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
+ 
+ distdir: $(DISTFILES)
+-#>- 	@for file in $(DISTFILES); do \
+-#>- 	  d=$(srcdir); \
+-#>- 	  if test -d $$d/$$file; then \
+-#>- 	    cp -pr $$/$$file $(distdir)/$$file; \
+-#>- 	  else \
+-#>- 	    test -f $(distdir)/$$file \
+-#>- 	    || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+-#>- 	    || cp -p $$d/$$file $(distdir)/$$file || :; \
+-#>- 	  fi; \
+-#>- 	done
+-#>+ 10
+ 	@for file in $(DISTFILES); do \
+-	  d=$(srcdir); \
+-	  if test -d $$d/$$file; then \
+-	    cp -pr $$d/$$file $(distdir)/$$file; \
+-	  else \
+-	    test -f $(distdir)/$$file \
+-	    || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+-	    || cp -p $$d/$$file $(distdir)/$$file || :; \
+-	  fi; \
++	if test -f $$file; then d=.; else d=$(srcdir); fi; \
++	dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
++	if test "$$dir" != "$$file" && test "$$dir" != "."; then \
++	$(mkinstalldirs) "$(distdir)/$$dir"; \
++	fi; \
++	if test -d $$d/$$file; then \
++	cp -pR $$d/$$file $(distdir) \
++	|| exit 1; \
++	else \
++	test -f $(distdir)/$$file \
++	|| cp -p $$d/$$file $(distdir)/$$file \
++	|| exit 1; \
++	fi; \
+ 	done
+-
+-info-am:
+-info: info-am
+-dvi-am:
+-dvi: dvi-am
+ check-am: all-am
+ check: check-am
+-installcheck-am:
+-installcheck: installcheck-am
+-install-exec-am: install-binPROGRAMS
+-install-exec: install-exec-am
++all-am: Makefile $(PROGRAMS) $(DATA)
+ 
+-install-data-am: install-rcDATA install-data-local
+-install-data: install-data-am
++installdirs:
++	$(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(rcdir)
+ 
+-install-am: all-am
+-	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+ install: install-am
+-uninstall-am: uninstall-binPROGRAMS uninstall-rcDATA uninstall-local
++install-exec: install-exec-am
++install-data: install-data-am
+ uninstall: uninstall-am
+-all-am: Makefile $(PROGRAMS) $(DATA)
+-all-redirect: all-am
+-install-strip:
+-	$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+-installdirs:
+-	$(mkinstalldirs)  $(DESTDIR)$(bindir) $(DESTDIR)$(rcdir)
+ 
++install-am: all-am
++	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+ 
++installcheck: installcheck-am
++install-strip:
++	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
++	`test -z '$(STRIP)' || \
++	echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+ mostlyclean-generic:
+ 
+ clean-generic:
+ 
+ distclean-generic:
+-	-rm -f Makefile $(CONFIG_CLEAN_FILES)
+-	-rm -f config.cache config.log stamp-h stamp-h[0-9]*
++	-rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
+ 
+ maintainer-clean-generic:
+-mostlyclean-am:  mostlyclean-binPROGRAMS mostlyclean-compile \
+-		mostlyclean-libtool mostlyclean-tags \
+-		mostlyclean-generic
+-
+-mostlyclean: mostlyclean-am
+-
+-#>- clean-am:  clean-binPROGRAMS clean-compile clean-libtool clean-tags \
+-#>- 		clean-generic mostlyclean-am
+-#>+ 2
+-clean-am: clean-metasources clean-moc-classes clean-final   clean-binPROGRAMS clean-compile clean-libtool clean-tags \
+-		clean-generic mostlyclean-am
+-
++	@echo "This command is intended for maintainers to use"
++	@echo "it deletes files that may require special tools to rebuild."
+ #>- clean: clean-am
+ #>+ 1
+ clean: kde-rpo-clean  clean-am
+ 
+-distclean-am:  distclean-binPROGRAMS distclean-compile distclean-libtool \
+-		distclean-tags distclean-generic clean-am
+-	-rm -f libtool
++#>- clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
++#>+ 1
++clean-am: clean-metasources clean-moc-classes clean-final  clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+ 
+ distclean: distclean-am
+ 
+-maintainer-clean-am:  maintainer-clean-binPROGRAMS \
+-		maintainer-clean-compile maintainer-clean-libtool \
+-		maintainer-clean-tags maintainer-clean-generic \
+-		distclean-am
+-	@echo "This command is intended for maintainers to use;"
+-	@echo "it deletes files that may require special tools to rebuild."
++distclean-am: clean-am distclean-compile distclean-depend \
++	distclean-generic distclean-libtool distclean-tags
++
++dvi: dvi-am
++
++dvi-am:
++
++info: info-am
++
++info-am:
++
++install-data-am: install-data-local install-rcDATA
++
++install-exec-am: install-binPROGRAMS
++
++install-info: install-info-am
++
++install-man:
++
++installcheck-am:
+ 
+ maintainer-clean: maintainer-clean-am
+ 
+-.PHONY: mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \
+-maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \
+-mostlyclean-compile distclean-compile clean-compile \
+-maintainer-clean-compile mostlyclean-libtool distclean-libtool \
+-clean-libtool maintainer-clean-libtool uninstall-rcDATA install-rcDATA \
+-tags mostlyclean-tags distclean-tags clean-tags maintainer-clean-tags \
+-distdir info-am info dvi-am dvi check check-am installcheck-am \
+-installcheck install-exec-am install-exec install-data-local \
+-install-data-am install-data install-am install uninstall-local \
+-uninstall-am uninstall all-redirect all-am all installdirs \
+-mostlyclean-generic distclean-generic clean-generic \
+-maintainer-clean-generic clean mostlyclean distclean maintainer-clean
++maintainer-clean-am: distclean-am maintainer-clean-generic
++
++mostlyclean: mostlyclean-am
++
++mostlyclean-am: mostlyclean-compile mostlyclean-generic \
++	mostlyclean-libtool
++
++uninstall-am: uninstall-binPROGRAMS uninstall-info-am uninstall-local \
++	uninstall-rcDATA
++
++.PHONY: GTAGS all all-am check check-am clean clean-binPROGRAMS \
++	clean-generic clean-libtool distclean distclean-compile \
++	distclean-depend distclean-generic distclean-libtool \
++	distclean-tags distdir dvi dvi-am info info-am install \
++	install-am install-binPROGRAMS install-data install-data-am \
++	install-data-local install-exec install-exec-am install-info \
++	install-info-am install-man install-rcDATA install-strip \
++	installcheck installcheck-am installdirs maintainer-clean \
++	maintainer-clean-generic mostlyclean mostlyclean-compile \
++	mostlyclean-generic mostlyclean-libtool tags uninstall \
++	uninstall-am uninstall-binPROGRAMS uninstall-info-am \
++	uninstall-local uninstall-rcDATA
+ 
+ 
+ install-data-local:
+@@ -575,111 +633,113 @@
+ messages: rc.cpp
+ 	LIST=`find . -name \*.h -o -name \*.hh -o -name \*.H -o -name \*.hxx -o -name \*.hpp -o -name \*.cpp -o -name \*.cc -o -name \*.cxx -o -name \*.ecpp -o -name \*.C`; \
+ 	if test -n "$$LIST"; then \
+-	 $(XGETTEXT) $$LIST -o $(podir)/kfocus.pot; \
++	$(XGETTEXT) $$LIST -o $(podir)/kfocus.pot; \
+ 	fi
+-
+ # Tell versions [3.59,3.63) of GNU make to not export all variables.
+ # Otherwise a system limit (for SysV at least) may be exceeded.
+ .NOEXPORT:
+ 
+ #>+ 3
+-kdatedialog.moc.cpp: $(srcdir)/kdatedialog.h
+-	$(MOC) $(srcdir)/kdatedialog.h -o kdatedialog.moc.cpp
++kfocustask.moc.cpp: $(srcdir)/kfocustask.h
++	$(MOC) $(srcdir)/kfocustask.h -o kfocustask.moc.cpp
+ 
+ #>+ 3
+-kfocusview.moc.cpp: $(srcdir)/kfocusview.h
+-	$(MOC) $(srcdir)/kfocusview.h -o kfocusview.moc.cpp
++kfocustasklist.moc.cpp: $(srcdir)/kfocustasklist.h
++	$(MOC) $(srcdir)/kfocustasklist.h -o kfocustasklist.moc.cpp
+ 
+ #>+ 3
+-kfmproject.moc.cpp: $(srcdir)/kfmproject.h
+-	$(MOC) $(srcdir)/kfmproject.h -o kfmproject.moc.cpp
++kfocusdialogcompletetask.moc.cpp: $(srcdir)/kfocusdialogcompletetask.h
++	$(MOC) $(srcdir)/kfocusdialogcompletetask.h -o kfocusdialogcompletetask.moc.cpp
+ 
+ #>+ 3
+ kfocuslogentry.moc.cpp: $(srcdir)/kfocuslogentry.h
+ 	$(MOC) $(srcdir)/kfocuslogentry.h -o kfocuslogentry.moc.cpp
+ 
+ #>+ 3
+-kfocuslogbook.moc.cpp: $(srcdir)/kfocuslogbook.h
+-	$(MOC) $(srcdir)/kfocuslogbook.h -o kfocuslogbook.moc.cpp
+-
+-#>+ 3
+-kfmprojectlist.moc.cpp: $(srcdir)/kfmprojectlist.h
+-	$(MOC) $(srcdir)/kfmprojectlist.h -o kfmprojectlist.moc.cpp
++kfocusview.moc.cpp: $(srcdir)/kfocusview.h
++	$(MOC) $(srcdir)/kfocusview.h -o kfocusview.moc.cpp
+ 
+ #>+ 3
+-kfvproject.moc.cpp: $(srcdir)/kfvproject.h
+-	$(MOC) $(srcdir)/kfvproject.h -o kfvproject.moc.cpp
++kfvprojectlist.moc.cpp: $(srcdir)/kfvprojectlist.h
++	$(MOC) $(srcdir)/kfvprojectlist.h -o kfvprojectlist.moc.cpp
+ 
+ #>+ 3
+ kfocustasksview.moc.cpp: $(srcdir)/kfocustasksview.h
+ 	$(MOC) $(srcdir)/kfocustasksview.h -o kfocustasksview.moc.cpp
+ 
+ #>+ 3
+-kfocusdoc.moc.cpp: $(srcdir)/kfocusdoc.h
+-	$(MOC) $(srcdir)/kfocusdoc.h -o kfocusdoc.moc.cpp
++kfocustaskpropsview.moc.cpp: $(srcdir)/kfocustaskpropsview.h
++	$(MOC) $(srcdir)/kfocustaskpropsview.h -o kfocustaskpropsview.moc.cpp
+ 
+ #>+ 3
+-kfocustask.moc.cpp: $(srcdir)/kfocustask.h
+-	$(MOC) $(srcdir)/kfocustask.h -o kfocustask.moc.cpp
++kfocuslogentriesview.moc.cpp: $(srcdir)/kfocuslogentriesview.h
++	$(MOC) $(srcdir)/kfocuslogentriesview.h -o kfocuslogentriesview.moc.cpp
+ 
+ #>+ 3
+-kfvlog.moc.cpp: $(srcdir)/kfvlog.h
+-	$(MOC) $(srcdir)/kfvlog.h -o kfvlog.moc.cpp
++kfocuslogbook.moc.cpp: $(srcdir)/kfocuslogbook.h
++	$(MOC) $(srcdir)/kfocuslogbook.h -o kfocuslogbook.moc.cpp
+ 
+ #>+ 3
+-kfocus.moc.cpp: $(srcdir)/kfocus.h
+-	$(MOC) $(srcdir)/kfocus.h -o kfocus.moc.cpp
++kfmproject.moc.cpp: $(srcdir)/kfmproject.h
++	$(MOC) $(srcdir)/kfmproject.h -o kfmproject.moc.cpp
+ 
+ #>+ 3
+-kfocuslogentriesview.moc.cpp: $(srcdir)/kfocuslogentriesview.h
+-	$(MOC) $(srcdir)/kfocuslogentriesview.h -o kfocuslogentriesview.moc.cpp
++kfocusdoc.moc.cpp: $(srcdir)/kfocusdoc.h
++	$(MOC) $(srcdir)/kfocusdoc.h -o kfocusdoc.moc.cpp
+ 
+ #>+ 3
+-kfvdate.moc.cpp: $(srcdir)/kfvdate.h
+-	$(MOC) $(srcdir)/kfvdate.h -o kfvdate.moc.cpp
++kfmprojectlist.moc.cpp: $(srcdir)/kfmprojectlist.h
++	$(MOC) $(srcdir)/kfmprojectlist.h -o kfmprojectlist.moc.cpp
++
++#>+ 3
++kfocus.moc.cpp: $(srcdir)/kfocus.h
++	$(MOC) $(srcdir)/kfocus.h -o kfocus.moc.cpp
+ 
+ #>+ 3
+ kfmenddate.moc.cpp: $(srcdir)/kfmenddate.h
+ 	$(MOC) $(srcdir)/kfmenddate.h -o kfmenddate.moc.cpp
+ 
+ #>+ 3
+-kfvprojectlist.moc.cpp: $(srcdir)/kfvprojectlist.h
+-	$(MOC) $(srcdir)/kfvprojectlist.h -o kfvprojectlist.moc.cpp
++kfvdate.moc.cpp: $(srcdir)/kfvdate.h
++	$(MOC) $(srcdir)/kfvdate.h -o kfvdate.moc.cpp
+ 
+ #>+ 3
+-kfocusdialogcompletetask.moc.cpp: $(srcdir)/kfocusdialogcompletetask.h
+-	$(MOC) $(srcdir)/kfocusdialogcompletetask.h -o kfocusdialogcompletetask.moc.cpp
++kdatedialog.moc.cpp: $(srcdir)/kdatedialog.h
++	$(MOC) $(srcdir)/kdatedialog.h -o kdatedialog.moc.cpp
+ 
+ #>+ 3
+-kfocustaskpropsview.moc.cpp: $(srcdir)/kfocustaskpropsview.h
+-	$(MOC) $(srcdir)/kfocustaskpropsview.h -o kfocustaskpropsview.moc.cpp
++kfvlog.moc.cpp: $(srcdir)/kfvlog.h
++	$(MOC) $(srcdir)/kfvlog.h -o kfvlog.moc.cpp
+ 
+ #>+ 3
+-kfocustasklist.moc.cpp: $(srcdir)/kfocustasklist.h
+-	$(MOC) $(srcdir)/kfocustasklist.h -o kfocustasklist.moc.cpp
++kfvproject.moc.cpp: $(srcdir)/kfvproject.h
++	$(MOC) $(srcdir)/kfvproject.h -o kfvproject.moc.cpp
+ 
+ #>+ 3
+ clean-metasources:
+-	-rm -f  kdatedialog.moc.cpp kfocusview.moc.cpp kfmproject.moc.cpp kfocuslogentry.moc.cpp kfocuslogbook.moc.cpp kfmprojectlist.moc.cpp kfvproject.moc.cpp kfocustasksview.moc.cpp kfocusdoc.moc.cpp kfocustask.moc.cpp kfvlog.moc.cpp kfocus.moc.cpp kfocuslogentriesview.moc.cpp kfvdate.moc.cpp kfmenddate.moc.cpp kfvprojectlist.moc.cpp kfocusdialogcompletetask.moc.cpp kfocustaskpropsview.moc.cpp kfocustasklist.moc.cpp
++	-rm -f  kfocustask.moc.cpp kfocustasklist.moc.cpp kfocusdialogcompletetask.moc.cpp kfocuslogentry.moc.cpp kfocusview.moc.cpp kfvprojectlist.moc.cpp kfocustasksview.moc.cpp kfocustaskpropsview.moc.cpp kfocuslogentriesview.moc.cpp kfocuslogbook.moc.cpp kfmproject.moc.cpp kfocusdoc.moc.cpp kfmprojectlist.moc.cpp kfocus.moc.cpp kfmenddate.moc.cpp kfvdate.moc.cpp kdatedialog.moc.cpp kfvlog.moc.cpp kfvproject.moc.cpp
+ 
+ #>+ 2
+ docs-am:
+ 
+-#>+ 5
++#>+ 6
+ force-reedit:
+-		cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps kfocus/Makefile
++		cd $(top_srcdir) && \
++	$(AUTOMAKE) --gnu  ./kfocus/Makefile
+ 	cd $(top_srcdir) && perl admin/am_edit kfocus/Makefile.in
+ 
+ 
+-#>+ 10
+-kfocus_meta_unload.cpp:  kdatedialog.moc.cpp kfocusview.moc.cpp kfmproject.moc.cpp kfocuslogentry.moc.cpp kfocuslogbook.moc.cpp kfmprojectlist.moc.cpp kfvproject.moc.cpp kfocustasksview.moc.cpp kfocusdoc.moc.cpp kfocustask.moc.cpp kfvlog.moc.cpp kfocus.moc.cpp kfocuslogentriesview.moc.cpp kfvdate.moc.cpp kfmenddate.moc.cpp kfvprojectlist.moc.cpp kfocustaskpropsview.moc.cpp kfocusdialogcompletetask.moc.cpp kfocustasklist.moc.cpp
++#>+ 12
++kfocus_meta_unload.cpp:  kfocustask.moc.cpp kfocustasklist.moc.cpp kfvprojectlist.moc.cpp kfocusview.moc.cpp kfocuslogentry.moc.cpp kfocusdialogcompletetask.moc.cpp kfocustasksview.moc.cpp kfocustaskpropsview.moc.cpp kfocuslogentriesview.moc.cpp kfocuslogbook.moc.cpp kfmproject.moc.cpp kfocusdoc.moc.cpp kfmprojectlist.moc.cpp kfocus.moc.cpp kfmenddate.moc.cpp kdatedialog.moc.cpp kfvdate.moc.cpp kfvlog.moc.cpp kfvproject.moc.cpp
+ 	@echo 'creating kfocus_meta_unload.cpp'
+-	-rm -f kfocus_meta_unload.cpp
+-	@echo 'static const char * _metalist_kfocus[] = {' > kfocus_meta_unload.cpp
+-	cat  kdatedialog.moc.cpp kfocusview.moc.cpp kfmproject.moc.cpp kfocuslogentry.moc.cpp kfocuslogbook.moc.cpp kfmprojectlist.moc.cpp kfvproject.moc.cpp kfocustasksview.moc.cpp kfocusdoc.moc.cpp kfocustask.moc.cpp kfvlog.moc.cpp kfocus.moc.cpp kfocuslogentriesview.moc.cpp kfvdate.moc.cpp kfmenddate.moc.cpp kfvprojectlist.moc.cpp kfocustaskpropsview.moc.cpp kfocusdialogcompletetask.moc.cpp kfocustasklist.moc.cpp | grep 'char.*className' | sed -e 's/.*[^A-Za-z0-9_:]\([A-Za-z0-9_:]*\)::className.*$$/\"\1\",/' | sort | uniq >> kfocus_meta_unload.cpp
+-	@echo '0};' >> kfocus_meta_unload.cpp
+-	@echo '#include <kunload.h>' >> kfocus_meta_unload.cpp
+-	@echo '_UNLOAD(kfocus)' >> kfocus_meta_unload.cpp
++	@-rm -f kfocus_meta_unload.cpp
++	@if test ${kde_qtver} = 2; then \
++		echo 'static const char * _metalist_kfocus[] = {' > kfocus_meta_unload.cpp ;\
++		cat  kfocustask.moc.cpp kfocustasklist.moc.cpp kfvprojectlist.moc.cpp kfocusview.moc.cpp kfocuslogentry.moc.cpp kfocusdialogcompletetask.moc.cpp kfocustasksview.moc.cpp kfocustaskpropsview.moc.cpp kfocuslogentriesview.moc.cpp kfocuslogbook.moc.cpp kfmproject.moc.cpp kfocusdoc.moc.cpp kfmprojectlist.moc.cpp kfocus.moc.cpp kfmenddate.moc.cpp kdatedialog.moc.cpp kfvdate.moc.cpp kfvlog.moc.cpp kfvproject.moc.cpp | grep 'char.*className' | sed -e 's/.*[^A-Za-z0-9_:]\([A-Za-z0-9_:]*\)::className.*$$/\"\1\",/' | sort | uniq >> kfocus_meta_unload.cpp ;\
++		echo '0};' >> kfocus_meta_unload.cpp ;\
++		echo '#include <kunload.h>' >> kfocus_meta_unload.cpp ;\
++		echo '_UNLOAD(kfocus)' >> kfocus_meta_unload.cpp ;\
++	else echo > kfocus_meta_unload.cpp; fi
+ 
+ 
+ #>+ 3
+@@ -687,11 +747,11 @@
+ 	-rm -f  kfocus_meta_unload.cpp
+ 
+ #>+ 11
+-kfocus.all_cpp.cpp: $(srcdir)/Makefile.in $(srcdir)/kfvdate.cpp $(srcdir)/kfxenddate.cpp $(srcdir)/kfmenddate.cpp $(srcdir)/kfmprojectlist.cpp $(srcdir)/kfvprojectlist.cpp $(srcdir)/kfvlog.cpp $(srcdir)/kfvproject.cpp $(srcdir)/kfocuslogbook.cpp $(srcdir)/kfmproject.cpp $(srcdir)/kfocusdialogcompletetask.cpp $(srcdir)/kdatedialog.cpp $(srcdir)/kfocuslogentriesview.cpp $(srcdir)/kfocuslogentry.cpp $(srcdir)/kfocustasklist.cpp $(srcdir)/kfocustasksview.cpp $(srcdir)/kfocustaskpropsview.cpp $(srcdir)/kfocustask.cpp $(srcdir)/kfocusview.cpp $(srcdir)/kfocusdoc.cpp $(srcdir)/kfocus.cpp $(srcdir)/main.cpp kfocus_meta_unload.cpp  kdatedialog.moc.cpp kfocusview.moc.cpp kfmproject.moc.cpp kfocuslogentry.moc.cpp kfocuslogbook.moc.cpp kfmprojectlist.moc.cpp kfvproject.moc.cpp kfocustasksview.moc.cpp kfocusdoc.moc.cpp kfocustask.moc.cpp kfvlog.moc.cpp kfocus.moc.cpp kfocuslogentriesview.moc.cpp kfvdate.moc.cpp kfmenddate.moc.cpp kfvprojectlist.moc.cpp kfocusdialogcompletetask.moc.cpp kfocustaskpropsview.moc.cpp kfocustasklist.moc.cpp
++kfocus.all_cpp.cpp: $(srcdir)/Makefile.in $(srcdir)/kfvdate.cpp $(srcdir)/kfxenddate.cpp $(srcdir)/kfmenddate.cpp $(srcdir)/kfmprojectlist.cpp $(srcdir)/kfvprojectlist.cpp $(srcdir)/kfvlog.cpp $(srcdir)/kfvproject.cpp $(srcdir)/kfocuslogbook.cpp $(srcdir)/kfmproject.cpp $(srcdir)/kfocusdialogcompletetask.cpp $(srcdir)/kdatedialog.cpp $(srcdir)/kfocuslogentriesview.cpp $(srcdir)/kfocuslogentry.cpp $(srcdir)/kfocustasklist.cpp $(srcdir)/kfocustasksview.cpp $(srcdir)/kfocustaskpropsview.cpp $(srcdir)/kfocustask.cpp $(srcdir)/kfocusview.cpp $(srcdir)/kfocusdoc.cpp $(srcdir)/kfocus.cpp $(srcdir)/main.cpp kfocus_meta_unload.cpp  kfocustask.moc.cpp kfocustasklist.moc.cpp kfocusdialogcompletetask.moc.cpp kfocuslogentry.moc.cpp kfocusview.moc.cpp kfvprojectlist.moc.cpp kfocustasksview.moc.cpp kfocustaskpropsview.moc.cpp kfocuslogentriesview.moc.cpp kfocuslogbook.moc.cpp kfmproject.moc.cpp kfocusdoc.moc.cpp kfmprojectlist.moc.cpp kfocus.moc.cpp kfmenddate.moc.cpp kfvdate.moc.cpp kdatedialog.moc.cpp kfvlog.moc.cpp kfvproject.moc.cpp
+ 	@echo 'creating kfocus.all_cpp.cpp ...'; \
+ 	rm -f kfocus.all_cpp.files kfocus.all_cpp.final; \
+ 	echo "#define KDE_USE_FINAL 1" >> kfocus.all_cpp.final; \
+-	for file in kfvdate.cpp kfxenddate.cpp kfmenddate.cpp kfmprojectlist.cpp kfvprojectlist.cpp kfvlog.cpp kfvproject.cpp kfocuslogbook.cpp kfmproject.cpp kfocusdialogcompletetask.cpp kdatedialog.cpp kfocuslogentriesview.cpp kfocuslogentry.cpp kfocustasklist.cpp kfocustasksview.cpp kfocustaskpropsview.cpp kfocustask.cpp kfocusview.cpp kfocusdoc.cpp kfocus.cpp main.cpp kfocus_meta_unload.cpp  kdatedialog.moc.cpp kfocusview.moc.cpp kfmproject.moc.cpp kfocuslogentry.moc.cpp kfocuslogbook.moc.cpp kfmprojectlist.moc.cpp kfvproject.moc.cpp kfocustasksview.moc.cpp kfocusdoc.moc.cpp kfocustask.moc.cpp kfvlog.moc.cpp kfocus.moc.cpp kfocuslogentriesview.moc.cpp kfvdate.moc.cpp kfmenddate.moc.cpp kfvprojectlist.moc.cpp kfocusdialogcompletetask.moc.cpp kfocustaskpropsview.moc.cpp kfocustasklist.moc.cpp; do \
++	for file in kfvdate.cpp kfxenddate.cpp kfmenddate.cpp kfmprojectlist.cpp kfvprojectlist.cpp kfvlog.cpp kfvproject.cpp kfocuslogbook.cpp kfmproject.cpp kfocusdialogcompletetask.cpp kdatedialog.cpp kfocuslogentriesview.cpp kfocuslogentry.cpp kfocustasklist.cpp kfocustasksview.cpp kfocustaskpropsview.cpp kfocustask.cpp kfocusview.cpp kfocusdoc.cpp kfocus.cpp main.cpp kfocus_meta_unload.cpp  kfocustask.moc.cpp kfocustasklist.moc.cpp kfocusdialogcompletetask.moc.cpp kfocuslogentry.moc.cpp kfocusview.moc.cpp kfvprojectlist.moc.cpp kfocustasksview.moc.cpp kfocustaskpropsview.moc.cpp kfocuslogentriesview.moc.cpp kfocuslogbook.moc.cpp kfmproject.moc.cpp kfocusdoc.moc.cpp kfmprojectlist.moc.cpp kfocus.moc.cpp kfmenddate.moc.cpp kfvdate.moc.cpp kdatedialog.moc.cpp kfvlog.moc.cpp kfvproject.moc.cpp; do \
+ 	  echo "#include \"$$file\"" >> kfocus.all_cpp.files; \
+ 	  test ! -f $(srcdir)/$$file || egrep '^#pragma +implementation' $(srcdir)/$$file >> kfocus.all_cpp.final; \
+ 	done; \
+@@ -706,8 +766,14 @@
+ final:
+ 	$(MAKE) kfocus_OBJECTS="$(kfocus_final_OBJECTS)" all-am
+ #>+ 2
++final-install:
++	$(MAKE) kfocus_OBJECTS="$(kfocus_final_OBJECTS)" install-am
++#>+ 2
+ no-final:
+ 	$(MAKE) kfocus_OBJECTS="$(kfocus_nofinal_OBJECTS)" all-am
++#>+ 2
++no-final-install:
++	$(MAKE) kfocus_OBJECTS="$(kfocus_nofinal_OBJECTS)" install-am
+ #>+ 3
+ cvs-clean:
+ 	$(MAKE) -f $(top_srcdir)/admin/Makefile.common cvs-clean
+--- kfocus-1.0.2.orig/po/Makefile.in
++++ kfocus-1.0.2/po/Makefile.in
+@@ -1,7 +1,8 @@
+-# KDE tags expanded automatically by am_edit - $Revision: 1.1.1.1 $ 
+-# Makefile.in generated automatically by automake 1.4 from Makefile.am
++# KDE tags expanded automatically by am_edit - $Revision: 1.4 $ 
++# Makefile.in generated automatically by automake 1.5 from Makefile.am.
+ 
+-# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
++# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
++# Free Software Foundation, Inc.
+ # This Makefile.in is free software; the Free Software Foundation
+ # gives unlimited permission to copy and/or distribute it,
+ # with or without modifications, as long as this notice is preserved.
+@@ -11,11 +12,12 @@
+ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ # PARTICULAR PURPOSE.
+ 
++ at SET_MAKE@
++
+ ####### kdevelop will overwrite this part!!! (begin)##########
+ 
+ ####### kdevelop will overwrite this part!!! (end)############
+ 
+-
+ SHELL = @SHELL@
+ 
+ srcdir = @srcdir@
+@@ -23,10 +25,6 @@
+ VPATH = @srcdir@
+ prefix = @prefix@
+ exec_prefix = @exec_prefix@
+-#>- 
+-bindir = @bindir@
+-#>+ 3
+-DEPDIR = .deps
+ 
+ bindir = @bindir@
+ sbindir = @sbindir@
+@@ -40,13 +38,9 @@
+ mandir = @mandir@
+ includedir = @includedir@
+ oldincludedir = /usr/include
+-
+-DESTDIR =
+-
+ pkgdatadir = $(datadir)/@PACKAGE@
+ pkglibdir = $(libdir)/@PACKAGE@
+ pkgincludedir = $(includedir)/@PACKAGE@
+-
+ top_builddir = ..
+ 
+ ACLOCAL = @ACLOCAL@
+@@ -55,11 +49,11 @@
+ AUTOHEADER = @AUTOHEADER@
+ 
+ INSTALL = @INSTALL@
+-INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
++INSTALL_PROGRAM = @INSTALL_PROGRAM@
+ INSTALL_DATA = @INSTALL_DATA@
+ INSTALL_SCRIPT = @INSTALL_SCRIPT@
++INSTALL_HEADER = $(INSTALL_DATA)
+ transform = @program_transform_name@
+-
+ NORMAL_INSTALL = :
+ PRE_INSTALL = :
+ POST_INSTALL = :
+@@ -72,9 +66,11 @@
+ host_triplet = @host@
+ target_alias = @target_alias@
+ target_triplet = @target@
++AMTAR = @AMTAR@
+ ARTSCCONFIG = @ARTSCCONFIG@
+ AS = @AS@
+ AUTODIRS = @AUTODIRS@
++AWK = @AWK@
+ CC = @CC@
+ CONF_FILES = @CONF_FILES@
+ CPP = @CPP@
+@@ -83,6 +79,7 @@
+ DCOPIDL = @DCOPIDL@
+ DCOPIDL2CPP = @DCOPIDL2CPP@
+ DCOP_DEPENDENCIES = @DCOP_DEPENDENCIES@
++DEPDIR = @DEPDIR@
+ DLLTOOL = @DLLTOOL@
+ DPMSINC = @DPMSINC@
+ DPMSLIB = @DPMSLIB@
+@@ -94,21 +91,31 @@
+ GMSGFMT = @GMSGFMT@
+ IDL = @IDL@
+ IDL_DEPENDENCIES = @IDL_DEPENDENCIES@
+-KDB2HTML = @KDB2HTML@
++INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
++JAR = @JAR@
++JAVAC = @JAVAC@
++JAVAH = @JAVAH@
++JVMLIBS = @JVMLIBS@
+ KDECONFIG = @KDECONFIG@
+ KDE_CXXFLAGS = @KDE_CXXFLAGS@
+ KDE_EXTRA_RPATH = @KDE_EXTRA_RPATH@
+ KDE_INCLUDES = @KDE_INCLUDES@
+ KDE_LDFLAGS = @KDE_LDFLAGS@
++KDE_MT_LDFLAGS = @KDE_MT_LDFLAGS@
++KDE_MT_LIBS = @KDE_MT_LIBS@
+ KDE_PLUGIN = @KDE_PLUGIN@
+ KDE_RPATH = @KDE_RPATH@
+ KDE_USE_CLOSURE_FALSE = @KDE_USE_CLOSURE_FALSE@
+ KDE_USE_CLOSURE_TRUE = @KDE_USE_CLOSURE_TRUE@
+ KDE_USE_FINAL_FALSE = @KDE_USE_FINAL_FALSE@
+ KDE_USE_FINAL_TRUE = @KDE_USE_FINAL_TRUE@
++KDE_XSL_STYLESHEET = @KDE_XSL_STYLESHEET@
++LEX = @LEX@
++LEXLIB = @LEXLIB@
+ LIBCOMPAT = @LIBCOMPAT@
+ LIBCRYPT = @LIBCRYPT@
+ LIBDL = @LIBDL@
++LIBGEN = @LIBGEN@
+ LIBJPEG = @LIBJPEG@
+ LIBMICO = @LIBMICO@
+ LIBOBJS = @LIBOBJS@
+@@ -116,59 +123,70 @@
+ LIBPTHREAD = @LIBPTHREAD@
+ LIBPYTHON = @LIBPYTHON@
+ LIBQIMGIO = @LIBQIMGIO@
++LIBRESOLV = @LIBRESOLV@
++LIBSHADOW = @LIBSHADOW@
+ LIBSM = @LIBSM@
+ LIBSOCKET = @LIBSOCKET@
+ LIBTIFF = @LIBTIFF@
+ LIBTOOL = @LIBTOOL@
+ LIBUCB = @LIBUCB@
++LIBUTIL = @LIBUTIL@
++LIBXINERAMA = @LIBXINERAMA@
+ LIBZ = @LIBZ@
+ LIB_KAB = @LIB_KAB@
+ LIB_KDECORE = @LIB_KDECORE@
++LIB_KDEPRINT = @LIB_KDEPRINT@
+ LIB_KDEUI = @LIB_KDEUI@
+ LIB_KFILE = @LIB_KFILE@
+ LIB_KFM = @LIB_KFM@
+-LIB_KFORMULA = @LIB_KFORMULA@
+ LIB_KHTML = @LIB_KHTML@
+ LIB_KIMGIO = @LIB_KIMGIO@
+ LIB_KIO = @LIB_KIO@
+ LIB_KPARTS = @LIB_KPARTS@
+ LIB_KSPELL = @LIB_KSPELL@
+ LIB_KSYCOCA = @LIB_KSYCOCA@
+-LIB_KWRITE = @LIB_KWRITE@
++LIB_QPE = @LIB_QPE@
+ LIB_QT = @LIB_QT@
++LIB_QTOPIA = @LIB_QTOPIA@
+ LIB_SMB = @LIB_SMB@
+ LIB_X11 = @LIB_X11@
++LIB_XEXT = @LIB_XEXT@
+ LN_S = @LN_S@
+-MAKEINFO = @MAKEINFO@
+ MCOPIDL = @MCOPIDL@
++MEINPROC = @MEINPROC@
+ MICO_INCLUDES = @MICO_INCLUDES@
+ MICO_LDFLAGS = @MICO_LDFLAGS@
+ MOC = @MOC@
+ MSGFMT = @MSGFMT@
++NOOPT_CFLAGS = @NOOPT_CFLAGS@
+ NOOPT_CXXFLAGS = @NOOPT_CXXFLAGS@
+ NOREPO = @NOREPO@
+ OBJDUMP = @OBJDUMP@
+ OBJEXT = @OBJEXT@
+ PACKAGE = @PACKAGE@
+-PAMINC = @PAMINC@
+-PAMLIBPATHS = @PAMLIBPATHS@
+ PAMLIBS = @PAMLIBS@
++PASSWDLIBS = @PASSWDLIBS@
+ PYTHONINC = @PYTHONINC@
+ PYTHONLIB = @PYTHONLIB@
+ PYTHONMODDIR = @PYTHONMODDIR@
++QTE_NORTTI = @QTE_NORTTI@
++QTOPIA_INCLUDES = @QTOPIA_INCLUDES@
+ QT_INCLUDES = @QT_INCLUDES@
+ QT_LDFLAGS = @QT_LDFLAGS@
+ RANLIB = @RANLIB@
+ REPO = @REPO@
++SETUIDFLAGS = @SETUIDFLAGS@
+ STRIP = @STRIP@
+ TOPSUBDIRS = @TOPSUBDIRS@
+ UIC = @UIC@
++UIC_TR = @UIC_TR@
+ USER_INCLUDES = @USER_INCLUDES@
+ USER_LDFLAGS = @USER_LDFLAGS@
+ USE_EXCEPTIONS = @USE_EXCEPTIONS@
+ USE_RTTI = @USE_RTTI@
+ USE_THREADS = @USE_THREADS@
+ VERSION = @VERSION@
++WOVERLOADED_VIRTUAL = @WOVERLOADED_VIRTUAL@
+ XGETTEXT = @XGETTEXT@
+ XPMINC = @XPMINC@
+ XPMLIB = @XPMLIB@
+@@ -178,7 +196,11 @@
+ X_PRE_LIBS = @X_PRE_LIBS@
+ all_includes = @all_includes@
+ all_libraries = @all_libraries@
++am__include = @am__include@
++am__quote = @am__quote@
+ idldir = @idldir@
++install_sh = @install_sh@
++jni_includes = @jni_includes@
+ kde_appsdir = @kde_appsdir@
+ kde_bindir = @kde_bindir@
+ kde_confdir = @kde_confdir@
+@@ -192,11 +214,14 @@
+ kde_locale = @kde_locale@
+ kde_mimedir = @kde_mimedir@
+ kde_moduledir = @kde_moduledir@
++kde_qtver = @kde_qtver@
+ kde_servicesdir = @kde_servicesdir@
+ kde_servicetypesdir = @kde_servicetypesdir@
+ kde_sounddir = @kde_sounddir@
++kde_styledir = @kde_styledir@
+ kde_templatesdir = @kde_templatesdir@
+ kde_wallpaperdir = @kde_wallpaperdir@
++kde_widgetdir = @kde_widgetdir@
+ micodir = @micodir@
+ qt_includes = @qt_includes@
+ qt_libraries = @qt_libraries@
+@@ -204,123 +229,138 @@
+ x_libraries = @x_libraries@
+ 
+ POFILES = AUTO
++subdir = ./po
+ mkinstalldirs = $(SHELL) $(top_srcdir)/admin/mkinstalldirs
+-CONFIG_HEADER = ../config.h
+-CONFIG_CLEAN_FILES = 
+-DIST_COMMON =  Makefile.am Makefile.in
+-
+-
+-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+-
+-TAR = gtar
+-GZIP_ENV = --best
+-#>- all: all-redirect
++CONFIG_HEADER = $(top_builddir)/config.h
++CONFIG_CLEAN_FILES =
++DIST_SOURCES =
++DIST_COMMON = Makefile.am Makefile.in
++#>- all: all-am
+ #>+ 1
+-all: docs-am  all-redirect
++all: docs-am  all-am
++
+ .SUFFIXES:
+-$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
+-#>- 	cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps po/Makefile
+-#>+ 2
+-	cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps po/Makefile
+-	cd $(top_srcdir) && perl admin/am_edit po/Makefile.in
+ 
+-Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
+-	cd $(top_builddir) \
+-	  && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
++mostlyclean-libtool:
++	-rm -f *.lo
+ 
++clean-libtool:
++	-rm -rf .libs _libs
++
++distclean-libtool:
++	-rm -f libtool
++$(srcdir)/Makefile.in:  Makefile.am  $(top_srcdir)/configure.in $(ACLOCAL_M4)
++#>- 	cd $(top_srcdir) && \
++#>- $(AUTOMAKE) --gnu  ./po/Makefile
++#>+ 3
++	cd $(top_srcdir) && \
++	$(AUTOMAKE) --gnu  ./po/Makefile
++	cd $(top_srcdir) && perl admin/am_edit po/Makefile.in
++Makefile:  $(srcdir)/Makefile.in  $(top_builddir)/config.status
++	cd $(top_builddir) && \
++	CONFIG_HEADERS= CONFIG_LINKS= \
++	CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
++uninstall-info-am:
+ tags: TAGS
+ TAGS:
+ 
+ 
+-distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
++DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ 
+-subdir = po
++top_distdir = ..
++distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
+ 
+ distdir: $(DISTFILES)
+-#>- 	@for file in $(DISTFILES); do \
+-#>- 	  d=$(srcdir); \
+-#>- 	  if test -d $$d/$$file; then \
+-#>- 	    cp -pr $$/$$file $(distdir)/$$file; \
+-#>- 	  else \
+-#>- 	    test -f $(distdir)/$$file \
+-#>- 	    || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+-#>- 	    || cp -p $$d/$$file $(distdir)/$$file || :; \
+-#>- 	  fi; \
+-#>- 	done
+-#>+ 10
+ 	@for file in $(DISTFILES); do \
+-	  d=$(srcdir); \
+-	  if test -d $$d/$$file; then \
+-	    cp -pr $$d/$$file $(distdir)/$$file; \
+-	  else \
+-	    test -f $(distdir)/$$file \
+-	    || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+-	    || cp -p $$d/$$file $(distdir)/$$file || :; \
+-	  fi; \
++	if test -f $$file; then d=.; else d=$(srcdir); fi; \
++	dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
++	if test "$$dir" != "$$file" && test "$$dir" != "."; then \
++	$(mkinstalldirs) "$(distdir)/$$dir"; \
++	fi; \
++	if test -d $$d/$$file; then \
++	cp -pR $$d/$$file $(distdir) \
++	|| exit 1; \
++	else \
++	test -f $(distdir)/$$file \
++	|| cp -p $$d/$$file $(distdir)/$$file \
++	|| exit 1; \
++	fi; \
+ 	done
+-info-am:
+-info: info-am
+-dvi-am:
+-dvi: dvi-am
+ check-am: all-am
+ check: check-am
+-installcheck-am:
+-installcheck: installcheck-am
+-install-exec-am:
+-install-exec: install-exec-am
++all-am: Makefile
+ 
+-install-data-am:
+-install-data: install-data-am
++installdirs:
+ 
+-install-am: all-am
+-	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+ install: install-am
+-uninstall-am:
++install-exec: install-exec-am
++install-data: install-data-am
+ uninstall: uninstall-am
+-all-am: Makefile
+-all-redirect: all-am
+-install-strip:
+-	$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+-installdirs:
+ 
++install-am: all-am
++	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+ 
++installcheck: installcheck-am
++install-strip:
++	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
++	`test -z '$(STRIP)' || \
++	echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+ mostlyclean-generic:
+ 
+ clean-generic:
+ 
+ distclean-generic:
+-	-rm -f Makefile $(CONFIG_CLEAN_FILES)
+-	-rm -f config.cache config.log stamp-h stamp-h[0-9]*
++	-rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
+ 
+ maintainer-clean-generic:
+-mostlyclean-am:  mostlyclean-generic
+-
+-mostlyclean: mostlyclean-am
+-
+-clean-am:  clean-generic mostlyclean-am
+-
++	@echo "This command is intended for maintainers to use"
++	@echo "it deletes files that may require special tools to rebuild."
+ #>- clean: clean-am
+ #>+ 1
+ clean: kde-rpo-clean  clean-am
+ 
+-distclean-am:  distclean-generic clean-am
+-	-rm -f libtool
++clean-am: clean-generic clean-libtool mostlyclean-am
+ 
+ distclean: distclean-am
+ 
+-maintainer-clean-am:  maintainer-clean-generic distclean-am
+-	@echo "This command is intended for maintainers to use;"
+-	@echo "it deletes files that may require special tools to rebuild."
++distclean-am: clean-am distclean-generic distclean-libtool
++
++dvi: dvi-am
++
++dvi-am:
++
++info: info-am
++
++info-am:
++
++install-data-am:
++
++install-exec-am:
++
++install-info: install-info-am
++
++install-man:
++
++installcheck-am:
+ 
+ maintainer-clean: maintainer-clean-am
+ 
+-.PHONY: tags distdir info-am info dvi-am dvi check check-am \
+-installcheck-am installcheck install-exec-am install-exec \
+-install-data-am install-data install-am install uninstall-am uninstall \
+-all-redirect all-am all installdirs mostlyclean-generic \
+-distclean-generic clean-generic maintainer-clean-generic clean \
+-mostlyclean distclean maintainer-clean
++maintainer-clean-am: distclean-am maintainer-clean-generic
++
++mostlyclean: mostlyclean-am
++
++mostlyclean-am: mostlyclean-generic mostlyclean-libtool
++
++uninstall-am: uninstall-info-am
+ 
++.PHONY: all all-am check check-am clean clean-generic clean-libtool \
++	distclean distclean-generic distclean-libtool distdir dvi \
++	dvi-am info info-am install install-am install-data \
++	install-data-am install-exec install-exec-am install-info \
++	install-info-am install-man install-strip installcheck \
++	installcheck-am installdirs maintainer-clean \
++	maintainer-clean-generic mostlyclean mostlyclean-generic \
++	mostlyclean-libtool uninstall uninstall-am uninstall-info-am
+ 
+ # Tell versions [3.59,3.63) of GNU make to not export all variables.
+ # Otherwise a system limit (for SysV at least) may be exceeded.
+@@ -329,9 +369,10 @@
+ #>+ 2
+ docs-am:
+ 
+-#>+ 5
++#>+ 6
+ force-reedit:
+-		cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps po/Makefile
++		cd $(top_srcdir) && \
++	$(AUTOMAKE) --gnu  ./po/Makefile
+ 	cd $(top_srcdir) && perl admin/am_edit po/Makefile.in
+ 
+ 
+@@ -339,8 +380,14 @@
+ final:
+ 	$(MAKE) all-am
+ #>+ 2
++final-install:
++	$(MAKE) install-am
++#>+ 2
+ no-final:
+ 	$(MAKE) all-am
++#>+ 2
++no-final-install:
++	$(MAKE) install-am
+ #>+ 3
+ cvs-clean:
+ 	$(MAKE) -f $(top_srcdir)/admin/Makefile.common cvs-clean
+--- kfocus-1.0.2.orig/admin/libtool.m4.in
++++ kfocus-1.0.2/admin/libtool.m4.in
+@@ -104,7 +104,7 @@
+ dnl
+ 
+ # Only perform the check for file, if the check method requires it
+-case "$deplibs_check_method" in
++case $deplibs_check_method in
+ file_magic*)
+   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+     AC_PATH_MAGIC
+@@ -139,12 +139,12 @@
+ 
+ # Some flags need to be propagated to the compiler or linker for good
+ # libtool support.
+-case "$host" in
++case $host in
+ *-*-irix6*)
+   # Find out which ABI we are using.
+   echo '[#]line __oline__ "configure"' > conftest.$ac_ext
+   if AC_TRY_EVAL(ac_compile); then
+-    case "`/usr/bin/file conftest.$ac_objext`" in
++    case `/usr/bin/file conftest.$ac_objext` in
+     *32-bit*)
+       LD="${LD-ld} -32"
+       ;;
+@@ -188,7 +188,7 @@
+       DllMain (0, 0, 0);],
+       [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
+ 
+-  case "$host/$CC" in
++  case $host/$CC in
+   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
+     # old mingw systems require "-dll" to link a DLL, while more recent ones
+     # require "-mdll"
+@@ -224,7 +224,7 @@
+ <<  --enable-shared[=PKGS]  build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
+ changequote([, ])dnl
+ [p=${PACKAGE-default}
+-case "$enableval" in
++case $enableval in
+ yes) enable_shared=yes ;;
+ no) enable_shared=no ;;
+ *)
+@@ -257,7 +257,7 @@
+ <<  --enable-static[=PKGS]  build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
+ changequote([, ])dnl
+ [p=${PACKAGE-default}
+-case "$enableval" in
++case $enableval in
+ yes) enable_static=yes ;;
+ no) enable_static=no ;;
+ *)
+@@ -292,7 +292,7 @@
+ <<  --enable-fast-install[=PKGS]  optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
+ changequote([, ])dnl
+ [p=${PACKAGE-default}
+-case "$enableval" in
++case $enableval in
+ yes) enable_fast_install=yes ;;
+ no) enable_fast_install=no ;;
+ *)
+@@ -328,7 +328,7 @@
+ AC_DEFUN([AC_PATH_TOOL_PREFIX],
+ [AC_MSG_CHECKING([for $1])
+ AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
+-[case "$MAGIC_CMD" in
++[case $MAGIC_CMD in
+   /*)
+   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+   ;;
+@@ -347,7 +347,7 @@
+     if test -f $ac_dir/$1; then
+       lt_cv_path_MAGIC_CMD="$ac_dir/$1"
+       if test -n "$file_magic_test_file"; then
+-	case "$deplibs_check_method" in
++	case $deplibs_check_method in
+ 	"file_magic "*)
+ 	  file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
+ 	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+@@ -419,12 +419,10 @@
+   *)
+     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+   esac
+-  case "$ac_prog" in
++  case $ac_prog in
+     # Accept absolute paths.
+-changequote(,)dnl
+-    [\\/]* | [A-Za-z]:[\\/]*)
+-      re_direlt='/[^/][^/]*/\.\./'
+-changequote([,])dnl
++    [[\\/]* | [A-Za-z]:[\\/]*)]
++      re_direlt=['/[^/][^/]*/\.\./']
+       # Canonicalize the path of ld
+       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
+       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+@@ -516,8 +514,8 @@
+ # If you have `file' or equivalent on your system and you're not sure
+ # whether `pass_all' will *always* work, you probably want this one.
+ 
+-case "$host_os" in
+-aix4*)
++case $host_os in
++aix*)
+   lt_cv_deplibs_check_method=pass_all
+   ;;
+ 
+@@ -526,9 +524,7 @@
+   ;;
+ 
+ bsdi4*)
+-  changequote(,)dnl
+-  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
+-  changequote([, ])dnl
++  lt_cv_deplibs_check_method=['file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)']
+   lt_cv_file_magic_cmd='/usr/bin/file -L'
+   lt_cv_file_magic_test_file=/shlib/libc.so
+   ;;
+@@ -540,19 +536,24 @@
+ 
+ darwin* | rhapsody*)
+   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
+-  lt_cv_file_magic_cmd=/usr/bin/file
+-  lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
++  lt_cv_file_magic_cmd='/usr/bin/file -L'
++  case "$host_os" in
++  rhapsody* | darwin1.[012])
++    lt_cv_file_magic_test_file='/System/Library/Frameworks/System.framework/System'
++    ;;
++  *) # Darwin 1.3 on
++    lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
++    ;;
++  esac
+   ;;
+ 
+ freebsd* )
+   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+-    case "$host_cpu" in
++    case $host_cpu in
+     i*86 )
+       # Not sure whether the presence of OpenBSD here was a mistake.
+       # Let's accept both of them until this is cleared up.
+-      changequote(,)dnl
+-      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
+-      changequote([, ])dnl
++      lt_cv_deplibs_check_method=['file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library']
+       lt_cv_file_magic_cmd=/usr/bin/file
+       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+       ;;
+@@ -567,31 +568,26 @@
+   ;;
+ 
+ hpux10.20*|hpux11*)
+-  # TODO:  Does this work for hpux-11 too?
+-  changequote(,)dnl
+-  lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
+-  changequote([, ])dnl
++  lt_cv_deplibs_check_method=['file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library']
+   lt_cv_file_magic_cmd=/usr/bin/file
+   lt_cv_file_magic_test_file=/usr/lib/libc.sl
+   ;;
+ 
+ irix5* | irix6*)
+-  case "$host_os" in
++  case $host_os in
+   irix5*)
+     # this will be overridden with pass_all, but let us keep it just in case
+     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
+     ;;
+   *)
+-    case "$LD" in
++    case $LD in
+     *-32|*"-32 ") libmagic=32-bit;;
+     *-n32|*"-n32 ") libmagic=N32;;
+     *-64|*"-64 ") libmagic=64-bit;;
+     *) libmagic=never-match;;
+     esac
+     # this will be overridden with pass_all, but let us keep it just in case
+-    changequote(,)dnl
+-    lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
+-    changequote([, ])dnl
++    lt_cv_deplibs_check_method=["file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"]
+     ;;
+   esac
+   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
+@@ -600,14 +596,12 @@
+ 
+ # This must be Linux ELF.
+ linux-gnu*)
+-  case "$host_cpu" in
+-  alpha* | i*86 | powerpc* | sparc* | ia64* | s390* )
++  case $host_cpu in
++  alpha* | i*86 | powerpc* | sparc* | ia64* | s390* | m68k* | arm* | mips* | hppa* | sh* )
+     lt_cv_deplibs_check_method=pass_all ;;
+   *)
+     # glibc up to 2.1.1 does not perform some relocations on ARM
+-    changequote(,)dnl
+-    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
+-    changequote([, ])dnl
++    lt_cv_deplibs_check_method=['file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'] ;;
+   esac
+   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
+   ;;
+@@ -661,14 +655,12 @@
+   ;;
+ 
+ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+-  case "$host_vendor" in
++  case $host_vendor in
+   ncr)
+     lt_cv_deplibs_check_method=pass_all
+     ;;
+   motorola)
+-    changequote(,)dnl
+-    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
+-    changequote([, ])dnl
++    lt_cv_deplibs_check_method=['file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]']
+     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+     ;;
+   esac
+@@ -720,7 +712,7 @@
+ AC_DEFUN([AC_CHECK_LIBM],
+ [AC_REQUIRE([AC_CANONICAL_HOST])dnl
+ LIBM=
+-case "$host" in
++case $host in
+ *-*-beos* | *-*-cygwin* | *-*-pw32*)
+   # These system don't have libm
+   ;;
+@@ -746,7 +738,7 @@
+ # top_srcdir appropriately in the Makefiles.
+ AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
+ [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+-  case "$enable_ltdl_convenience" in
++  case $enable_ltdl_convenience in
+   no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
+   "") enable_ltdl_convenience=yes
+       ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
+--- kfocus-1.0.2.orig/admin/config.sub
++++ kfocus-1.0.2/admin/config.sub
+@@ -1,9 +1,9 @@
+ #! /bin/sh
+ # Configuration validation subroutine script.
+-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
+-#   Free Software Foundation, Inc.
++#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
++#   2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+ 
+-timestamp='2000-11-26'
++timestamp='2005-07-08'
+ 
+ # This file is (in principle) common to ALL GNU software.
+ # The presence of a machine in this file suggests that SOME GNU software
+@@ -21,15 +21,17 @@
+ #
+ # 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.
+-
++# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
++# 02110-1301, 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.
+ 
+-# Please send patches to <config-patches at gnu.org>.
++
++# Please send patches to <config-patches at gnu.org>.  Submit a context
++# diff and a properly formatted ChangeLog entry.
+ #
+ # Configuration subroutine to validate and canonicalize a configuration type.
+ # Supply the specified configuration type as an argument.
+@@ -62,11 +64,18 @@
+ Operation modes:
+   -h, --help         print this help, then exit
+   -t, --time-stamp   print date of last modification, then exit
++  -v, --version      print version number, then exit
++
++Report bugs and patches to <config-patches at gnu.org>."
+ 
+-Report bugs and patches to <config-patches at gnu.org>.
++version="\
++GNU config.sub ($timestamp)
+ 
+-Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 99, 2000
+-Free Software Foundation, Inc.  See the source for copying conditions."
++Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
++Free Software Foundation, Inc.
++
++This is free software; see the source for copying conditions.  There is NO
++warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+ 
+ help="
+ Try \`$me --help' for more information."
+@@ -75,9 +84,11 @@
+ while test $# -gt 0 ; do
+   case $1 in
+     --time-stamp | --time* | -t )
+-       echo "$timestamp" ; exit 0 ;;
++       echo "$timestamp" ; exit ;;
++    --version | -v )
++       echo "$version" ; exit ;;
+     --help | --h* | -h )
+-       echo "$usage"; exit 0 ;;
++       echo "$usage"; exit ;;
+     -- )     # Stop option processing
+        shift; break ;;
+     - )	# Use stdin as input.
+@@ -89,7 +100,7 @@
+     *local*)
+        # First pass through any local machine types.
+        echo $1
+-       exit 0;;
++       exit ;;
+ 
+     * )
+        break ;;
+@@ -108,7 +119,8 @@
+ # Here we must recognize all the valid KERNEL-OS combinations.
+ maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+ case $maybe_os in
+-  nto-qnx* | linux-gnu* | storm-chaos*)
++  nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \
++  kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
+     os=-$maybe_os
+     basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+     ;;
+@@ -134,7 +146,7 @@
+ 	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+ 	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+ 	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+-	-apple | -axis)
++	-apple | -axis | -knuth | -cray)
+ 		os=
+ 		basic_machine=$1
+ 		;;
+@@ -148,6 +160,14 @@
+ 		os=-vxworks
+ 		basic_machine=$1
+ 		;;
++	-chorusos*)
++		os=-chorusos
++		basic_machine=$1
++		;;
++ 	-chorusrdb)
++ 		os=-chorusrdb
++		basic_machine=$1
++ 		;;
+ 	-hiux*)
+ 		os=-hiuxwe2
+ 		;;
+@@ -206,23 +226,57 @@
+ case $basic_machine in
+ 	# Recognize the basic CPU types without company name.
+ 	# Some are omitted here because they have special meanings below.
+-	tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc \
+-	        | arm | arme[lb] | arm[bl]e | armv[2345] | armv[345][lb] | strongarm | xscale \
+-		| pyramid | mn10200 | mn10300 | tron | a29k \
+-		| 580 | i960 | h8300 \
+-		| x86 | ppcbe | mipsbe | mipsle | shbe | shle \
+-		| hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \
+-		| hppa64 \
+-		| alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \
+-		| alphaev6[78] \
+-		| we32k | ns16k | clipper | i370 | sh | sh[34] \
+-		| powerpc | powerpcle \
+-		| 1750a | dsp16xx | pdp11 | mips16 | mips64 | mipsel | mips64el \
+-		| mips64orion | mips64orionel | mipstx39 | mipstx39el \
+-		| mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \
+-		| mips64vr5000 | miprs64vr5000el | mcore \
+-		| sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \
+-		| thumb | d10v | d30v | fr30 | avr)
++	1750a | 580 \
++	| a29k \
++	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
++	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
++	| am33_2.0 \
++	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
++	| bfin \
++	| c4x | clipper \
++	| d10v | d30v | dlx | dsp16xx \
++	| fr30 | frv \
++	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
++	| i370 | i860 | i960 | ia64 \
++	| ip2k | iq2000 \
++	| m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \
++	| mips | mipsbe | mipseb | mipsel | mipsle \
++	| mips16 \
++	| mips64 | mips64el \
++	| mips64vr | mips64vrel \
++	| mips64orion | mips64orionel \
++	| mips64vr4100 | mips64vr4100el \
++	| mips64vr4300 | mips64vr4300el \
++	| mips64vr5000 | mips64vr5000el \
++	| mips64vr5900 | mips64vr5900el \
++	| mipsisa32 | mipsisa32el \
++	| mipsisa32r2 | mipsisa32r2el \
++	| mipsisa64 | mipsisa64el \
++	| mipsisa64r2 | mipsisa64r2el \
++	| mipsisa64sb1 | mipsisa64sb1el \
++	| mipsisa64sr71k | mipsisa64sr71kel \
++	| mipstx39 | mipstx39el \
++	| mn10200 | mn10300 \
++	| ms1 \
++	| msp430 \
++	| ns16k | ns32k \
++	| or32 \
++	| pdp10 | pdp11 | pj | pjl \
++	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
++	| pyramid \
++	| sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
++	| sh64 | sh64le \
++	| sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \
++	| sparcv8 | sparcv9 | sparcv9b \
++	| strongarm \
++	| tahoe | thumb | tic4x | tic80 | tron \
++	| v850 | v850e \
++	| we32k \
++	| x86 | xscale | xscalee[bl] | xstormy16 | xtensa \
++	| z8k)
++		basic_machine=$basic_machine-unknown
++		;;
++	m32c)
+ 		basic_machine=$basic_machine-unknown
+ 		;;
+ 	m6811 | m68hc11 | m6812 | m68hc12)
+@@ -230,13 +284,13 @@
+ 		basic_machine=$basic_machine-unknown
+ 		os=-none
+ 		;;
+-	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65 | pj | pjl)
++	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+ 		;;
+ 
+ 	# We use `pc' rather than `unknown'
+ 	# because (1) that's what they normally are, and
+ 	# (2) the word "unknown" tends to confuse beginning users.
+-	i[234567]86 | x86_64)
++	i*86 | x86_64)
+ 	  basic_machine=$basic_machine-pc
+ 	  ;;
+ 	# Object if more than one company name word.
+@@ -245,29 +299,67 @@
+ 		exit 1
+ 		;;
+ 	# Recognize the basic CPU types with company name.
+-	# FIXME: clean up the formatting here.
+-	vax-* | tahoe-* | i[234567]86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \
+-	      | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | c[123]* \
+-	      | arm-*  | armbe-* | armle-* | armv*-* | strongarm-* | xscale-* \
+-	      | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
+-	      | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \
+-	      | xmp-* | ymp-* \
+-	      | x86-* | ppcbe-* | mipsbe-* | mipsle-* | shbe-* | shle-* \
+-	      | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* \
+-	      | hppa2.0n-* | hppa64-* \
+-	      | alpha-* | alphaev[4-8]-* | alphaev56-* | alphapca5[67]-* \
+-	      | alphaev6[78]-* \
+-	      | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \
+-	      | clipper-* | orion-* \
+-	      | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
+-	      | sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \
+-	      | mips64el-* | mips64orion-* | mips64orionel-* \
+-	      | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \
+-	      | mipstx39-* | mipstx39el-* | mcore-* \
+-	      | f301-* | s390-* | sv1-* | t3e-* \
+-	      | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \
+-	      | thumb-* | v850-* | d30v-* | tic30-* | c30-* | fr30-* \
+-	      | bs2000-* | tic54x-* | c54x-* | x86_64-*)
++	580-* \
++	| a29k-* \
++	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
++	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
++	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
++	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
++	| avr-* \
++	| bfin-* | bs2000-* \
++	| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
++	| clipper-* | craynv-* | cydra-* \
++	| d10v-* | d30v-* | dlx-* \
++	| elxsi-* \
++	| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
++	| h8300-* | h8500-* \
++	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
++	| i*86-* | i860-* | i960-* | ia64-* \
++	| ip2k-* | iq2000-* \
++	| m32r-* | m32rle-* \
++	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
++	| m88110-* | m88k-* | maxq-* | mcore-* \
++	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
++	| mips16-* \
++	| mips64-* | mips64el-* \
++	| mips64vr-* | mips64vrel-* \
++	| mips64orion-* | mips64orionel-* \
++	| mips64vr4100-* | mips64vr4100el-* \
++	| mips64vr4300-* | mips64vr4300el-* \
++	| mips64vr5000-* | mips64vr5000el-* \
++	| mips64vr5900-* | mips64vr5900el-* \
++	| mipsisa32-* | mipsisa32el-* \
++	| mipsisa32r2-* | mipsisa32r2el-* \
++	| mipsisa64-* | mipsisa64el-* \
++	| mipsisa64r2-* | mipsisa64r2el-* \
++	| mipsisa64sb1-* | mipsisa64sb1el-* \
++	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
++	| mipstx39-* | mipstx39el-* \
++	| mmix-* \
++	| ms1-* \
++	| msp430-* \
++	| none-* | np1-* | ns16k-* | ns32k-* \
++	| orion-* \
++	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
++	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
++	| pyramid-* \
++	| romp-* | rs6000-* \
++	| sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \
++	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
++	| sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \
++	| sparclite-* \
++	| sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
++	| tahoe-* | thumb-* \
++	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
++	| tron-* \
++	| v850-* | v850e-* | vax-* \
++	| we32k-* \
++	| x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \
++	| xstormy16-* | xtensa-* \
++	| ymp-* \
++	| z8k-*)
++		;;
++	m32c-*)
+ 		;;
+ 	# Recognize the various machine names and aliases which stand
+ 	# for a CPU type and a company and sometimes even an OS.
+@@ -285,6 +377,9 @@
+ 		basic_machine=a29k-amd
+ 		os=-udi
+ 		;;
++    	abacus)
++		basic_machine=abacus-unknown
++		;;
+ 	adobe68k)
+ 		basic_machine=m68010-adobe
+ 		os=-scout
+@@ -299,6 +394,12 @@
+ 		basic_machine=a29k-none
+ 		os=-bsd
+ 		;;
++	amd64)
++		basic_machine=x86_64-pc
++		;;
++	amd64-*)
++		basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
++		;;
+ 	amdahl)
+ 		basic_machine=580-amdahl
+ 		os=-sysv
+@@ -330,6 +431,10 @@
+ 		basic_machine=ns32k-sequent
+ 		os=-dynix
+ 		;;
++	c90)
++		basic_machine=c90-cray
++		os=-unicos
++		;;
+ 	convex-c1)
+ 		basic_machine=c1-convex
+ 		os=-bsd
+@@ -350,30 +455,45 @@
+ 		basic_machine=c38-convex
+ 		os=-bsd
+ 		;;
+-	cray | ymp)
+-		basic_machine=ymp-cray
++	cray | j90)
++		basic_machine=j90-cray
+ 		os=-unicos
+ 		;;
+-	cray2)
+-		basic_machine=cray2-cray
+-		os=-unicos
++	craynv)
++		basic_machine=craynv-cray
++		os=-unicosmp
+ 		;;
+-	[ctj]90-cray)
+-		basic_machine=c90-cray
+-		os=-unicos
++	cr16c)
++		basic_machine=cr16c-unknown
++		os=-elf
+ 		;;
+ 	crds | unos)
+ 		basic_machine=m68k-crds
+ 		;;
++	crisv32 | crisv32-* | etraxfs*)
++		basic_machine=crisv32-axis
++		;;
+ 	cris | cris-* | etrax*)
+ 		basic_machine=cris-axis
+ 		;;
++	crx)
++		basic_machine=crx-unknown
++		os=-elf
++		;;
+ 	da30 | da30-*)
+ 		basic_machine=m68k-da30
+ 		;;
+ 	decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+ 		basic_machine=mips-dec
+ 		;;
++	decsystem10* | dec10*)
++		basic_machine=pdp10-dec
++		os=-tops10
++		;;
++	decsystem20* | dec20*)
++		basic_machine=pdp10-dec
++		os=-tops20
++		;;
+ 	delta | 3300 | motorola-3300 | motorola-delta \
+ 	      | 3300-motorola | delta-motorola)
+ 		basic_machine=m68k-motorola
+@@ -382,6 +502,10 @@
+ 		basic_machine=m88k-motorola
+ 		os=-sysv3
+ 		;;
++	djgpp)
++		basic_machine=i586-pc
++		os=-msdosdjgpp
++		;;
+ 	dpx20 | dpx20-*)
+ 		basic_machine=rs6000-bull
+ 		os=-bosx
+@@ -415,6 +539,10 @@
+ 		basic_machine=tron-gmicro
+ 		os=-sysv
+ 		;;
++	go32)
++		basic_machine=i386-pc
++		os=-go32
++		;;
+ 	h3050r* | hiux*)
+ 		basic_machine=hppa1.1-hitachi
+ 		os=-hiuxwe2
+@@ -490,19 +618,19 @@
+ 		basic_machine=i370-ibm
+ 		;;
+ # I'm not sure what "Sysv32" means.  Should this be sysv3.2?
+-	i[34567]86v32)
++	i*86v32)
+ 		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ 		os=-sysv32
+ 		;;
+-	i[34567]86v4*)
++	i*86v4*)
+ 		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ 		os=-sysv4
+ 		;;
+-	i[34567]86v)
++	i*86v)
+ 		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ 		os=-sysv
+ 		;;
+-	i[34567]86sol2)
++	i*86sol2)
+ 		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ 		os=-solaris2
+ 		;;
+@@ -514,18 +642,6 @@
+ 		basic_machine=i386-unknown
+ 		os=-vsta
+ 		;;
+-	i386-go32 | go32)
+-		basic_machine=i386-unknown
+-		os=-go32
+-		;;
+-	i386-mingw32 | mingw32)
+-		basic_machine=i386-unknown
+-		os=-mingw32
+-		;;
+-	i[34567]86-pw32 | pw32)
+-		basic_machine=i586-unknown
+-		os=-pw32
+-		;;
+ 	iris | iris4d)
+ 		basic_machine=mips-sgi
+ 		case $os in
+@@ -551,6 +667,10 @@
+ 		basic_machine=ns32k-utek
+ 		os=-sysv
+ 		;;
++	mingw32)
++		basic_machine=i386-pc
++		os=-mingw32
++		;;
+ 	miniframe)
+ 		basic_machine=m68000-convergent
+ 		;;
+@@ -558,30 +678,22 @@
+ 		basic_machine=m68k-atari
+ 		os=-mint
+ 		;;
+-	mipsel*-linux*)
+-		basic_machine=mipsel-unknown
+-		os=-linux-gnu
+-		;;
+-	mips*-linux*)
+-		basic_machine=mips-unknown
+-		os=-linux-gnu
+-		;;
+ 	mips3*-*)
+ 		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+ 		;;
+ 	mips3*)
+ 		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+ 		;;
+-	mmix*)
+-		basic_machine=mmix-knuth
+-		os=-mmixware
+-		;;
+ 	monitor)
+ 		basic_machine=m68k-rom68k
+ 		os=-coff
+ 		;;
++	morphos)
++		basic_machine=powerpc-unknown
++		os=-morphos
++		;;
+ 	msdos)
+-		basic_machine=i386-unknown
++		basic_machine=i386-pc
+ 		os=-msdos
+ 		;;
+ 	mvs)
+@@ -659,6 +771,13 @@
+ 		basic_machine=hppa1.1-oki
+ 		os=-proelf
+ 		;;
++	openrisc | openrisc-*)
++		basic_machine=or32-unknown
++		;;
++	os400)
++		basic_machine=powerpc-ibm
++		os=-os400
++		;;
+ 	OSE68000 | ose68000)
+ 		basic_machine=m68000-ericsson
+ 		os=-ose
+@@ -681,45 +800,65 @@
+ 	pbb)
+ 		basic_machine=m68k-tti
+ 		;;
+-        pc532 | pc532-*)
++	pc532 | pc532-*)
+ 		basic_machine=ns32k-pc532
+ 		;;
+-	pentium | p5 | k5 | k6 | nexgen)
++	pentium | p5 | k5 | k6 | nexgen | viac3)
+ 		basic_machine=i586-pc
+ 		;;
+-	pentiumpro | p6 | 6x86 | athlon)
++	pentiumpro | p6 | 6x86 | athlon | athlon_*)
+ 		basic_machine=i686-pc
+ 		;;
+-	pentiumii | pentium2)
++	pentiumii | pentium2 | pentiumiii | pentium3)
+ 		basic_machine=i686-pc
+ 		;;
+-	pentium-* | p5-* | k5-* | k6-* | nexgen-*)
++	pentium4)
++		basic_machine=i786-pc
++		;;
++	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+ 		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+ 		;;
+ 	pentiumpro-* | p6-* | 6x86-* | athlon-*)
+ 		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ 		;;
+-	pentiumii-* | pentium2-*)
++	pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+ 		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ 		;;
++	pentium4-*)
++		basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
++		;;
+ 	pn)
+ 		basic_machine=pn-gould
+ 		;;
+ 	power)	basic_machine=power-ibm
+ 		;;
+ 	ppc)	basic_machine=powerpc-unknown
+-	        ;;
++		;;
+ 	ppc-*)	basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+ 		;;
+ 	ppcle | powerpclittle | ppc-le | powerpc-little)
+ 		basic_machine=powerpcle-unknown
+-	        ;;
++		;;
+ 	ppcle-* | powerpclittle-*)
+ 		basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+ 		;;
++	ppc64)	basic_machine=powerpc64-unknown
++		;;
++	ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
++		;;
++	ppc64le | powerpc64little | ppc64-le | powerpc64-little)
++		basic_machine=powerpc64le-unknown
++		;;
++	ppc64le-* | powerpc64little-*)
++		basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
++		;;
+ 	ps2)
+ 		basic_machine=i386-ibm
+ 		;;
++	pw32)
++		basic_machine=i586-unknown
++		os=-pw32
++		;;
+ 	rom68k)
+ 		basic_machine=m68k-rom68k
+ 		os=-coff
+@@ -730,10 +869,26 @@
+ 	rtpc | rtpc-*)
+ 		basic_machine=romp-ibm
+ 		;;
++	s390 | s390-*)
++		basic_machine=s390-ibm
++		;;
++	s390x | s390x-*)
++		basic_machine=s390x-ibm
++		;;
+ 	sa29200)
+ 		basic_machine=a29k-amd
+ 		os=-udi
+ 		;;
++	sb1)
++		basic_machine=mipsisa64sb1-unknown
++		;;
++	sb1el)
++		basic_machine=mipsisa64sb1el-unknown
++		;;
++	sei)
++		basic_machine=mips-sei
++		os=-seiux
++		;;
+ 	sequent)
+ 		basic_machine=i386-sequent
+ 		;;
+@@ -741,7 +896,10 @@
+ 		basic_machine=sh-hitachi
+ 		os=-hms
+ 		;;
+-	sparclite-wrs)
++	sh64)
++		basic_machine=sh64-unknown
++		;;
++	sparclite-wrs | simso-wrs)
+ 		basic_machine=sparclite-wrs
+ 		os=-vxworks
+ 		;;
+@@ -808,22 +966,42 @@
+ 		os=-dynix
+ 		;;
+ 	t3e)
+-		basic_machine=t3e-cray
++		basic_machine=alphaev5-cray
++		os=-unicos
++		;;
++	t90)
++		basic_machine=t90-cray
+ 		os=-unicos
+ 		;;
+ 	tic54x | c54x*)
+ 		basic_machine=tic54x-unknown
+ 		os=-coff
+ 		;;
++	tic55x | c55x*)
++		basic_machine=tic55x-unknown
++		os=-coff
++		;;
++	tic6x | c6x*)
++		basic_machine=tic6x-unknown
++		os=-coff
++		;;
+ 	tx39)
+ 		basic_machine=mipstx39-unknown
+ 		;;
+ 	tx39el)
+ 		basic_machine=mipstx39el-unknown
+ 		;;
++	toad1)
++		basic_machine=pdp10-xkl
++		os=-tops20
++		;;
+ 	tower | tower-32)
+ 		basic_machine=m68k-ncr
+ 		;;
++	tpf)
++		basic_machine=s390x-ibm
++		os=-tpf
++		;;
+ 	udi29k)
+ 		basic_machine=a29k-amd
+ 		os=-udi
+@@ -845,8 +1023,8 @@
+ 		os=-vms
+ 		;;
+ 	vpp*|vx|vx-*)
+-               basic_machine=f301-fujitsu
+-               ;;
++		basic_machine=f301-fujitsu
++		;;
+ 	vxworks960)
+ 		basic_machine=i960-wrs
+ 		os=-vxworks
+@@ -867,13 +1045,17 @@
+ 		basic_machine=hppa1.1-winbond
+ 		os=-proelf
+ 		;;
+-	xmp)
+-		basic_machine=xmp-cray
+-		os=-unicos
++	xbox)
++		basic_machine=i686-pc
++		os=-mingw32
+ 		;;
+-        xps | xps100)
++	xps | xps100)
+ 		basic_machine=xps100-honeywell
+ 		;;
++	ymp)
++		basic_machine=ymp-cray
++		os=-unicos
++		;;
+ 	z8k-*-coff)
+ 		basic_machine=z8k-unknown
+ 		os=-sim
+@@ -894,35 +1076,35 @@
+ 	op60c)
+ 		basic_machine=hppa1.1-oki
+ 		;;
+-	mips)
+-		if [ x$os = x-linux-gnu ]; then
+-			basic_machine=mips-unknown
+-		else
+-			basic_machine=mips-mips
+-		fi
+-		;;
+ 	romp)
+ 		basic_machine=romp-ibm
+ 		;;
++	mmix)
++		basic_machine=mmix-knuth
++		;;
+ 	rs6000)
+ 		basic_machine=rs6000-ibm
+ 		;;
+ 	vax)
+ 		basic_machine=vax-dec
+ 		;;
++	pdp10)
++		# there are many clones, so DEC is not a safe bet
++		basic_machine=pdp10-unknown
++		;;
+ 	pdp11)
+ 		basic_machine=pdp11-dec
+ 		;;
+ 	we32k)
+ 		basic_machine=we32k-att
+ 		;;
+-	sh3 | sh4)
++	sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
+ 		basic_machine=sh-unknown
+ 		;;
+-	sparc | sparcv9)
++	sparc | sparcv8 | sparcv9 | sparcv9b)
+ 		basic_machine=sparc-sun
+ 		;;
+-        cydra)
++	cydra)
+ 		basic_machine=cydra-cydrome
+ 		;;
+ 	orion)
+@@ -937,9 +1119,8 @@
+ 	pmac | pmac-mpw)
+ 		basic_machine=powerpc-apple
+ 		;;
+-	c4x*)
+-		basic_machine=c4x-none
+-		os=-coff
++	*-unknown)
++		# Make sure to match an already-canonicalized machine name.
+ 		;;
+ 	*)
+ 		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+@@ -993,35 +1174,47 @@
+ 	      | -aos* \
+ 	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+ 	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+-	      | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
+-	      | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
++	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
++	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
++	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+ 	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+ 	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
++	      | -chorusos* | -chorusrdb* \
+ 	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+-	      | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
+-	      | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
+-	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* | -storm-chaos*)
++	      | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
++	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
++	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
++	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
++	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
++	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
++	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
++	      | -skyos* | -haiku*)
+ 	# Remember, each alternative MUST END IN *, to match a version number.
+ 		;;
+ 	-qnx*)
+ 		case $basic_machine in
+-		    x86-* | i[34567]86-*)
++		    x86-* | i*86-*)
+ 			;;
+ 		    *)
+ 			os=-nto$os
+ 			;;
+ 		esac
+ 		;;
++	-nto-qnx*)
++		;;
+ 	-nto*)
+-		os=-nto-qnx
++		os=`echo $os | sed -e 's|nto|nto-qnx|'`
+ 		;;
+ 	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+-	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
++	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
+ 	      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+ 		;;
+ 	-mac*)
+ 		os=`echo $os | sed -e 's|mac|macos|'`
+ 		;;
++	-linux-dietlibc)
++		os=-linux-dietlibc
++		;;
+ 	-linux*)
+ 		os=`echo $os | sed -e 's|linux|linux-gnu|'`
+ 		;;
+@@ -1034,6 +1227,9 @@
+ 	-opened*)
+ 		os=-openedition
+ 		;;
++        -os400*)
++		os=-os400
++		;;
+ 	-wince*)
+ 		os=-wince
+ 		;;
+@@ -1052,14 +1248,23 @@
+ 	-acis*)
+ 		os=-aos
+ 		;;
++	-atheos*)
++		os=-atheos
++		;;
++	-syllable*)
++		os=-syllable
++		;;
+ 	-386bsd)
+ 		os=-bsd
+ 		;;
+ 	-ctix* | -uts*)
+ 		os=-sysv
+ 		;;
++	-nova*)
++		os=-rtmk-nova
++		;;
+ 	-ns2 )
+-	        os=-nextstep2
++		os=-nextstep2
+ 		;;
+ 	-nsk*)
+ 		os=-nsk
+@@ -1071,6 +1276,9 @@
+ 	-sinix*)
+ 		os=-sysv4
+ 		;;
++        -tpf*)
++		os=-tpf
++		;;
+ 	-triton*)
+ 		os=-sysv3
+ 		;;
+@@ -1098,8 +1306,17 @@
+ 	-xenix)
+ 		os=-xenix
+ 		;;
+-        -*mint | -*MiNT)
+-	        os=-mint
++	-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
++		os=-mint
++		;;
++	-aros*)
++		os=-aros
++		;;
++	-kaos*)
++		os=-kaos
++		;;
++	-zvmoe)
++		os=-zvmoe
+ 		;;
+ 	-none)
+ 		;;
+@@ -1132,7 +1349,14 @@
+ 	arm*-semi)
+ 		os=-aout
+ 		;;
+-        pdp11-*)
++    c4x-* | tic4x-*)
++        os=-coff
++        ;;
++	# This must come before the *-dec entry.
++	pdp10-*)
++		os=-tops20
++		;;
++	pdp11-*)
+ 		os=-none
+ 		;;
+ 	*-dec | vax-*)
+@@ -1159,6 +1383,9 @@
+ 	mips*-*)
+ 		os=-elf
+ 		;;
++	or32-*)
++		os=-coff
++		;;
+ 	*-tti)	# must be before sparc entry or we get the wrong os.
+ 		os=-sysv3
+ 		;;
+@@ -1168,9 +1395,15 @@
+ 	*-be)
+ 		os=-beos
+ 		;;
++	*-haiku)
++		os=-haiku
++		;;
+ 	*-ibm)
+ 		os=-aix
+ 		;;
++    	*-knuth)
++		os=-mmixware
++		;;
+ 	*-wec)
+ 		os=-proelf
+ 		;;
+@@ -1222,25 +1455,25 @@
+ 	*-next)
+ 		os=-nextstep3
+ 		;;
+-        *-gould)
++	*-gould)
+ 		os=-sysv
+ 		;;
+-        *-highlevel)
++	*-highlevel)
+ 		os=-bsd
+ 		;;
+ 	*-encore)
+ 		os=-bsd
+ 		;;
+-        *-sgi)
++	*-sgi)
+ 		os=-irix
+ 		;;
+-        *-siemens)
++	*-siemens)
+ 		os=-sysv4
+ 		;;
+ 	*-masscomp)
+ 		os=-rtu
+ 		;;
+-	f301-fujitsu)
++	f30[01]-fujitsu | f700-fujitsu)
+ 		os=-uxpv
+ 		;;
+ 	*-rom68k)
+@@ -1303,10 +1536,16 @@
+ 			-mvs* | -opened*)
+ 				vendor=ibm
+ 				;;
++			-os400*)
++				vendor=ibm
++				;;
+ 			-ptx*)
+ 				vendor=sequent
+ 				;;
+-			-vxsim* | -vxworks*)
++			-tpf*)
++				vendor=ibm
++				;;
++			-vxsim* | -vxworks* | -windiss*)
+ 				vendor=wrs
+ 				;;
+ 			-aux*)
+@@ -1318,16 +1557,19 @@
+ 			-mpw* | -macos*)
+ 				vendor=apple
+ 				;;
+-			-*mint | -*MiNT)
++			-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ 				vendor=atari
+ 				;;
++			-vos*)
++				vendor=stratus
++				;;
+ 		esac
+ 		basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+ 		;;
+ esac
+ 
+ echo $basic_machine$os
+-exit 0
++exit
+ 
+ # Local variables:
+ # eval: (add-hook 'write-file-hooks 'time-stamp)
+--- kfocus-1.0.2.orig/admin/conf.change.pl
++++ kfocus-1.0.2/admin/conf.change.pl
+@@ -4,7 +4,8 @@
+ # 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 at ifh.de>
++# written by Michael Matz <matz at kde.org>
++# adapted by Dirk Mueller <mueller at kde.org>
+ 
+ # we have to change two places
+ # 1. the splitting of the substitutions into chunks of 90 (or even 48 in
+@@ -14,7 +15,7 @@
+ 
+ my $ac_aux_dir = dirname($0);
+ my ($flag);
+-my $ac_version = 0;
++local $ac_version = 0;
+ my $vpath_seen = 0;
+ $flag = 0;
+ 
+@@ -32,10 +33,17 @@
+ #    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]+/ ) {
++        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;
+ 	    }
+@@ -44,18 +52,16 @@
+ 	    print;
+ 	}
+     } elsif ($flag == 1) {
+-        if (/^\s*CONFIG_FILES=/ ) {
++        if (/^\s*CONFIG_FILES=/ && ($ac_version != 250)) {
+ 	     print;
+ 	     $flag = 2;
+ 	} elsif (/^\s*for\s+ac_file\s+in\s+.*CONFIG_FILES/ ) {
+ 	     $flag = 3;
+-	     if ($ac_version != 2141) {
+-	         $ac_version = 2141;
+-	     }
+ 	}
+     } elsif ($flag == 2) {
+ # 2. begins with: "for ac_file in.*CONFIG_FILES"  (the next 'for' after (1))
+ #    end with: "rm -f conftest.s\*"
++# on autoconf 250, it ends with '# CONFIG_HEADER section'
+ 	if (/^\s*for\s+ac_file\s+in\s+.*CONFIG_FILES/ ) {
+ 	    $flag = 3;
+ 	} else {
+@@ -64,14 +70,20 @@
+     } elsif ($flag == 3) {
+         if (/^\s*rm\s+-f\s+conftest/ ) {
+ 	    $flag = 4;
+-	    insert_main_loop();
++	    &insert_main_loop();
+ 	} elsif (/^\s*rm\s+-f\s+.*ac_cs_root/ ) {
+ 	    $flag = 4;
+-	    insert_main_loop();
++	    &insert_main_loop();
+ 	    #die "hhhhhhh";
+ 	    if ($ac_version != 2141) {
+ 	        print STDERR "hmm, don't know autoconf version\n";
+ 	    }
++        } elsif (/^\#\s*CONFIG_HEADER section.*/) {
++          $flag = 4;
++          &insert_main_loop();
++          if($ac_version != 250) {
++            print STDERR "hmm, something went wrong :-(\n";
++          }
+ 	} elsif (/VPATH/ ) {
+ 	    $vpath_seen = 1;
+ 	}
+@@ -82,6 +94,44 @@
+ 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
+@@ -89,7 +139,7 @@
+ fi
+ EOF
+     if ($vpath_seen) {
+-        print <<EOF;
++      print <<EOF;
+ # VPATH subst was seen in original config.status main loop
+ echo '/^[ 	]*VPATH[ 	]*=[^:]*\$/d' >> \$ac_cs_root.subs
+ EOF
+@@ -102,7 +152,7 @@
+     fi
+ done
+ if test -f \$ac_cs_root.sacfiles ; then
+-    perl $ac_aux_dir/config.pl "\$ac_cs_root" "\$ac_given_srcdir" "\$ac_given_INSTALL"
++    perl $ac_aux_dir/config.pl "\$ac_cs_root.subs" "\$ac_cs_root.sacfiles" "\$ac_given_srcdir" "\$ac_given_INSTALL"
+ fi
+ rm -f \$ac_cs_root.s*
+ 
+--- kfocus-1.0.2.orig/admin/configure.in.min
++++ kfocus-1.0.2/admin/configure.in.min
+@@ -1,3 +1,21 @@
++dnl    This file is part of the KDE libraries/packages
++dnl    Copyright (C) 2001 Stephan Kulow (coolo at 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 at kde.org
+ # I lifted it in some mater. (Stephan Kulow)
+ # I used much code from Janos Farkas
+@@ -9,7 +27,12 @@
+ 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)
+@@ -30,8 +53,5 @@
+ dnl WITH_NLS is for the po files
+ AM_KDE_WITH_NLS
+ 
++dnl KDE_USE_QT
+ AC_PATH_KDE
+-
+-dnl Perform program name transformation
+-AC_ARG_PROGRAM
+-
+--- kfocus-1.0.2.orig/admin/ltconfig
++++ kfocus-1.0.2/admin/ltconfig
+@@ -1,7 +1,8 @@
+ #! /bin/sh
+ 
+ # ltconfig - Create a system-specific libtool.
+-# Copyright (C) 1996-2000 Free Software Foundation, Inc.
++# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
++# Free Software Foundation, Inc.
+ # Originally by Gordon Matzigkeit <gord at gnu.ai.mit.edu>, 1996
+ #
+ # This file is free software; you can redistribute it and/or modify it
+@@ -181,7 +182,7 @@
+ PROGRAM=ltconfig
+ PACKAGE=libtool
+ VERSION=1.4a
+-TIMESTAMP=" (1.641.2.179mm 2001/01/08 01:59:19)"
++TIMESTAMP=" (1.641.2.206mm 2001/04/03 21:47:47)"
+ ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+ rm="rm -f"
+@@ -216,6 +217,7 @@
+ ac_ext=c
+ libext=a
+ cache_file=
++max_cmd_len=
+ 
+ ## Dependencies to place before and after the object being linked:
+ predep_objects=
+@@ -294,7 +296,7 @@
+ prev=
+ for option
+ do
+-  case "$option" in
++  case $option in
+   -*=*) optarg=`echo "$option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+   *) optarg= ;;
+   esac
+@@ -306,7 +308,7 @@
+     continue
+   fi
+ 
+-  case "$option" in
++  case $option in
+   --help) cat <<EOM
+ Usage: $progname [OPTION]... LTMAIN [HOST]
+ 
+@@ -453,7 +455,7 @@
+ ltconfig_args=
+ for arg
+ do
+-  case "$arg" in
++  case $arg in
+   *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
+   ltconfig_args="$ltconfig_args '$arg'" ;;
+   *) ltconfig_args="$ltconfig_args $arg" ;;
+@@ -536,7 +538,7 @@
+   echo $ac_n "checking host system type""... $ac_c" 1>&6
+ 
+   host_alias=$host
+-  case "$host_alias" in
++  case $host_alias in
+   "")
+     # Force config.guess to use the C compiler.
+     # CC_FOR_BUILD overrides the CC variable in config.guess but I had
+@@ -564,7 +566,7 @@
+   echo $ac_n "checking build system type... $ac_c" 1>&6
+ 
+   build_alias=$build
+-  case "$build_alias" in
++  case $build_alias in
+   NONE)
+     case $nonopt in
+     NONE) build_alias=$host_alias ;;
+@@ -599,12 +601,12 @@
+ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+ 
+ # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
+-case "$host_os" in
++case $host_os in
+ linux-gnu*) ;;
+ linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
+ esac
+ 
+-case "$host_os" in
++case $host_os in
+ aix3*)
+   # AIX sometimes has problems with the GCC collect2 program.  For some
+   # reason, if we set the COLLECT_NAMES environment variable, the problems
+@@ -673,7 +675,7 @@
+ # in isolation, and that seeing it set (from the cache) indicates that
+ # the associated values are set (in the cache) correctly too.
+ echo $ac_n "checking for $compiler option to produce PIC... $ac_c" 1>&6
+-echo "$progname:676:checking for $compiler option to produce PIC" 1>&5
++echo "$progname:678:checking for $compiler option to produce PIC" 1>&5
+ 
+ if test -z "$ac_cv_prog_cc_pic"; then
+   echo "$ac_t"none 1>&6
+@@ -682,7 +684,7 @@
+ 
+   # Check to make sure the pic_flag actually works.
+   echo $ac_n "checking if $compiler PIC flag $ac_cv_prog_cc_pic works... $ac_c" 1>&6
+-  echo "$progname:685:checking that $compiler PIC flag $ac_cv_prog_cc_pic works." 1>&5
++  echo "$progname:687:checking that $compiler PIC flag $ac_cv_prog_cc_pic works." 1>&5
+   if test "X${ac_cv_prog_cc_pic_works+set}" = Xset && \
+      test "X${ac_cv_prog_cc_pic_works}" != X; then
+     echo $ac_n "(cached) $ac_c" 1>&6
+@@ -692,11 +694,11 @@
+     echo $lt_simple_compile_test_code > conftest.$ac_ext
+     save_CFLAGS="$CFLAGS"
+     CFLAGS="$CFLAGS $ac_cv_prog_cc_pic -DPIC"
+-    if { (eval echo $progname:695: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then
++    if { (eval echo $progname:697: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then
+       # Append any warnings to the config.log.
+       cat conftest.err 1>&5
+ 
+-      case "$host_os" in
++      case $host_os in
+       hpux9* | hpux10* | hpux11*)
+ 	# On HP-UX, both CC and GCC only warn that PIC is supported... then
+ 	# they create non-PIC objects.  So, if there were any warnings, we
+@@ -744,7 +746,7 @@
+ fi
+ 
+ echo $ac_n "checking if $compiler static flag $ac_cv_prog_cc_static works... $ac_c" 1>&6
+-echo "$progname:747: checking if $compiler static flag $ac_cv_prog_cc_static works" >&5
++echo "$progname:749: checking if $compiler static flag $ac_cv_prog_cc_static works" >&5
+ if test "X${ac_cv_prog_cc_static_works+set}" = Xset && \
+    test "X${ac_cv_prog_cc_static_works}" != X; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+@@ -753,7 +755,7 @@
+   echo $lt_simple_link_test_code > conftest.$ac_ext
+   save_LDFLAGS="$LDFLAGS"
+   LDFLAGS="$LDFLAGS $ac_cv_prog_cc_static"
+-  if { (eval echo $progname:756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
++  if { (eval echo $progname:758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+     ac_cv_prog_cc_static_works=yes
+   else
+     ac_cv_prog_cc_static_works=no
+@@ -774,47 +776,81 @@
+ no_builtin_flag="$ac_cv_prog_cc_no_builtin"
+ can_build_shared="$ac_cv_prog_cc_can_build_shared"
+ 
++# find the maximum length of command line arguments
++echo "$progname:780: finding the maximum length of command line arguments" 1>&5
++echo $ac_n "finding the maximum length of command line arguments... $ac_c" 1>&6
++if test "${lt_cv_sys_max_cmd_len+set}" = set; then
++  echo $ac_n "(cached) $ac_c" 1>&6
++else
++  i=0
++  testring="ABCDEF"
++  while test `$CONFIG_SHELL $0 --fallback-echo "X$testring" >/dev/null 2>&1` == `echo "X$testring" >/dev/null 2>&1` &&
++          new_result=`expr "X$testring" : ".*" 2>&1` &&
++          lt_cv_sys_max_cmd_len=$new_result &&
++          test $i != 32 # 1 MB should be enough
++  do
++    i=`expr $i + 1`
++    testring=$testring$testring
++  done
++  testring=
++  # add a significant safety factor because C++ compilers can tack on massive amounts
++  # of additional arguments before passing them to the linker.  1/4 should be good.
++  len=`expr $lt_cv_sys_max_cmd_len \/ 4`
++  lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len - $len`
++fi
++echo "$progname:@lineno@: result: $lt_cv_sys_max_cmd_len" 1>&5
++echo "${ac_t}$lt_cv_sys_max_cmd_len" 1>&6
++
++if test -n $lt_cv_sys_max_cmd_len ; then
++  max_cmd_len=$lt_cv_sys_max_cmd_len
++else
++  max_cmd_len=none
++fi
++
+ # Check to see if options -o and -c are simultaneously supported by compiler
+ echo $ac_n "checking if $compiler supports -c -o file.$objext... $ac_c" 1>&6
+-$rm -r conftest 2>/dev/null
+-mkdir conftest
+-cd conftest
+-$rm conftest*
+-echo $lt_simple_compile_test_code > conftest.$ac_ext
+-mkdir out
+-# According to Tom Tromey, Ian Lance Taylor reported there are C compilers
+-# that will create temporary files in the current directory regardless of
+-# the output directory.  Thus, making CWD read-only will cause this test
+-# to fail, enabling locking or at least warning the user not to do parallel
+-# builds.
+-chmod -w .
+-save_CFLAGS="$CFLAGS"
+-CFLAGS="$CFLAGS -o out/conftest2.$objext"
+-echo "$progname:793: checking if $compiler supports -c -o file.$objext" >&5
+-if { (eval echo $progname:794: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$objext; then
+-
+-  # The compiler can only warn and ignore the option if not recognized
+-  # So say no if there are warnings
+-    if test -s out/conftest.err; then
+-      echo "$ac_t"no 1>&6
+-      compiler_c_o=no
+-    else
+-      echo "$ac_t"yes 1>&6
+-      compiler_c_o=yes
+-    fi
++if test "${lt_cv_compiler_c_o+set}" = set; then
++  echo $ac_n "(cached) $ac_c" 1>&6
+ else
+-  # Append any errors to the config.log.
+-  cat out/conftest.err 1>&5
+-  compiler_c_o=no
+-  echo "$ac_t"no 1>&6
+-fi
+-CFLAGS="$save_CFLAGS"
+-chmod u+w .
+-$rm conftest* out/*
+-rmdir out
+-cd ..
+-rmdir conftest
+-$rm -r conftest 2>/dev/null
++  $rm -r conftest 2>/dev/null
++  mkdir conftest
++  cd conftest
++  $rm conftest*
++  echo $lt_simple_compile_test_code > conftest.$ac_ext
++  mkdir out
++  # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
++  # that will create temporary files in the current directory regardless of
++  # the output directory.  Thus, making CWD read-only will cause this test
++  # to fail, enabling locking or at least warning the user not to do parallel
++  # builds.
++  chmod -w .
++  save_CFLAGS="$CFLAGS"
++  CFLAGS="$CFLAGS -o out/conftest2.$objext"
++  echo "$progname:829: checking if $compiler supports -c -o file.$objext" >&5
++  if { (eval echo $progname:830: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$objext; then
++
++    # The compiler can only warn and ignore the option if not recognized
++    # So say no if there are warnings
++      if test -s out/conftest.err; then
++        lt_cv_compiler_c_o=no
++      else
++        lt_cv_compiler_c_o=yes
++      fi
++  else
++    # Append any errors to the config.log.
++    cat out/conftest.err 1>&5
++    lt_cv_compiler_c_o=no
++  fi
++  CFLAGS="$save_CFLAGS"
++  chmod u+w .
++  $rm conftest* out/*
++  rmdir out
++  cd ..
++  rmdir conftest
++  $rm -r conftest 2>/dev/null
++fi
++compiler_c_o=$lt_cv_compiler_c_o
++echo "${ac_t}$compiler_c_o" 1>&6
+ 
+ # Check to see if we can do hard links to lock some files if needed
+ hard_links="nottested"
+@@ -844,8 +880,8 @@
+   echo $lt_simple_compile_test_code > conftest.$ac_ext
+   save_CFLAGS="$CFLAGS"
+   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
+-  echo "$progname:847: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
+-  if { (eval echo $progname:848: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then
++  echo "$progname:883: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
++  if { (eval echo $progname:884: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then
+ 
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+@@ -914,6 +950,10 @@
+   echo "${ac_t}no" 1>&6
+ fi
+ 
++case $reload_flag in
++"" | " "*) ;;
++*) reload_flag=" $reload_flag" ;;
++esac
+ reload_cmds='$LD$reload_flag -o $output$reload_objs'
+ test -z "$deplibs_check_method" && deplibs_check_method=unknown
+ 
+@@ -933,30 +973,67 @@
+ sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+ 
+ echo $ac_n "checking dynamic linker characteristics... $ac_c" 1>&6
+-case "$host_os" in
++case $host_os in
+ aix3*)
+   version_type=linux
+   library_names_spec='${libname}${release}.so$versuffix $libname.a'
+   shlibpath_var=LIBPATH
+ 
+-  # AIX has no versioning support, so we append a major version to the name.
++  # AIX 3 has no versioning support, so we append a major version to the name.
+   soname_spec='${libname}${release}.so$major'
+   ;;
+ 
+-aix4*)
+-  version_type=linux
+-  # AIX has no versioning support, so currently we can not hardcode correct
+-  # soname into executable. Probably we can add versioning support to
+-  # collect2, so additional links can be useful in future.
+-  # We preserve .a as extension for shared libraries though AIX4.2
+-  # and later linker supports .so
+-  # (MM) we changed it to .so, as we now use runtime linking (-brtl) and this
+-  # prevents people from linking it as normal .a archive
+-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+-  shlibpath_var=LIBPATH
+-  # the following is may be not correct. I need to check with the source of
+-  # this patch (its arbab at austin.ibm.com) (MM)
+-  hardcode_into_libs=all
++aix4* | aix5*)
++  if test "$host_cpu" = ia64; then
++    # AIX 5 supports IA64
++    library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
++    shlibpath_var=LD_LIBRARY_PATH
++  else
++    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
++    # soname into executable. Probably we can add versioning support to
++    # collect2, so additional links can be useful in future.
++    # We preserve .a as extension for shared libraries though AIX4.2
++    # and later linker supports .so
++    if test "$aix_use_runtimelinking" = yes; then
++      # If using run time linking (on AIX 4.2 or later) use lib<name>.so instead of
++      # lib<name>.a to let people know that these are not typical AIX shared libraries.
++      library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
++      # We want symlinks to be created for the different names.
++      version_type=linux
++    else
++      # We preserve .a as extension for shared libraries though AIX4.2
++      # and later when we are not doing run time linking.
++      library_names_spec='${libname}${release}.a $libname.a'
++      soname_spec='${libname}${release}.so$major.o'
++    fi
++    # If we're using GNU nm, then we don't want the "-C" option.
++    # -C means demangle to AIX nm, but means don't demangle with GNU nm
++    if $NM -V 2>&1 | egrep '(GNU)' > /dev/null; then
++      export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
++    else
++      export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
++    fi
++    shlibpath_var=LIBPATH
++    deplibs_check_method=pass_all
++    # Put the right runpath into libraries.
++    hardcode_into_libs=yes
++    case $host_os in
++    aix4 | aix4.[01] | aix4.[01].*)
++      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
++	   echo ' yes '
++	   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
++	:
++      else
++	# With GCC up to 2.95.x, collect2 would create an import file
++	# for dependence libraries.  The import file would start with
++	# the line `#! .'.  This would cause the generated library to
++	# depend on `.', always an invalid library.  This was fixed in
++	# development snapshots of GCC prior to 3.0.
++        can_build_shared=no
++      fi
++      ;;
++    esac
++  fi
+   ;;
+ 
+ amigaos*)
+@@ -993,11 +1070,28 @@
+   version_type=windows
+   need_version=no
+   need_lib_prefix=no
+-  if test "$with_gcc" = yes; then
++  case $with_gcc,$host_os in
++  yes,cygwin*)
++    library_names_spec='$libname.dll.a'
++    soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | [sed -e 's/[.]/-/g']`${versuffix}.dll'
++    postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i; echo \$dlname'\''`~
++      dldir=$destdir/`dirname \$dlpath`~
++      test -d \$dldir || mkdir -p \$dldir~
++      $install_prog .libs/$dlname \$dldir/$dlname'
++    postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
++      dlpath=$dir/\$dldll; $rm \$dlpath'
++    ;;
++  yes,mingw*)
+     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
+-  else
++    sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"`
++    ;;
++  yes,pw32*)
++    library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
++;;
++  *)
+     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
+-  fi
++    ;;
++  esac
+   dynamic_linker='Win32 ld.exe'
+   # FIXME: first we should search . and the directory the executable is in
+   shlibpath_var=PATH
+@@ -1006,10 +1100,12 @@
+   ;;
+ 
+ darwin* | rhapsody*)
+-  library_names_spec='${libname}.`if test "$module" = "yes"; then echo so; else echo dylib; fi`'
++  dynamic_linker="$host_os dyld"
++  version_type=darwin
+   need_lib_prefix=no
+   need_version=no
+-  postinstall_cmds='chmod +x $lib'
++  library_names_spec='${libname}${release}${versuffix}.`test .$module = .yes && echo so || echo dylib` ${libname}${release}${major}.$`test .$module = .yes && echo so || echo dylib` ${libname}.`test .$module = .yes && echo so || echo dylib`'
++  soname_spec='${libname}${release}${major}.`test .$module = .yes && echo so || echo dylib`'
+   shlibpath_overrides_runpath=yes
+   shlibpath_var=DYLD_LIBRARY_PATH
+   ;;
+@@ -1021,7 +1117,7 @@
+ freebsd*)
+   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
+   version_type=freebsd-$objformat
+-  case "$version_type" in
++  case $version_type in
+     freebsd-elf*)
+       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
+       need_version=no
+@@ -1033,15 +1129,11 @@
+       ;;
+   esac
+   shlibpath_var=LD_LIBRARY_PATH
+-  case "$host_os" in
++  case $host_os in
+   freebsd2*)
+     shlibpath_overrides_runpath=yes
+     ;;
+-  freebsd3.[01]* | freebsdelf3.[01]*)
+-    shlibpath_overrides_runpath=yes
+-    hardcode_into_libs=yes
+-    ;;
+-  *) # from 3.2 on
++  *)
+     shlibpath_overrides_runpath=no
+     hardcode_into_libs=yes
+     ;;
+@@ -1063,6 +1155,7 @@
+   # link against other versions.
+   dynamic_linker="$host_os dld.sl"
+   version_type=sunos
++  hardcode_into_libs=all
+   need_lib_prefix=no
+   need_version=no
+   shlibpath_var=SHLIB_PATH
+@@ -1079,12 +1172,12 @@
+   need_version=no
+   soname_spec='${libname}${release}.so$major'
+   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
+-  case "$host_os" in
++  case $host_os in
+   irix5*)
+     libsuff= shlibsuff=
+     ;;
+   *)
+-    case "$LD" in # libtool.m4 will add one of these switches to LD
++    case $LD in # libtool.m4 will add one of these switches to LD
+     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
+     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
+     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
+@@ -1219,7 +1312,7 @@
+   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+   soname_spec='${libname}${release}.so$major'
+   shlibpath_var=LD_LIBRARY_PATH
+-  case "$host_vendor" in
++  case $host_vendor in
+     motorola)
+       need_lib_prefix=no
+       need_version=no
+@@ -1280,7 +1373,7 @@
+ global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
+ 
+ # Define system-specific variables.
+-case "$host_os" in
++case $host_os in
+ aix*)
+   symcode='[BCDT]'
+   ;;
+@@ -1301,9 +1394,9 @@
+   ;;
+ esac
+ 
+-# Handle CRLF in mingw too chain
++# Handle CRLF in mingw tool chain
+ opt_cr=
+-case "$host_os" in
++case $host_os in
+ mingw*)
+   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
+   ;;
+@@ -1335,11 +1428,11 @@
+ int main(){nm_test_var='a';nm_test_func();return(0);}
+ EOF
+ 
+-  echo "$progname:1326: checking if global_symbol_pipe works" >&5
+-  if { (eval echo $progname:1327: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.$objext; then
++  echo "$progname:1423: checking if global_symbol_pipe works" >&5
++  if { (eval echo $progname:1424: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.$objext; then
+     # Now try to grab the symbols.
+     nlist=conftest.nm
+-    if { echo "$progname:1330: eval \"$NM conftest.$objext | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.$objext | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then
++    if { echo "$progname:1427: eval \"$NM conftest.$objext | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.$objext | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then
+ 
+       # Try sorting and uniquifying the output.
+       if sort "$nlist" | uniq > "$nlist"T; then
+@@ -1391,7 +1484,7 @@
+ 	  save_CFLAGS="$CFLAGS"
+ 	  LIBS="conftstm.$objext"
+ 	  CFLAGS="$CFLAGS$no_builtin_flag"
+-	  if { (eval echo $progname:1404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
++	  if { (eval echo $progname:1479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ 	    pipe_works=yes
+ 	  else
+ 	    echo "$progname: failed program was:" >&5
+@@ -1435,7 +1528,7 @@
+ 
+ # Only try to build win32 dlls if AC_LIBTOOL_WIN32_DLL was used in
+ # configure.in, otherwise build static only libraries.
+-case "$host_os" in
++case $host_os in
+ cygwin* | mingw* | pw32* | os2*)
+   if test x$can_build_shared = xyes; then
+     test x$enable_win32_dll = xno && can_build_shared=no
+@@ -1449,7 +1542,7 @@
+ 
+ # On AIX, shared libraries and static libraries use the same namespace, and
+ # are all built from PIC.
+-case "$host_os" in
++case $host_os in
+ aix3*)
+   test "$enable_shared" = yes && enable_static=no
+   if test -n "$RANLIB"; then
+@@ -1458,7 +1551,7 @@
+   fi
+   ;;
+ 
+-aix4*)
++aix4* | aix5*)
+   test "$enable_shared" = yes && enable_static=no
+   ;;
+ esac
+@@ -1470,7 +1563,7 @@
+ 
+ echo "checking whether to build static libraries... $enable_static" 1>&6
+ 
+-if test "$hardcode_action" = relink || test "$hardcode_into_libs" = all; then
++if test "$hardcode_action" = relink; then
+   # Fast installation is not supported
+   enable_fast_install=no
+ elif test "$shlibpath_overrides_runpath" = yes ||
+@@ -1495,14 +1588,14 @@
+ if test "X${lt_cv_dlopen+set}" != Xset; then
+   lt_cv_dlopen=no lt_cv_dlopen_libs=
+ echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
+-echo "$progname:1508: checking for dlopen in -ldl" >&5
++echo "$progname:1583: checking for dlopen in -ldl" >&5
+ if test "X${ac_cv_lib_dl_dlopen+set}" = Xset; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   ac_save_LIBS="$LIBS"
+ LIBS="-ldl  $LIBS"
+ cat > conftest.$ac_ext <<EOF
+-/*#line 1515 "ltconfig"*/
++/*#line 1590 "ltconfig"*/
+ /* Override any gcc2 internal prototype to avoid an error.  */
+ /* We use char because int might match the return type of a gcc2
+     builtin and then its argument prototype would still apply.  */
+@@ -1515,7 +1608,7 @@
+ dlopen()
+ ; return 0; }
+ EOF
+-if { (eval echo $progname:1528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo $progname:1603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   rm -rf conftest*
+   ac_cv_lib_dl_dlopen=yes
+ else
+@@ -1534,12 +1627,12 @@
+ else
+   echo "$ac_t""no" 1>&6
+ echo $ac_n "checking for dlopen""... $ac_c" 1>&6
+-echo "$progname:1547: checking for dlopen" >&5
++echo "$progname:1622: checking for dlopen" >&5
+ if test "X${ac_cv_func_dlopen+set}" = Xset; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   cat > conftest.$ac_ext <<EOF
+-/*#line 1552 "ltconfig"*/
++/*#line 1627 "ltconfig"*/
+ /* System header to define __stub macros and hopefully few prototypes,
+     which can conflict with char dlopen(); below.  */
+ #include <assert.h>
+@@ -1564,7 +1657,7 @@
+ 
+ ; return 0; }
+ EOF
+-if { (eval echo $progname:1577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo $progname:1652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   rm -rf conftest*
+   ac_cv_func_dlopen=yes
+ else
+@@ -1581,14 +1674,14 @@
+ else
+   echo "$ac_t""no" 1>&6
+ echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
+-echo "$progname:1594: checking for dlopen in -lsvld" >&5
++echo "$progname:1669: checking for dlopen in -lsvld" >&5
+ if test "X${ac_cv_lib_svld_dlopen+set}" = Xset; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   ac_save_LIBS="$LIBS"
+ LIBS="-lsvld  $LIBS"
+ cat > conftest.$ac_ext <<EOF
+-/* #line 1601 "ltconfig" */
++/*#line 1676 "ltconfig"*/
+ /* Override any gcc2 internal prototype to avoid an error.  */
+ /* We use char because int might match the return type of a gcc2
+     builtin and then its argument prototype would still apply.  */
+@@ -1601,7 +1694,7 @@
+ dlopen()
+ ; return 0; }
+ EOF
+-if { (eval echo $progname:1614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo $progname:1689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   rm -rf conftest*
+   ac_cv_lib_svld_dlopen=yes
+ else
+@@ -1620,14 +1713,14 @@
+ else
+   echo "$ac_t""no" 1>&6
+ echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
+-echo "$progname:1633: checking for dld_link in -ldld" >&5
++echo "$progname:1708: checking for dld_link in -ldld" >&5
+ if test "X${ac_cv_lib_dld_dld_link+set}" = Xset; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   ac_save_LIBS="$LIBS"
+ LIBS="-ldld  $LIBS"
+ cat > conftest.$ac_ext <<EOF
+-/* #line 1640 "ltconfig" */
++/*#line 1715 "ltconfig"*/
+ /* Override any gcc2 internal prototype to avoid an error.  */
+ /* We use char because int might match the return type of a gcc2
+     builtin and then its argument prototype would still apply.  */
+@@ -1640,7 +1733,7 @@
+ dld_link()
+ ; return 0; }
+ EOF
+-if { (eval echo $progname:1653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo $progname:1728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   rm -rf conftest*
+   ac_cv_lib_dld_dld_link=yes
+ else
+@@ -1659,12 +1752,12 @@
+ else
+   echo "$ac_t""no" 1>&6
+ echo $ac_n "checking for shl_load""... $ac_c" 1>&6
+-echo "$progname:1672: checking for shl_load" >&5
++echo "$progname:1747: checking for shl_load" >&5
+ if test "X${ac_cv_func_shl_load+set}" = Xset; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   cat > conftest.$ac_ext <<EOF
+-/*#line 1677 "ltconfig"*/
++/*#line 1752 "ltconfig"*/
+ /* System header to define __stub macros and hopefully few prototypes,
+     which can conflict with char shl_load(); below.  */
+ #include <assert.h>
+@@ -1689,7 +1782,7 @@
+ 
+ ; return 0; }
+ EOF
+-if { (eval echo $progname:1702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo $progname:1777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   rm -rf conftest*
+   ac_cv_func_shl_load=yes
+ else
+@@ -1707,14 +1800,14 @@
+ else
+   echo "$ac_t""no" 1>&6
+ echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
+-echo "$progname:1720: checking for shl_load in -ldld" >&5
++echo "$progname:1795: checking for shl_load in -ldld" >&5
+ if test "X${ac_cv_lib_dld_shl_load+set}" = Xset; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   ac_save_LIBS="$LIBS"
+ LIBS="-ldld  $LIBS"
+ cat > conftest.$ac_ext <<EOF
+-/*#line 1727 "ltconfig"*/
++/*#line 1802 "ltconfig"*/
+ #include "confdefs.h"
+ /* Override any gcc2 internal prototype to avoid an error.  */
+ /* We use char because int might match the return type of a gcc2
+@@ -1728,7 +1821,7 @@
+ shl_load()
+ ; return 0; }
+ EOF
+-if { (eval echo $progname:1741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo $progname:1816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   rm -rf conftest*
+   ac_cv_lib_dld_shl_load=yes
+ else
+@@ -1770,23 +1863,23 @@
+     enable_dlopen=no
+   fi
+ 
+-  case "$lt_cv_dlopen" in
++  case $lt_cv_dlopen in
+   dlopen)
+ for ac_hdr in dlfcn.h; do
+ ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+ echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+-echo "$progname:1788: checking for $ac_hdr" >&5
++echo "$progname:1863: checking for $ac_hdr" >&5
+ if eval "test \"`echo 'X$''{'ac_cv_header_$ac_safe'+set}'`\" = Xset"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   cat > conftest.$ac_ext <<EOF
+-/*#line 1793 "ltconfig"*/
++/*#line 1868 "ltconfig"*/
+ #include <$ac_hdr>
+ int fnord = 0;
+ int main () { return(0); }
+ EOF
+ ac_try="$ac_compile >/dev/null 2>conftest.out"
+-{ (eval echo $progname:1799: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++{ (eval echo $progname:1874: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+ if test -z "$ac_err"; then
+   rm -rf conftest*
+@@ -1814,7 +1907,7 @@
+     LIBS="$lt_cv_dlopen_libs $LIBS"
+ 
+   echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
+-echo "$progname:1827: checking whether a program can dlopen itself" >&5
++echo "$progname:1902: checking whether a program can dlopen itself" >&5
+ if test "X${lt_cv_dlopen_self+set}" = Xset; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+@@ -1822,7 +1915,7 @@
+     lt_cv_dlopen_self=cross
+   else
+     cat > conftest.$ac_ext <<EOF
+-/*#line 1835 "ltconfig"*/
++/*#line 1910 "ltconfig"*/
+ 
+ #if HAVE_DLFCN_H
+ #include <dlfcn.h>
+@@ -1862,13 +1955,14 @@
+ # endif
+ #endif
+ 
+-void fnord() { int i=42;}
+-int main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW);
++void fnord() { int i=42; }
++int main() {
++    void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW);
+     if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord");
+-               if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); return 1; }
++               if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); return 1;}
+ 
+ EOF
+-if { (eval echo $progname:1881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
++if { (eval echo $progname:1957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+ then
+   lt_cv_dlopen_self=yes
+ else
+@@ -1887,7 +1981,7 @@
+   if test "$lt_cv_dlopen_self" = yes; then
+     LDFLAGS="$LDFLAGS $link_static_flag"
+   echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
+-echo "$progname:1900: checking whether a statically linked program can dlopen itself" >&5
++echo "$progname:1976: checking whether a statically linked program can dlopen itself" >&5
+ if test "X${lt_cv_dlopen_self_static+set}" = Xset; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+@@ -1895,7 +1989,7 @@
+     lt_cv_dlopen_self_static=cross
+   else
+     cat > conftest.$ac_ext <<EOF
+-/* #line 1908 "ltconfig" */
++/*#line 1984 "ltconfig"*/
+ 
+ #if HAVE_DLFCN_H
+ #include <dlfcn.h>
+@@ -1935,13 +2029,14 @@
+ # endif
+ #endif
+ 
+-void fnord() { int i=42;}
+-int main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW);
++void fnord() { int i=42; }
++int main() {
++    void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW);
+     if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord");
+     if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); return 1; }
+ 
+ EOF
+-if { (eval echo $progname:1954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
++if { (eval echo $progname:2031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+ then
+   lt_cv_dlopen_self_static=yes
+ else
+@@ -1960,12 +2055,12 @@
+     ;;
+   esac
+ 
+-  case "$lt_cv_dlopen_self" in
++  case $lt_cv_dlopen_self in
+   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+   *) enable_dlopen_self=unknown ;;
+   esac
+ 
+-  case "$lt_cv_dlopen_self_static" in
++  case $lt_cv_dlopen_self_static in
+   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
+   *) enable_dlopen_self_static=unknown ;;
+   esac
+@@ -1982,7 +2077,7 @@
+ LTCONFIG_VERSION="$VERSION"
+ 
+ # Only quote variables if we're using ltmain.sh.
+-case "$ltmain" in
++case $ltmain in
+ *.sh)
+   # Now quote all the things that may contain metacharacters.
+   for var in ltecho old_AR old_AR_FLAGS old_CC old_LTCC old_CFLAGS old_CPPFLAGS \
+@@ -2007,7 +2102,7 @@
+     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
+     compiler_c_o need_locks exclude_expsyms include_expsyms; do
+ 
+-    case "$var" in
++    case $var in
+     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
+     old_postinstall_cmds | old_postuninstall_cmds | \
+     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
+@@ -2023,7 +2118,7 @@
+     esac
+   done
+ 
+-  case "$ltecho" in
++  case $ltecho in
+   *'\$0 --fallback-echo"')
+     ltecho=`$echo "X$ltecho" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
+     ;;
+@@ -2212,6 +2307,9 @@
+ pic_flag=$pic_flag
+ pic_mode=$pic_mode
+ 
++# What is the maximum length of a command?
++max_cmd_len=$max_cmd_len
++
+ # Does compiler simultaneously support -c and -o options?
+ compiler_c_o=$compiler_c_o
+ 
+@@ -2400,11 +2498,11 @@
+   echo "### END LIBTOOL TAG CONFIG: $tagname" >> "$ofile"
+ fi
+ 
+-case "$ltmain" in
++case $ltmain in
+ *.sh)
+   echo >> "$ofile"
+   if test -z "$tagname"; then
+-    case "$host_os" in
++    case $host_os in
+     aix3*)
+       cat <<\EOF >> "$ofile"
+ 
+@@ -2418,7 +2516,7 @@
+ EOF
+       ;;
+     esac
+-    case "$host" in
++    case $host in
+     *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+       cat <<'EOF' >> "$ofile"
+       # This is a source program that is used to create dlls on Windows
+@@ -2534,7 +2632,7 @@
+ #      filename = argv[1];
+ #
+ #      dll = open(filename, O_RDONLY|O_BINARY);
+-#      if (!dll)
++#      if (dll < 1)
+ #  	return 1;
+ #
+ #      dll_name = filename;
+--- kfocus-1.0.2.orig/admin/depcomp
++++ kfocus-1.0.2/admin/depcomp
+@@ -1,7 +1,7 @@
+ #! /bin/sh
+ 
+ # depcomp - compile a program generating dependencies as side-effects
+-# Copyright (C) 1999 Free Software Foundation, Inc.
++# 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
+@@ -48,6 +48,18 @@
+ fi
+ 
+ case "$depmode" in
++gcc3)
++## gcc 3 implements dependency tracking that does exactly what
++## we want.  Yay!
++  if "$@" -MT "$object" -MF "$tmpdepfile" -MD -MP; then :
++  else
++    stat=$?
++    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:
+@@ -67,9 +79,12 @@
+     rm -f "$tmpdepfile"
+     exit $stat
+   fi
+-  rm -f "$depfile" 
++  rm -f "$depfile"
+   echo "$object : \\" > "$depfile"
+-  sed 's/^[^:]*: / /' < "$tmpdepfile" >> "$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
+@@ -94,41 +109,84 @@
+   exit 1
+   ;;
+ 
+-dashmd)
+-  # The Java front end to gcc doesn't run cpp, so we can't use the -Wp
+-  # trick.  Instead we must use -M and then rename the resulting .d
+-  # file.  This is also the case for older versions of gcc, which
+-  # don't implement -Wp.
+-  if "$@" -MD; then :
++sgi)
++  if test "$libtool" = yes; then
++    "$@" "-Wp,-MDupdate,$tmpdepfile"
+   else
+-    stat=$?
+-    rm -f FIXME
++    "$@" -MDupdate "$tmpdepfile"
++  fi
++  stat=$?
++  if test $stat -eq 0; then :
++  else
++    rm -f "$tmpdepfile"
+     exit $stat
+   fi
+-  FIXME: rewrite the file
++  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).
++    tr ' ' '
++' < "$tmpdepfile" | sed 's/^[^\.]*\.o://' | tr '
++' ' ' >> $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"
++  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"
+   ;;
+ 
+-sgi)
++aix)
++  # The C for AIX Compiler uses -M and outputs the dependencies
++  # in a .u file.
++  tmpdepfile=`echo "$object" | sed 's/\(.*\)\..*$/\1.u/'`
+   if test "$libtool" = yes; then
+-    "$@" "-Wc,-MDupdate,$tmpdepfile"
++    "$@" -Wc,-M
+   else
+-    "$@" -MDupdate "$tmpdepfile"
++    "$@" -M
+   fi
++
+   stat=$?
+   if test $stat -eq 0; then :
+   else
+-    stat=$?
+     rm -f "$tmpdepfile"
+     exit $stat
+   fi
+-  rm -f "$depfile" 
+-  echo "$object : \\" > "$depfile"
+-  sed 's/^[^:]*: / /' < "$tmpdepfile" >> "$depfile"
+-  tr ' ' '
++
++  if test -f "$tmpdepfile"; then
++    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).
++    tr ' ' '
++' < "$tmpdepfile" | sed 's/^[^\.]*\.o://' | tr '
++' ' ' >> $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"
++      sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -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"
+   ;;
+ 
+@@ -166,7 +224,7 @@
+   stat=$?
+   wait "$proc"
+   if test "$stat" != 0; then exit $stat; fi
+-  rm -f "$depfile" 
++  rm -f "$depfile"
+   cat < "$tmpdepfile" > "$depfile"
+   tr ' ' '
+ ' < "$tmpdepfile" | \
+@@ -210,7 +268,7 @@
+   stat=$?
+   wait "$proc"
+   if test "$stat" != 0; then exit $stat; fi
+-  rm -f "$depfile" 
++  rm -f "$depfile"
+   cat < "$tmpdepfile" > "$depfile"
+   tail +3 "$tmpdepfile" | tr ' ' '
+ ' | \
+@@ -229,7 +287,7 @@
+     *" --mode=compile "*)
+       for arg
+       do # cycle over the arguments
+-        case "$arg" in
++        case $arg in
+ 	"--mode=compile")
+ 	  # insert --quiet before "--mode=compile"
+ 	  set fnord "$@" --quiet
+@@ -243,7 +301,8 @@
+       ;;
+     esac
+     "$@" -E |
+-    sed -n '/^# [0-9][0-9]* "\([^"]*\)"/ s::'"$object"'\: \1:p' > "$tmpdepfile"
++    sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
++    sed '$ s: \\$::' > "$tmpdepfile"
+   ) &
+   proc=$!
+   "$@"
+@@ -251,8 +310,47 @@
+   wait "$proc"
+   if test "$stat" != 0; then exit $stat; fi
+   rm -f "$depfile"
+-  cat < "$tmpdepfile" > "$depfile"
+-  sed < "$tmpdepfile" -e 's/^[^:]*: //' -e 's/$/ :/' >> "$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"
+   ;;
+ 
+--- kfocus-1.0.2.orig/admin/ltcf-c.sh
++++ kfocus-1.0.2/admin/ltcf-c.sh
+@@ -1,10 +1,8 @@
+ #### This script is meant to be sourced by ltconfig.
+ 
+-# $Id: ltcf-c.sh,v 1.1.1.1 2001/08/28 19:08:47 wehjin Exp $
+-
+ # ltcf-c.sh - Create a C compiler specific configuration
+ #
+-# Copyright (C) 1996-2000 Free Software Foundation, Inc.
++# Copyright (C) 1996-2000, 2001 Free Software Foundation, Inc.
+ # Originally by Gordon Matzigkeit <gord at gnu.ai.mit.edu>, 1996
+ #
+ # This file is free software; you can redistribute it and/or modify it
+@@ -40,7 +38,7 @@
+ lt_simple_link_test_code='main(){return(0);}'
+ 
+ ## Linker Characteristics
+-case "$host_os" in
++case $host_os in
+ cygwin* | mingw*)
+   # FIXME: the MSVC++ port hasn't been tested in a loooong time
+   # When not using gcc, we currently assume that we are using
+@@ -58,8 +56,8 @@
+   wlarc='${wl}'
+ 
+   # See if GNU ld supports shared libraries.
+-  case "$host_os" in
+-  aix3* | aix4*)
++  case $host_os in
++  aix3* | aix4* | aix5*)
+     # On AIX, the GNU linker is very broken
+     ld_shlibs=no
+     cat <<EOF 1>&2
+@@ -110,7 +108,7 @@
+       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
+       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
+       else $CC -o impgen impgen.c ; fi)~
+-      $output_objdir/impgen $dir/$soname > $output_objdir/$soname-def'
++      $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
+ 
+     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
+ 
+@@ -119,7 +117,7 @@
+     # FIXME: what about values for MSVC?
+     dll_entry=__cygwin_dll_entry at 12
+     dll_exclude_symbols=DllMain at 12,_cygwin_dll_entry at 12,_cygwin_noncygwin_dll_entry at 12~
+-    case "$host_os" in
++    case $host_os in
+     mingw*)
+       # mingw values
+       dll_entry=_DllMainCRTStartup at 12
+@@ -150,35 +148,39 @@
+       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
+       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
+ 
++    # If the export-symbols file already is a .def file (1st line
++    # is EXPORTS), use it as is.
+     # If DATA tags from a recent dlltool are present, honour them!
+-    archive_expsym_cmds='echo EXPORTS > $output_objdir/$soname-def~
+-      _lt_hint=1;
+-      cat $export_symbols | while read symbol; do
+-	set dummy \$symbol;
+-	case \$# in
+-	  2) echo "	\$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
+-	  *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
+-	esac;
+-	_lt_hint=`expr 1 + \$_lt_hint`;
+-      done~
++    archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
++        cp $export_symbols $output_objdir/$soname-def;
++      else
++        echo EXPORTS > $output_objdir/$soname-def;
++        _lt_hint=1;
++        cat $export_symbols | while read symbol; do
++         set dummy \$symbol;
++         case \[$]# in
++           2) echo "   \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
++           *) echo "     \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
++         esac;
++         _lt_hint=`expr 1 + \$_lt_hint`;
++        done;
++      fi~
+       '"$ltdll_cmds"'
+-      $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $lib '$ltdll_obj'$libobjs $deplibs $compiler_flags~
+-      $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
+-      $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $lib '$ltdll_obj'$libobjs $deplibs $compiler_flags~
++      $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
+       $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
+-      $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $lib '$ltdll_obj'$libobjs $deplibs $compiler_flags'
++      $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
++      $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~
++      $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
+     ;;
+ 
+-  darwin*|rhapsody*)
+-    allow_undefined_flag='-undefined warning'
+-    archive_cmds='$CC $(if test "$module" = "yes"; then echo -bundle; else
+-      echo -dynamiclib; fi) -o $lib $libobjs $deplibs $linkopts'
+-    archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
+-    ## What we need is to hardcode the path to the library, not the search path
+-    #hardcode_direct=yes
+-    #hardcode_libdir_flag_spec='-install_name $libdir/$lib'
++  darwin* | rhapsody*)
++    allow_undefined_flag='-undefined suppress'
++    archive_cmds='$CC `test .$module = .yes && echo -bundle || echo -dynamiclib` $allow_undefined_flag -o $lib $libobjs $deplibs $linkopts -install_name $rpath/$soname `test -n "$verstring" -a x$verstring != x0.0 && echo $verstring`'
++    # We need to add '_' to the symbols in $export_symbols first
++    #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
++    hardcode_direct=yes
+     hardcode_shlibpath_var=no
+-    whole_archive_flag_spec='-all_load'
++    whole_archive_flag_spec='-all_load $convenience'
+     ;;
+ 
+   netbsd*)
+@@ -256,7 +258,7 @@
+   fi
+ else
+   # PORTME fill in a description of your system's linker (not GNU ld)
+-  case "$host_os" in
++  case $host_os in
+   aix3*)
+     allow_undefined_flag=unsupported
+     always_export_symbols=yes
+@@ -271,57 +273,87 @@
+     fi
+     ;;
+ 
+-  # this was the old aix4 code, Reza Arbab says, it isn't working anymore (MM)
+-  #aix4*)
+-  #  hardcode_libdir_flag_spec='${wl}-b ${wl}nolibpath ${wl}-b ${wl}libpath:$libdir:/usr/lib:/lib'
+-  #  hardcode_libdir_separator=':'
+-  #  if test "$with_gcc" = yes; then
+-  #    collect2name=`${CC} -print-prog-name=collect2`
+-  #    if test -f "$collect2name" && \
+-  #       strings "$collect2name" | grep resolve_lib_name >/dev/null
+-  #    then
+-  #      # We have reworked collect2
+-  #      hardcode_direct=yes
+-  #    else
+-  #      # We have old collect2
+-  #      hardcode_direct=unsupported
+-  #      # It fails to find uninstalled libraries when the uninstalled
+-  #      # path is not listed in the libpath.  Setting hardcode_minus_L
+-  #      # to unsupported forces relinking
+-  #      hardcode_minus_L=yes
+-  #      hardcode_libdir_flag_spec='-L$libdir'
+-  #      hardcode_libdir_separator=
+-  #    fi
+-  #    shared_flag='-shared'
+-  #  else
+-  #    shared_flag='${wl}-bM:SRE'
+-  #    hardcode_direct=yes
+-  #  fi
+-  #  allow_undefined_flag=' ${wl}-berok'
+-  #  archive_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bexpall ${wl}-bnoentry${allow_undefined_flag}'
+-  #  archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}'
+-  #  case "$host_os" in aix4.[01]|aix4.[01].*)
+-  #    # According to Greg Wooledge, -bexpall is only supported from AIX 4.2 on
+-  #    always_export_symbols=yes ;;
+-  #  esac
+-  #;;                                                                         
+-
+-  aix4*)
+-    if test "$with_gcc" = yes; then
+-      # GNU compiler
+-      archive_cmds='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-G -o $lib'
+-      archive_expsym_cmds='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-G ${wl}-bE:$export_symbols -o $lib'
+-    else
+-      # IBM compiler (xlc).  Anything older than Visual Age C 5.0 probably won't work.
+-      archive_cmds='$CC -qmkshrobj $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-G -o $lib'
+-      archive_expsym_cmds='$CC -qmkshrobj $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-G ${wl}-bE:$export_symbols -o $lib'
+-    fi
+-  
+-    hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
++  aix4* | aix5*)
++    hardcode_direct=yes
+     hardcode_libdir_separator=':'
+-    hardcode_direct=unsupported
+     link_all_deplibs=yes
+-   ;;
++    # When large executables or shared objects are built, AIX ld can
++    # have problems creating the table of contents.  If linking a library
++    # or program results in "error TOC overflow" add -mminimal-toc to
++    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
++    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
++    if test "$with_gcc" = yes; then
++      case $host_os in aix4.[012]|aix4.[012].*)
++      # We only want to do this on AIX 4.2 and lower, the check
++      # below for broken collect2 doesn't work under 4.3+
++        collect2name=`${CC} -print-prog-name=collect2`
++        if test -f "$collect2name" && \
++	   strings "$collect2name" | grep resolve_lib_name >/dev/null
++        then
++	  # We have reworked collect2
++	  hardcode_direct=yes
++        else
++	  # We have old collect2
++	  hardcode_direct=unsupported
++	  # It fails to find uninstalled libraries when the uninstalled
++	  # path is not listed in the libpath.  Setting hardcode_minus_L
++	  # to unsupported forces relinking
++	  hardcode_minus_L=yes
++	  hardcode_libdir_flag_spec='-L$libdir'
++	  hardcode_libdir_separator=
++        fi
++      esac
++      shared_flag='-shared'
++    else
++      # not using gcc
++      if test "$host_cpu" = ia64; then
++        shared_flag='${wl}-G'
++      else
++        shared_flag='${wl}-bM:SRE'
++      fi
++    fi
++
++    if test "$host_cpu" = ia64; then
++      # On IA64, the linker does run time linking by default, so we don't
++      # have to do anything special.
++      aix_use_runtimelinking=no
++      exp_sym_flag='-Bexport'
++      no_entry_flag=""
++    else
++      # KDE requires run time linking.  Make it the default.
++      aix_use_runtimelinking=yes
++      exp_sym_flag='-bexport'
++      no_entry_flag='-bnoentry'
++    fi
++    # Let the compiler handle the export list.
++    always_export_symbols=no
++    if test "$aix_use_runtimelinking" = yes; then
++      # Warning - without using the other run time loading flags (-brtl), -berok will
++      #           link without error, but may produce a broken library.
++      allow_undefined_flag=' ${wl}-berok'
++      # The following three lines along with hardcode_into_libs=yes put the correct path into libraries.
++      hardcode_libdir_flag_spec='${wl}-blibpath:$libdir${libdir:+:}/usr/lib:/lib'
++      archive_cmds='$CC '"$shared_flag"' $libobjs $deplibs $compiler_flags ${wl}-G '"$hardcode_libdir_flag_spec"' -o $lib'
++      archive_expsym_cmds='$CC '"$shared_flag"' $libobjs $deplibs $compiler_flags ${wl}-G '"$hardcode_libdir_flag_spec"' ${wl}'"$exp_sym_flag"':$export_symbols -o $lib'
++    else
++      if test "$host_cpu" = ia64; then
++        hardcode_libdir_flag_spec='${wl}-R $libdir${libdir:+:}/usr/lib:/lib'
++        allow_undefined_flag="-z nodefs"
++        archive_cmds='$CC '"$shared_flag"' $libobjs $deplibs $compiler_flags '"$hardcode_libdir_flag_spec"' -o $lib'
++        archive_expsym_cmds='$CC '"$shared_flag"' $libobjs $deplibs $compiler_flags '"$hardcode_libdir_flag_spec"' ${wl}'"$exp_sym_flag"':$export_symbols -o $lib'
++      else
++        allow_undefined_flag=' ${wl}-berok'
++        # -bexpall does not export symbols beginning with underscore (_)
++        always_export_symbols=yes
++        # Exported symbols can be pulled into shared objects from archives
++        whole_archive_flag_spec=' '
++        build_libtool_need_lc=yes
++        hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
++        # This is similar to how AIX traditionally builds it's shared libraries.
++        archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
++      fi
++    fi
++    ;;
+ 
+   amigaos*)
+     archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+@@ -382,7 +414,7 @@
+     ;;
+ 
+   hpux9* | hpux10* | hpux11*)
+-    case "$host_os" in
++    case $host_os in
+     hpux9*) archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;;
+     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
+     esac
+@@ -481,7 +513,7 @@
+ 		$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
+     hardcode_libdir_flag_spec='-R$libdir'
+     hardcode_shlibpath_var=no
+-    case "$host_os" in
++    case $host_os in
+     solaris2.[0-5] | solaris2.[0-5].*) ;;
+     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
+       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
+@@ -580,29 +612,38 @@
+     ac_cv_prog_cc_wl='-Wl,'
+     ac_cv_prog_cc_static='-static'
+ 
+-    case "$host_os" in
++    case $host_os in
++    aix*)
++      # All AIX code is PIC.
++      if test "$host_cpu" = ia64; then
++        # AIX 5 now supports IA64 processor
++        lt_cv_prog_cc_static='-Bstatic'
++      else
++        lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
++      fi
++      ;;
++    amigaos*)
++      # FIXME: we need at least 68020 code to build shared libraries, but
++      # adding the `-m68020' flag to GCC prevents building anything better,
++      # like `-m68040'.
++      ac_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
++      ;;
+     beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
+       # PIC is the default for these OSes.
+       ;;
+-    aix*)
+-      # Below there is a dirty hack to force normal static linking with -ldl
+-      # The problem is because libdl dynamically linked with both libc and
+-      # libC (AIX C++ library), which obviously doesn't included in libraries
+-      # list by gcc. This cause undefined symbols with -static flags.
+-      # This hack allows C programs to be linked with "-static -ldl", but
+-      # we not sure about C++ programs.
+-      ac_cv_prog_cc_static="$ac_cv_prog_cc_static ${ac_cv_prog_cc_wl}-lC"
+-      ;;
+     cygwin* | mingw* | os2*)
+       # This hack is so that the source file can tell whether it is being
+       # built for inclusion in a dll (and should export symbols for example).
+       ac_cv_prog_cc_pic='-DDLL_EXPORT'
+       ;;
+-    amigaos*)
+-      # FIXME: we need at least 68020 code to build shared libraries, but
+-      # adding the `-m68020' flag to GCC prevents building anything better,
+-      # like `-m68040'.
+-      ac_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
++    darwin* | rhapsody*)
++      # PIC is the default on this platform
++      # Common symbols not allowed in MH_DYLIB files
++      lt_cv_prog_cc_pic='-fno-common'
++      ;;
++    *djgpp*)
++      # DJGPP does not support shared libraries at all
++      ac_cv_prog_cc_pic=
+       ;;
+     sysv4*MP*)
+       if test -d /usr/nec; then
+@@ -615,10 +656,10 @@
+     esac
+   else
+     # PORTME Check for PIC flags for the system compiler.
+-    case "$host_os" in
+-    aix3* | aix4*)
++    case $host_os in
++    aix*)
+      # All AIX code is PIC.
+-      ac_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
++      ac_cv_prog_cc_static="$ac_cv_prog_cc_static ${ac_cv_prog_cc_wl}-lC"
+       ;;
+ 
+     hpux9* | hpux10* | hpux11*)
+@@ -640,6 +681,25 @@
+       ac_cv_prog_cc_pic='-DDLL_EXPORT'
+       ;;
+ 
++    linux*)
++      case "$CC" in
++        ccc*)
++          # Compaq C
++          # It appears that all Alpha
++          # Linux and Compaq Tru64 Unix objects are PIC.
++          ac_cv_prog_cc_static='-non_shared'
++          ;;
++	KCC*)
++	  # KAI C++
++	  ac_cv_prog_cc_pic='-fPIC'
++	  ac_cv_prog_cc_wl='--backend -Wl,'
++	  ac_cv_prog_cc_static='-Bstatic'
++	  ;;
++        *)
++          ;;
++      esac
++      ;;
++
+     newsos6)
+       ac_cv_prog_cc_pic='-KPIC'
+       ac_cv_prog_cc_static='-Bstatic'
+@@ -692,12 +752,21 @@
+       ;;
+     esac
+   fi
+-  ac_cv_prog_cc_pic="$ac_cv_prog_cc_pic -DPIC"
++  case "$host_os" in
++      # Platforms which do not suport PIC and -DPIC is meaningless
++      # on them:
++      *djgpp*)
++        ac_cv_prog_cc_pic=
++        ;;
++      *)
++        ac_cv_prog_cc_pic="$ac_cv_prog_cc_pic -DPIC"
++        ;;
++  esac
+ fi
+ 
+ need_lc=yes
+ if test "$enable_shared" = yes && test "$with_gcc" = yes; then
+-  case "$archive_cmds" in
++  case $archive_cmds in
+   *'~'*)
+     # FIXME: we may have to deal with multi-command sequences.
+     ;;
+--- kfocus-1.0.2.orig/admin/am_edit
++++ kfocus-1.0.2/admin/am_edit
+@@ -1,6 +1,6 @@
+-#!/usr/bin/perl
++#!/usr/bin/perl -w
+ 
+-# Expands the specilised KDE tags in Makefile.in to (hopefully) valid
++# Expands the specialised KDE tags in Makefile.in to (hopefully) valid
+ # make syntax.
+ # When called without file parameters, we work recursively on all Makefile.in
+ # in and below the current subdirectory. When called with file parameters,
+@@ -25,28 +25,12 @@
+ # The concept (and base code) for this program came from automoc,
+ # supplied by the following
+ #
+-# Matthias Ettrich <ettrich\@kde.org>      (The originator)
+-# Kalle Dalheimer <kalle\@kde.org>      (The original implementator)
++# Matthias Ettrich <ettrich at kde.org>      (The originator)
++# Kalle Dalheimer <kalle at kde.org>      (The original implementator)
+ # Harri Porten  <porten at tu-harburg.de>
+-# Alex Zepeda  <garbanzo at hooked.net>
++# Alex Zepeda  <jazepeda at pacbell.net>
+ # David Faure <faure at kde.org>
+ # Stephan Kulow <coolo at kde.org>
+-#
+-# I've puddled around with automoc and produced something different
+-# 1999-02-01 John Birch <jb.nz at writeme.com>
+-#       * Rewritten automoc to cater for more than just moc file expansion
+-#         Version 0.01 does the same as automoc at this stage.
+-# 1999-02-18 jb
+-#       * We must always write a Makefile.in file out even if we fail
+-#         because we need the "perl autokmake" in the AUTOMAKE so that a
+-#         "make" will regenerate the Makefile.in correctly.
+-#         Reworked moc file checking so that missing includes in cpp
+-#         will work and includes in cpp when using use_automoc will also
+-#         work.
+-# 1999-02-23 jb
+-#       * Added POFILE processing and changed the USE_AUTOMOC tag to
+-#         AUTO instead.
+-# ... See ChangeLog for more logs
+ 
+ use Cwd;
+ use File::Find;
+@@ -75,7 +59,6 @@
+ sub tag_LOCALINSTALL();
+ sub tag_IDLFILES();
+ sub tag_UIFILES();
+-sub tag_TOPLEVEL();
+ sub tag_SUBDIRS();
+ sub tag_ICON();
+ sub tag_CLOSURE();
+@@ -90,8 +73,8 @@
+ $start      = (times)[0]; # some stats for testing - comment out for release
+ $version    = "v0.2";
+ $errorflag  = 0;
+-$cppExt     = "*.cpp *.cc *.cxx *.C *.c++";           # used by grep
+-$hExt       = "*.h *.H *.hh *.hxx *.h++";             # used by grep
++$cppExt     = "(cpp|cc|cxx|C|c\\+\\+)";
++$hExt       = "(h|H|hh|hxx|hpp|h\\+\\+)";
+ $progId     = "KDE tags expanded automatically by " . basename($thisProg);
+ $automkCall = "\n";
+ $printname  = "";  # used to display the directory the Makefile is in
+@@ -99,6 +82,7 @@
+ $cleantarget = "clean";
+ $dryrun     = 0;
+ $pathoption = 0;
++$foreign_libtool = 0;
+ 
+ while (defined ($ARGV[0]))
+ {
+@@ -150,6 +134,11 @@
+ 	$use_final = 0;
+         $thisProg .= " --no-final";
+     }
++    elsif (/^--foreign-libtool$/)
++    {
++        $foreign_libtool = 1;
++        $thisProg .= " --foreign-libtool";
++    }
+     elsif (/^-n$/)
+     {
+     	$dryrun = 1;
+@@ -225,12 +214,11 @@
+     local %idlfiles = ();  # lists the idl files used for $program
+     local %globalmocs = ();# list of all mocfiles (in %mocFiles format)
+     local %important = (); # list of files to be generated asap
++    local %uiFiles = ();
+ 
+     local $allidls = "";
+-    local $alluis = "";
+     local $idl_output = "";# lists all idl generated files for cleantarget
+     local $ui_output = "";# lists all uic generated files for cleantarget
+-    local $ui_mocs = "";# lists all moc files associated with generated uic files
+ 
+     local %depedmocs = ();
+     
+@@ -262,8 +250,8 @@
+         $depedmocs{$program} = "";
+         $important{$program} = "";
+ 	tag_IDLFILES();             # Sorts out idl rules
+-	tag_UIFILES();             # Sorts out ui rules
+ 	tag_CLOSURE();
++	tag_UIFILES();             # Sorts out ui rules
+         tag_METASOURCES ();         # Sorts out the moc rules
+         if ($sources_changed{$program}) {
+             my $lookup = "$program" . '_SOURCES\s*=\s*(.*)';
+@@ -322,19 +310,22 @@
+ 
+     tag_POFILES ();             # language rules for po directory
+     tag_DOCFILES ();            # language rules for doc directories
+-    tag_TOPLEVEL ();            # language rules for po toplevel
+     tag_LOCALINSTALL();         # add $(DESTDIR) before all kde_ dirs
+     tag_ICON();
++    tag_SUBDIRS();
+ 
+     my $tmp = "force-reedit:\n";
+     $tmp   .= "\t$automkCall\n\tcd \$(top_srcdir) && perl $thisProg $printname\n\n";
+     appendLines($tmp);
+     
+     make_meta_classes();
++    tag_COMPILE_FIRST();
+     tag_FINAL() if (!$kdeopts{"nofinal"});
+ 
+     my $final_lines = "final:\n\t\$(MAKE) ";
++    my $final_install_lines = "final-install:\n\t\$(MAKE) ";
+     my $nofinal_lines = "no-final:\n\t\$(MAKE) ";
++    my $nofinal_install_lines = "no-final-install:\n\t\$(MAKE) ";
+ 
+     foreach $program (@programs) {
+         
+@@ -352,17 +343,21 @@
+             $new .= "\n\@KDE_USE_FINAL_TRUE\@$program\_OBJECTS = \$($program\_final\_OBJECTS)";
+             
+             $final_lines .= "$program\_OBJECTS=\"\$($program\_final_OBJECTS)\" ";
++            $final_install_lines .= "$program\_OBJECTS=\"\$($program\_final_OBJECTS)\" ";
+             $nofinal_lines .= "$program\_OBJECTS=\"\$($program\_nofinal\_OBJECTS)\" ";
++            $nofinal_install_lines .= "$program\_OBJECTS=\"\$($program\_nofinal_OBJECTS)\" ";
+         } else {
+             $new = "$program\_OBJECTS = " . $realObjs{$program};
+         }
+         substituteLine ($lookup, $new);
+     }
+     appendLines($final_lines . "all-am");
++    appendLines($final_install_lines . "install-am");
+     appendLines($nofinal_lines . "all-am");
++    appendLines($nofinal_install_lines . "install-am");
+     
+     my $lookup = 'DEP_FILES\s*=([^\n]*)';
+-    if ($MakefileData =~ /\n$lookup\n/) {
++    if ($MakefileData =~ /\n$lookup\n/o) {
+         $depfiles = $1;
+         
+         if ($dep_finals) {
+@@ -383,11 +378,24 @@
+     $cvs_lines .= "\t-rm -f *.rpo\n";
+     appendLines($cvs_lines);
+     $target_adds{"clean"} .= "kde-rpo-clean ";
++
++    # some strange people like to do a install-exec, and expect that also
++    # all modules are installed.  automake doesn't know this, so we need to move
++    # this here from install-data to install-exec.
++    if ($MakefileData =~ m/\nkde_module_LTLIBRARIES\s*=/) {
++      $target_adds{"install-exec-am"} .= "install-kde_moduleLTLIBRARIES";
++      my $lookup = 'install-data-am:\s*(.*)';
++      if ($MakefileData =~ /\n$lookup\n/) {
++        my $newdeps = $1;
++	$newdeps =~ s/\s*install-kde_moduleLTLIBRARIES\s*/ /g;
++	substituteLine($lookup, "install-data-am: " . $newdeps);
++      }
++    }
+     
+     my $lines = "";
+ 
+     foreach $add (keys %target_adds) {
+-        my $lookup = quotemeta($add) . ":\s*(.*)";
++	my $lookup = quotemeta($add) . ':([^\n]*)';
+         if ($MakefileData =~ /\n$lookup\n/) {
+             substituteLine($lookup, "$add: " . $target_adds{$add} . $1);
+         } else {
+@@ -402,8 +410,8 @@
+     
+     while ($found) {
+         if ($MakefileData =~ m/\n(.*)\$\(CXXFLAGS\)(.*)\n/) {
+-            my $vor = $1;
+-            my $nach = $2;
++            my $vor = $1;   # "vor" means before in German
++            my $nach = $2; # "nach" means after in German
+             my $lookup = quotemeta("$1\$(CXXFLAGS)$2");
+             my $replacement = "$1\$(KCXXFLAGS)$2";
+             $MakefileData =~ s/$lookup/$replacement/;
+@@ -415,21 +423,23 @@
+         }
+     }
+ 
+-    $lookup = '(\n[^#].*\$\(LIBTOOL\) --mode=link) (\$\(CXXLD\).*\$\(KCXXFLAGS\))';
++    if($foreign_libtool == 0) {
++        $lookup = '(\n[^#].*\$\(LIBTOOL\) --mode=link) (\$\(CXXLD\).*\$\(KCXXFLAGS\))';
+     
+-    if ($MakefileData =~ m/$lookup/ ) {
+-        $MakefileData =~ s/$lookup/$1 --tag=CXX $2/;
+-    }
++        if ($MakefileData =~ m/$lookup/ ) {
++            $MakefileData =~ s/$lookup/$1 --tag=CXX $2/;
++        }
+ 
+-    $lookup = '(\n[^#].*\$\(LIBTOOL\) --mode=compile) (\$\(CXX\).*\$\(KCXXFLAGS\))';
+-    if ($MakefileData =~ m/$lookup/ ) {
+-        $MakefileData =~ s/$lookup/$1 --tag=CXX $2/;
++        $lookup = '(\n[^#].*\$\(LIBTOOL\) --mode=compile) (\$\(CXX\).*\$\(KCXXFLAGS\))';
++        if ($MakefileData =~ m/$lookup/ ) {
++            $MakefileData =~ s/$lookup/$1 --tag=CXX $2/;
++        }
+     }
+ 
+     $MakefileData =~ s/\$\(KCXXFLAGS\)/\$\(CXXFLAGS\)/g;
+ 
+     $lookup = '(.*)cp -pr \$\$/\$\$file \$\(distdir\)/\$\$file(.*)';
+-    if ($MakefileData =~ m/$lookup/) {
++    if ($MakefileData =~ m/\n$lookup\n/) {
+         substituteLine($lookup, "$1cp -pr \$\$d/\$\$file \$(distdir)/\$\$file$2");
+     }
+ 
+@@ -455,18 +465,18 @@
+     open (FILEIN, $makefile)
+       || die "Could not open $makefileDir/$makefile: $!\n";
+     # Read the file
+-    while ( <FILEIN> )
+-    {
+-        $MakefileData .= $_;
+-        if ($_ =~ /\r\n$/) {
+-            die "DOS-Linefeeds within $makefileDir/$makefile!\n";
+-        }
+-    }
++    # stat(FILEIN)[7] might look more elegant, but is slower as it 
++    # requires stat'ing the file
++    seek(FILEIN, 0, 2);
++    my $fsize = tell(FILEIN);
++    seek(FILEIN, 0, 0);
++    read FILEIN, $MakefileData, $fsize;
+     close FILEIN;
++    print "DOS CRLF within $makefileDir/$makefile!\n" if($MakefileData =~ y/\r//d);
+ 
+     # Remove the line continuations, but keep them marked
+     # Note: we lose the trailing spaces but that's ok.
+-    $MakefileData =~ s/\\\s*\n/\034/g;
++    $MakefileData =~ s/\\\s*\n\s*/\034/g;
+ 
+     # If we've processed the file before...
+     restoreMakefile ()      if ($MakefileData =~ /$progId/);
+@@ -480,6 +490,7 @@
+     %kdeopts = ();
+     $kdeopts{"foreign"} = 0;
+     $kdeopts{"qtonly"} = 0;
++    $kdeopts{"foreign-libtool"} = $foreign_libtool;
+     $kdeopts{"nofinal"} = !$use_final; # default
+ 
+     if ($MakefileData =~ /\nKDE_OPTIONS\s*=\s*([^\n]*)\n/) {
+@@ -511,9 +522,8 @@
+ 
+     while ($MakefileData =~ /\n\.SUFFIXES:([^\n]+)\n/g) {
+ 	my @list=split(' ', $1);
+-	my $extions = " " . $cppExt . " ";
+ 	foreach $ext (@list) {
+-	    if ($extions =~ / \*\Q$ext\E /) {
++	    if ($ext =~ /^\.$cppExt$/) {
+ 		$cxxsuffix = $ext;
+ 		$cxxsuffix =~ s/\.//g;
+ 		print STDOUT "will use suffix $cxxsuffix\n" if ($verbose);
+@@ -540,17 +550,21 @@
+         }
+         
+         next if ($ocv);
+-        
++
+         $program =~ s/^am_// if ($program =~ /^am_/);
+         
++        my $sourceprogram = $program;
++        $sourceprogram =~ s/\@am_/\@/ if($sourceprogram =~ /^.*\@am_.+/);
++        
+         print STDOUT "found program $program\n" if ($verbose);
+         push(@programs, $program);
+         
+         $realObjs{$program} = $objs;
+         
+-        if ($MakefileData =~ /\n$program\_SOURCES\s*=\s*(.*)\n/) {
++        if ($MakefileData =~ /\n$sourceprogram\_SOURCES\s*=\s*(.*)\n/) {
+             $sources{$program} = $1;
+-        } else {
++        } 
++        else {
+             $sources{$program} = "";
+             print STDERR "found program with no _SOURCES: $program\n";
+         }
+@@ -566,14 +580,12 @@
+     }
+     
+     my $lookup = '\nDEPDIR\s*=.*';
+-    if ($MakefileData !~ /($lookup)\n/) {
++    if ($MakefileData !~ /($lookup)\n/o) {
+         $lookup = '\nbindir\s*=.*';
+         if ($MakefileData =~ /($lookup)\n/) {
+             substituteLine ($lookup, "DEPDIR = .deps\n$1");
+         }
+-    } else {
+-        print STDERR "$printname defines DEPDIR. This means you're using automake > 1.4 - this is not supported!\n";
+-    }
++    } 
+ 
+     my @marks = ('MAINTAINERCLEANFILES', 'CLEANFILES', 'DISTCLEANFILES');
+     foreach $mark (@marks) {
+@@ -598,7 +610,7 @@
+ sub tag_META_INCLUDES ()
+ {
+     my $lookup = '[^=\n]*META_INCLUDES\s*=\s*(.*)';
+-    return 1    if ($MakefileData !~ /($lookup)\n/);
++    return 1    if ($MakefileData !~ /($lookup)\n/o);
+     print STDOUT "META_INCLUDE processing <$1>\n"       if ($verbose);
+ 
+     my $headerStr = $2;
+@@ -657,13 +669,9 @@
+             
+             # See if this file contains c++ code. (ie Just check the files suffix against
+             my $suffix_is_cxx = 0;
+-            foreach $cxx_suffix (split(' ', $cppExt)) {
+-                $cxx_suffix =~ s/^\*\.//;
+-                $cxx_suffix = quotemeta($cxx_suffix);
+-                if ($suffix =~ $cxx_suffix) {
+-                    $suffix_is_cxx = 1;
+-                    last; # $cxx_suffix
+-                }
++            if($suffix =~ /($cppExt)$/) {
++              $cxxsuffix = $1;
++              $suffix_is_cxx = 1;
+             }
+             
+             my $mocfiles_in = ($suffix eq $cxxsuffix) &&
+@@ -674,8 +682,8 @@
+             if ((@sourcelist == 1 && !$mocfiles_in) || $suffix_is_cxx != 1 ) {
+                 
+                 # we support IDL on our own
+-                if ($suffix =~ /^skel$/ || $suffix =~ /^stub/ || $suffix =~ /^h$/
+-                    || $suffix =~ /^ui$/ ) {
++                if ($suffix =~ /^skel$/ || $suffix =~ /^stub/ || $suffix =~ /^signals/ 
++                    || $suffix =~ /^h$/ || $suffix =~ /^ui$/ ) {
+                     next;
+                 }
+                 
+@@ -707,6 +715,7 @@
+             if ($mocfiles_in) {
+                 $handling .= $depedmocs{$program};
+                 foreach $mocfile (split(' ', $depedmocs{$program})) {
++                   
+                     if ($mocfile =~ m/\.$suffix$/) {
+                         $mocsources .= " " . $mocfile;
+                     }
+@@ -750,6 +759,42 @@
+     }
+ }
+ 
++#-----------------------------------------------------------------------------
++
++sub tag_COMPILE_FIRST()
++{
++  foreach $program (@programs) {
++    my $lookup = "$program" . '_COMPILE_FIRST\s*=\s*(.*)';
++    if ($MakefileData =~ m/\n$lookup\n/) {
++      my @compilefirst = split(/[\s\034]+/, $1);
++      my @progsources = split(/[\s\034]+/, $sources{$program});
++      my %donesources = ();
++      $handling = "";
++      foreach $source (@progsources) {
++        my @deps  = ();
++        my $sdeps = "";
++        if (-f $source) {
++          $sdeps = "\$(srcdir)/$source";
++        } else {
++          $sdeps = "$source";
++        }
++        foreach $depend (@compilefirst) {
++          next if ($source eq $depend);
++          # avoid cyclic dependencies
++          next if defined($donesources{$depend});
++          push @deps, $depend;
++        }
++        $handling .= "$sdeps: " . join(' ', @deps) . "\n" if (@deps);
++        $donesources{$source} = 1;
++      }
++      appendLines($handling) if (length($handling));
++    }
++  }
++}
++
++#-----------------------------------------------------------------------------
++
++
+ # Organises the list of headers that we'll use to produce moc files
+ # from.
+ sub tag_METASOURCES ()
+@@ -773,7 +818,7 @@
+ 	$lookup = $program . '_METASOURCES\s*=\s*(.*)';
+ 	if ($MakefileData !~ /\n($lookup)\n/) {
+ 	    $lookup = 'METASOURCES\s*=\s*(.*)';
+-	    return 1    if ($MakefileData !~ /\n($lookup)\n/);
++	    return 1    if ($MakefileData !~ /\n($lookup)\n/o);
+ 	    $found = $1;
+ 	    $metasourceTags = 0; # we can use the general target only once
+ 	} else {
+@@ -791,7 +836,7 @@
+     return 1    if (findMocCandidates ());
+     
+     if ($postEqual =~ /AUTO\s*(\S*)|USE_AUTOMOC\s*(\S*)/)
+-      {
++    {
+ 	print STDERR "$printname: the argument for AUTO|USE_AUTOMOC is obsolete" if ($+);
+ 	$mocExt = ".moc.$cxxsuffix";
+ 	$haveAutomocTag = 1;
+@@ -815,7 +860,7 @@
+         $realObjs{$program} .= "\034" . join ($ext, @newObs) . $ext;
+         $depedmocs{$program} = join (".moc.$cxxsuffix " , @newObs) . ".moc.$cxxsuffix";
+         foreach $file (@newObs) {
+-            $dep_files .= " \$(DEPDIR)/$file.moc.P";
++            $dep_files .= " \$(DEPDIR)/$file.moc.P" if($dep_files !~/$file.moc.P/);
+         }
+     }
+     if (@deped) {
+@@ -833,8 +878,8 @@
+ # Errors are logged in the global $errorflags
+ sub tag_AUTOMAKE ()
+ {
+-    my $lookup = '.*cd \$\(top_srcdir\)\s+&&\s+\$\(AUTOMAKE\)(.*)';
+-    return 1    if ($MakefileData !~ /($lookup)/);
++    my $lookup = '.*cd \$\(top_srcdir\)\s+&&[\s\034]+\$\(AUTOMAKE\)(.*)';
++    return 1    if ($MakefileData !~ /\n($lookup)\n/);
+     print STDOUT "AUTOMAKE processing <$1>\n"        if ($verbose);
+ 
+     my $newLine = $1."\n\tcd \$(top_srcdir) && perl $thisProg $printname";
+@@ -845,18 +890,8 @@
+ 
+ #-----------------------------------------------------------------------------
+ 
+-sub tag_TOPLEVEL()
++sub handle_TOPLEVEL()
+ {
+-    my $lookup = 'TOPLEVEL_LANG\s*=\s*(\S+)';
+-    return 1 if ($MakefileData !~ /\n$lookup\n/);
+-    my $lang = $1;
+-
+-    if (tag_SUBDIRS()) {
+-        print STDERR "Error: TOPLEVEL_LANG without SUBDIRS = \$(AUTODIRS) in $printname\n";
+-        $errorflag = 1;
+-        return 1;
+-    }
+-    
+     my $pofiles = "";
+     my @restfiles = ();
+     opendir (THISDIR, ".");
+@@ -866,22 +901,23 @@
+         next if ($entry eq "CVS" || $entry =~ /^\./  || $entry =~ /^Makefile/ || $entry =~ /~$/ || $entry =~ /^\#.*\#$/ || $entry =~ /.gmo$/);
+                  
+         if ($entry =~ /\.po$/) {
+-            $pofiles .= "$entry ";
+-            next;
++             next;
+         }
+         push(@restfiles, $entry);
+     }
+     closedir (THISDIR);
+-    
+-    print STDOUT "pofiles found = $pofiles\n"   if ($verbose);
+-    handle_POFILES($pofiles, '$(TOPLEVEL_LANG)') if ($pofiles);
+-    
++            
+     if (@restfiles) {
+         $target_adds{"install-data-am"} .= "install-nls-files ";
+         $lines = "install-nls-files:\n";
+-        $lines .= "\t\$(mkinstalldirs) \$(DESTDIR)\$(kde_locale)/$lang\n";
++        $lines .= "\t\$(mkinstalldirs) \$(DESTDIR)\$(kde_locale)/$kdelang\n";
++        for $file (@restfiles) {
++            $lines .= "\t\$(INSTALL_DATA) \$\(srcdir\)/$file \$(DESTDIR)\$(kde_locale)/$kdelang/$file\n";
++        }
++	$target_adds{"uninstall"} .= "uninstall-nls-files ";
++        $lines .= "uninstall-nls-files:\n";
+         for $file (@restfiles) {
+-            $lines .= "\t\$(INSTALL_DATA) \$\(srcdir\)/$file \$(DESTDIR)\$(kde_locale)/$lang/$file\n";
++            $lines .= "\t-rm -f \$(DESTDIR)\$(kde_locale)/$kdelang/$file\n";
+         }
+         appendLines($lines);
+     }
+@@ -897,7 +933,7 @@
+     return 1;
+   }
+ 
+-  my $subdirs;
++  my $subdirs = ".";
+ 
+   opendir (THISDIR, ".");
+   foreach $entry (readdir(THISDIR)) {
+@@ -923,8 +959,10 @@
+     foreach $source (@psources) {
+         
+         my $skel = ($source =~ m/\.skel$/);
++        my $stub = ($source =~ m/\.stub$/);
++        my $signals = ($source =~ m/\.signals$/);
+         
+-        if ($source =~ m/\.stub$/ || $skel) {
++        if ($stub || $skel || $signals) {
+             
+             my $qs = quotemeta($source);
+             $sources{$program} =~ s/$qs//;
+@@ -932,14 +970,16 @@
+             
+             print STDOUT "adding IDL file $source\n" if ($verbose);
+             
+-            $source =~ s/\.(stub|skel)$//;
++            $source =~ s/\.(stub|skel|signals)$//;
+             
+             my $sourcename;
+             
+             if ($skel) {
+                 $sourcename = "$source\_skel";
+-            } else {
++            } elsif ($stub) {
+                 $sourcename = "$source\_stub";
++            } else {
++                $sourcename = "$source\_signals";
+             }
+             
+             my $sourcedir = '';
+@@ -962,13 +1002,21 @@
+             
+             if ($allidls !~ /$sourcename/) {
+                 
++                $dep_lines_tmp = "";
++
+                 if ($skel) {
+                     $dep_lines .= "$sourcename.$cxxsuffix: $source.kidl\n";
+-                    $dep_lines .= "\t\$(DCOPIDL2CPP) --c++-suffix $cxxsuffix --no-stub $source.kidl\n";
+-                } else {
++                    $dep_lines .= "\t\$(DCOPIDL2CPP) --c++-suffix $cxxsuffix --no-signals --no-stub $source.kidl\n";
++                } elsif ($stub) {
++                    $dep_lines_tmp = "\t\$(DCOPIDL2CPP) --c++-suffix $cxxsuffix --no-signals --no-skel $source.kidl\n";
++                } else { # signals
++                    $dep_lines_tmp = "\t\$(DCOPIDL2CPP) --c++-suffix $cxxsuffix --no-stub --no-skel $source.kidl\n";
++                }
++
++                if ($stub || $signals) {
+                     $target_adds{"$sourcename.$cxxsuffix"} .= "$sourcename.h ";
+                     $dep_lines .= "$sourcename.h: $source.kidl\n";
+-                    $dep_lines .= "\t\$(DCOPIDL2CPP) --c++-suffix $cxxsuffix --no-skel $source.kidl\n";
++                    $dep_lines .= $dep_lines_tmp;
+                 }
+                 
+                 $allidls .= $sourcename . " ";
+@@ -988,7 +1036,7 @@
+             push(@cleanfiles, "$sourcename.$cxxsuffix");
+             push(@cleanfiles, "$sourcename.h");
+             push(@cleanfiles, "$sourcename.kidl");
+-            $dep_files .= " \$(DEPDIR)/$sourcename.P";
++            $dep_files .= " \$(DEPDIR)/$sourcename.P" if ($dep_files !~/$sourcename.P/);
+         }
+     }
+     if ($dep_lines) {
+@@ -1038,13 +1086,13 @@
+                 $sourcedir = '$(srcdir)/';
+             }
+ 
+-            if ($alluis !~ /$source/) {
++            if (!$uiFiles{$source}) {
+ 
+                 $dep_lines .= "$source.$cxxsuffix: $sourcedir$source.ui $source.h $source.moc\n";
+                 $dep_lines .= "\trm -f $source.$cxxsuffix\n";
+                 if (!$kdeopts{"qtonly"}) {
+                     $dep_lines .= "\techo '#include <klocale.h>' > $source.$cxxsuffix\n";
+-                    $dep_lines .= "\t\$(UIC) -tr i18n -i $source.h $sourcedir$source.ui | sed -e \"s,i18n( \\\"\\\" ),QString::null,g\" >> $source.$cxxsuffix || rm -f $source.$cxxsuffix\n";
++                    $dep_lines .= "\t\$(UIC) -tr \${UIC_TR} -i $source.h $sourcedir$source.ui | sed -e \"s,\${UIC_TR}( \\\"\\\" ),QString::null,g\" | sed -e \"s,\${UIC_TR}( \\\"\\\"\\, \\\"\\\" ),QString::null,g\" >> $source.$cxxsuffix || rm -f $source.$cxxsuffix\n";
+                 } else {
+                     $dep_lines .= "\t\$(UIC) -i $source.h $sourcedir$source.ui > $source.$cxxsuffix || rm -f $source.$cxxsuffix\n";
+                 }
+@@ -1054,9 +1102,9 @@
+                 $dep_lines .= "$source.moc: $source.h\n";
+                 $dep_lines .= "\t\$(MOC) $source.h -o $source.moc\n";
+ 
+-                $alluis .= "$source ";
+-                $ui_mocs .= " $source.moc";
++		$uiFiles{$source} = 1;
+                 $depedmocs{$program} .= " $source.moc";
++                $globalmocs{$source} = "\035$source.h\035$source.cpp";
+             }
+             
+             if ($program =~ /_la$/) {
+@@ -1071,8 +1119,7 @@
+             push(@cleanfiles, "$source.$cxxsuffix");
+             push(@cleanfiles, "source.h");
+             push(@cleanfiles, "$source.moc");
+-
+-            $dep_files .= " \$(DEPDIR)/$source.P";
++            $dep_files .= " \$(DEPDIR)/$source.P" if($dep_files !~/$source.P/ );
+         }
+     }
+     if ($dep_lines) {
+@@ -1086,7 +1133,7 @@
+     my $install = "";
+     my $uninstall = "";
+ 
+-    while ($MakefileData =~ /\n$lookup/g) {
++    while ($MakefileData =~ /\n$lookup/og) {
+         my $destdir;
+         if ($1 eq "KDE") {
+             $destdir = "kde_icondir";
+@@ -1113,11 +1160,11 @@
+             if ( $iconauto )
+               {
+                   push(@files, $entry)
+-                    if ($entry =~ /\.xpm/ || $entry =~ /\.png/);
++                    if ($entry =~ /\.xpm/ || $entry =~ /\.png/ || $entry =~ /\.mng/);
+               } else {
+                   foreach $appname (@appnames) {
+                       push(@files, $entry)
+-                        if ($entry =~ /-$appname\.xpm/ || $entry =~ /-$appname\.png/);
++                        if ($entry =~ /-$appname\.xpm/ || $entry =~ /-$appname\.png/ || $entry =~ /-$appname\.mng/);
+                   }
+               }
+         }
+@@ -1128,7 +1175,7 @@
+         foreach $file (@files) {
+             my $newfile = $file;
+             my $prefix = $file;
+-            $prefix =~ s/\.(png|xpm)$//;
++            $prefix =~ s/\.(png|xpm|mng)$//;
+             my $appname = $prefix;
+             $appname =~ s/^[^-]+-// if ($appname =~ /-/) ;
+             $appname =~ s/^[^-]+-// if ($appname =~ /-/) ;
+@@ -1172,10 +1219,11 @@
+                'hi22' => 'hicolor/22x22',
+                'hi32' => 'hicolor/32x32',
+                'hi48' => 'hicolor/48x48',
++               'hi64' => 'hicolor/64x64',
+                'hisc' => 'hicolor/scalable'
+               );
+             
+-            $newfile =~ s at .*-($appname\.(png|xpm?))@$1@;
++            $newfile =~ s at .*-($appname\.(png|xpm|mng?))@$1@;
+             
+             if (! defined $dir_hash{$prefix}) {
+                 print STDERR "unknown icon prefix $prefix in $printname\n";
+@@ -1200,7 +1248,7 @@
+             
+         }
+     }
+-    
++
+     if (length($install)) {
+         $target_adds{"install-data-am"} .= "install-kde-icons ";
+         $target_adds{"uninstall-am"} .= "uninstall-kde-icons ";
+@@ -1228,7 +1276,7 @@
+     }
+   appendLines ($tmp);
+   my $lookup = 'POFILES\s*=([^\n]*)';
+-  if ($MakefileData !~ /\n$lookup/) {
++  if ($MakefileData !~ /\n$lookup/o) {
+     appendLines("$pofileLine\nGMOFILES =$allgmofiles");
+   } else {
+     substituteLine ($lookup, "$pofileLine\nGMOFILES =$allgmofiles");
+@@ -1242,7 +1290,7 @@
+ 	$target_adds{"maintainer-clean"} .= "clean-nls ";
+ 
+ 	$lookup = 'DISTFILES\s*=\s*(.*)';
+-	if ($MakefileData =~ /\n$lookup\n/) {
++	if ($MakefileData =~ /\n$lookup\n/o) {
+ 	  $tmp = "DISTFILES = \$(GMOFILES) \$(POFILES) $1";
+ 	  substituteLine ($lookup, $tmp);
+ 	}
+@@ -1251,7 +1299,6 @@
+   $target_adds{"install-data-am"} .= "install-nls ";
+ 
+   $tmp = "install-nls:\n";
+-  $tmp .= "install-nls:\n";
+   if ($lang) {
+     $tmp  .= "\t\$(mkinstalldirs) \$(DESTDIR)\$(kde_locale)/$lang/LC_MESSAGES\n";
+   }
+@@ -1300,7 +1347,9 @@
+   $tmp .= "\tfor file in \$(POFILES); do \\\n";
+   $tmp .= "\t  cp \$(srcdir)/\$\$file \$(distdir); \\\n";
+   $tmp .= "\tdone\n";
+-  $tmp .= "\ttest -z \"\$(GMOFILES)\" || cp \$(GMOFILES) \$(distdir)\n";
++  $tmp .= "\tfor file in \$(GMOFILES); do \\\n";
++  $tmp .= "\t  cp \$(srcdir)/\$\$file \$(distdir); \\\n";
++  $tmp .= "\tdone\n";
+ 
+   appendLines ($tmp);
+ 
+@@ -1317,7 +1366,7 @@
+ sub tag_POFILES ()
+ {
+     my $lookup = 'POFILES\s*=([^\n]*)';
+-    return 1    if ($MakefileData !~ /\n$lookup/);
++    return 1    if ($MakefileData !~ /\n$lookup/o);
+     print STDOUT "POFILES processing <$1>\n"   if ($verbose);
+ 
+     my $tmp = $1;
+@@ -1335,10 +1384,12 @@
+     if ($tmp =~ /^\s*AUTO\s*$/)
+     {
+         opendir (THISDIR, ".");
+-	next if ($entry eq "CVS" || $entry =~ /^\./  || $entry =~ /^Makefile/ || $entry =~ /~$/ || $entry =~ /^#.*#$/);
+ 	$pofiles =  join(" ", grep(/\.po$/, readdir(THISDIR)));
+         closedir (THISDIR);
+         print STDOUT "pofiles found = $pofiles\n"   if ($verbose);
++	if (-f "charset" && -f "kdelibs.po") {
++	    handle_TOPLEVEL();
++	}
+     }
+     else
+     {
+@@ -1394,7 +1445,7 @@
+       || $line =~ /^\s*(\@.*\@)*\s*\$\(INSTALL\S*\)/
+       || $line =~ /^\s*(\@.*\@)*\s*(-?rm.*) \S*$/)
+   {
+-    $line =~ s/^(.*) ([^\s]*)\s*$/$1 \$(DESTDIR)$2/ if ($line !~ /\$\(DESTDIR\)/);
++    $line =~ s/^(.*) ([^\s]+)\s*$/$1 \$(DESTDIR)$2/ if ($line !~ /\$\(DESTDIR\)/);
+   }
+ 
+   if ($line ne $_[0]) {
+@@ -1420,7 +1471,7 @@
+     my $lines = "$closure: \$($program\_OBJECTS) \$($program\_DEPENDENCIES)\n";
+     $lines .= "\t\@echo \"int main() {return 0;}\" > $program\_closure.$cxxsuffix\n";
+     $lines .= "\t\@\$\(LTCXXCOMPILE\) -c $program\_closure.$cxxsuffix\n";
+-    $lines .= "\t\@\$\(CXXLINK\) $program\_closure.lo \$($program\_LDFLAGS) \$($program\_OBJECTS) \$($program\_LIBADD) \$(LIBS)\n";
++    $lines .= "\t\$\(CXXLINK\) $program\_closure.lo \$($program\_LDFLAGS) \$($program\_OBJECTS) \$($program\_LIBADD) \$(LIBS)\n";
+     $lines .= "\t\@rm -f $program\_closure.* $closure\n";
+     $lines .= "\t\@echo \"timestamp\" > $closure\n";
+     $lines .= "\n";
+@@ -1441,11 +1492,13 @@
+         next if ($entry eq "CVS" || $entry =~ /^\./  || $entry =~ /^Makefile$$/ || $entry =~ /~$/ || $entry =~ /^\#.*\#$/);
+         next if (! -f $entry);
+         next if ($entry =~ /\.moc/ || $entry =~ /\.lo$/ || $entry =~ /\.la$/ || $entry =~ /\.o/);
++        next if ($entry =~ /.+meta_unload.$cppExt$/ || $entry =~ /\.all_$cppExt\.$cppExt$/);
+         $foundfiles{$entry} = 1;
+     }
+     closedir (THISDIR);
+ 
+-    my @marks = ("EXTRA_DIST", "DIST_COMMON", '\S*_SOURCES', '\S*_HEADERS', 'MAINTAINERCLEANFILES', 'CLEANFILES', 'DISTCLEANFILES', '\S*_OBJECTS');
++    # doing this for MAINTAINERCLEANFILES would be wrong
++    my @marks = ("EXTRA_DIST", "DIST_COMMON", '\S*_SOURCES', '\S*_HEADERS', 'CLEANFILES', 'DISTCLEANFILES', '\S*_OBJECTS');
+     foreach $mark (@marks) {
+         while ($MakefileData =~ /\n($mark)\s*=\s*([^\n]*)/g) {
+             foreach $file (split('[\034\s]', $2)) {
+@@ -1470,7 +1523,7 @@
+         print "KDE_DIST $printname $KDE_DIST\n" if ($verbose);
+         
+         my $lookup = "DISTFILES *=(.*)";
+-        if ($MakefileData =~ /\n$lookup\n/) {
++        if ($MakefileData =~ /\n$lookup\n/o) {
+             substituteLine($lookup, "KDE_DIST=$KDE_DIST\n\nDISTFILES=$1 \$(KDE_DIST)\n");
+         }
+     }
+@@ -1494,11 +1547,9 @@
+     $target_adds{"all"} .= "docs-am ";
+ 
+     my $lookup = 'KDE_DOCS\s*=\s*([^\n]*)';
+-    goto nodocs    if ($MakefileData !~ /\n$lookup/);
++    goto nodocs    if ($MakefileData !~ /\n$lookup/o);
+     print STDOUT "KDE_DOCS processing <$1>\n"   if ($verbose);
+ 
+-    tag_SUBDIRS();
+-
+     my $tmp = $1;
+ 
+     # Either find the files in the directory (AUTO) or use
+@@ -1536,33 +1587,29 @@
+     if ($files =~ /(^| )index\.docbook($| )/) {
+       
+       my $lines = "";
+-      my $lookup = 'KDB2HTML\s*=';
+-      #if ($MakefileData !~ /\n($lookup)/) {
+-#	$lines = "KDB2HTML = \$(SHELL) /\$(kde_bindir)/kdb2html\n";
+-#      }
+-      $lines .= "docs-am: HTML HTML/index.html\n";
+-      $lines .= "\n";
+-      $lines .= "HTML:\n";
+-      $lines .= "\ttest -d HTML || mkdir HTML\n";
+-      $lines .= "\n";
+-      $lines .= "HTML/index.html: HTML index.docbook\n";
+-      $lines .= "\t\@test -d HTML && rm -r HTML\n";
+-      $lines .= "\t\$(KDB2HTML) \$(srcdir)/index.docbook\n";
++      my $lookup = 'MEINPROC\s*=';
++      if ($MakefileData !~ /\n($lookup)/) {
++	$lines = "MEINPROC=/\$(kde_bindir)/meinproc\n";
++      }
++      $lookup = 'KDE_XSL_STYLESHEET\s*=';
++      if ($MakefileData !~ /\n($lookup)/) {
++        $lines .= "KDE_XSL_STYLESHEET=/\$(kde_datadir)/ksgmltools2/customization/kde-chunk.xsl\n";
++      }
++      $lookup = '\nindex.cache.bz2:';
++      if ($MakefileData !~ /\n($lookup)/) {
++         $lines .= "index.cache.bz2: \$(srcdir)/index.docbook \$(KDE_XSL_STYLESHEET) $files\n";
++         $lines .= "\t-\@if test -n \"\$(MEINPROC)\"; then echo \$(MEINPROC) --check --cache index.cache.bz2 \$(srcdir)/index.docbook; \$(MEINPROC) --check --cache index.cache.bz2 \$(srcdir)/index.docbook; fi\n";
++         $lines .= "\n";
++      }
++ 
++      $lines .= "docs-am: index.cache.bz2\n";  
+       $lines .= "\n";
+-      $lines .= "install-docs:\n";
++      $lines .= "install-docs: docs-am install-nls\n";
+       $lines .= "\t\$(mkinstalldirs) \$(DESTDIR)\$(kde_htmldir)/$kdelang/$appname\n";
+-      $lines .= "\t-\@filelist=\"\" ;\\\n";
+-      $lines .= "\tif test -d HTML; then \\\n";
+-      $lines .= "\t  filelist=`(cd HTML && ls -1 * .anchors 2> /dev/null)`; \\\n";
+-      $lines .= "\t  dir=HTML; \\\n";
+-      $lines .= "\telse if test -d \$(srcdir)/HTML; then \\\n";
+-      $lines .= "\t  filelist=`(cd \$(srcdir)/HTML && ls -1 * .anchors 2> /dev/null)`; \\\n";
+-      $lines .= "\t  dir=\"\$(srcdir)/HTML\" ;\\\n";
+-      $lines .= "\tfi ; fi ;\\\n";
+-      $lines .= "\tfor file in \$\$filelist; do if test -f \$\$dir/\$\$file; then \\\n";
+-      $lines .= "\techo \$(INSTALL_DATA) \$\$dir/\$\$file \$(DESTDIR)\$(kde_htmldir)/$kdelang/$appname/\$\$file ;\\\n";
+-      $lines .= "\t\$(INSTALL_DATA) \$\$dir/\$\$file \$(DESTDIR)\$(kde_htmldir)/$kdelang/$appname/\$\$file; \\\n";
+-      $lines .= "\tfi; done\n";
++      $lines .= "\t\@if test -f index.cache.bz2; then \\\n";
++      $lines .= "\techo \$(INSTALL_DATA) index.cache.bz2 \$(DESTDIR)\$(kde_htmldir)/$kdelang/$appname/; \\\n";
++      $lines .= "\t\$(INSTALL_DATA) index.cache.bz2 \$(DESTDIR)\$(kde_htmldir)/$kdelang/$appname/; \\\n";
++      $lines .= "\tfi\n";
+       $lines .= "\t-rm -f \$(DESTDIR)\$(kde_htmldir)/$kdelang/$appname/common\n";
+       $lines .= "\t\$(LN_S) \$(kde_libs_htmldir)/$kdelang/common \$(DESTDIR)\$(kde_htmldir)/$kdelang/$appname/common\n";
+ 
+@@ -1570,11 +1617,15 @@
+       $lines .= "uninstall-docs:\n";
+       $lines .= "\t-rm -rf \$(kde_htmldir)/$kdelang/$appname\n";
+       $lines .= "\n";
++      $lines .= "clean-docs:\n";
++      $lines .= "\t-rm -f index.cache.bz2\n";
++      $lines .= "\n";
+       $target_adds{"install-data-am"} .= "install-docs ";
+       $target_adds{"uninstall"} .= "uninstall-docs ";
++      $target_adds{"clean-am"} .= "clean-docs ";
+       appendLines ($lines);
+     } else {
+-      appendLines("docs-am:\n");
++      appendLines("docs-am: $files\n");
+     }
+ 
+     $target_adds{"install-data-am"} .= "install-nls";
+@@ -1588,7 +1639,7 @@
+     $tmp .= "\tdone\n";
+     if ($appname eq 'common') {
+       $tmp .= "\t\@echo \"merging common and language specific dir\" ;\\\n";
+-	  $tmp .= "\tif test ! -e \$(kde_htmldir)/en/common/kde-common.css; then echo 'no english docs found in \$(kde_htmldir)/en/common/'; exit 1; fi \n";
++      $tmp .= "\tif test ! -e \$(kde_htmldir)/en/common/kde-common.css; then echo 'no english docs found in \$(kde_htmldir)/en/common/'; exit 1; fi \n";
+       $tmp .= "\t\@com_files=`cd \$(kde_htmldir)/en/common && echo *` ;\\\n";
+       $tmp .= "\tcd \$(DESTDIR)\$(kde_htmldir)/$kdelang/common ;\\\n";
+       $tmp .= "\tif test -n \"\$\$com_files\"; then for p in \$\$com_files ; do \\\n";
+@@ -1626,22 +1677,37 @@
+ # are candidates for "moc-ing".
+ sub findMocCandidates ()
+ {
+-    my @list = ();
+     foreach $dir (@headerdirs)
+     {
+-        chdir ($dir);
+-        @list = `grep -l '^.*Q_OBJECT' $hExt 2> /dev/null`;
+-        chdir ($makefileDir);
+-
++        my @list = ();
++        opendir (SRCDIR, "$dir");
++        @hFiles = grep { /.+\.$hExt$/o && !/^\./ } readdir(SRCDIR);
++        closedir SRCDIR;
++        foreach $hf (@hFiles)
++        {
++            next if ($hf =~ /^\.\#/);
++	    $hf =~ /(.*)\.[^\.]*$/;          # Find name minus extension
++	    next if ($uiFiles{$1});
++            open (HFIN, "$dir/$hf") || die "Could not open $dir/$hf: $!\n";
++            my $hfsize = 0;
++            seek(HFIN, 0, 2);
++            $hfsize = tell(HFIN);
++            seek(HFIN, 0, 0);
++            read HFIN, $hfData, $hfsize;
++            close HFIN;
++            # push (@list, $hf) if(index($hfData, "Q_OBJECT") >= 0); ### fast but doesn't handle //Q_OBJECT
++            if ( $hfData =~ /{([^}]*)Q_OBJECT/s ) {              ## handle " { friend class blah; Q_OBJECT "
++                push (@list, $hf) unless $1 =~ m://[^\n]*Q_OBJECT[^\n]*$:s;  ## handle "// Q_OBJECT"
++            }
++        }
+         # The assoc array of root of headerfile and header filename
+         foreach $hFile (@list)
+         {
+-            chomp ($hFile);
+             $hFile =~ /(.*)\.[^\.]*$/;          # Find name minus extension
+             if ($mocFiles{$1})
+             {
+-                print STDERR "Warning: Multiple header files found for $1\n";
+-                next;                           # Use the first one
++              print STDERR "Warning: Multiple header files found for $1\n";
++              next;                           # Use the first one
+             }
+             $mocFiles{$1} = "$dir\035$hFile";   # Add relative dir
+         }
+@@ -1688,38 +1754,46 @@
+ # The cpp files get appended to the header file separated by \035
+ sub checkMocCandidates ()
+ {
+-    my @cppFiles = ();
+-
+-    foreach $mocFile (keys (%mocFiles))
++    my @cppFiles;
++    my $cpp2moc;  # which c++ file includes which .moc files
++    my $moc2cpp;  # which moc file is included by which c++ files
++
++    return unless (keys %mocFiles);
++    opendir(THISDIR, ".") || return;
++    @cppFiles = grep { /.+\.$cppExt$/o  && !/.+\.moc\.$cppExt$/o
++                         && !/.+\.all_$cppExt\.$cppExt$/o
++			 && !/^\./  } readdir(THISDIR);
++    closedir THISDIR;
++    return unless (@cppFiles);
++    my $files = join (" ", @cppFiles);
++    $cpp2moc = {};
++    $moc2cpp = {};
++    foreach $cxxf (@cppFiles)
++    {
++      open (CXXFIN, $cxxf) || die "Could not open $cxxf: $!\n";
++      seek(CXXFIN, 0, 2);
++      my $cxxfsize = tell(CXXFIN);
++      seek(CXXFIN, 0, 0);
++      read CXXFIN, $cxxfData, $cxxfsize;
++      close CXXFIN;
++      while(($cxxfData =~ m/^[ \t]*\#include\s*[<\"](.*\.moc)[>\"]/gm)) {
++	$cpp2moc->{$cxxf}->{$1} = 1;
++	$moc2cpp->{$1}->{$cxxf} = 1;
++      }
++    }
++    foreach my $mocFile (keys (%mocFiles))
+     {
+-        # Find corresponding c++ files that includes the moc file
+-        @cppFiles = `echo \`ls -1d $cppExt 2> /dev/null | egrep -v "\.moc\.$cxxsuffix\$" | egrep -v "all_$cxxsuffix\.$cxxsuffix\$"\``;
+-
+-        if (@cppFiles)  {
+-            my $files = join(" ", @cppFiles);
+-            @cppFiles =
+-              `egrep -l "^[ 	]*#include[ 	]*.$mocFile\.moc." $files 2>/dev/null`;
+-        }
+-
+-        if (@cppFiles == 1)
+-        {
+-            chomp $cppFiles[0];
++	@cppFiles = keys %{$moc2cpp->{"$mocFile.moc"}};
++        if (@cppFiles == 1) {
+             $mocFiles{$mocFile} .= "\035" . $cppFiles[0];
+ 	    push(@deped, $mocFile);
+-            next;
+-        }
+-
+-        if (@cppFiles == 0)
+-        {
++        } elsif (@cppFiles == 0) {
+             push (@newObs, $mocFile);           # Produce new object file
+             next    if ($haveAutomocTag);       # This is expected...
+             # But this is an error we can deal with - let them know
+             print STDERR
+                 "Warning: No c++ file that includes $mocFile.moc\n";
+-            next;
+-        }
+-        else
+-        {
++        } else {
+             # We can't decide which file to use, so it's fatal. Although as a
+             # guess we could use the mocFile.cpp file if it's in the list???
+             print STDERR
+@@ -1769,11 +1843,6 @@
+     my $cppFile;
+     my $hFile;
+     my $moc_class_headers = "";
+-    my @cppFiles =
+-	`grep -l "setMocClasses[ 	]*(.*)[ 	]*;" $cppExt 2> /dev/null`;
+-    chomp(@cppFiles);
+-    print STDOUT "C++ files with setMocClasses() = [".join(' ', @cppFiles)."]\n"
+-        if $verbose;
+     foreach $program (@programs) {
+ 	my $mocs = "";
+ 	my @progsources = split(/[\s\034]+/, $sources{$program});
+@@ -1793,7 +1862,6 @@
+ 	    $dir =~ s#^\.#\$(srcdir)#;
+ 	    if (defined ($cppFile))
+ 	    {
+-		#print STDOUT "cpp=$cppFile\n";
+ 		$mocs .= " $mocFile.moc" if exists $shash{$cppFile};
+ 	    }
+ 	    else
+@@ -1810,7 +1878,6 @@
+ 		    if exists $mhash{$mocFile.".moc.$cxxsuffix"};
+ 	    }
+ 	}
+-  	$mocs .= $ui_mocs;
+ 	if ($mocs) {
+ 	    print STDOUT "==> mocs=[".$mocs."]\n" if ($verbose);
+ 	    my $sourcename = $program."_meta_unload";
+@@ -1821,28 +1888,21 @@
+ 	    my $appl;
+ 	    $appl  = "$srcfile: $mocs\n";
+ 	    $appl .= "\t\@echo 'creating $srcfile'\n";
+-	    $appl .= "\t-rm -f $srcfile\n";
+-	    $appl .= "\t\@echo 'static const char * _metalist_$program\[\] = {' > $srcfile\n";
+-	    $appl .= "\tcat $mocs | grep 'char.*className' | ";
+-	    $appl .=  "sed -e 's/.*[^A-Za-z0-9_:]\\([A-Za-z0-9_:]*\\)::className.*\$\$/\\\"\\1\\\",/' | sort | uniq >> $srcfile\n";
+-	    $appl .= "\t\@echo '0};' >> $srcfile\n";
+-	    $appl .= "\t\@echo '#include <kunload.h>' >> $srcfile\n";
+-	    $appl .= "\t\@echo '_UNLOAD($program)' >> $srcfile\n";
+-		$appl .= "\n";
++	    $appl .= "\t\@-rm -f $srcfile\n";
++	    $appl .= "\t\@if test \${kde_qtver} = 2; then \\\n";
++	    $appl .= "\t\techo 'static const char * _metalist_$program\[\] = {' > $srcfile ;\\\n";
++	    $appl .= "\t\tcat $mocs | grep 'char.*className' | ";
++	    $appl .=  "sed -e 's/.*[^A-Za-z0-9_:]\\([A-Za-z0-9_:]*\\)::className.*\$\$/\\\"\\1\\\",/' | sort | uniq >> $srcfile ;\\\n";
++	    $appl .= "\t\techo '0};' >> $srcfile ;\\\n";
++  	    $appl .= "\t\techo '#include <kunload.h>' >> $srcfile ;\\\n";
++	    $appl .= "\t\techo '_UNLOAD($program)' >> $srcfile ;\\\n";
++	    $appl .= "\telse echo > $srcfile; fi\n";
++  	    $appl .= "\n";
+ 	    
+ 	    $realObjs{$program} .= " \034" . $objfile . " ";
+ 	    $sources{$program} .= " $srcfile";
+             $sources_changed{$program} = 1;
+-            $dep_files .= " \$(DEPDIR)/$sourcename.P";
+-
+-	    # now also add a dependency for the C++ file which includes a
+-	    # setMocClasses() call, and is part of this program (if any)
+-	    #foreach $cppFile (@cppFiles) {
+-		#print STDOUT "testing $cppFile\n" if $verbose;
+-	        #if (exists $shash{$cppFile}) {
+-		#    $appl .= "\$(srcdir)/$cppFile: $header\n";
+-		#}
+-	    #}
++            $dep_files .= " \$(DEPDIR)/$sourcename.P" if($dep_files !~/$sourcename.P/);
+ 	    appendLines ($appl);
+ 	}
+ 	print STDOUT "\n" if $verbose;
+@@ -1862,8 +1922,8 @@
+     open (FILEOUT, "> $makefile")
+                         || die "Could not create $makefile: $!\n";
+ 
+-    print FILEOUT "\# $progId - " . '$Revision: 1.1.1.1 $ '  . "\n";
+-    $MakefileData =~ s/\034/\\\n/g;    # Restore continuation lines
++    print FILEOUT "\# $progId - " . '$Revision: 1.4 $ '  . "\n";
++    $MakefileData =~ s/\034/\\\n\t/g;    # Restore continuation lines
+     print FILEOUT $MakefileData;
+     close FILEOUT;
+ }
+@@ -1892,10 +1952,8 @@
+     if ($MakefileData =~ /\n($lookup)/) {
+       $old = $1;
+       $old =~ s/\034/\\\n#>\- /g;         # Fix continuation lines
+-      $new =~ s/\034/\\\n/g;
+-      my $newCount = 1;
+-      $newCount++  while ($new =~ /\n/g);
+-
++      $new =~ s/\034/\\\n\t/g;
++      my $newCount = ($new =~ tr/\n//) + 1;
+       $MakefileData =~ s/\n$lookup/\n#>- $old\n#>\+ $newCount\n$new/;
+     } else {
+       print STDERR "Warning: substitution of \"$lookup\" in $printname failed\n";
+@@ -1907,13 +1965,10 @@
+ # Slap new lines on the back of the file.
+ sub appendLines ($)
+ {
+-    my ($new) = @_;
+-
+-    $new =~ s/\034/\\\n/g;        # Fix continuation lines
+-    my $newCount = 1;
+-    $newCount++  while ($new =~ /\n/g);
+-
+-    $MakefileData .= "\n#>\+ $newCount\n$new";
++  my ($new) = @_;
++  $new =~ s/\034/\\\n\t/g;        # Fix continuation lines
++  my $newCount = ($new =~ tr/\n//) + 1;
++  $MakefileData .= "\n#>\+ $newCount\n$new";
+ }
+ 
+ #-----------------------------------------------------------------------------
+--- kfocus-1.0.2.orig/admin/acinclude.m4.in
++++ kfocus-1.0.2/admin/acinclude.m4.in
+@@ -28,6 +28,138 @@
+ dnl Single-module modifications are best placed in configure.in for kdelibs
+ dnl and kdebase or configure.in.in if present.
+ 
++dnl ------------------------------------------------------------------------
++dnl Forward compatibility macros (make autoconf 2.13 look like 2.50),
++dnl thanks to Raja R Harinath.
++dnl ------------------------------------------------------------------------
++dnl
++ifdef([_AC_PATH_X_XMKMF],[],
++   [AC_DEFUN([_AC_PATH_X_XMKMF],[AC_PATH_X_XMKMF])])
++ifdef([AC_OUTPUT_SUBDIRS],[],
++   [AC_DEFUN([AC_OUTPUT_SUBDIRS],[subdirs=$1; _AC_OUTPUT_SUBDIRS])])
++
++# KDE_PATH_X_DIRECT
++dnl Internal subroutine of AC_PATH_X.
++dnl Set ac_x_includes and/or ac_x_libraries.
++AC_DEFUN(KDE_PATH_X_DIRECT,
++[if test "$ac_x_includes" = NO; then
++  # Guess where to find include files, by looking for this one X11 .h file.
++  test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
++
++  # First, try using that file with no special directory specified.
++AC_TRY_CPP([#include <$x_direct_test_include>],
++[# We can compile using X headers with no special include directory.
++ac_x_includes=],
++[# Look for the header file in a standard set of common directories.
++# Check X11 before X11Rn because it is often a symlink to the current release.
++  for ac_dir in               \
++    /usr/X11/include          \
++    /usr/X11R6/include        \
++    /usr/X11R5/include        \
++    /usr/X11R4/include        \
++                              \
++    /usr/include/X11          \
++    /usr/include/X11R6        \
++    /usr/include/X11R5        \
++    /usr/include/X11R4        \
++                              \
++    /usr/local/X11/include    \
++    /usr/local/X11R6/include  \
++    /usr/local/X11R5/include  \
++    /usr/local/X11R4/include  \
++                              \
++    /usr/local/include/X11    \
++    /usr/local/include/X11R6  \
++    /usr/local/include/X11R5  \
++    /usr/local/include/X11R4  \
++                              \
++    /usr/X386/include         \
++    /usr/x386/include         \
++    /usr/XFree86/include/X11  \
++                              \
++    /usr/include              \
++    /usr/local/include        \
++    /usr/unsupported/include  \
++    /usr/athena/include       \
++    /usr/local/x11r5/include  \
++    /usr/lpp/Xamples/include  \
++                              \
++    /usr/openwin/include      \
++    /usr/openwin/share/include \
++    ; \
++  do
++    if test -r "$ac_dir/$x_direct_test_include"; then
++      ac_x_includes=$ac_dir
++      break
++    fi
++  done])
++fi # $ac_x_includes = NO
++
++if test "$ac_x_libraries" = NO; then
++  # Check for the libraries.
++
++  test -z "$x_direct_test_library" && x_direct_test_library=Xt
++  test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
++
++  # See if we find them without any special options.
++  # Don't add to $LIBS permanently.
++  ac_save_LIBS="$LIBS"
++  LIBS="-l$x_direct_test_library $LIBS"
++AC_TRY_LINK(, [${x_direct_test_function}()],
++[LIBS="$ac_save_LIBS"
++# We can link X programs with no special library path.
++ac_x_libraries=],
++[LIBS="$ac_save_LIBS"
++# First see if replacing the include by lib works.
++# Check X11 before X11Rn because it is often a symlink to the current release.
++for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
++    /usr/X11/lib          \
++    /usr/X11R6/lib        \
++    /usr/X11R5/lib        \
++    /usr/X11R4/lib        \
++                          \
++    /usr/lib/X11          \
++    /usr/lib/X11R6        \
++    /usr/lib/X11R5        \
++    /usr/lib/X11R4        \
++                          \
++    /usr/local/X11/lib    \
++    /usr/local/X11R6/lib  \
++    /usr/local/X11R5/lib  \
++    /usr/local/X11R4/lib  \
++                          \
++    /usr/local/lib/X11    \
++    /usr/local/lib/X11R6  \
++    /usr/local/lib/X11R5  \
++    /usr/local/lib/X11R4  \
++                          \
++    /usr/X386/lib         \
++    /usr/x386/lib         \
++    /usr/XFree86/lib/X11  \
++                          \
++    /usr/lib              \
++    /usr/local/lib        \
++    /usr/unsupported/lib  \
++    /usr/athena/lib       \
++    /usr/local/x11r5/lib  \
++    /usr/lpp/Xamples/lib  \
++    /lib/usr/lib/X11	  \
++                          \
++    /usr/openwin/lib      \
++    /usr/openwin/share/lib \
++    ; \
++do
++dnl Don't even attempt the hair of trying to link an X program!
++  for ac_extension in a so sl; do
++    if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
++      ac_x_libraries=$ac_dir
++      break 2
++    fi
++  done
++done])
++fi # $ac_x_libraries = NO
++])
++
+ 
+ dnl ------------------------------------------------------------------------
+ dnl Find a file (or one of more files in a list of dirs)
+@@ -40,7 +172,9 @@
+ do
+   for j in $1;
+   do
++    echo "configure: __oline__: $i/$j" >&AC_FD_CC
+     if test -r "$i/$j"; then
++      echo "taking that" >&AC_FD_CC
+       $3=$i
+       break 2
+     fi
+@@ -144,16 +278,25 @@
+    fi
+ 
+    KDE_FIND_PATH(moc, MOC, [$qt_bindirs], [KDE_MOC_ERROR_MESSAGE])
+-   KDE_FIND_PATH(uic, UIC, [$qt_bindirs], [UIC="" ; KDE_UIC_ERROR_MESSAGE])
+-   if test -z "$UIC" ; then
+-     if test -z "$UIC_NOT_NEEDED" ; then
++   if test -z "$UIC_NOT_NEEDED"; then
++     KDE_FIND_PATH(uic, UIC, [$qt_bindirs], [UIC=""])
++     if test -z "$UIC" ; then
++       KDE_UIC_ERROR_MESSAGE
+        exit 1
+-     else
+-       UIC="echo uic not available: "
+      fi
++   else
++     UIC="echo uic not available: "
+    fi
++
+    AC_SUBST(MOC)
+    AC_SUBST(UIC)
++
++   UIC_TR="i18n"
++   if test $kde_qtver = 3; then
++     UIC_TR="tr2i18n"
++   fi
++
++   AC_SUBST(UIC_TR)
+ ])
+ 
+ AC_DEFUN(KDE_1_CHECK_PATHS,
+@@ -223,6 +366,8 @@
+ 	kde_servicesdir=\"$kde_servicesdir\" \
+ 	kde_servicetypesdir=\"$kde_servicetypesdir\" \
+ 	kde_moduledir=\"$kde_moduledir\" \
++   kde_styledir=\"$kde_styledir\" \
++	kde_widgetdir=\"$kde_widgetdir\" \
+ 	kde_result=$1"
+ ])
+ 
+@@ -276,7 +421,17 @@
+     kde_servicetypesdir='\${prefix}/share/servicetypes'
+   fi
+   if test -z "$kde_moduledir"; then
+-    kde_moduledir='\${prefix}/lib/kde2'
++    if test "$kde_qtver" = "2"; then
++      kde_moduledir='\${exec_prefix}/lib/kde2'
++    else
++      kde_moduledir='\${exec_prefix}/lib/kde3'
++    fi
++  fi
++  if test -z "$kde_styledir"; then
++    kde_styledir='\${exec_prefix}/lib/kde3/plugins/styles'
++  fi
++  if test -z "$kde_widgetdir"; then
++    kde_widgetdir='\${exec_prefix}/lib/kde3/plugins/designer'
+   fi
+ 
+   KDE_SET_PATHS(defaults)
+@@ -302,7 +457,8 @@
+    test -z "$kde_wallpaperdir" || test -z "$kde_templatesdir" ||
+    test -z "$kde_bindir" || test -z "$kde_servicesdir" ||
+    test -z "$kde_servicetypesdir" || test -z "$kde_moduledir" ||
+-   test "$kde_have_all_paths" != "yes"; then
++   test -z "$kde_styledir" || test -z "kde_widgetdir" 
++   test "x$kde_have_all_paths" != "xyes"; then
+      kde_have_all_paths=no
+   fi
+ ])
+@@ -315,9 +471,9 @@
+ ])
+ 
+ AC_DEFUN(KDE_SUBST_PROGRAMS,
+-[AC_REQUIRE([AC_CREATE_KFSSTND])dnl
++[
+ 
+-        kde_default_bindirs="/usr/bin /usr/local/bin /opt/local/bin /usr/X11R6/bin /opt/kde/bin /opt/kde2/bin /usr/kde/bin /usr/local/kde/bin"
++        kde_default_bindirs="/usr/bin /usr/local/bin /opt/local/bin /usr/X11R6/bin /opt/kde/bin /opt/kde3/bin /usr/kde/bin /usr/local/kde/bin"
+         if test -n "$KDEDIRS"; then
+            kde_save_IFS=$IFS
+            IFS=:
+@@ -330,18 +486,30 @@
+         KDE_FIND_PATH(dcopidl, DCOPIDL, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl)])
+         KDE_FIND_PATH(dcopidl2cpp, DCOPIDL2CPP, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl2cpp)])
+         KDE_FIND_PATH(mcopidl, MCOPIDL, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(mcopidl)])
+-        KDE_FIND_PATH(kdb2html, KDB2HTML, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(kdb2html)])
+         KDE_FIND_PATH(artsc-config, ARTSCCONFIG, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(artsc-config)])
+-        KDE_FIND_PATH(kde-config, KDECONFIG, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(kde-config)])
++        KDE_FIND_PATH(kde-config, KDECONFIG, [$kde_default_bindirs])
++        KDE_FIND_PATH(meinproc, MEINPROC, [$kde_default_bindirs])
++      
++        if test -n "$MEINPROC" && test ! "$MEINPROC" = "compiled"; then  
++ 	    kde_sharedirs="/usr/share/kde /usr/local/share /usr/share /opt/kde3/share /opt/kde/share $prefix/share"
++            test -n "$KDEDIR" && kde_sharedirs="$KDEDIR/share $kde_sharedirs"
++            AC_FIND_FILE(apps/ksgmltools2/customization/kde-chunk.xsl, $kde_sharedirs, KDE_XSL_STYLESHEET)
++	    if test "$KDE_XSL_STYLESHEET" = "NO"; then
++		KDE_XSL_STYLESHEET=""
++	    else
++                KDE_XSL_STYLESHEET="$KDE_XSL_STYLESHEET/apps/ksgmltools2/customization/kde-chunk.xsl"
++	    fi
++        fi
+ 
+         DCOP_DEPENDENCIES='$(DCOPIDL)'
+         AC_SUBST(DCOPIDL)
+         AC_SUBST(DCOPIDL2CPP)
+         AC_SUBST(DCOP_DEPENDENCIES)
+         AC_SUBST(MCOPIDL)
+-        AC_SUBST(KDB2HTML)
+         AC_SUBST(ARTSCCONFIG)
+         AC_SUBST(KDECONFIG)
++	AC_SUBST(MEINPROC)
++ 	AC_SUBST(KDE_XSL_STYLESHEET)
+ 
+         if test -x "$KDECONFIG"; then # it can be "compiled"
+           kde_libs_prefix=`$KDECONFIG --prefix`
+@@ -382,6 +550,8 @@
+   kde_mimedir= kde_toolbardir= kde_wallpaperdir= kde_templatesdir=
+   kde_bindir= kde_servicesdir= kde_servicetypesdir= kde_moduledir=
+   kde_have_all_paths=
++  kde_styledir=
++  kde_widgetdir=
+   KDE_SET_DEFAULT_PATHS($1)
+   eval "$kde_cv_all_paths"
+   KDE_CHECK_PATHS_FOR_COMPLETENESS
+@@ -422,6 +592,8 @@
+ AC_SUBST(kde_servicesdir)
+ AC_SUBST(kde_servicetypesdir)
+ AC_SUBST(kde_moduledir)
++AC_SUBST(kde_styledir)
++AC_SUBST(kde_widgetdir)
+ if test "$kde_qtver" = 1; then
+   kde_minidir="$kde_icondir/mini"
+ else
+@@ -438,7 +610,9 @@
+ [
+    AC_LANG_C
+    dnl Checks for libraries.
+-   AC_CHECK_LIB(compat, main, [LIBCOMPAT="-lcompat"]) dnl for FreeBSD
++   AC_CHECK_LIB(util, main, [LIBUTIL="-lutil"]) dnl for *BSD 
++   AC_SUBST(LIBUTIL)
++   AC_CHECK_LIB(compat, main, [LIBCOMPAT="-lcompat"]) dnl for *BSD
+    AC_SUBST(LIBCOMPAT)
+    kde_have_crypt=
+    AC_CHECK_LIB(crypt, crypt, [LIBCRYPT="-lcrypt"; kde_have_crypt=yes],
+@@ -452,7 +626,7 @@
+    if test $kde_have_crypt = yes; then
+       AC_DEFINE_UNQUOTED(HAVE_CRYPT, 1, [Defines if your system has the crypt function])
+    fi
+-   AC_CHECK_KSIZE_T
++   AC_CHECK_SOCKLEN_T
+    AC_LANG_C
+    AC_CHECK_LIB(dnet, dnet_ntoa, [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"])
+    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
+@@ -478,12 +652,27 @@
+    AC_CHECK_FUNC(shmat, ,
+      AC_CHECK_LIB(ipc, shmat, X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"))
+    
+-   # Solaris 2.6 needs -lresolv for res_init
+-   AC_CHECK_FUNC(res_init, ,
+-     AC_CHECK_LIB(resolv, res_init, X_EXTRA_LIBS="$X_EXTRA_LIBS -lresolv"))
++   # Solaris 2.6 and others need -lresolv for res_init
++   AC_CHECK_FUNCS(res_init, , [
++     kde_libs_safe="$LIBS"
++     LIBS="$LIBS $X_EXTRA_LIBS -lresolv"
++     AC_TRY_LINK(
++[
++#include <resolv.h>
++],
++[ 
++res_init(); 
++],
++        LIBRESOLV="-lresolv"
++        X_EXTRA_LIBS="$X_EXTRA_LIBS $LIBRESOLV"
++        AC_DEFINE(HAVE_RES_INIT, 1, [Define if you have the res_init function])
++     )
++     LIBS=$kde_libs_safe
++   ])
+ 
+    LIBSOCKET="$X_EXTRA_LIBS"
+    AC_SUBST(LIBSOCKET)
++   AC_SUBST(LIBRESOLV)
+    AC_SUBST(X_EXTRA_LIBS)
+    AC_CHECK_LIB(ucb, killpg, [LIBUCB="-lucb"]) dnl for Solaris2.4
+    AC_SUBST(LIBUCB)
+@@ -508,8 +697,24 @@
+ dnl
+ AC_DEFUN(K_PATH_X,
+ [
+-AC_REQUIRE([AC_PROG_CPP])dnl
+ AC_REQUIRE([KDE_MISC_TESTS])dnl
++
++AC_ARG_ENABLE(
++  embedded,
++  [  --enable-embedded       link to Qt-embedded, don't use X],
++  kde_use_qt_emb=$enableval,
++  kde_use_qt_emb=no
++)
++
++AC_ARG_ENABLE(
++  qtopia,
++  [  --enable-qtopia       link to Qt-embedded, link to the Qtopia Environment],
++  kde_use_qt_emb_palm=$enableval,
++  kde_use_qt_emb_palm=no
++)
++
++if test "$kde_use_qt_emb" = "no"; then
++
+ AC_MSG_CHECKING(for X)
+ AC_LANG_SAVE
+ AC_LANG_C
+@@ -530,17 +735,22 @@
+ ac_x_libraries=$kde_x_libraries
+ ac_x_includes=$kde_x_includes
+ 
+-AC_PATH_X_DIRECT
++KDE_PATH_X_DIRECT
+ dnl AC_PATH_X_XMKMF picks /usr/lib as the path for the X libraries.
+ dnl Unfortunately, if compiling with the N32 ABI, this is not the correct
+ dnl location. The correct location is /usr/lib32 or an undefined value
+ dnl (the linker is smart enough to pick the correct default library).
+ dnl Things work just fine if you use just AC_PATH_X_DIRECT.
++dnl Solaris has a similar problem. AC_PATH_X_XMKMF forces x_includes to
++dnl /usr/openwin/include, which doesn't work. /usr/include does work, so
++dnl x_includes should be left alone.
+ case "$host" in
+ mips-sgi-irix6*)
+   ;;
++*-*-solaris*)
++  ;;
+ *)
+-  AC_PATH_X_XMKMF
++  _AC_PATH_X_XMKMF
+   if test -z "$ac_x_includes"; then
+     ac_x_includes="."
+   fi
+@@ -573,6 +783,7 @@
+ kde_cv_have_x="have_x=yes \
+          kde_x_includes=$kde_x_includes kde_x_libraries=$kde_x_libraries"
+ ])dnl
++
+ eval "$kde_cv_have_x"
+ 
+ if test "$have_x" != yes; then
+@@ -635,6 +846,9 @@
+ 
+ AC_TRY_LINK([
+ #include <stdio.h>
++#ifdef STDC_HEADERS
++# include <stdlib.h>
++#endif
+ ],
+ [
+ printf("hello Xext\n");
+@@ -655,9 +869,84 @@
+ them either.])
+ fi
+ 
+-])
++AC_MSG_CHECKING(for Xinerama)
++
++ AC_ARG_WITH(xinerama,
++  [  --with-xinerama         enable support for Xinerama ],
++  [
++    no_xinerama=no
++  ], [
++    no_xinerama=yes
++  ]
++)
++
++kde_save_LDFLAGS="$LDFLAGS"
++kde_save_CFLAGS="$CFLAGS"
++kde_save_LIBS="$LIBS"
++LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS"
++CFLAGS="$CFLAGS -I$x_includes"
++LIBS="-lXinerama -lXext"
++
++if test "x$no_xinerama" = "xno"; then
++
++  AC_CACHE_VAL(ac_cv_have_xinerama,
++  [
++	  AC_TRY_LINK([#include <X11/Xlib.h>
++  			#include <X11/extensions/Xinerama.h>],
++	  	  [XineramaIsActive(NULL);],
++		  [ac_cv_have_xinerama="yes"],
++		  [ac_cv_have_xinerama="no"])
++  ])
++else
++  ac_cv_have_xinerama=no;
++fi
++
++AC_MSG_RESULT($ac_cv_have_xinerama)
++
++LIBXINERAMA=""
++
++if test "$ac_cv_have_xinerama" = "yes"; then
++  AC_DEFINE(HAVE_XINERAMA, 1, [Define if you want Xinerama support])
++  LIBXINERAMA="-lXinerama"
++fi
++
++AC_SUBST(LIBXINERAMA)
++
++LDFLAGS="$kde_save_LDFLAGS"
++CFLAGS="$kde_save_CFLAGS"
++LIBS="$kde_save_LIBS"
++
++LIB_XEXT="-lXext"
++QTE_NORTTI=""
++
++else
++  dnl We're using QT Embedded
++  CXXFLAGS="$CXXFLAGS -fno-rtti -DQWS"
++  CFLAGS="$CFLAGS -DQWS"
++  LDFLAGS="$LDFLAGS -DQWS"
++  QTE_NORTTI="-fno-rtti -DQWS"
++  X_PRE_LIBS=""
++  LIB_X11=""
++  LIB_XEXT=""
++  LIBSM=""
++  X_INCLUDES=""
++  X_LDFLAGS=""
++  x_includes=""
++  x_libraries=""
++  AC_SUBST(X_PRE_LIBS)
++  AC_SUBST(LIB_X11)
++  AC_SUBST(LIBSM)
++  AC_SUBST(X_INCLUDES)
++  AC_SUBST(X_LDFLAGS)
++  AC_SUBST(x_includes)
++  AC_SUBST(x_libraries)
++fi
++AC_SUBST(QTE_NORTTI)
++AC_SUBST(LIB_XEXT)
++
+ 
+ AC_LANG_RESTORE
++
+ ])
+ 
+ AC_DEFUN(KDE_PRINT_QT_PROGRAM,
+@@ -667,8 +956,6 @@
+ #include "confdefs.h"
+ #include <qglobal.h>
+ #include <qapplication.h>
+-#include <qapp.h>
+-#include <qobjcoll.h>
+ EOF
+ if test "$kde_qtver" = "2"; then
+ cat >> conftest.$ac_ext <<EOF
+@@ -682,7 +969,14 @@
+ #include <qiconview.h>
+ EOF
+ fi
++fi
+ 
++if test "$kde_qtver" = "3"; then
++cat >> conftest.$ac_ext <<EOF
++#include <qcursor.h>
++#include <qstylefactory.h>
++#include <private/qucomextra_p.h>
++EOF
+ fi
+ 
+ echo "#if ! ($kde_qt_verstring)" >> conftest.$ac_ext
+@@ -695,6 +989,7 @@
+ if test "$kde_qtver" = "2"; then
+ cat >> conftest.$ac_ext <<EOF
+     QStringList *t = new QStringList();
++    Q_UNUSED(t);
+ EOF
+ if test $kde_qtsubver -gt 0; then
+ cat >> conftest.$ac_ext <<EOF
+@@ -702,10 +997,15 @@
+     iv.setWordWrapIconText(false);
+     QString s;
+     s.setLatin1("Elvis is alive", 14);
+-    int magnolia = QEvent::Speech; /* new in 2.2 beta2 */
+ EOF
+ fi
+ fi
++if test "$kde_qtver" = "3"; then
++cat >> conftest.$ac_ext <<EOF
++    (void)QStyleFactory::create(QString::null);
++    QCursor c(Qt::WhatsThisCursor);
++EOF
++fi
+ cat >> conftest.$ac_ext <<EOF
+     return 0;
+ }
+@@ -714,36 +1014,33 @@
+ 
+ AC_DEFUN(KDE_USE_QT,
+ [
+-
+ if test -z "$1"; then
+-  kde_qtver=2
++  kde_qtver=3
+   kde_qtsubver=1
+ else
+-  kde_qtsubver=`echo "$1" | sed -e 's#[0-9]\+\.\([0-9]\+\).*#\1#'`
++  kde_qtsubver=`echo "$1" | sed -e 's#[0-9][0-9]*\.\([0-9][0-9]*\).*#\1#'`
+   # following is the check if subversion isn´t found in passed argument
+   if test "$kde_qtsubver" = "$1"; then
+     kde_qtsubver=1
+   fi
+-  kde_qtver=`echo "$1" | sed -e 's#^\([0-9]\+\)\..*#\1#'`
++  kde_qtver=`echo "$1" | sed -e 's#^\([0-9][0-9]*\)\..*#\1#'`
+   if test "$kde_qtver" = "1"; then
+     kde_qtsubver=42
+-  else
+-   # this is the version number fallback to 2.1, unless major version is 1 or 2
+-   if test "$kde_qtver" != "2"; then
+-    kde_qtver=2
+-    kde_qtsubver=1
+-   fi
+   fi
+ fi
+ 
+ if test -z "$2"; then
+-  if test $kde_qtver = 2; then
++  if test "$kde_qtver" = "2"; then
+     if test $kde_qtsubver -gt 0; then
+       kde_qt_minversion=">= Qt 2.2.2"
+     else
+       kde_qt_minversion=">= Qt 2.0.2"
+     fi
+-  else
++  fi
++  if test "$kde_qtver" = "3"; then
++    kde_qt_minversion=">= Qt 3.0.1"
++  fi
++  if test "$kde_qtver" = "1"; then
+     kde_qt_minversion=">= 1.42 and < 2.0"
+   fi
+ else
+@@ -751,22 +1048,30 @@
+ fi
+ 
+ if test -z "$3"; then
++   if test $kde_qtver = 3; then
++     kde_qt_verstring="QT_VERSION >= 301"
++   fi
+    if test $kde_qtver = 2; then
+-    if test $kde_qtsubver -gt 0; then
+-      kde_qt_verstring="QT_VERSION >= 222"
+-    else
+-      kde_qt_verstring="QT_VERSION >= 200"
+-    fi
+-   else
++     if test $kde_qtsubver -gt 0; then
++       kde_qt_verstring="QT_VERSION >= 222"
++     else
++       kde_qt_verstring="QT_VERSION >= 200"
++     fi
++   fi
++   if test $kde_qtver = 1; then
+     kde_qt_verstring="QT_VERSION >= 142 && QT_VERSION < 200"
+-  fi
++   fi
+ else
+    kde_qt_verstring=$3
+ fi
+ 
++if test $kde_qtver = 3; then
++  kde_qt_dirs="$QTDIR /usr/lib/qt3 /usr/lib/qt"
++fi
+ if test $kde_qtver = 2; then
+    kde_qt_dirs="$QTDIR /usr/lib/qt2 /usr/lib/qt"
+-else
++fi
++if test $kde_qtver = 1; then
+    kde_qt_dirs="$QTDIR /usr/lib/qt"
+ fi
+ ])
+@@ -787,7 +1092,11 @@
+ 
+ CXXFLAGS="$CXXFLAGS -I$qt_includes"
+ LDFLAGS="$LDFLAGS $X_LDFLAGS"
++if test "x$kde_use_qt_emb" != "xyes"; then
+ LIBS="$LIBQT -lXext -lX11 $LIBSOCKET"
++else
++LIBS="$LIBQT $LIBSOCKET"
++fi
+ LD_LIBRARY_PATH=
+ export LD_LIBRARY_PATH
+ LIBRARY_PATH=
+@@ -841,86 +1150,117 @@
+ 
+ AC_ARG_ENABLE(
+   mt,
+-  [  --enable-mt             link to threaded Qt (experimental)],
++  [  --disable-mt            link to non-threaded Qt (deprecated)],
+   kde_use_qt_mt=$enableval,
+-  kde_use_qt_mt=no
++  [
++    if test $kde_qtver = 3; then
++      kde_use_qt_mt=yes
++    else
++      kde_use_qt_mt=no
++    fi
++  ]
+ )
+ 
+ USING_QT_MT=""
+ 
+ dnl ------------------------------------------------------------------------
+-dnl If we got --enable-qt-mt then adjust some vars for the host.
++dnl If we not get --disable-qt-mt then adjust some vars for the host.
+ dnl ------------------------------------------------------------------------
+ 
++KDE_MT_LDFLAGS=
++KDE_MT_LIBS=
+ if test "x$kde_use_qt_mt" = "xyes"; then
+-
+-  case $host in
+-  *-*-linux-*)
+-    if test "x$GCC" = "xyes"; then
+-      CPPFLAGS="$CPPFLAGS -DQT_THREAD_SUPPORT -pthread"
+-      X_EXTRA_LIBS="$X_EXTRA_LIBS -pthread"
+-    else
+-      AC_MSG_WARN([Compiler is not gcc. MT support disabled.])
+-    fi
+-    ;;
+-  *)
+-    AC_MSG_WARN([MT not yet supported on $host - disabled.])
+-    ;;
+-  esac
+-
++  KDE_CHECK_THREADING
++  if test "x$kde_use_threading" = "xyes"; then
++    CPPFLAGS="$USE_THREADS -DQT_THREAD_SUPPORT $CPPFLAGS"
++    KDE_MT_LDFLAGS="$USE_THREADS"
++    KDE_MT_LIBS="$LIBPTHREAD"
++  else
++    kde_use_qt_mt=no
++  fi
+ fi
++AC_SUBST(KDE_MT_LDFLAGS)
++AC_SUBST(KDE_MT_LIBS)
+ 
+ kde_qt_was_given=yes
+ 
+ dnl ------------------------------------------------------------------------
+ dnl If we haven't been told how to link to Qt, we work it out for ourselves.
+ dnl ------------------------------------------------------------------------
+-
+ if test -z "$LIBQT_GLOB"; then
+-
+-  LIBQT_GLOB="libqt.*"
+-
++  if test "x$kde_use_qt_emb" = "xyes"; then
++    LIBQT_GLOB="libqte.*"
++  else
++    LIBQT_GLOB="libqt.*"
++  fi
+ fi
+ 
+ if test -z "$LIBQT"; then
++dnl ------------------------------------------------------------
++dnl If we got --enable-embedded then adjust the Qt library name.
++dnl ------------------------------------------------------------
++  if test "x$kde_use_qt_emb" = "xyes"; then
++    qtlib="qte"
++  else
++    qtlib="qt"
++  fi
++
++  kde_int_qt="-l$qtlib"
++else
++  kde_int_qt="$LIBQT"
++  kde_lib_qt_set=yes
++fi
+ 
+-  LIBQT="-lqt"
+-  kde_int_qt="-lqt"
++if test -z "$LIBQPE"; then
++dnl ------------------------------------------------------------
++dnl If we got --enable-palmtop then add -lqpe to the link line
++dnl ------------------------------------------------------------
++  if test "x$kde_use_qt_emb" = "xyes"; then
++    if test "x$kde_use_qt_emb_palm" = "xyes"; then
++      LIB_QPE="-lqpe"
++    else
++      LIB_QPE=""
++    fi
++  else
++    LIB_QPE=""
++  fi
++fi
+ 
+ dnl ------------------------------------------------------------------------
+ dnl If we got --enable-qt-mt then adjust the Qt library name for the host.
+ dnl ------------------------------------------------------------------------
+ 
+-  if test "x$kde_use_qt_mt" = "xyes"; then
+-
+-      case $host in
+-      *-*-linux-*)
+-        if test "x$GCC" = "xyes"; then
+-          LIBQT="-lqt-mt"
+-          kde_int_qt="-lqt-mt"
+-          LIBQT_GLOB="libqt-mt.*"
+-          USING_QT_MT="using -mt"
+-        fi
+-      ;;
+-      esac
++if test "x$kde_use_qt_mt" = "xyes"; then
++  if test -z "$LIBQT"; then
++    LIBQT="-l$qtlib-mt"
++    kde_int_qt="-l$qtlib-mt"
++  else
++    LIBQT="$qtlib-mt"
++    kde_int_qt="$qtlib-mt"
+   fi
+-
+-  kde_qt_was_given=no
+-
++  LIBQT_GLOB="lib$qtlib-mt.*"
++  USING_QT_MT="using -mt"
+ else
+-  kde_int_qt="$LIBQT"
++  LIBQT="-l$qtlib"
+ fi
+ 
+-if test $kde_qtver = 2; then
++if test $kde_qtver != 1; then
+ 
+   AC_REQUIRE([AC_FIND_PNG])
+   AC_REQUIRE([AC_FIND_JPEG])
+   LIBQT="$LIBQT $LIBPNG $LIBJPEG"
+ fi
+ 
++if test $kde_qtver = 3; then
++  AC_REQUIRE([KDE_CHECK_LIBDL])
++  LIBQT="$LIBQT $LIBDL"
++fi
++
+ AC_MSG_CHECKING([for Qt])
+ 
++if test "x$kde_use_qt_emb" != "xyes"; then
+ LIBQT="$LIBQT $X_PRE_LIBS -lXext -lX11 $LIBSM $LIBSOCKET"
++fi
+ ac_qt_includes=NO ac_qt_libraries=NO ac_qt_bindir=NO
+ qt_libraries=""
+ qt_includes=""
+@@ -952,12 +1292,12 @@
+ for dir in $kde_qt_dirs; do
+    qt_incdirs="$qt_incdirs $dir/include $dir"
+ done
+-qt_incdirs="$QTINC $qt_incdirs /usr/local/qt/include /usr/include/qt /usr/include /usr/X11R6/include/X11/qt /usr/X11R6/include/qt $x_includes"
++qt_incdirs="$QTINC $qt_incdirs /usr/local/qt/include /usr/include/qt /usr/include /usr/X11R6/include/X11/qt /usr/X11R6/include/qt /usr/X11R6/include/qt2 $x_includes"
+ if test ! "$ac_qt_includes" = "NO"; then
+    qt_incdirs="$ac_qt_includes $qt_incdirs"
+ fi
+ 
+-if test "$kde_qtver" = "2"; then
++if test "$kde_qtver" != "1"; then
+   kde_qt_header=qstyle.h
+ else
+   kde_qt_header=qglobal.h
+@@ -993,8 +1333,8 @@
+ ac_libs_safe="$LIBS"
+ 
+ CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
+-LDFLAGS="$LDFLAGS -L$qt_libdir $all_libraries $USER_LDFLAGS"
+-LIBS="$LIBS $LIBQT"
++LDFLAGS="$LDFLAGS -L$qt_libdir $all_libraries $USER_LDFLAGS $KDE_MT_LDFLAGS"
++LIBS="$LIBS $LIBQT $KDE_MT_LIBS"
+ 
+ KDE_PRINT_QT_PROGRAM
+ 
+@@ -1014,6 +1354,7 @@
+ if test "$ac_qt_includes" = NO || test "$ac_qt_libraries" = NO; then
+   ac_cv_have_qt="have_qt=no"
+   ac_qt_notfound=""
++  missing_qt_mt=""
+   if test "$ac_qt_includes" = NO; then
+     if test "$ac_qt_libraries" = NO; then
+       ac_qt_notfound="(headers and libraries)";
+@@ -1021,11 +1362,17 @@
+       ac_qt_notfound="(headers)";
+     fi
+   else
+-    ac_qt_notfound="(libraries)";
++    if test "x$kde_use_qt_mt" = "xyes"; then
++       missing_qt_mt="
++Make sure that you have compiled Qt with thread support!"
++       ac_qt_notfound="(library $qtlib-mt)";
++    else
++       ac_qt_notfound="(library $qtlib)";
++    fi
+   fi
+ 
+   AC_MSG_ERROR([Qt ($kde_qt_minversion) $ac_qt_notfound not found. Please check your installation!
+-For more details about this problem, look at the end of config.log.])
++For more details about this problem, look at the end of config.log.$missing_qt_mt])
+ else
+   have_qt="yes"
+ fi
+@@ -1052,7 +1399,7 @@
+ AC_SUBST(qt_includes)
+ 
+ if test "$qt_includes" = "$x_includes" || test -z "$qt_includes"; then
+- QT_INCLUDES="";
++ QT_INCLUDES=""
+ else
+  QT_INCLUDES="-I$qt_includes"
+  all_includes="$QT_INCLUDES $all_includes"
+@@ -1064,14 +1411,23 @@
+  QT_LDFLAGS="-L$qt_libraries"
+  all_libraries="$all_libraries $QT_LDFLAGS"
+ fi
++test -z "$KDE_MT_LDFLAGS" || all_libraries="$all_libraries $KDE_MT_LDFLAGS"
+ 
+ AC_SUBST(QT_INCLUDES)
+ AC_SUBST(QT_LDFLAGS)
+ AC_PATH_QT_MOC_UIC
+ 
++if test "x$kde_use_qt_emb" != "xyes"; then
+ LIB_QT="$kde_int_qt "'$(LIBPNG) $(LIBJPEG) -lXext $(LIB_X11) $(LIBSM)'
++else
++LIB_QT="$kde_int_qt "'$(LIBPNG) $(LIBJPEG)'
++fi
++test -z "$KDE_MT_LIBS" || LIB_QT="$LIB_QT $KDE_MT_LIBS"
++
+ AC_SUBST(LIB_QT)
++AC_SUBST(LIB_QPE)
+ 
++AC_SUBST(kde_qtver)
+ ])
+ 
+ AC_DEFUN(AC_PATH_QT,
+@@ -1154,7 +1510,7 @@
+ 
+ if test -z "$1"; then
+ 
+-kde_incdirs="/usr/lib/kde/include /usr/local/kde/include /usr/kde/include /usr/include/kde /usr/include /opt/kde2/include /opt/kde/include $x_includes $qt_includes"
++kde_incdirs="/usr/lib/kde/include /usr/local/kde/include /usr/local/include /usr/kde/include /usr/include/kde /usr/include /opt/kde3/include /opt/kde/include $x_includes $qt_includes"
+ test -n "$KDEDIR" && kde_incdirs="$KDEDIR/include $KDEDIR/include/kde $KDEDIR $kde_incdirs"
+ kde_incdirs="$ac_kde_includes $kde_incdirs"
+ AC_FIND_FILE($kde_check_header, $kde_incdirs, kde_incdir)
+@@ -1166,7 +1522,7 @@
+ So, check this please and use another prefix!])
+ fi
+ 
+-kde_libdirs="/usr/lib/kde/lib /usr/local/kde/lib /usr/kde/lib /usr/lib/kde /usr/lib /usr/X11R6/lib /opt/kde2/lib /opt/kde/lib /usr/X11R6/kde/lib"
++kde_libdirs="/usr/lib/kde/lib /usr/local/kde/lib /usr/kde/lib /usr/lib/kde /usr/lib/kde3 /usr/lib /usr/X11R6/lib /usr/local/lib /opt/kde3/lib /opt/kde/lib /usr/X11R6/kde/lib"
+ test -n "$KDEDIR" && kde_libdirs="$KDEDIR/lib $KDEDIR $kde_libdirs"
+ kde_libdirs="$ac_kde_libraries $kde_libdirs"
+ AC_FIND_FILE($kde_check_lib, $kde_libdirs, kde_libdir)
+@@ -1223,7 +1579,7 @@
+ AC_SUBST(kde_libraries)
+ AC_SUBST(kde_includes)
+ 
+-if test "$kde_includes" = "$x_includes" || test "$kde_includes" = "$qt_includes" ; then
++if test "$kde_includes" = "$x_includes" || test "$kde_includes" = "$qt_includes"  || test "$kde_includes" = "/usr/include"; then
+  KDE_INCLUDES=""
+ else
+  KDE_INCLUDES="-I$kde_includes"
+@@ -1309,6 +1665,9 @@
+     AC_LANG_SAVE
+     AC_LANG_CPLUSPLUS
+ cat > conftest.$ac_ext <<EOF
++#ifdef STDC_HEADERS
++# include <stdlib.h>
++#endif
+ #include <stdio.h>
+ #include "confdefs.h"
+ #include <kapp.h>
+@@ -1331,6 +1690,8 @@
+     printf("kde_servicesdir=\\"/tmp/dummy\\"\n");
+     printf("kde_servicetypesdir=\\"/tmp/dummy\\"\n");
+     printf("kde_moduledir=\\"/tmp/dummy\\"\n");
++    printf("kde_styledir=\\"/tmp/dummy\\"\n");
++    printf("kde_widgetdir=\\"/tmp/dummy\\"\n");
+     return 0;
+     }
+ EOF
+@@ -1399,10 +1760,10 @@
+      LIBS="$LIBS $all_libraries $LIBJPEG $LIBTIFF $LIBPNG $LIBQT -lm"
+      AC_CHECK_LIB(kimgio, kimgioRegister, [
+       LIBKIMGIO_EXISTS=yes],LIBKIMGIO_EXISTS=no)
+-      LIBS="$kde_save_LIBS"
+-      AC_LANG_RESTORE
++     LIBS="$kde_save_LIBS"
++     AC_LANG_RESTORE
+    else
+-      LIBKIMGIO_EXISTS=yes
++     LIBKIMGIO_EXISTS=yes
+    fi
+ 
+    if test "$LIBKIMGIO_EXISTS" = "yes"; then
+@@ -1419,13 +1780,35 @@
+    AC_REQUIRE([KDE_CHECK_LIBDL])
+    AC_REQUIRE([K_PATH_X])
+ 
+-if test $kde_qtver = 2; then
++if test $kde_qtver = 3; then
++   LIB_KDECORE='-lkdecore'
++   AC_SUBST(LIB_KDECORE)
++   LIB_KDEUI='-lkdeui'
++   AC_SUBST(LIB_KDEUI)
++   LIB_KIO='-lkio'
++   AC_SUBST(LIB_KIO)
++   LIB_SMB='-lsmb'
++   AC_SUBST(LIB_SMB)
++   LIB_KAB='-lkab'
++   AC_SUBST(LIB_KAB)
++   LIB_KHTML='-lkhtml'
++   AC_SUBST(LIB_KHTML)
++   LIB_KSPELL='-lkspell'
++   AC_SUBST(LIB_KSPELL)
++   LIB_KPARTS='-lkparts'
++   AC_SUBST(LIB_KPARTS)
++   LIB_KDEPRINT='-lkdeprint'
++   AC_SUBST(LIB_KDEPRINT)
++# these are for backward compatibility
++   LIB_KSYCOCA='-lkio'
++   AC_SUBST(LIB_KSYCOCA)
++   LIB_KFILE='-lkio'
++   AC_SUBST(LIB_KFILE)
++elif test $kde_qtver = 2; then
+    LIB_KDECORE='-lkdecore'
+    AC_SUBST(LIB_KDECORE)
+    LIB_KDEUI='-lkdeui'
+    AC_SUBST(LIB_KDEUI)
+-   LIB_KFORMULA='-lkformula'
+-   AC_SUBST(LIB_KFORMULA)
+    LIB_KIO='-lkio'
+    AC_SUBST(LIB_KIO)
+    LIB_KSYCOCA='-lksycoca'
+@@ -1442,8 +1825,8 @@
+    AC_SUBST(LIB_KSPELL)
+    LIB_KPARTS='-lkparts'
+    AC_SUBST(LIB_KPARTS)
+-   LIB_KWRITE='-lkwrite'
+-   AC_SUBST(LIB_KWRITE)
++   LIB_KDEPRINT='-lkdeprint'
++   AC_SUBST(LIB_KDEPRINT)
+ else
+    LIB_KDECORE='-lkdecore -lXext $(LIB_QT)'
+    AC_SUBST(LIB_KDECORE)
+@@ -1617,7 +2000,7 @@
+   [Define if you have gethostname prototype])
+ fi
+ if eval "test \"`echo $ac_cv_func_gethostname`\" = yes"; then
+-  AC_DEFINE(HAVE_GETHOSTNAME, 1, [Define if you have getdomainname])
++  AC_DEFINE(HAVE_GETHOSTNAME, 1, [Define if you have gethostname])
+ fi
+ ])
+ 
+@@ -1678,7 +2061,11 @@
+    [AC_MSG_CHECKING([for giflib])
+ AC_CACHE_VAL(ac_cv_lib_gif,
+ [ac_save_LIBS="$LIBS"
++if test "x$kde_use_qt_emb" != "xyes"; then
+ LIBS="$all_libraries -lgif -lX11 $LIBSOCKET"
++else
++LIBS="$all_libraries -lgif"
++fi
+ AC_TRY_LINK(dnl
+ [
+ #ifdef __cplusplus
+@@ -1753,24 +2140,10 @@
+ KDE_FIND_JPEG_HELPER(6b, 6b,
+    KDE_FIND_JPEG_HELPER(normal, [],
+     [
+-dnl what to do, if the normal way fails:
+-	if test -f "$kde_libraries/libjpeg.so"; then
+-	   test -f ./libjpegkde.so || $LN_S $kde_libraries/libjpeg.so ./libjpegkde.so
+-	   ac_cv_lib_jpeg="-L\${topdir} -ljpegkde"
+-	else if test -f "$kde_libraries/libjpeg.sl"; then
+-	   test -f ./libjpegkde.sl ||$LN_S $kde_libraries/libjpeg.sl ./libjpegkde.sl
+-	   ac_cv_lib_jpeg="-L\${topdir} -ljpegkde"	
+-	else if test -f "$kde_libraries/libjpeg.a"; then
+-	   test -f ./libjpegkde.a || $LN_S $kde_libraries/libjpeg.a ./libjpegkde.a
+-	   ac_cv_lib_jpeg="-L\${topdir} -ljpegkde"
+-        else
+-	  ac_cv_lib_jpeg=
+-	fi
+-      fi
+-   fi
+-
+-   LIBJPEG=$ac_cv_lib_jpeg
+-]))
++       LIBJPEG=
++    ]
++   )
++)
+ 
+ dnl then search the headers (can't use simply AC_TRY_xxx, as jpeglib.h
+ dnl requires system dependent includes loaded before it)
+@@ -1845,7 +2218,11 @@
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ kde_save_LIBS="$LIBS"
++if test "x$kde_use_qt_emb" != "xyes"; then
+ LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lX11 $LIBSOCKET -lm"
++else
++LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lm"
++fi
+ kde_save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
+ 
+@@ -1900,7 +2277,11 @@
+ AC_CACHE_VAL(ac_cv_lib_png,
+ [
+ kde_save_LIBS="$LIBS"
++if test "x$kde_use_qt_emb" != "xyes"; then
+ LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm -lX11 $LIBSOCKET"
++else
++LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm"
++fi
+ kde_save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
+ AC_LANG_C
+@@ -1966,19 +2347,17 @@
+ 
+ AC_DEFUN(KDE_CHECK_COMPILER_FLAG,
+ [
+-AC_REQUIRE([AC_CHECK_COMPILERS])
+ AC_MSG_CHECKING(whether $CXX supports -$1)
+-kde_cache=`echo $1 | sed 'y%.=/+-%___p_%'`
++kde_cache=`echo $1 | sed 'y% .=/+-%____p_%'`
+ AC_CACHE_VAL(kde_cv_prog_cxx_$kde_cache,
+ [
+-echo 'int main() { return 0; }' >conftest.cc
+-eval "kde_cv_prog_cxx_$kde_cache=no"
+-if test -z "`$CXX -$1 -c conftest.cc 2>&1`"; then
+-  if test -z "`$CXX -$1 -o conftest conftest.o 2>&1`"; then
+-    eval "kde_cv_prog_cxx_$kde_cache=yes"
+-  fi
+-fi
+-rm -f conftest*
++  AC_LANG_SAVE
++  AC_LANG_CPLUSPLUS
++  save_CXXFLAGS="$CXXFLAGS"
++  CXXFLAGS="$CXXFLAGS -$1"
++  AC_TRY_LINK([],[ return 0; ], [eval "kde_cv_prog_cxx_$kde_cache=yes"], [])
++  CXXFLAGS="$save_CXXFLAGS"
++  AC_LANG_RESTORE
+ ])
+ if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
+  AC_MSG_RESULT(yes)
+@@ -1991,28 +2370,6 @@
+ fi
+ ])
+ 
+-AC_DEFUN(KDE_PROG_CC_PG,
+-[ AC_CACHE_CHECK(whether ${CC-cc} accepts -pg, kde_cv_prog_cc_pg,
+-  [echo 'void f(){}' > conftest.c
+-   if test -z "`${CC-cc} -pg -c conftest.c 2>&1`"; then
+-     kde_cv_prog_cc_pg=yes
+-   else
+-     kde_cv_prog_cc_pg=no
+-   fi
+-   rm -f conftest*
+-])])
+-
+-AC_DEFUN(KDE_PROG_CXX_PG,
+-[ AC_CACHE_CHECK(whether ${CXX-g++} accepts -pg, kde_cv_prog_cxx_pg,
+-  [echo 'void f(){}' > conftest.cc
+-   if test -z "`${CXX-g++} -pg -c conftest.cc 2>&1`"; then
+-     kde_cv_prog_cxx_pg=yes
+-   else
+-     kde_cv_prog_cxx_pg=no
+-   fi
+-  rm -f conftest*
+-])])
+-
+ dnl AC_REMOVE_FORBIDDEN removes forbidden arguments from variables
+ dnl use: AC_REMOVE_FORBIDDEN(CC, [-forbid -bad-option whatever])
+ dnl it's all white-space separated
+@@ -2039,31 +2396,38 @@
+ dnl AC_VALIDIFY_CXXFLAGS checks for forbidden flags the user may have given
+ AC_DEFUN(AC_VALIDIFY_CXXFLAGS,
+ [dnl
++if test "x$kde_use_qt_emb" != "xyes"; then
+  AC_REMOVE_FORBIDDEN(CXX, [-fno-rtti -rpath])
+  AC_REMOVE_FORBIDDEN(CXXFLAGS, [-fno-rtti -rpath])
++else
++ AC_REMOVE_FORBIDDEN(CXX, [-rpath])
++ AC_REMOVE_FORBIDDEN(CXXFLAGS, [-rpath])
++fi
+ ])
+ 
+ AC_DEFUN(AC_CHECK_COMPILERS,
+ [
+-  dnl this is somehow a fat lie, but prevents other macros from double checking
+-  AC_PROVIDE([AC_PROG_CC])
+-  AC_PROVIDE([AC_PROG_CPP])
+-  AC_PROVIDE([AC_PROG_CXX])
+-  AC_PROVIDE([AC_PROG_CXXCPP])
+-
+-  AC_ARG_ENABLE(debug,[  --enable-debug          enables debug symbols [default=no]],
++  AC_ARG_ENABLE(debug,[  --enable-debug[=ARG]    enables debug symbols (yes|no|full) [default=no]],
+   [
+-   if test $enableval = "no"; dnl
+-     then
+-       kde_use_debug_code="no"
+-       kde_use_debug_define=yes
+-     else
+-       kde_use_debug_code="yes"
+-       kde_use_debug_define=no
+-   fi
+-  ], [kde_use_debug_code="no"
++    case $enableval in
++      yes)
++        kde_use_debug_code="yes"
++        kde_use_debug_define=no
++        ;;
++      full)
++        kde_use_debug_code="full"
++        kde_use_debug_define=no
++        ;;
++      *)
++        kde_use_debug_code="no"
++        kde_use_debug_define=yes
++        ;;
++    esac
++  ], 
++    [kde_use_debug_code="no"
+       kde_use_debug_define=no
+-    ])
++  ])
++
+   dnl Just for configure --help
+   AC_ARG_ENABLE(dummyoption,[  --disable-debug         disables debug output and debug symbols [default=no]],[],[])
+ 
+@@ -2076,271 +2440,187 @@
+     fi
+    ], [kde_use_strict_options="no"])
+ 
++  AC_ARG_ENABLE(warnings,[  --enable-warnings         compiles with -Wall and similiar],
++   [
++    if test $enableval = "no"; then
++         kde_use_warnings="no"
++       else
++         kde_use_warnings="yes"
++    fi
++   ], [kde_use_warnings="no"])
++
++  dnl enable warnings for debug build
++  if test "$kde_use_debug_code" != "no"; then
++    kde_use_warnings=yes
++  fi
++
+   AC_ARG_ENABLE(profile,[  --enable-profile        creates profiling infos [default=no]],
+-     [kde_use_profiling=$enableval],
+-     [kde_use_profiling="no"]
++    [kde_use_profiling=$enableval],
++    [kde_use_profiling="no"]
+   )
+ 
+-dnl this was AC_PROG_CC. I had to include it manualy, since I had to patch it
+-  AC_MSG_CHECKING(for a C-Compiler)
+-  dnl if there is one, print out. if not, don't matter
+-  AC_MSG_RESULT($CC)
+-
+-  if test -z "$CC"; then AC_CHECK_PROG(CC, gcc, gcc) fi
+-  if test -z "$CC"; then AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc) fi
+-  if test -z "$CC"; then AC_CHECK_PROG(CC, xlc, xlc) fi
+-  test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
+-
+-  AC_PROG_CC_WORKS
+-  AC_PROG_CC_GNU
+-
+-  if test $ac_cv_prog_gcc = yes; then
+-    GCC=yes
+-  else
+-    GCC=
+-  fi
+-
+-  USER_CFLAGS=$CFLAGS
+-  CFLAGS=
+-
+-  if test -z "$CFLAGS"; then
+-    if test "$kde_use_debug_code" = "yes"; then
+-      AC_PROG_CC_G
+-      if test $ac_cv_prog_cc_g = yes; then
+-	CFLAGS="-g"
+-	case $host in
+-   	*-*-linux-gnu)	
+-           CFLAGS="$CFLAGS -ansi -W -Wall -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE -D_BSD_SOURCE"
+-         ;;
+-        esac
+-      fi
+-    else
+-      if test "$GCC" = "yes"; then
+-        CFLAGS="-O2"
+-      else
+-        CFLAGS=""
+-      fi
+-      if test "$kde_use_debug_define" = "yes"; then
+-        CFLAGS="$CFLAGS -DNDEBUG"
+-	dnl damn buggy compilers :-(
+-	dnl if test "$GCC" = "yes"; then
+-    	dnl  CFLAGS="$CFLAGS -fomit-frame-pointer"
+-	dnl   CXXFLAGS="$CXXFLAGS -fomit-frame-pointer"
+-	dnl fi
+-      fi
+-    fi
++  dnl this prevents stupid AC_PROG_CC to add "-g" to the default CFLAGS
++  CFLAGS=" $CFLAGS"
+ 
+-    if test "$kde_use_profiling" = yes; then
+-      KDE_PROG_CC_PG
+-      if test "$kde_cv_prog_cc_pg" = yes; then
+-        CFLAGS="$CFLAGS -pg"
+-      fi
+-    fi
++  AC_PROG_CC 
+ 
+-    if test "$GCC" = "yes"; then
+-     CFLAGS="$CFLAGS"
++  AC_PROG_CPP
+ 
+-     if test "$kde_use_strict_options" = "yes"; then
+-	CFLAGS="$CFLAGS -W -Wall -ansi -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings"
+-     fi
++  if test "$GCC" = "yes"; then
++    if test "$kde_use_debug_code" != "no"; then
++      if test $kde_use_debug_code = "full"; then
++        CFLAGS="-g3 $CFLAGS"
++      else
++        CFLAGS="-g -O2 $CFLAGS"
++      fi
++    else
++      CFLAGS="-O2 $CFLAGS"
+     fi
++  fi
+ 
++  if test "$kde_use_debug_define" = "yes"; then
++    CFLAGS="-DNDEBUG $CFLAGS"
+   fi
+ 
++
+   case "$host" in
+-  *-*-sysv4.2uw*) CFLAGS="$CFLAGS -D_UNIXWARE";;
+-  *-*-sysv5uw7*) CFLAGS="$CFLAGS -D_UNIXWARE7";;
++  *-*-sysv4.2uw*) CFLAGS="-D_UNIXWARE $CFLAGS";;
++  *-*-sysv5uw7*) CFLAGS="-D_UNIXWARE7 $CFLAGS";;
+   esac
+ 
+-  if test -n "$USER_CFLAGS"; then
+-    CFLAGS="$CFLAGS $USER_CFLAGS"
+-  fi
+-
+   if test -z "$LDFLAGS" && test "$kde_use_debug_code" = "no" && test "$GCC" = "yes"; then
+      LDFLAGS=""
+   fi
+ 
++  CXXFLAGS=" $CXXFLAGS"
+ 
+-dnl this is AC_PROG_CPP. I had to include it here, since autoconf checks
+-dnl dependecies between AC_PROG_CPP and AC_PROG_CC (or is it automake?)
++  AC_PROG_CXX
+ 
+-  AC_MSG_CHECKING(how to run the C preprocessor)
+-  # On Suns, sometimes $CPP names a directory.
+-  if test -n "$CPP" && test -d "$CPP"; then
+-    CPP=
+-  fi
+-  if test -z "$CPP"; then
+-  AC_CACHE_VAL(ac_cv_prog_CPP,
+-  [  # This must be in double quotes, not single quotes, because CPP may get
+-    # substituted into the Makefile and "${CC-cc}" will confuse make.
+-    CPP="${CC-cc} -E"
+-    # On the NeXT, cc -E runs the code through the compiler's parser,
+-    # not just through cpp.
+-    dnl Use a header file that comes with gcc, so configuring glibc
+-    dnl with a fresh cross-compiler works.
+-    AC_TRY_CPP([#include <assert.h>
+-    Syntax Error], ,
+-    CPP="${CC-cc} -E -traditional-cpp"
+-    AC_TRY_CPP([#include <assert.h>
+-    Syntax Error], , CPP=/lib/cpp))
+-    ac_cv_prog_CPP="$CPP"])dnl
+-    CPP="$ac_cv_prog_CPP"
+-  else
+-    ac_cv_prog_CPP="$CPP"
+-  fi
+-  AC_MSG_RESULT($CPP)
+-  AC_SUBST(CPP)dnl
+-
+-
+-  AC_MSG_CHECKING(for a C++-Compiler)
+-  dnl if there is one, print out. if not, don't matter
+-  AC_MSG_RESULT($CXX)
+-
+-  if test -z "$CXX"; then AC_CHECK_PROG(CXX, g++, g++) fi
+-  if test -z "$CXX"; then AC_CHECK_PROG(CXX, CC, CC) fi
+-  if test -z "$CXX"; then AC_CHECK_PROG(CXX, xlC, xlC) fi
+-  if test -z "$CXX"; then AC_CHECK_PROG(CXX, DCC, DCC) fi
+-  test -z "$CXX" && AC_MSG_ERROR([no acceptable C++-compiler found in \$PATH])
+-
+-  AC_PROG_CXX_WORKS
+-  AC_PROG_CXX_GNU
+-
+-  if test $ac_cv_prog_gxx = yes; then
+-    GXX=yes
+-  fi
+-
+-  USER_CXXFLAGS=$CXXFLAGS
+-  CXXFLAGS=""
+-
+-  if test -z "$CXXFLAGS"; then
+-    if test "$kde_use_debug_code" = "yes"; then
+-      AC_PROG_CXX_G
+-      if test $ac_cv_prog_cxx_g = yes; then
+-        CXXFLAGS="-g"
+-	case $host in  dnl
+-   	*-*-linux-gnu)
+-           CXXFLAGS="$CXXFLAGS -ansi -D_XOPEN_SOURCE -D_BSD_SOURCE -Wbad-function-cast -Wcast-align -Wundef -Wconversion"
+-         ;;
+-        esac
++  if test "$GXX" = "yes" || test "$CXX" = "KCC"; then
++    if test "$kde_use_debug_code" != "no"; then
++      if test "$CXX" = "KCC"; then
++        CXXFLAGS="+K0 -Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings $CXXFLAGS"
++      else
++        if test "$kde_use_debug_code" = "full"; then
++          CXXFLAGS="-g3 $CXXFLAGS"
++        else
++          CXXFLAGS="-g -O2 $CXXFLAGS"
++        fi
+       fi
++      KDE_CHECK_COMPILER_FLAG(fno-builtin,[CXXFLAGS="-fno-builtin $CXXFLAGS"])
++
++      dnl convenience compiler flags
++      KDE_CHECK_COMPILER_FLAG(Woverloaded-virtual, [WOVERLOADED_VIRTUAL="-Woverloaded-virtual"], [WOVERLOADED_VRITUAL=""])
++      AC_SUBST(WOVERLOADED_VIRTUAL)
+     else
+-      if test "$GXX" = "yes"; then
+-         CXXFLAGS="-O2"
+-      fi
+-      if test "$kde_use_debug_define" = "yes"; then
+-         CXXFLAGS="$CXXFLAGS -DNDEBUG"
+-      fi
++      if test "$CXX" = "KCC"; then
++        CXXFLAGS="+K3 $CXXFLAGS"
++      else
++        CXXFLAGS="-O2 $CXXFLAGS"
++      fi  
+     fi
++  fi
+ 
+-    if test "$kde_use_profiling" = yes; then
+-      KDE_PROG_CXX_PG
+-      if test "$kde_cv_prog_cxx_pg" = yes; then
+-        CXXFLAGS="$CXXFLAGS -pg"
+-      fi
+-    fi
+-    
+-    KDE_CHECK_COMPILER_FLAG(fno-exceptions,
++  if test "$kde_use_debug_define" = "yes"; then
++    CXXFLAGS="-DNDEBUG -DNO_DEBUG $CXXFLAGS"
++  fi  
++
++  if test "$kde_use_profiling" = "yes"; then
++    KDE_CHECK_COMPILER_FLAG(pg,
+     [
+-      CXXFLAGS="$CXXFLAGS -fno-exceptions"
++      CFLAGS="-pg $CFLAGS"
++      CXXFLAGS="-pg $CXXFLAGS"
+     ])
+-      
+-dnl WABA: Nothing wrong with RTTI, keep it on.
+-dnl    KDE_CHECK_COMPILER_FLAG(fno-rtti,
+-dnl	[
+-dnl	  CXXFLAGS="$CXXFLAGS -fno-rtti"
+-dnl	])
+-
+-    KDE_CHECK_COMPILER_FLAG(fno-check-new,
+-	[
+-	  CXXFLAGS="$CXXFLAGS -fno-check-new"
+-	])
+-
+-    if test "$GXX" = "yes"; then
+-       CXXFLAGS="$CXXFLAGS"
+-
+-       if test true || test "$kde_use_debug_code" = "yes"; then
+-	 CXXFLAGS="$CXXFLAGS -Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings"
++  fi
+ 
+-         KDE_CHECK_COMPILER_FLAG(Wno-long-long,
+-	 [
+-	   CXXFLAGS="$CXXFLAGS -Wno-long-long"
+-	 ])
+-         KDE_CHECK_COMPILER_FLAG(Wnon-virtual-dtor,
+-         [
+-           CXXFLAGS="$CXXFLAGS -Wnon-virtual-dtor"
+-         ])
+-         KDE_CHECK_COMPILER_FLAG(fno-builtin,
+-         [
+-           CXXFLAGS="$CXXFLAGS -fno-builtin"
+-         ])
+-	
+-       fi
++  if test "$kde_use_warnings" = "yes"; then
++      if test "$GCC" = "yes"; then
++        case $host in
++          *-*-linux-gnu)	
++            CFLAGS="-ansi -W -Wall -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE $CFLAGS"
++            CXXFLAGS="-ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion $CXXFLAGS"
++          ;;
++        esac
++        CXXFLAGS="-Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings $CXXFLAGS"
++        KDE_CHECK_COMPILER_FLAG(Wundef,[CXXFLAGS="-Wundef $CXXFLAGS"])
++        KDE_CHECK_COMPILER_FLAG(Wbad-function-cast,[CXXFLAGS="-Wbad-function-cast $CXXFLAGS"])
++        KDE_CHECK_COMPILER_FLAG(Wno-long-long,[CXXFLAGS="-Wno-long-long $CXXFLAGS"])
++        KDE_CHECK_COMPILER_FLAG(Wnon-virtual-dtor,[CXXFLAGS="-Wnon-virtual-dtor $CXXFLAGS"])
++     fi
++  fi
+ 
+-       if test "$kde_use_strict_options" = "yes"; then
+-	CXXFLAGS="$CXXFLAGS -Wcast-qual -Wbad-function-cast -Wshadow -Wcast-align"
+-       fi
++  if test "$GCC" = "yes" && test "$kde_use_strict_options" = "yes"; then
++    CXXFLAGS="-Wcast-qual -Wshadow -Wcast-align $CXXFLAGS"
++  fi
++    
++  if test "$GXX" = "yes"; then
++    KDE_CHECK_COMPILER_FLAG(fno-exceptions,[CXXFLAGS="$CXXFLAGS -fno-exceptions"])
++    KDE_CHECK_COMPILER_FLAG(fno-check-new, [CXXFLAGS="$CXXFLAGS -fno-check-new"])
++    KDE_CHECK_COMPILER_FLAG(fexceptions, [USE_EXCEPTIONS="-fexceptions"], USE_EXCEPTIONS=	)
++  fi
++  if test "$CXX" = "KCC"; then
++    dnl unfortunately we currently cannot disable exception support in KCC
++    dnl because doing so is binary incompatible and Qt by default links with exceptions :-(
++    dnl KDE_CHECK_COMPILER_FLAG(-no_exceptions,[CXXFLAGS="$CXXFLAGS --no_exceptions"])
++    dnl KDE_CHECK_COMPILER_FLAG(-exceptions, [USE_EXCEPTIONS="--exceptions"], USE_EXCEPTIONS=	)
+ 
+-       if test "$kde_very_strict" = "yes"; then
+-         CXXFLAGS="$CXXFLAGS -Wold-style-cast -Wredundant-decls -Wconversion"
+-       fi
++    AC_ARG_ENABLE(pch,[  --enable-pch            enables precompiled header support (currently only KCC) [default=no]],
++    [
++      kde_use_pch=$enableval
++    ],[kde_use_pch=no])
++ 
++    if test "$kde_use_pch" = "yes"; then
++      dnl TODO: support --pch-dir!
++      KDE_CHECK_COMPILER_FLAG(-pch,[CXXFLAGS="$CXXFLAGS --pch"])
++      dnl the below works (but the dir must exist), but it's
++      dnl useless for a whole package.
++      dnl The are precompiled headers for each source file, so when compiling
++      dnl from scratch, it doesn't make a difference, and they take up
++      dnl around ~5Mb _per_ sourcefile.
++      dnl KDE_CHECK_COMPILER_FLAG(-pch_dir /tmp,
++      dnl   [CXXFLAGS="$CXXFLAGS --pch_dir `pwd`/pcheaders"])
+     fi
+-  fi
++    dnl this flag controls inlining. by default KCC inlines in optimisation mode
++    dnl all implementations that are defined inside the class {} declaration. 
++    dnl because of templates-compatibility with broken gcc compilers, this
++    dnl can cause excessive inlining. This flag limits it to a sane level
++    KDE_CHECK_COMPILER_FLAG(-inline_keyword_space_time=6,[CXXFLAGS="$CXXFLAGS --inline_keyword_space_time=6"])
++    KDE_CHECK_COMPILER_FLAG(-inline_auto_space_time=2,[CXXFLAGS="$CXXFLAGS --inline_auto_space_time=2"])
++    KDE_CHECK_COMPILER_FLAG(-inline_implicit_space_time=2.0,[CXXFLAGS="$CXXFLAGS --inline_implicit_space_time=2.0"])
++    KDE_CHECK_COMPILER_FLAG(-inline_generated_space_time=2.0,[CXXFLAGS="$CXXFLAGS --inline_generated_space_time=2.0"])
++    dnl Some source files are shared between multiple executables
++    dnl (or libraries) and some of those need template instantiations.
++    dnl In that case KCC needs to compile those sources with
++    dnl --one_instantiation_per_object.  To make it easy for us we compile
++    dnl _all_ objects with that flag (--one_per is a shorthand).
++    KDE_CHECK_COMPILER_FLAG(-one_per, [CXXFLAGS="$CXXFLAGS --one_per"])
++  fi
++  AC_SUBST(USE_EXCEPTIONS)
++  dnl obsolete macro - provided to keep things going
++  USE_RTTI=
++  AC_SUBST(USE_RTTI)
+ 
+-    KDE_CHECK_COMPILER_FLAG(fexceptions,
+-	[
+-	  USE_EXCEPTIONS="-fexceptions"
+-	],
+-	  USE_EXCEPTIONS=
+-	)
+-    AC_SUBST(USE_EXCEPTIONS)
+-
+-    KDE_CHECK_COMPILER_FLAG(frtti,
+-	[
+-	  USE_RTTI="-frtti"
+-	],
+-	  USE_RTTI=
+-	)
+-    AC_SUBST(USE_RTTI)
+-
+-    case "$host" in
+-      *-*-irix*)  test "$GXX" = yes && CXXFLAGS="$CXXFLAGS -D_LANGUAGE_C_PLUS_PLUS -D__LANGUAGE_C_PLUS_PLUS" ;;
+-      *-*-sysv4.2uw*) CXXFLAGS="$CXXFLAGS -D_UNIXWARE";;
+-      *-*-sysv5uw7*) CXXFLAGS="$CXXFLAGS -D_UNIXWARE7";;
++  case "$host" in
++      *-*-irix*)  test "$GXX" = yes && CXXFLAGS="-D_LANGUAGE_C_PLUS_PLUS -D__LANGUAGE_C_PLUS_PLUS $CXXFLAGS" ;;
++      *-*-sysv4.2uw*) CXXFLAGS="-D_UNIXWARE $CXXFLAGS";;
++      *-*-sysv5uw7*) CXXFLAGS="-D_UNIXWARE7 $CXXFLAGS";;
+       *-*-solaris*) 
+         if test "$GXX" = yes; then
+-          libstdcpp=`gcc -print-file-name=libstdc++.so`
++          libstdcpp=`$CXX -print-file-name=libstdc++.so`
+           if test ! -f $libstdcpp; then
+              AC_MSG_ERROR([You've compiled gcc without --enable-shared. This doesn't work with KDE. Please recompile gcc with --enable-shared to receive a libstdc++.so])
+           fi
+         fi
+         ;;
+-    esac
++  esac
+ 
+-    if test -n "$USER_CXXFLAGS"; then
+-       CXXFLAGS="$CXXFLAGS $USER_CXXFLAGS"
+-    fi
++  AC_VALIDIFY_CXXFLAGS
+ 
+-    AC_VALIDIFY_CXXFLAGS
++  AC_PROG_CXXCPP
+ 
+-    AC_MSG_CHECKING(how to run the C++ preprocessor)
+-    if test -z "$CXXCPP"; then
+-      AC_CACHE_VAL(ac_cv_prog_CXXCPP,
+-      [
+-         AC_LANG_SAVE[]dnl
+-         AC_LANG_CPLUSPLUS[]dnl
+-         CXXCPP="${CXX-g++} -E"
+-         AC_TRY_CPP([#include <stdlib.h>], , CXXCPP=/lib/cpp)
+-         ac_cv_prog_CXXCPP="$CXXCPP"
+-         AC_LANG_RESTORE[]dnl
+-     ])dnl
+-     CXXCPP="$ac_cv_prog_CXXCPP"
+-    fi
+-    AC_MSG_RESULT($CXXCPP)
+-    AC_SUBST(CXXCPP)dnl
+-
+-    # the following is to allow programs, that are known to
+-    # have problems when compiled with -O2
+-    if test -n "$CXXFLAGS"; then
++  # the following is to allow programs, that are known to
++  # have problems when compiled with -O2
++  if test -n "$CXXFLAGS"; then
+       kde_safe_IFS=$IFS
+       IFS=" "
+       NOOPT_CXXFLAGS=""
+@@ -2354,15 +2634,37 @@
+         esac
+       done
+       IFS=$kde_safe_IFS
+-    fi
+-    AC_SUBST(NOOPT_CXXFLAGS)
++  fi
+ 
+-    KDE_CHECK_FINAL
++  if test -n "$CFLAGS"; then
++      kde_safe_IFS=$IFS
++      IFS=" "
++      NOOPT_CFLAGS=""
++      for i in $CFLAGS; do
++        case $i in
++          -O*)
++                ;;
++          *)
++                NOOPT_CFLAGS="$NOOPT_CFLAGS $i"
++                ;;
++        esac
++      done
++      IFS=$kde_safe_IFS
++  fi
+ 
+-    ifdef([AM_DEPENDENCIES], AC_REQUIRE([KDE_ADD_DEPENDENCIES]), [])
++  if test "x$kde_use_qt_emb" = "xyes"; then
++    NOOPT_CXXFLAGS="$NOOPT_CXXFLAGS -fno-rtti -DQWS"
++  fi
+ 
+-    KDE_CXXFLAGS=
+-    AC_SUBST(KDE_CXXFLAGS)
++  AC_SUBST(NOOPT_CXXFLAGS)
++  AC_SUBST(NOOPT_CFLAGS)
++
++  KDE_CHECK_FINAL
++
++  ifdef([AM_DEPENDENCIES], AC_REQUIRE([KDE_ADD_DEPENDENCIES]), [])
++
++  KDE_CXXFLAGS=
++  AC_SUBST(KDE_CXXFLAGS)
+ ])
+ 
+ AC_DEFUN(KDE_ADD_DEPENDENCIES,
+@@ -2391,7 +2693,7 @@
+ 
+ LIBTOOL_SHELL="/bin/sh ./libtool"
+ #  LIBTOOL="$LIBTOOL --silent"
+-KDE_PLUGIN="-avoid-version -module -no-undefined"
++KDE_PLUGIN="-avoid-version -module -no-undefined \$(KDE_RPATH) \$(KDE_MT_LDFLAGS)"
+ AC_SUBST(KDE_PLUGIN)
+ ])
+ 
+@@ -2399,6 +2701,7 @@
+ [  AC_CHECK_SIZEOF(int, 4)dnl
+   AC_CHECK_SIZEOF(long, 4)dnl
+   AC_CHECK_SIZEOF(char *, 4)dnl
++  AC_CHECK_SIZEOF(char, 1)dnl
+ ])dnl
+ 
+ AC_DEFUN(KDE_DO_IT_ALL,
+@@ -2442,47 +2745,39 @@
+ ])
+ 
+ dnl Check for the type of the third argument of getsockname
+-AC_DEFUN(AC_CHECK_KSIZE_T,
+-[AC_MSG_CHECKING(for the third argument of getsockname)
+-AC_CACHE_VAL(ac_cv_ksize_t,
+-AC_LANG_SAVE
+-AC_LANG_CPLUSPLUS
+-[AC_TRY_COMPILE([
++AC_DEFUN(AC_CHECK_SOCKLEN_T, [
++  AC_MSG_CHECKING(for socklen_t)
++  AC_CACHE_VAL(ac_cv_socklen_t, [
++    AC_LANG_SAVE
++    AC_LANG_CPLUSPLUS
++    AC_TRY_COMPILE([
+ #include <sys/types.h>
+ #include <sys/socket.h>
+-],[
++      ],[
+ socklen_t a=0;
+ getsockname(0,(struct sockaddr*)0, &a);
+-],
+-ac_cv_ksize_t=socklen_t,
+-ac_cv_ksize_t=)
+-if test -z "$ac_cv_ksize_t"; then
+-ac_safe_cxxflags="$CXXFLAGS"
+-if test "$GCC" = "yes"; then
+-  CXXFLAGS="-Werror $CXXFLAGS"
+-fi
+-AC_TRY_COMPILE([
++      ],
++      ac_cv_socklen_t=socklen_t,
++      AC_TRY_COMPILE([
+ #include <sys/types.h>
+ #include <sys/socket.h>
+-],[
++        ],[
+ int a=0;
+ getsockname(0,(struct sockaddr*)0, &a);
+-],
+-ac_cv_ksize_t=int,
+-ac_cv_ksize_t=size_t)
+-CXXFLAGS="$ac_safe_cxxflags"
+-fi
+-AC_LANG_RESTORE
+-])
+-
+-if test -z "$ac_cv_ksize_t"; then
+-  ac_cv_ksize_t=int
+-fi
++        ],
++        ac_cv_socklen_t=int,
++        ac_cv_socklen_t=size_t
++      )
++    )
++    AC_LANG_RESTORE
++  ])
+ 
+-AC_MSG_RESULT($ac_cv_ksize_t)
+-AC_DEFINE_UNQUOTED(ksize_t, $ac_cv_ksize_t,
+-      [Define the type of the third argument for getsockname]
+-)
++  AC_MSG_RESULT($ac_cv_socklen_t)
++  if test "$ac_cv_socklen_t" != "socklen_t"; then
++    AC_DEFINE_UNQUOTED(socklen_t, $ac_cv_socklen_t,
++        [Define the real type of socklen_t])
++  fi
++  AC_DEFINE_UNQUOTED(ksize_t, socklen_t, [Compatibility define])
+ 
+ ])
+ 
+@@ -2600,7 +2895,7 @@
+ dnl From Jim Meyering.
+ dnl FIXME: migrate into libit.
+ 
+-AC_DEFUN(AM_FUNC_OBSTACK,
++AC_DEFUN([AM_FUNC_OBSTACK],
+ [AC_CACHE_CHECK([for obstacks], am_cv_func_obstack,
+  [AC_TRY_LINK([#include "obstack.h"],
+ 	      [struct obstack *mem;obstack_free(mem,(char *) 0)],
+@@ -2616,7 +2911,7 @@
+ dnl From Jim Meyering.  Use this if you use the GNU error.[ch].
+ dnl FIXME: Migrate into libit
+ 
+-AC_DEFUN(AM_FUNC_ERROR_AT_LINE,
++AC_DEFUN([AM_FUNC_ERROR_AT_LINE],
+ [AC_CACHE_CHECK([for error_at_line], am_cv_lib_error_at_line,
+  [AC_TRY_LINK([],[error_at_line(0, 0, "", 0, "");],
+               am_cv_lib_error_at_line=yes,
+@@ -2713,7 +3008,11 @@
+     AC_LANG_C
+     ac_save_ldflags="$LDFLAGS"
+     ac_save_cflags="$CFLAGS"
+-    LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm -lX11 -lXext $LIBZ $LIBSOCKET"
++    if test "x$kde_use_qt_emb" != "xyes"; then
++      LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm -lX11 -lXext $LIBZ $LIBSOCKET"
++    else
++      LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm $LIBZ $LIBSOCKET"
++    fi
+     CFLAGS="$CFLAGS $X_INCLUDES $USER_INCLUDES"
+     test -n "$XPM_INCLUDE" && CFLAGS="-I$XPM_INCLUDE $CFLAGS"
+     AC_TRY_LINK([#include <X11/xpm.h>],[],
+@@ -2765,41 +3064,46 @@
+    dnl 'yes' means DPMS_LIB="", '-lXdpms' means DPMS_LIB="-lXdpms".
+    AC_CACHE_VAL(ac_cv_have_dpms,
+    [
+-    AC_LANG_C
+-    ac_save_ldflags="$LDFLAGS"
+-    ac_save_cflags="$CFLAGS"
+-    ac_save_libs="$LIBS"
+-    LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries -lX11 -lXext $LIBSOCKET"
+-    CFLAGS="$CFLAGS $X_INCLUDES"
+-    test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
+-    AC_TRY_LINK([
+-	#include <X11/Xproto.h>
+-	#include <X11/X.h>
+-	#include <X11/Xlib.h>
+-	#include <X11/extensions/dpms.h>
+-	int foo_test_dpms()
+-	{ return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
+-	ac_cv_have_dpms="yes", [
+-            LDFLAGS="$ac_save_ldflags"
+-            CFLAGS="$ac_save_cflags"
+-            LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries -lX11 -lXext $LIBSOCKET"
+-            LIBS="$LIBS -lXdpms"
+-            CFLAGS="$CFLAGS $X_INCLUDES"
+-            test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
+-            AC_TRY_LINK([
+-	        #include <X11/Xproto.h>
+-        	#include <X11/X.h>
+-        	#include <X11/Xlib.h>
+-        	#include <X11/extensions/dpms.h>
+-        	int foo_test_dpms()
+-        	{ return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
+-        	[
+-                ac_cv_have_dpms="-lXdpms"
+-                ],ac_cv_have_dpms="no")
+-            ])
+-    LDFLAGS="$ac_save_ldflags"
+-    CFLAGS="$ac_save_cflags"
+-    LIBS="$ac_save_libs"
++    if test "x$kde_use_qt_emb" = "xyes"; then
++      AC_MSG_RESULT(no)
++      ac_cv_have_dpms="no"
++    else
++      AC_LANG_C
++      ac_save_ldflags="$LDFLAGS"
++      ac_save_cflags="$CFLAGS"
++      ac_save_libs="$LIBS"
++      LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries -lX11 -lXext $LIBSOCKET"
++      CFLAGS="$CFLAGS $X_INCLUDES"
++      test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
++      AC_TRY_LINK([
++	  #include <X11/Xproto.h>
++	  #include <X11/X.h>
++	  #include <X11/Xlib.h>
++	  #include <X11/extensions/dpms.h>
++	  int foo_test_dpms()
++	  { return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
++	  ac_cv_have_dpms="yes", [
++              LDFLAGS="$ac_save_ldflags"
++              CFLAGS="$ac_save_cflags"
++              LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries -lX11 -lXext $LIBSOCKET"
++              LIBS="$LIBS -lXdpms"
++              CFLAGS="$CFLAGS $X_INCLUDES"
++              test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
++              AC_TRY_LINK([
++	          #include <X11/Xproto.h>
++        	  #include <X11/X.h>
++        	  #include <X11/Xlib.h>
++        	  #include <X11/extensions/dpms.h>
++        	  int foo_test_dpms()
++        	  { return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
++        	  [
++                  ac_cv_have_dpms="-lXdpms"
++                  ],ac_cv_have_dpms="no")
++              ])
++      LDFLAGS="$ac_save_ldflags"
++      CFLAGS="$ac_save_cflags"
++      LIBS="$ac_save_libs"
++    fi
+    ])dnl
+ 
+   if test "$ac_cv_have_dpms" = no; then
+@@ -2839,7 +3143,10 @@
+ 
+  AC_ARG_WITH(gl, [  --without-gl            disable 3D GL modes],
+ 	gl_test=$withval, gl_test="yes")
+- if test "x$gl_test" = xno; then
++ if test "x$kde_use_qt_emb" = "xyes"; then
++   # GL and Qt Embedded is a no-go for now.
++   ac_cv_have_gl=no
++ elif test "x$gl_test" = xno; then
+    ac_cv_have_gl=no
+  else
+    AC_MSG_CHECKING(for GL)
+@@ -2848,15 +3155,19 @@
+     AC_LANG_C
+     ac_save_ldflags="$LDFLAGS"
+     ac_save_cflags="$CFLAGS"
+-    LDFLAGS="$LDFLAGS $GL_LDFLAGS $X_LDFLAGS $all_libraries -lMesaGL -lMesaGLU -lX11 -lXext -lm $LIBSOCKET"
++    LDFLAGS="$LDFLAGS $GL_LDFLAGS $X_LDFLAGS $all_libraries -lMesaGL -lMesaGLU"
++    test "x$kde_use_qt_emb" != xyes && LDFLAGS="$LDFLAGS -lX11"
++    LDFLAGS="$LDFLAGS $LIB_XEXT -lm $LIBSOCKET"
+     CFLAGS="$CFLAGS $X_INCLUDES"
+     test -n "$GL_INCLUDE" && CFLAGS="-I$GL_INCLUDE $CFLAGS"
+     AC_TRY_LINK([#include <GL/gl.h>
+-#include <GL/glu.h>           
++#include <GL/glu.h>
+ ], [],
+ 	ac_cv_have_gl="mesa", ac_cv_have_gl="no")
+     if test "x$ac_cv_have_gl" = "xno"; then
+-      LDFLAGS="$ac_save_ldflags $X_LDFLAGS $GL_LDFLAGS $all_libraries -lGL -lGLU -lX11 -lXext -lm $LIBSOCKET"
++      LDFLAGS="$ac_save_ldflags $X_LDFLAGS $GL_LDFLAGS $all_libraries -lGL -lGLU"
++      test "x$kde_use_qt_emb" != xyes && LDFLAGS="$LDFLAGS -lX11"
++      LDFLAGS="$LDFLAGS $LIB_XEXT -lm $LIBSOCKET"
+       CFLAGS="$ac_save_cflags $X_INCLUDES"
+       test -n "$GL_INCLUDE" && CFLAGS="-I$GL_INCLUDE $CFLAGS"
+       AC_TRY_LINK([#include <GL/gl.h>
+@@ -2901,153 +3212,163 @@
+  AC_SUBST(GLLIB)
+ ])
+ 
+- dnl PAM pam
+-
+- dnl Should test for PAM (Pluggable Authentication Modules)
+- AC_DEFUN(AC_PATH_PAM_DIRECT,
+- [
+- test -z "$pam_direct_test_library" && pam_direct_test_library=pam
+- test -z "$pam_direct_test_include" && pam_direct_test_include=security/pam_appl.h
+ 
+-   for ac_dir in               \
+-                               \
+-     /usr/local/include        \
+-     /usr/include              \
+-     /usr/unsupported/include  \
+-     /opt/include              \
+-     /usr/pam/include          \
+-     /usr/local/pam/include    \
+-     /usr/lib/pam/include      \
+- 			      \
+-     $extra_include            \
+-     ; \
+-   do
+-     if test -r "$ac_dir/$pam_direct_test_include"; then
+-       no_pam= ac_pam_includes=$ac_dir
+-       break
+-     fi
+-   done
++ dnl shadow password and PAM magic - maintained by ossi at kde.org
+ 
+- # First see if replacing the include by lib works.
+- for ac_dir in `echo "$ac_pam_includes" | sed s/include/lib/` \
+-                           \
+-     /lib                  \
+-     /usr/lib              \
+-     /usr/local/lib        \
+-     /usr/unsupported/lib  \
+-     /lib/security         \
+-     /usr/security/lib     \
+-     $extra_lib            \
+-     ; \
+- do
+-   for ac_extension in a so sl; do
+-     if test -r $ac_dir/lib${pam_direct_test_library}.$ac_extension; then
+-       no_pam= ac_pam_libraries=$ac_dir
+-       break 2
+-     fi
+-   done
+- done
+-])
+-
+-AC_DEFUN(AC_PATH_PAM,
+- [
++AC_DEFUN(KDE_PAM, [
+   AC_REQUIRE([KDE_CHECK_LIBDL])
+-  AC_REQUIRE_CPP()dnl
+-
+-dnl AC_CHECK_LIB(pam_misc, main, [PAM_MISC_LIB="-lpam_misc"
+-dnl              AC_DEFINE_UNQUOTED(HAVE_PAM_MISC, 1, [Define if you have a PAM implementation with the pam_misc library])], [], [-lpam $LIBDL])
+ 
+- AC_MSG_CHECKING(for PAM)
+- AC_ARG_WITH(pam,
+-[  --with-pam[=ARG]        enable support for PAM: ARG=[yes|no|service name]],
+-  [
+-    if test "x$withval" = "xyes"; then
+-      no_pam=
+-      default_pam=yes
+-    elif test "x$withval" = "xno"; then
+-      no_pam=yes
+-    else
+-      no_pam=
+-      pam_service="$withval"
+-        if test -z "$pam_service"; then
+-        default_pam=yes
+-        else
+-        default_pam=
+-        fi
++  AC_ARG_WITH(pam,
++    [  --with-pam[=ARG]        enable support for PAM: ARG=[yes|no|service name]],
++    [ if test "x$withval" = "xyes"; then
++        use_pam=yes
++        pam_service=kde
++      elif test "x$withval" = "xno"; then
++        use_pam=no
++      else
++        use_pam=yes
++        pam_service=$withval
+       fi
+-  ], no_pam=yes
+- )
++      ac_cv_path_pam="use_pam=$use_pam pam_service=$pam_service"
++    ], [
++      AC_CACHE_VAL(ac_cv_path_pam,
++        [ use_pam=no
++          AC_CHECK_LIB(pam, pam_start,
++            [ AC_CHECK_HEADER(security/pam_appl.h,
++                [ use_pam=yes
++                  pam_service=kde ]) 
++            ], , $LIBDL)
++          ac_cv_path_pam="use_pam=$use_pam pam_service=$pam_service"
++        ])
++    ])
++  eval "$ac_cv_path_pam"
+ 
+- if test ! "$no_pam" = yes; then
++  AC_MSG_CHECKING(for PAM)
++  if test "x$use_pam" = xno; then
++    AC_MSG_RESULT(no)
++    PAMLIBS=""
++  else
++    AC_MSG_RESULT(yes)
++    AC_DEFINE(HAVE_PAM, 1, [Defines if you have PAM (Pluggable Authentication Modules)])
++    PAMLIBS="$PAM_MISC_LIB -lpam $LIBDL"
+ 
+- AC_CACHE_VAL(ac_cv_path_pam,
+- [
+- ac_pam_includes=NONE
+- ac_pam_libraries=NONE
+- if test -z "$pam_libraries"; then
+-   pam_libraries=NONE
+- fi
+- if test -z "$pam_includes"; then
+-   pam_includes=NONE
+- fi
++    dnl test whether struct pam_message is const (Linux) or not (Sun)
++    AC_MSG_CHECKING(for const pam_message)
++    AC_EGREP_HEADER([struct pam_message], security/pam_appl.h,
++      [ AC_EGREP_HEADER([const struct pam_message], security/pam_appl.h,
++                        [AC_MSG_RESULT([const: Linux-type PAM])],
++                        [AC_MSG_RESULT([nonconst: Sun-type PAM])
++                        AC_DEFINE(PAM_MESSAGE_NONCONST, 1, [Define if your PAM support takes non-const arguments (Solaris)])]
++                        )],
++      [AC_MSG_RESULT([not found - assume const, Linux-type PAM])])
++  fi
+ 
+- AC_PATH_PAM_DIRECT
++  AC_SUBST(PAMLIBS)
++])
+ 
+- test "x$pam_includes" = xNONE && pam_includes=$ac_pam_includes
+- test "x$pam_libraries" = xNONE && pam_libraries=$ac_pam_libraries
++dnl DEF_PAM_SERVICE(arg name, full name, define name)
++AC_DEFUN(DEF_PAM_SERVICE, [
++  AC_ARG_WITH($1-pam,
++    [  --with-$1-pam=[val]    override PAM service from --with-pam for $2],
++    [ if test "x$use_pam" = xyes; then
++        $3_PAM_SERVICE="$withval"
++      else
++        AC_MSG_ERROR([Cannot use use --with-$1-pam, as no PAM was detected.
++You may want to enforce it by using --with-pam.])
++      fi
++    ], 
++    [ if test "x$use_pam" = xyes; then
++        $3_PAM_SERVICE="$pam_service"
++      fi
++    ])
++    if test -n "$$3_PAM_SERVICE"; then
++      AC_MSG_RESULT([The PAM service used by $2 will be $$3_PAM_SERVICE])
++      AC_DEFINE_UNQUOTED($3_PAM_SERVICE, "$$3_PAM_SERVICE", [The PAM service to be used by $2])
++    fi
++    AC_SUBST($3_PAM_SERVICE)
++])
+ 
+- if test ! "x$pam_includes" = xNONE && test ! "x$pam_libraries" = xNONE; then
+-   ac_pam_libs="-lpam $PAM_MISC_LIB $LIBDL"
+-   ac_cv_path_pam="no_pam= ac_pam_includes=$ac_pam_includes ac_pam_libraries=$ac_pam_libraries ac_pam_libs=\"$ac_pam_libs\""
+- else
+-   ac_cv_path_pam="no_pam=yes"
+- fi
+- ])
++AC_DEFUN(KDE_SHADOWPASSWD, [
++  AC_REQUIRE([KDE_PAM])
+ 
+- eval "$ac_cv_path_pam"
++  AC_CHECK_LIB(shadow, getspent,
++    [ LIBSHADOW="-lshadow"
++      ac_use_shadow=yes
++    ],
++    [ dnl for UnixWare
++      AC_CHECK_LIB(gen, getspent, 
++        [ LIBGEN="-lgen"
++          ac_use_shadow=yes
++        ], 
++        [ AC_CHECK_FUNC(getspent, 
++            [ ac_use_shadow=yes ],
++            [ ac_use_shadow=no ])
++	])
++    ])
++  AC_SUBST(LIBSHADOW)
++  AC_SUBST(LIBGEN)
++  
++  AC_MSG_CHECKING([for shadow passwords])
++
++  AC_ARG_WITH(shadow,
++    [  --with-shadow		  If you want shadow password support ],
++    [ if test "x$withval" != "xno"; then
++        use_shadow=yes
++      else
++        use_shadow=no
++      fi
++    ], [
++      use_shadow="$ac_use_shadow"
++    ])
+ 
+- fi
++  if test "x$use_shadow" = xyes; then
++    AC_MSG_RESULT(yes)
++    AC_DEFINE(HAVE_SHADOW, 1, [Define if you use shadow passwords])
++  else
++    AC_MSG_RESULT(no)
++    LIBSHADOW=
++    LIBGEN=
++  fi
+ 
+- if test "$no_pam" = yes; then
+-   AC_MSG_RESULT(no)
+- else
+-   AC_DEFINE(HAVE_PAM, 1, [Defines if you have PAM (Pluggable Authentication Modules); Redhat-Users!])
+-   PAMLIBS="$ac_pam_libs"
+-   test "x$pam_includes" = xNONE && pam_includes=$ac_pam_includes
+-   test "x$pam_libraries" = xNONE && pam_libraries=$ac_pam_libraries
+-   AC_MSG_RESULT([libraries $pam_libraries, headers $pam_includes])
+- if test "$default_pam" = yes; then
+-   AC_MSG_RESULT(["default pam service name will be used"])
+- else
+-   AC_DEFINE_UNQUOTED(KDE_PAM_SERVICE,"$pam_service", [Define to change the default name of the PAM service used by KDE])
+-   AC_MSG_RESULT(["pam service name will be: " $pam_service])
+- fi
+-dnl test whether struct pam_message is const (Linux) or not (Sun)
+-   pam_appl_h="$ac_pam_includes/security/pam_appl.h"
+-   AC_MSG_CHECKING(for const pam_message)
+-   AC_EGREP_HEADER([struct pam_message],
+-      $pam_appl_h,
+-      [ AC_EGREP_HEADER([const struct pam_message],
+-                        $pam_appl_h,
+-                        [AC_MSG_RESULT(["const: Linux-type PAM"]) ],
+-                        [AC_MSG_RESULT(["nonconst: Sun-type PAM"])
+-                        AC_DEFINE(PAM_MESSAGE_NONCONST, 1, [Define if your PAM support takes non-const arguments (Solaris)])]
+-                        )],
+-       [AC_MSG_RESULT(["not found - assume const, Linux-type PAM"])]
+-       )
+- fi
++  dnl finally make the relevant binaries setuid root, if we have shadow passwds.
++  dnl this still applies, if we could use it indirectly through pam.
++  if test "x$use_shadow" = xyes || 
++     ( test "x$use_pam" = xyes && test "x$ac_use_shadow" = xyes ); then
++      case $host in
++      *-*-freebsd* | *-*-netbsd* | *-*-openbsd*)
++	SETUIDFLAGS="-m 4755 -o root";;
++      *)
++	SETUIDFLAGS="-m 4755";;
++      esac
++  fi
++  AC_SUBST(SETUIDFLAGS)
+ 
+- if test "x$pam_libraries" != x && test "x$pam_libraries" != xNONE ; then
+-     PAMLIBPATHS="-L$pam_libraries"
+- fi
+- if test "x$pam_includes" != x && test "x$pam_includes" != xNONE ; then
+-     PAMINC="-I$pam_includes"
+- fi
++])
++
++AC_DEFUN(KDE_PASSWDLIBS, [
++  AC_REQUIRE([KDE_MISC_TESTS]) dnl for LIBCRYPT
++  AC_REQUIRE([KDE_PAM])
++  AC_REQUIRE([KDE_SHADOWPASSWD])
++
++  if test "x$use_pam" = "xyes"; then 
++    PASSWDLIBS="$PAMLIBS"
++  else
++    PASSWDLIBS="$LIBCRYPT $LIBSHADOW $LIBGEN"
++  fi
+ 
+- AC_SUBST(PAMINC)
+- AC_SUBST(PAMLIBS)
+- AC_SUBST(PAMLIBPATHS)
++  dnl FreeBSD uses a shadow-like setup, where /etc/passwd holds the users, but
++  dnl /etc/master.passwd holds the actual passwords.  /etc/master.passwd requires
++  dnl root to read, so kcheckpass needs to be root (even when using pam, since pam
++  dnl may need to read /etc/master.passwd).
++  case $host in
++  *-*-freebsd*)
++    SETUIDFLAGS="-m 4755 -o root"
++    ;;
++  *)
++    ;;
++  esac
+ 
++  AC_SUBST(PASSWDLIBS)
+ ])
+ 
+ AC_DEFUN(KDE_CHECK_LIBDL,
+@@ -3350,21 +3671,20 @@
+     case $host_os in
+  	solaris*)
+ 		KDE_CHECK_COMPILER_FLAG(mt, [USE_THREADS="-mt"])
+-                CPPFLAGS="$CPPFLAGS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_SOLARIS"
+-                echo "Setting Solaris pthread compilation options"
++                CPPFLAGS="$CPPFLAGS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_SOLARIS -DSVR4"
+     		;;
+         freebsd*)
+                 CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
+-                echo "Setting FreeBSD pthread compilation options"
+                 ;;
+         aix*)
+                 CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
+                 LIBPTHREAD="$LIBPTHREAD -lc_r"
+-                echo "Setting AIX pthread compilation options"
+                 ;;
+         linux*) CPPFLAGS="$CPPFLAGS -D_REENTRANT"
+-                USE_THREADS="$USE_THREADS -DPIC -fPIC"
+-                echo "Setting Linux pthread compilation options"
++                if test "$CXX" = "KCC"; then
++                  CXXFLAGS="$CXXFLAGS --thread_safe"
++		  NOOPT_CXXFLAGS="$NOOPT_CXXFLAGS --thread_safe"
++                fi
+                 ;;
+ 	*)
+ 		;;
+@@ -3379,13 +3699,16 @@
+   AC_REQUIRE([KDE_CHECK_PTHREAD_OPTION])
+   dnl default is yes if libpthread is found and no if no libpthread is available
+   if test -z "$LIBPTHREAD"; then
+-    kde_check_threading_default=no
++    if test -z "$USE_THREADS"; then
++      kde_check_threading_default=no
++    else
++      kde_check_threading_default=yes
++    fi
+   else
+     kde_check_threading_default=yes
+   fi
+   AC_ARG_ENABLE(threading, [  --disable-threading     disables threading even if libpthread found ],
+    kde_use_threading=$enableval, kde_use_threading=$kde_check_threading_default)
+-
+   if test "x$kde_use_threading" = "xyes"; then
+     AC_DEFINE(HAVE_LIBPTHREAD, 1, [Define if you have a working libpthread (will enable threaded code)])
+   fi
+@@ -3443,13 +3766,10 @@
+ 
+ ])
+ 
+-AC_DEFUN(KDE_CHECK_PYTHON,
++AC_DEFUN(KDE_CHECK_PYTHON_DIR,
+ [
+-AC_REQUIRE([KDE_CHECK_LIBDL])
+-AC_REQUIRE([KDE_CHECK_LIBPTHREAD])
+-
+ AC_MSG_CHECKING([for Python directory])
+-
++ 
+ AC_CACHE_VAL(kde_cv_pythondir,
+ [
+   if test -z "$PYTHONDIR"; then
+@@ -3458,15 +3778,22 @@
+     kde_cv_pythondir="$PYTHONDIR"
+   fi
+ ])
+-
++ 
+ AC_ARG_WITH(pythondir,
+ [  --with-pythondir=pythondir   use python installed in pythondir ],
+ [
+   ac_python_dir=$withval
+ ], ac_python_dir=$kde_cv_pythondir
+ )
+-
++ 
+ AC_MSG_RESULT($ac_python_dir)
++])
++
++AC_DEFUN(KDE_CHECK_PYTHON_INTERN,
++[
++AC_REQUIRE([KDE_CHECK_LIBDL])
++AC_REQUIRE([KDE_CHECK_LIBPTHREAD])
++AC_REQUIRE([KDE_CHECK_PYTHON_DIR])
+ 
+ if test -z "$1"; then
+   version="1.5"
+@@ -3482,7 +3809,7 @@
+   AC_FIND_FILE(python$version/Python.h, $python_incdirs, python_incdir)
+   python_incdir=$python_incdir/python$version
+   if test ! -r $python_incdir/Python.h; then
+-    AC_MSG_ERROR(Python.h not found.)
++    python_incdir=no
+   fi
+ fi
+ 
+@@ -3494,47 +3821,70 @@
+   AC_FIND_FILE(python$version/config/libpython$version.a, $python_libdirs, python_libdir)
+   python_libdir=$python_libdir/python$version/config
+   if test ! -r $python_libdir/libpython$version.a; then
+-    AC_MSG_ERROR(libpython$version.a not found.)
++    python_libdir=no
+   fi
+ fi
+ 
+ PYTHONLIB=-L$python_libdir
++kde_orig_LIBPYTHON=$LIBPYTHON
+ if test -z "$LIBPYTHON"; then
+-LIBPYTHON=-lpython$version
++  LIBPYTHON=-lpython$version
+ fi
+ 
+ python_libdirs="$ac_python_dir/lib /usr/lib /usr/local /usr/lib $kde_extra_libs"
+ AC_FIND_FILE(python$version/copy.py, $python_libdirs, python_moddir)
+ python_moddir=$python_moddir/python$version
+ if test ! -r $python_moddir/copy.py; then
+-  AC_MSG_ERROR(python module directory not found.)
++  python_moddir=no
+ fi
+ 
+ PYTHONMODDIR=$python_moddir
+ 
+ AC_MSG_RESULT(header $python_incdir library $python_libdir modules $python_moddir)
+ 
+-dnl Note: this test is very weak
+-kde_python_link_found=no
+-KDE_TRY_LINK_PYTHON(normal)
+-KDE_TRY_LINK_PYTHON(m, -lm)
+-KDE_TRY_LINK_PYTHON(pthread, $LIBPTHREAD)
+-KDE_TRY_LINK_PYTHON(tcl, -ltcl)
+-KDE_TRY_LINK_PYTHON(m_and_thread, [$LIBPTHREAD -lm], [],
++if test x$python_incdir = xno ||  test x$python_libdir = xno ||  test x$python_moddir = xno; then
++   LIBPYTHON=$kde_orig_LIBPYTHON
++   test "x$PYTHONLIB" = "x-Lno" && PYTHONLIB=""
++   test "x$PYTHONINC" = "x-Ino" && PYTHONINC=""
++   $2
++else 
++  dnl Note: this test is very weak
++  kde_python_link_found=no
++  KDE_TRY_LINK_PYTHON(normal)
++  KDE_TRY_LINK_PYTHON(m, -lm)
++  KDE_TRY_LINK_PYTHON(pthread, $LIBPTHREAD)
++  KDE_TRY_LINK_PYTHON(tcl, -ltcl)
++  KDE_TRY_LINK_PYTHON(db2, -ldb2)
++  KDE_TRY_LINK_PYTHON(m_and_thread, [$LIBPTHREAD -lm])
++  KDE_TRY_LINK_PYTHON(m_and_thread_and_util, [$LIBPTHREAD -lm -lutil])
++  KDE_TRY_LINK_PYTHON(m_and_thread_and_db3, [$LIBPTHREAD -lm -ldb-3 -lutil])
++  KDE_TRY_LINK_PYTHON(pthread_and_db3, [$LIBPTHREAD -ldb-3])
++  KDE_TRY_LINK_PYTHON(m_and_thread_and_db, [$LIBPTHREAD -lm -ldb -ltermcap -lutil])
++  KDE_TRY_LINK_PYTHON(pthread_and_dl, [$LIBPTHREAD $LIBDL -lutil -lreadline -lncurses -lm])
++  KDE_TRY_LINK_PYTHON(m_and_thread_and_db_special, [$LIBPTHREAD -lm -ldb -lutil], [],
+ 	[AC_MSG_WARN([it seems, Python depends on another library.
+-    Pleae use \"make LIBPTYHON='-lpython$version -lotherlib'\" to fix this
++    Pleae set LIBPYTHON to '-lpython$version -lotherlib' before calling configure to fix this
+     and contact the authors to let them know about this problem])
+ 	])
+ 
+-LIBPYTHON="$LIBPYTHON $LIBDL $LIBSOCKET"
+-AC_SUBST(PYTHONINC)
+-AC_SUBST(PYTHONLIB)
+-AC_SUBST(LIBPYTHON)
+-AC_SUBST(PYTHONMODDIR)
++  LIBPYTHON="$LIBPYTHON $LIBDL $LIBSOCKET"
++  AC_SUBST(PYTHONINC)
++  AC_SUBST(PYTHONLIB)
++  AC_SUBST(LIBPYTHON)
++  AC_SUBST(PYTHONMODDIR)
++  AC_DEFINE(HAVE_PYTHON, 1, [Define if you have the development files for python])
++fi
+ 
+ ])
+ 
+ 
++AC_DEFUN(KDE_CHECK_PYTHON,
++[
++  KDE_CHECK_PYTHON_INTERN("2.1", [KDE_CHECK_PYTHON_INTERN("2.0",
++        [ KDE_CHECK_PYTHON_INTERN($1, $2) ])
++  ])
++])
++
+ AC_DEFUN(KDE_CHECK_STL_SGI,
+ [
+     AC_MSG_CHECKING([if STL implementation is SGI like])
+@@ -3576,7 +3926,7 @@
+    AC_MSG_RESULT($kde_cv_stl_type_hp)
+ 
+    if test "$kde_cv_stl_type_hp" = "yes"; then
+-	AC_DEFINE_UNQUOTED(HAVE_HP_STL, 1, [Define if you have a STL implementation by SGI])
++	AC_DEFINE_UNQUOTED(HAVE_HP_STL, 1, [Define if you have a STL implementation by HP])
+    fi
+ ])
+ 
+@@ -3592,7 +3942,7 @@
+        KDE_CHECK_STL_HP
+ 
+        if test "$kde_cv_stl_type_hp" = "no"; then
+-         AC_MSG_ERROR("no known STL type found")
++         AC_MSG_ERROR("no known STL type found - did you forget to install libstdc++[-devel] ?")
+        fi
+     fi
+ 
+@@ -3815,6 +4165,9 @@
+ [
+ AC_LANG_C
+ cat > conftest.$ac_ext <<EOF
++#ifdef STDC_HEADERS
++# include <stdlib.h>
++#endif
+ #include <stdio.h>
+ #include <sys/param.h>
+ #ifndef MAXPATHLEN
+@@ -3883,16 +4236,6 @@
+    AC_LANG_RESTORE
+ ])
+ 
+-AC_DEFUN(KDE_CHECK_QWSPRITEFIELD,
+-[
+-  KDE_CHECK_HEADER(QwSpriteField.h, ,
+-  [
+-    AC_MSG_WARN([you don't have QwSpriteField.h somewhere. Please install
+-       QwSpriteField out of kdesupport.])
+-      $1
+-  ])
+-])
+-
+ AC_DEFUN(KDE_FAST_CONFIGURE,
+ [
+   dnl makes configure fast (needs perl)
+@@ -4018,6 +4361,7 @@
+   foo = foo+1;
+   ],
+   kde_cv_c_long_long=yes, kde_cv_c_long_long=no)
++  AC_LANG_RESTORE
+ ])
+ AC_MSG_RESULT($kde_cv_c_long_long)
+ if test "$kde_cv_c_long_long" = yes; then
+@@ -4025,3 +4369,304 @@
+ fi
+ ])
+ 
++AC_DEFUN(KDE_CHECK_LIB,
++[
++     kde_save_LIBS="$LIBS"
++     LIBS="$LIBS $all_libraries"
++     case $host_os in
++      aix*) LIBS="-brtl $LIBS"
++	test "$GCC" = yes && LIBS="-Wl,$LIBS"
++	;;
++     esac
++     AC_CHECK_LIB($1, $2, $3, $4, $5)
++     LIBS="$kde_save_LIBS"
++])
++
++
++
++
++AC_DEFUN(KDE_CHECK_INITGROUPS,
++[ 
++  AC_REQUIRE([AC_CANONICAL_HOST])
++  AC_CHECK_FUNCS(initgroups)
++  if test "x$ac_cv_func_initgroups" = "xyes"; then
++    case $host_os in
++      aix*) AC_LANG_SAVE
++            AC_LANG_CPLUSPLUS
++            AC_MSG_CHECKING([for initgroups prototype])
++            AC_CACHE_VAL(kde_cv_check_initgroups_proto,
++            [ AC_TRY_COMPILE(
++              [ #include <grp.h>
++              ],
++              [ char buffer[10];
++                gid_t id;
++                int x = initgroups(buffer,id);
++              ],
++              kde_cv_check_initgroups_proto=yes,
++              kde_cv_check_initgroups_proto=no)
++            ])
++            AC_MSG_RESULT($kde_cv_check_initgroups_proto)
++            AC_LANG_RESTORE
++            ;;
++      *)
++            kde_cv_check_initgroups_proto=yes
++            ;;
++    esac
++  else
++    kde_cv_check_initgroups_proto=no
++  fi
++  if test "x$kde_cv_check_initgroups_proto" = "xyes"; then
++    kde_check_initgroups_proto=1
++  else
++    kde_check_initgroups_proto=0
++  fi
++  AC_DEFINE_UNQUOTED(HAVE_INITGROUPS_PROTO,$kde_check_initgroups_proto,
++           [initgroups may exist but not its prototype (e.g. AIX<4.3.3:8)])
++])
++
++
++AC_DEFUN(KDE_CHECK_JAVA_DIR,
++[
++AC_MSG_CHECKING([for Java directory])
++
++AC_ARG_WITH(java,
++[  --with-java=javadir     use java installed in javadir, --without-java disables ],
++[  ac_java_dir=$withval
++], ac_java_dir=""
++)
++
++dnl at this point ac_java_dir is either a dir, 'no' to disable, or '' to say look in $PATH
++if test "x$ac_java_dir" = xno; then
++   kde_cv_java_bindir=no
++   kde_cv_java_includedir=no
++   kde_java_libjvmdir=no
++   kde_java_libhpidir=no
++else
++  if test "x$ac_java_dir" = x; then
++    dnl No option set -> look in $PATH
++    AC_CACHE_VAL(kde_cv_java_bindir,
++    [
++      dnl First look for javac in $PATH. If not found we'll look at the option.
++      KDE_FIND_PATH(javac, JAVAC, [], [])
++      if test -n "$JAVAC"; then
++          kde_cv_java_bindir=`echo $JAVAC | sed -e 's,/javac$,/,'`
++          dnl this substitution might not work - well, we test for jni.h below
++          kde_cv_java_includedir=`echo $kde_cv_java_bindir | sed -e 's,bin/$,include/,'`
++      else
++          kde_cv_java_bindir=no
++      fi
++    ])
++  else
++    dnl config option set
++    kde_cv_java_bindir=$ac_java_dir/bin
++    kde_cv_java_includedir=$ac_java_dir/include
++  fi
++fi
++
++dnl At this point kde_cv_java_bindir and kde_cv_java_includedir are either set or "no"
++if test ! "x$kde_cv_java_bindir" = xno; then
++
++  dnl Look for libjvm.so
++  kde_java_libjvmdir=`find $kde_cv_java_bindir/.. -name libjvm.so | sed 's,libjvm.so,,'|head -n 1`
++  dnl Look for libhpi.so and avoid green threads
++  kde_java_libhpidir=`find $kde_cv_java_bindir/.. -name libhpi.so | grep -v green | sed 's,libhpi.so,,'`
++
++  dnl Now check everything's fine under there
++
++  if test ! -x "$kde_cv_java_bindir/javac"; then
++    AC_MSG_ERROR([javac not found under $kde_cv_java_bindir - it seems you passed a wrong --with-java.])
++  fi
++  if test ! -x "$kde_cv_java_bindir/javah"; then
++    AC_MSG_ERROR([javah not found under $kde_cv_java_bindir. javac was found though! Use --with-java or --without-java.])
++  fi
++  if test ! -x "$kde_cv_java_bindir/jar"; then
++    AC_MSG_ERROR([jar not found under $kde_cv_java_bindir. javac was found though! Use --with-java or --without-java.])
++  fi
++  if test ! -r "$kde_cv_java_includedir/jni.h"; then
++    AC_MSG_ERROR([jni.h not found under $kde_cv_java_includedir. Use --with-java or --without-java.])
++  fi
++  if test ! -r "$kde_java_libjvmdir/libjvm.so"; then
++    AC_MSG_ERROR([libjvm.so not found under $kde_java_libjvmdir. Use --without-java.])
++  fi
++  if test ! -r "$kde_java_libhpidir/libhpi.so"; then
++    AC_MSG_ERROR([libhpi.so not found under $kde_java_libhpidir. Use --without-java.])
++  fi
++
++  jni_includes="-I$kde_cv_java_includedir"
++  dnl Strange thing, jni.h requires jni_md.h which is under genunix here..
++  dnl and under linux here..
++  test -d "$kde_cv_java_includedir/linux" && jni_includes="$jni_includes -I$kde_cv_java_includedir/linux"
++  test -d "$kde_cv_java_includedir/genunix" && jni_includes="$jni_includes -I$kde_cv_java_includedir/genunix"
++
++  dnl Check for JNI version
++  AC_LANG_SAVE
++  AC_LANG_CPLUSPLUS
++  ac_cxxflags_safe="$CXXFLAGS"
++  CXXFLAGS="$CXXFLAGS $all_includes $jni_includes"
++
++  AC_TRY_COMPILE([
++#include <jni.h>
++	    ],
++	    [
++#ifndef JNI_VERSION_1_2
++Syntax Error
++#endif
++	    ],[ kde_jni_works=yes ],
++            [ kde_jni_works=no ])
++
++  if test $kde_jni_works = no; then
++    AC_MSG_ERROR([Incorrect version of $kde_cv_java_includedir/jni.h.
++	          You need to have Java Development Kit (JDK) version 1.2. 
++	
++	          Use --with-java to specify another location.
++	          Use --without-java to configure without java support.
++        	  Or download a newer JDK and try again. 
++	          See e.g. http://java.sun.com/products/jdk/1.2 ])
++  fi
++
++  CXXFLAGS="$ac_cxxflags_safe"    
++  AC_LANG_RESTORE
++
++  dnl All tests ok, inform and subst the variables
++  AC_MSG_RESULT([javac/javah/jar in $kde_cv_java_bindir, jni.h in $kde_cv_java_includedir])
++
++  JAVAC=$kde_cv_java_bindir/javac
++  AC_SUBST(JAVAC)
++  JAVAH=$kde_cv_java_bindir/javah
++  AC_SUBST(JAVAH)
++  JAR=$kde_cv_java_bindir/jar
++  AC_SUBST(JAR)
++  AC_SUBST(jni_includes)
++  JVMLIBS="-L$kde_java_libjvmdir -ljvm -L$kde_cv_java_libhpidir -lhpi"
++  AC_SUBST(JVMLIBS)
++fi
++])
++
++dnl this is a redefinition of autoconf 2.5x's AC_FOREACH.
++dnl When the argument list becomes big, as in KDE for AC_OUTPUT in
++dnl big packages, m4_foreach is dog-slow.  So use our own version of
++dnl it.  (matz at kde.org)
++m4_define([mm_foreach],
++[m4_pushdef([$1])_mm_foreach($@)m4_popdef([$1])])
++m4_define([mm_car], [[$1]])
++m4_define([mm_car2], [[$@]])
++m4_define([_mm_foreach],
++[m4_if(m4_quote($2), [], [],
++       [m4_define([$1], [mm_car($2)])$3[]_mm_foreach([$1],
++                                                     mm_car2(m4_shift($2)),
++                                                     [$3])])])
++m4_define([AC_FOREACH],
++[mm_foreach([$1], m4_split(m4_normalize([$2])), [$3])])
++
++AC_DEFUN(KDE_NEED_FLEX,
++[
++AC_REQUIRE([AM_PROG_LEX])
++if test -z "$LEXLIB"; then
++    AC_MSG_ERROR([You need to have flex installed.])
++fi
++AC_SUBST(LEXLIB)
++])
++
++AC_DEFUN(AC_PATH_QTOPIA,
++[
++  dnl TODO: use AC_CACHE_VAL
++
++  if test -z "$1"; then
++    qtopia_minver_maj=1
++    qtopia_minver_min=5
++    qtopia_minver_pat=0
++  else
++    qtopia_minver_maj=`echo "$1" | sed -e "s/^\(.*\)\..*\..*$/\1/"`
++    qtopia_minver_min=`echo "$1" | sed -e "s/^.*\.\(.*\)\..*$/\1/"`
++    qtopia_minver_pat=`echo "$1" | sed -e "s/^.*\..*\.\(.*\)$/\1/"`
++  fi
++
++  qtopia_minver="$qtopia_minver_maj$qtopia_minver_min$qtopia_minver_pat"
++  qtopia_minverstr="$qtopia_minver_maj.$qtopia_minver_min.$qtopia_minver_pat"
++
++  AC_REQUIRE([AC_PATH_QT])
++
++  AC_MSG_CHECKING([for Qtopia])
++
++  LIB_QTOPIA="-lqpe"
++  AC_SUBST(LIB_QTOPIA)
++
++  kde_qtopia_dirs="$QPEDIR /opt/Qtopia"
++
++  ac_qtopia_incdir=NO
++
++  AC_ARG_WITH(qtopia-dir,
++              [  --with-qtopia-dir=DIR   where the root of Qtopia is installed ],
++              [  ac_qtopia_incdir="$withval"/include] ) 
++  
++  qtopia_incdirs=""
++  for dir in $kde_qtopia_dirs; do
++    qtopia_incdirs="$qtopia_incdirs $dir/include"
++  done
++
++  if test ! "$ac_qtopia_incdir" = "NO"; then
++    qtopia_incdirs="$ac_qtopia_incdir $qtopia_incdirs"
++  fi
++
++  qtopia_incdir=""
++  AC_FIND_FILE(qpe/qpeapplication.h, $qtopia_incdirs, qtopia_incdir)
++  ac_qtopia_incdir="$qtopia_incdir"
++
++  if test -z "$qtopia_incdir"; then
++    AC_MSG_ERROR([Cannot find Qtopia headers. Please check your installation.])
++  fi
++
++  qtopia_ver_maj=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION "\(.*\)\..*\..*".*,\1,p'`;
++  qtopia_ver_min=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION ".*\.\(.*\)\..*".*,\1,p'`;
++  qtopia_ver_pat=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION ".*\..*\.\(.*\)".*,\1,p'`;
++
++  qtopia_ver="$qtopia_ver_maj$qtopia_ver_min$qtopia_ver_pat"
++  qtopia_verstr="$qtopia_ver_maj.$qtopia_ver_min.$qtopia_ver_pat"
++  if test "$qtopia_ver" -lt "$qtopia_minver"; then
++    AC_MSG_ERROR([found Qtopia version $qtopia_verstr but version $qtopia_minverstr
++is required.])
++  fi
++
++  AC_LANG_SAVE
++  AC_LANG_CPLUSPLUS
++
++  ac_cxxflags_safe="$CXXFLAGS"
++  ac_ldflags_safe="$LDFLAGS"
++  ac_libs_safe="$LIBS"
++
++  CXXFLAGS="$CXXFLAGS -I$qtopia_incdir $all_includes"
++  LDFLAGS="$LDFLAGS $QT_LDFLAGS $all_libraries $USER_LDFLAGS $KDE_MT_LDFLAGS"
++  LIBS="$LIBS $LIB_QTOPIA $LIBQT"
++
++  cat > conftest.$ac_ext <<EOF
++#include "confdefs.h"
++#include <qpe/qpeapplication.h>
++#include <qpe/version.h>
++
++int main( int argc, char **argv )
++{
++    QPEApplication app( argc, argv );
++    return 0;
++}
++EOF
++
++  if AC_TRY_EVAL(ac_link) && test -s conftest; then
++    rm -f conftest*
++  else
++    rm -f conftest*
++    AC_MSG_ERROR([Cannot link small Qtopia Application. For more details look at
++the end of config.log])
++  fi
++
++  CXXFLAGS="$ac_cxxflags_safe"
++  LDFLAGS="$ac_ldflags_safe"
++  LIBS="$ac_libs_safe"
++
++  AC_LANG_RESTORE
++
++  QTOPIA_INCLUDES="-I$qtopia_incdir"
++  AC_SUBST(QTOPIA_INCLUDES)
++
++  AC_MSG_RESULT([found version $qtopia_verstr with headers at $qtopia_incdir])
++])
++
+--- kfocus-1.0.2.orig/admin/config.guess
++++ kfocus-1.0.2/admin/config.guess
+@@ -1,9 +1,9 @@
+ #! /bin/sh
+ # Attempt to guess a canonical system name.
+-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
+-#   Free Software Foundation, Inc.
++#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
++#   2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+ 
+-timestamp='2000-12-02'
++timestamp='2005-08-03'
+ 
+ # This file is free software; you can redistribute it and/or modify it
+ # under the terms of the GNU General Public License as published by
+@@ -17,15 +17,18 @@
+ #
+ # 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.
++# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
++# 02110-1301, 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.
+ 
+-# Written by Per Bothner <bothner at cygnus.com>.
+-# Please send patches to <config-patches at gnu.org>.
++
++# Originally written by Per Bothner <per at bothner.com>.
++# Please send patches to <config-patches at gnu.org>.  Submit a context
++# diff and a properly formatted ChangeLog entry.
+ #
+ # This script attempts to guess a canonical system name similar to
+ # config.sub.  If it succeeds, it prints the system name on stdout, and
+@@ -33,10 +36,6 @@
+ #
+ # The plan is that this can be called by configure scripts if you
+ # don't specify an explicit build system type.
+-#
+-# Only a few systems have been added to this list; please add others
+-# (but try to keep the structure clean).
+-#
+ 
+ me=`echo "$0" | sed -e 's,.*/,,'`
+ 
+@@ -48,12 +47,19 @@
+ Operation modes:
+   -h, --help         print this help, then exit
+   -t, --time-stamp   print date of last modification, then exit
++  -v, --version      print version number, then exit
++
++Report bugs and patches to <config-patches at gnu.org>."
++
++version="\
++GNU config.guess ($timestamp)
+ 
+-Report bugs and patches to <config-patches at gnu.org>.
++Originally written by Per Bothner.
++Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
++Free Software Foundation, Inc.
+ 
+-Written by Per Bothner.
+-Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 99, 2000
+-Free Software Foundation, Inc.  See the source for copying conditions."
++This is free software; see the source for copying conditions.  There is NO
++warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+ 
+ help="
+ Try \`$me --help' for more information."
+@@ -61,10 +67,12 @@
+ # Parse command line
+ while test $# -gt 0 ; do
+   case $1 in
+-    --time-stamp | --time* | -t)
+-       echo "$timestamp" ; exit 0 ;;
++    --time-stamp | --time* | -t )
++       echo "$timestamp" ; exit ;;
++    --version | -v )
++       echo "$version" ; exit ;;
+     --help | --h* | -h )
+-       echo "$usage"; exit 0 ;;
++       echo "$usage"; exit ;;
+     -- )     # Stop option processing
+        shift; break ;;
+     - )	# Use stdin as input.
+@@ -82,33 +90,45 @@
+   exit 1
+ fi
+ 
++trap 'exit 1' 1 2 15
+ 
+-dummy=dummy-$$
+-trap 'rm -f $dummy.c $dummy.o $dummy; exit 1' 1 2 15
++# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
++# compiler to aid in system detection is discouraged as it requires
++# temporary files to be created and, as you can see below, it is a
++# headache to deal with in a portable fashion.
+ 
+-# CC_FOR_BUILD -- compiler used by this script.
+ # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+ # use `HOST_CC' if defined, but it is deprecated.
+ 
++# Portable tmp directory creation inspired by the Autoconf team.
++
++set_cc_for_build='
++trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
++trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
++: ${TMPDIR=/tmp} ;
++ { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
++ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
++ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
++ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
++dummy=$tmp/dummy ;
++tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
+ case $CC_FOR_BUILD,$HOST_CC,$CC in
+- ,,)    echo "int dummy(){}" > $dummy.c
+-	for c in cc gcc c89 ; do
+-	  ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1
+-	  if test $? = 0 ; then
+-	     CC_FOR_BUILD="$c"; break
+-	  fi
+-	done
+-	rm -f $dummy.c $dummy.o
++ ,,)    echo "int x;" > $dummy.c ;
++	for c in cc gcc c89 c99 ; do
++	  if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
++	     CC_FOR_BUILD="$c"; break ;
++	  fi ;
++	done ;
+ 	if test x"$CC_FOR_BUILD" = x ; then
+-	  CC_FOR_BUILD=no_compiler_found
++	  CC_FOR_BUILD=no_compiler_found ;
+ 	fi
+ 	;;
+  ,,*)   CC_FOR_BUILD=$CC ;;
+  ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
+-esac
++esac ; set_cc_for_build= ;'
+ 
+ # This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+-# (ghazi at noc.rutgers.edu 8/24/94.)
++# (ghazi at noc.rutgers.edu 1994-08-24)
+ if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+ 	PATH=$PATH:/.attbin ; export PATH
+ fi
+@@ -122,29 +142,31 @@
+ 
+ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+     *:NetBSD:*:*)
+-	# Netbsd (nbsd) targets should (where applicable) match one or
++	# NetBSD (nbsd) targets should (where applicable) match one or
+ 	# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+ 	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
+ 	# switched to ELF, *-*-netbsd* would select the old
+ 	# object file format.  This provides both forward
+ 	# compatibility and a consistent mechanism for selecting the
+ 	# object file format.
+-	# Determine the machine/vendor (is the vendor relevant).
+-	case "${UNAME_MACHINE}" in
+-	    amiga) machine=m68k-unknown ;;
+-	    arm32) machine=arm-unknown ;;
+-	    atari*) machine=m68k-atari ;;
+-	    sun3*) machine=m68k-sun ;;
+-	    mac68k) machine=m68k-apple ;;
+-	    macppc) machine=powerpc-apple ;;
+-	    hp3[0-9][05]) machine=m68k-hp ;;
+-	    ibmrt|romp-ibm) machine=romp-ibm ;;
+-	    *) machine=${UNAME_MACHINE}-unknown ;;
++	#
++	# Note: NetBSD doesn't particularly care about the vendor
++	# portion of the name.  We always set it to "unknown".
++	sysctl="sysctl -n hw.machine_arch"
++	UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
++	    /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
++	case "${UNAME_MACHINE_ARCH}" in
++	    armeb) machine=armeb-unknown ;;
++	    arm*) machine=arm-unknown ;;
++	    sh3el) machine=shl-unknown ;;
++	    sh3eb) machine=sh-unknown ;;
++	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+ 	esac
+ 	# The Operating System including object format, if it has switched
+ 	# to ELF recently, or will in the future.
+-	case "${UNAME_MACHINE}" in
+-	    i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k)
++	case "${UNAME_MACHINE_ARCH}" in
++	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
++		eval $set_cc_for_build
+ 		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ 			| grep __ELF__ >/dev/null
+ 		then
+@@ -160,116 +182,125 @@
+ 		;;
+ 	esac
+ 	# The OS release
+-	release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
++	# Debian GNU/NetBSD machines have a different userland, and
++	# thus, need a distinct triplet. However, they do not need
++	# kernel version information, so it can be replaced with a
++	# suitable tag, in the style of linux-gnu.
++	case "${UNAME_VERSION}" in
++	    Debian*)
++		release='-gnu'
++		;;
++	    *)
++		release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
++		;;
++	esac
+ 	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+ 	# contains redundant information, the shorter form:
+ 	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+ 	echo "${machine}-${os}${release}"
+-	exit 0 ;;
++	exit ;;
++    *:OpenBSD:*:*)
++	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
++	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
++	exit ;;
++    *:ekkoBSD:*:*)
++	echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
++	exit ;;
++    macppc:MirBSD:*:*)
++	echo powerppc-unknown-mirbsd${UNAME_RELEASE}
++	exit ;;
++    *:MirBSD:*:*)
++	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
++	exit ;;
+     alpha:OSF1:*:*)
+-	if test $UNAME_RELEASE = "V4.0"; then
++	case $UNAME_RELEASE in
++	*4.0)
+ 		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+-	fi
++		;;
++	*5.*)
++	        UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
++		;;
++	esac
++	# According to Compaq, /usr/sbin/psrinfo has been available on
++	# OSF/1 and Tru64 systems produced since 1995.  I hope that
++	# covers most systems running today.  This code pipes the CPU
++	# types through head -n 1, so we only detect the type of CPU 0.
++	ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
++	case "$ALPHA_CPU_TYPE" in
++	    "EV4 (21064)")
++		UNAME_MACHINE="alpha" ;;
++	    "EV4.5 (21064)")
++		UNAME_MACHINE="alpha" ;;
++	    "LCA4 (21066/21068)")
++		UNAME_MACHINE="alpha" ;;
++	    "EV5 (21164)")
++		UNAME_MACHINE="alphaev5" ;;
++	    "EV5.6 (21164A)")
++		UNAME_MACHINE="alphaev56" ;;
++	    "EV5.6 (21164PC)")
++		UNAME_MACHINE="alphapca56" ;;
++	    "EV5.7 (21164PC)")
++		UNAME_MACHINE="alphapca57" ;;
++	    "EV6 (21264)")
++		UNAME_MACHINE="alphaev6" ;;
++	    "EV6.7 (21264A)")
++		UNAME_MACHINE="alphaev67" ;;
++	    "EV6.8CB (21264C)")
++		UNAME_MACHINE="alphaev68" ;;
++	    "EV6.8AL (21264B)")
++		UNAME_MACHINE="alphaev68" ;;
++	    "EV6.8CX (21264D)")
++		UNAME_MACHINE="alphaev68" ;;
++	    "EV6.9A (21264/EV69A)")
++		UNAME_MACHINE="alphaev69" ;;
++	    "EV7 (21364)")
++		UNAME_MACHINE="alphaev7" ;;
++	    "EV7.9 (21364A)")
++		UNAME_MACHINE="alphaev79" ;;
++	esac
++	# A Pn.n version is a patched version.
+ 	# A Vn.n version is a released version.
+ 	# A Tn.n version is a released field test version.
+ 	# A Xn.n version is an unreleased experimental baselevel.
+ 	# 1.2 uses "1.2" for uname -r.
+-	cat <<EOF >$dummy.s
+-	.data
+-\$Lformat:
+-	.byte 37,100,45,37,120,10,0	# "%d-%x\n"
+-
+-	.text
+-	.globl main
+-	.align 4
+-	.ent main
+-main:
+-	.frame \$30,16,\$26,0
+-	ldgp \$29,0(\$27)
+-	.prologue 1
+-	.long 0x47e03d80 # implver \$0
+-	lda \$2,-1
+-	.long 0x47e20c21 # amask \$2,\$1
+-	lda \$16,\$Lformat
+-	mov \$0,\$17
+-	not \$1,\$18
+-	jsr \$26,printf
+-	ldgp \$29,0(\$26)
+-	mov 0,\$16
+-	jsr \$26,exit
+-	.end main
+-EOF
+-	$CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
+-	if test "$?" = 0 ; then
+-		case `./$dummy` in
+-			0-0)
+-				UNAME_MACHINE="alpha"
+-				;;
+-			1-0)
+-				UNAME_MACHINE="alphaev5"
+-				;;
+-			1-1)
+-				UNAME_MACHINE="alphaev56"
+-				;;
+-			1-101)
+-				UNAME_MACHINE="alphapca56"
+-				;;
+-			2-303)
+-				UNAME_MACHINE="alphaev6"
+-				;;
+-			2-307)
+-				UNAME_MACHINE="alphaev67"
+-				;;
+-		esac
+-	fi
+-	rm -f $dummy.s $dummy
+-	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+-	exit 0 ;;
++	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
++	exit ;;
+     Alpha\ *:Windows_NT*:*)
+ 	# How do we know it's Interix rather than the generic POSIX subsystem?
+ 	# Should we change UNAME_MACHINE based on the output of uname instead
+ 	# of the specific Alpha model?
+ 	echo alpha-pc-interix
+-	exit 0 ;;
++	exit ;;
+     21064:Windows_NT:50:3)
+ 	echo alpha-dec-winnt3.5
+-	exit 0 ;;
++	exit ;;
+     Amiga*:UNIX_System_V:4.0:*)
+ 	echo m68k-unknown-sysv4
+-	exit 0;;
+-    amiga:OpenBSD:*:*)
+-	echo m68k-unknown-openbsd${UNAME_RELEASE}
+-	exit 0 ;;
++	exit ;;
+     *:[Aa]miga[Oo][Ss]:*:*)
+ 	echo ${UNAME_MACHINE}-unknown-amigaos
+-	exit 0 ;;
+-    arc64:OpenBSD:*:*)
+-	echo mips64el-unknown-openbsd${UNAME_RELEASE}
+-	exit 0 ;;
+-    arc:OpenBSD:*:*)
+-	echo mipsel-unknown-openbsd${UNAME_RELEASE}
+-	exit 0 ;;
+-    hkmips:OpenBSD:*:*)
+-	echo mips-unknown-openbsd${UNAME_RELEASE}
+-	exit 0 ;;
+-    pmax:OpenBSD:*:*)
+-	echo mipsel-unknown-openbsd${UNAME_RELEASE}
+-	exit 0 ;;
+-    sgi:OpenBSD:*:*)
+-	echo mips-unknown-openbsd${UNAME_RELEASE}
+-	exit 0 ;;
+-    wgrisc:OpenBSD:*:*)
+-	echo mipsel-unknown-openbsd${UNAME_RELEASE}
+-	exit 0 ;;
++	exit ;;
++    *:[Mm]orph[Oo][Ss]:*:*)
++	echo ${UNAME_MACHINE}-unknown-morphos
++	exit ;;
+     *:OS/390:*:*)
+ 	echo i370-ibm-openedition
+-	exit 0 ;;
++	exit ;;
++    *:z/VM:*:*)
++	echo s390-ibm-zvmoe
++	exit ;;
++    *:OS400:*:*)
++        echo powerpc-ibm-os400
++	exit ;;
+     arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+ 	echo arm-acorn-riscix${UNAME_RELEASE}
+-	exit 0;;
+-    SR2?01:HI-UX/MPP:*:*)
++	exit ;;
++    arm:riscos:*:*|arm:RISCOS:*:*)
++	echo arm-unknown-riscos
++	exit ;;
++    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+ 	echo hppa1.1-hitachi-hiuxmpp
+-	exit 0;;
++	exit ;;
+     Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+ 	# akee at wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+ 	if test "`(/bin/universe) 2>/dev/null`" = att ; then
+@@ -277,25 +308,32 @@
+ 	else
+ 		echo pyramid-pyramid-bsd
+ 	fi
+-	exit 0 ;;
++	exit ;;
+     NILE*:*:*:dcosx)
+ 	echo pyramid-pyramid-svr4
+-	exit 0 ;;
++	exit ;;
++    DRS?6000:unix:4.0:6*)
++	echo sparc-icl-nx6
++	exit ;;
++    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
++	case `/usr/bin/uname -p` in
++	    sparc) echo sparc-icl-nx7; exit ;;
++	esac ;;
+     sun4H:SunOS:5.*:*)
+ 	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+-	exit 0 ;;
++	exit ;;
+     sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+ 	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+-	exit 0 ;;
++	exit ;;
+     i86pc:SunOS:5.*:*)
+ 	echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+-	exit 0 ;;
++	exit ;;
+     sun4*:SunOS:6*:*)
+ 	# According to config.sub, this is the proper way to canonicalize
+ 	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
+ 	# it's likely to be more like Solaris than SunOS4.
+ 	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+-	exit 0 ;;
++	exit ;;
+     sun4*:SunOS:*:*)
+ 	case "`/usr/bin/arch -k`" in
+ 	    Series*|S4*)
+@@ -304,12 +342,12 @@
+ 	esac
+ 	# Japanese Language versions have a version number like `4.1.3-JL'.
+ 	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+-	exit 0 ;;
++	exit ;;
+     sun3*:SunOS:*:*)
+ 	echo m68k-sun-sunos${UNAME_RELEASE}
+-	exit 0 ;;
++	exit ;;
+     sun*:*:4.2BSD:*)
+-	UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
++	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+ 	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+ 	case "`/bin/arch`" in
+ 	    sun3)
+@@ -319,13 +357,10 @@
+ 		echo sparc-sun-sunos${UNAME_RELEASE}
+ 		;;
+ 	esac
+-	exit 0 ;;
++	exit ;;
+     aushp:SunOS:*:*)
+ 	echo sparc-auspex-sunos${UNAME_RELEASE}
+-	exit 0 ;;
+-    atari*:OpenBSD:*:*)
+-	echo m68k-unknown-openbsd${UNAME_RELEASE}
+-	exit 0 ;;
++	exit ;;
+     # The situation for MiNT is a little confusing.  The machine name
+     # can be virtually everything (everything which is not
+     # "atarist" or "atariste" at least should have a processor
+@@ -336,50 +371,42 @@
+     # be no problem.
+     atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+         echo m68k-atari-mint${UNAME_RELEASE}
+-	exit 0 ;;
++	exit ;;
+     atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+ 	echo m68k-atari-mint${UNAME_RELEASE}
+-        exit 0 ;;
++        exit ;;
+     *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+         echo m68k-atari-mint${UNAME_RELEASE}
+-	exit 0 ;;
++	exit ;;
+     milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+         echo m68k-milan-mint${UNAME_RELEASE}
+-        exit 0 ;;
++        exit ;;
+     hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+         echo m68k-hades-mint${UNAME_RELEASE}
+-        exit 0 ;;
++        exit ;;
+     *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+         echo m68k-unknown-mint${UNAME_RELEASE}
+-        exit 0 ;;
+-    sun3*:OpenBSD:*:*)
+-	echo m68k-unknown-openbsd${UNAME_RELEASE}
+-	exit 0 ;;
+-    mac68k:OpenBSD:*:*)
+-	echo m68k-unknown-openbsd${UNAME_RELEASE}
+-	exit 0 ;;
+-    mvme68k:OpenBSD:*:*)
+-	echo m68k-unknown-openbsd${UNAME_RELEASE}
+-	exit 0 ;;
+-    mvme88k:OpenBSD:*:*)
+-	echo m88k-unknown-openbsd${UNAME_RELEASE}
+-	exit 0 ;;
++        exit ;;
++    m68k:machten:*:*)
++	echo m68k-apple-machten${UNAME_RELEASE}
++	exit ;;
+     powerpc:machten:*:*)
+ 	echo powerpc-apple-machten${UNAME_RELEASE}
+-	exit 0 ;;
++	exit ;;
+     RISC*:Mach:*:*)
+ 	echo mips-dec-mach_bsd4.3
+-	exit 0 ;;
++	exit ;;
+     RISC*:ULTRIX:*:*)
+ 	echo mips-dec-ultrix${UNAME_RELEASE}
+-	exit 0 ;;
++	exit ;;
+     VAX*:ULTRIX*:*:*)
+ 	echo vax-dec-ultrix${UNAME_RELEASE}
+-	exit 0 ;;
++	exit ;;
+     2020:CLIX:*:* | 2430:CLIX:*:*)
+ 	echo clipper-intergraph-clix${UNAME_RELEASE}
+-	exit 0 ;;
++	exit ;;
+     mips:*:*:UMIPS | mips:*:*:RISCos)
++	eval $set_cc_for_build
+ 	sed 's/^	//' << EOF >$dummy.c
+ #ifdef __cplusplus
+ #include <stdio.h>  /* for printf() prototype */
+@@ -401,24 +428,33 @@
+ 	  exit (-1);
+ 	}
+ EOF
+-	$CC_FOR_BUILD $dummy.c -o $dummy \
+-	  && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
+-	  && rm $dummy.c $dummy && exit 0
+-	rm -f $dummy.c $dummy
++	$CC_FOR_BUILD -o $dummy $dummy.c &&
++	  dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
++	  SYSTEM_NAME=`$dummy $dummyarg` &&
++	    { echo "$SYSTEM_NAME"; exit; }
+ 	echo mips-mips-riscos${UNAME_RELEASE}
+-	exit 0 ;;
++	exit ;;
++    Motorola:PowerMAX_OS:*:*)
++	echo powerpc-motorola-powermax
++	exit ;;
++    Motorola:*:4.3:PL8-*)
++	echo powerpc-harris-powermax
++	exit ;;
++    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
++	echo powerpc-harris-powermax
++	exit ;;
+     Night_Hawk:Power_UNIX:*:*)
+ 	echo powerpc-harris-powerunix
+-	exit 0 ;;
++	exit ;;
+     m88k:CX/UX:7*:*)
+ 	echo m88k-harris-cxux7
+-	exit 0 ;;
++	exit ;;
+     m88k:*:4*:R4*)
+ 	echo m88k-motorola-sysv4
+-	exit 0 ;;
++	exit ;;
+     m88k:*:3*:R3*)
+ 	echo m88k-motorola-sysv3
+-	exit 0 ;;
++	exit ;;
+     AViiON:dgux:*:*)
+         # DG/UX returns AViiON for all architectures
+         UNAME_PROCESSOR=`/usr/bin/uname -p`
+@@ -434,31 +470,40 @@
+ 	else
+ 	    echo i586-dg-dgux${UNAME_RELEASE}
+ 	fi
+- 	exit 0 ;;
++ 	exit ;;
+     M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
+ 	echo m88k-dolphin-sysv3
+-	exit 0 ;;
++	exit ;;
+     M88*:*:R3*:*)
+ 	# Delta 88k system running SVR3
+ 	echo m88k-motorola-sysv3
+-	exit 0 ;;
++	exit ;;
+     XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+ 	echo m88k-tektronix-sysv3
+-	exit 0 ;;
++	exit ;;
+     Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+ 	echo m68k-tektronix-bsd
+-	exit 0 ;;
++	exit ;;
+     *:IRIX*:*:*)
+ 	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+-	exit 0 ;;
++	exit ;;
+     ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+-	echo romp-ibm-aix      # uname -m gives an 8 hex-code CPU id
+-	exit 0 ;;              # Note that: echo "'`uname -s`'" gives 'AIX '
+-    i?86:AIX:*:*)
++	echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
++	exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
++    i*86:AIX:*:*)
+ 	echo i386-ibm-aix
+-	exit 0 ;;
++	exit ;;
++    ia64:AIX:*:*)
++	if [ -x /usr/bin/oslevel ] ; then
++		IBM_REV=`/usr/bin/oslevel`
++	else
++		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
++	fi
++	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
++	exit ;;
+     *:AIX:2:3)
+ 	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
++		eval $set_cc_for_build
+ 		sed 's/^		//' << EOF >$dummy.c
+ 		#include <sys/systemcfg.h>
+ 
+@@ -470,18 +515,21 @@
+ 			exit(0);
+ 			}
+ EOF
+-		$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0
+-		rm -f $dummy.c $dummy
+-		echo rs6000-ibm-aix3.2.5
++		if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
++		then
++			echo "$SYSTEM_NAME"
++		else
++			echo rs6000-ibm-aix3.2.5
++		fi
+ 	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+ 		echo rs6000-ibm-aix3.2.4
+ 	else
+ 		echo rs6000-ibm-aix3.2
+ 	fi
+-	exit 0 ;;
+-    *:AIX:*:4)
+-	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'`
+-	if /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER >/dev/null 2>&1; then
++	exit ;;
++    *:AIX:*:[45])
++	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
++	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+ 		IBM_ARCH=rs6000
+ 	else
+ 		IBM_ARCH=powerpc
+@@ -489,41 +537,39 @@
+ 	if [ -x /usr/bin/oslevel ] ; then
+ 		IBM_REV=`/usr/bin/oslevel`
+ 	else
+-		IBM_REV=4.${UNAME_RELEASE}
++		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ 	fi
+ 	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+-	exit 0 ;;
++	exit ;;
+     *:AIX:*:*)
+ 	echo rs6000-ibm-aix
+-	exit 0 ;;
++	exit ;;
+     ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+ 	echo romp-ibm-bsd4.4
+-	exit 0 ;;
++	exit ;;
+     ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
+ 	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
+-	exit 0 ;;                           # report: romp-ibm BSD 4.3
++	exit ;;                             # report: romp-ibm BSD 4.3
+     *:BOSX:*:*)
+ 	echo rs6000-bull-bosx
+-	exit 0 ;;
++	exit ;;
+     DPX/2?00:B.O.S.:*:*)
+ 	echo m68k-bull-sysv3
+-	exit 0 ;;
++	exit ;;
+     9000/[34]??:4.3bsd:1.*:*)
+ 	echo m68k-hp-bsd
+-	exit 0 ;;
++	exit ;;
+     hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+ 	echo m68k-hp-bsd4.4
+-	exit 0 ;;
++	exit ;;
+     9000/[34678]??:HP-UX:*:*)
+ 	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ 	case "${UNAME_MACHINE}" in
+ 	    9000/31? )            HP_ARCH=m68000 ;;
+ 	    9000/[34]?? )         HP_ARCH=m68k ;;
+ 	    9000/[678][0-9][0-9])
+-              case "${HPUX_REV}" in
+-                11.[0-9][0-9])
+-                  if [ -x /usr/bin/getconf ]; then
+-                    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
++		if [ -x /usr/bin/getconf ]; then
++		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+                     sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+                     case "${sc_cpu_version}" in
+                       523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+@@ -532,12 +578,13 @@
+                         case "${sc_kernel_bits}" in
+                           32) HP_ARCH="hppa2.0n" ;;
+                           64) HP_ARCH="hppa2.0w" ;;
++			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
+                         esac ;;
+                     esac
+-                  fi ;;
+-              esac
+-              if [ "${HP_ARCH}" = "" ]; then
+-              sed 's/^              //' << EOF >$dummy.c
++		fi
++		if [ "${HP_ARCH}" = "" ]; then
++		    eval $set_cc_for_build
++		    sed 's/^              //' << EOF >$dummy.c
+ 
+               #define _HPUX_SOURCE
+               #include <stdlib.h>
+@@ -570,14 +617,39 @@
+                   exit (0);
+               }
+ EOF
+-	(CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
+-	if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
+-	rm -f $dummy.c $dummy
+-	fi ;;
++		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
++		    test -z "$HP_ARCH" && HP_ARCH=hppa
++		fi ;;
+ 	esac
++	if [ ${HP_ARCH} = "hppa2.0w" ]
++	then
++	    eval $set_cc_for_build
++
++	    # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
++	    # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
++	    # generating 64-bit code.  GNU and HP use different nomenclature:
++	    #
++	    # $ CC_FOR_BUILD=cc ./config.guess
++	    # => hppa2.0w-hp-hpux11.23
++	    # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
++	    # => hppa64-hp-hpux11.23
++
++	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
++		grep __LP64__ >/dev/null
++	    then
++		HP_ARCH="hppa2.0w"
++	    else
++		HP_ARCH="hppa64"
++	    fi
++	fi
+ 	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+-	exit 0 ;;
++	exit ;;
++    ia64:HP-UX:*:*)
++	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
++	echo ia64-hp-hpux${HPUX_REV}
++	exit ;;
+     3050*:HI-UX:*:*)
++	eval $set_cc_for_build
+ 	sed 's/^	//' << EOF >$dummy.c
+ 	#include <unistd.h>
+ 	int
+@@ -603,479 +675,447 @@
+ 	  exit (0);
+ 	}
+ EOF
+-	$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0
+-	rm -f $dummy.c $dummy
++	$CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
++		{ echo "$SYSTEM_NAME"; exit; }
+ 	echo unknown-hitachi-hiuxwe2
+-	exit 0 ;;
++	exit ;;
+     9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+ 	echo hppa1.1-hp-bsd
+-	exit 0 ;;
++	exit ;;
+     9000/8??:4.3bsd:*:*)
+ 	echo hppa1.0-hp-bsd
+-	exit 0 ;;
+-    *9??*:MPE/iX:*:*)
++	exit ;;
++    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+ 	echo hppa1.0-hp-mpeix
+-	exit 0 ;;
++	exit ;;
+     hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+ 	echo hppa1.1-hp-osf
+-	exit 0 ;;
++	exit ;;
+     hp8??:OSF1:*:*)
+ 	echo hppa1.0-hp-osf
+-	exit 0 ;;
+-    i?86:OSF1:*:*)
++	exit ;;
++    i*86:OSF1:*:*)
+ 	if [ -x /usr/sbin/sysversion ] ; then
+ 	    echo ${UNAME_MACHINE}-unknown-osf1mk
+ 	else
+ 	    echo ${UNAME_MACHINE}-unknown-osf1
+ 	fi
+-	exit 0 ;;
++	exit ;;
+     parisc*:Lites*:*:*)
+ 	echo hppa1.1-hp-lites
+-	exit 0 ;;
+-    hppa*:OpenBSD:*:*)
+-	echo hppa-unknown-openbsd
+-	exit 0 ;;
++	exit ;;
+     C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+ 	echo c1-convex-bsd
+-        exit 0 ;;
++        exit ;;
+     C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+ 	if getsysinfo -f scalar_acc
+ 	then echo c32-convex-bsd
+ 	else echo c2-convex-bsd
+ 	fi
+-        exit 0 ;;
++        exit ;;
+     C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+ 	echo c34-convex-bsd
+-        exit 0 ;;
++        exit ;;
+     C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+ 	echo c38-convex-bsd
+-        exit 0 ;;
++        exit ;;
+     C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+ 	echo c4-convex-bsd
+-        exit 0 ;;
+-    CRAY*X-MP:*:*:*)
+-	echo xmp-cray-unicos
+-        exit 0 ;;
++        exit ;;
+     CRAY*Y-MP:*:*:*)
+-	echo ymp-cray-unicos${UNAME_RELEASE}
+-	exit 0 ;;
++	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
++	exit ;;
+     CRAY*[A-Z]90:*:*:*)
+ 	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+ 	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+-	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
+-	exit 0 ;;
++	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
++	      -e 's/\.[^.]*$/.X/'
++	exit ;;
+     CRAY*TS:*:*:*)
+ 	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+-	exit 0 ;;
+-    CRAY*T3D:*:*:*)
+-	echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+-	exit 0 ;;
++	exit ;;
+     CRAY*T3E:*:*:*)
+ 	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+-	exit 0 ;;
++	exit ;;
+     CRAY*SV1:*:*:*)
+ 	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+-	exit 0 ;;
+-    CRAY-2:*:*:*)
+-	echo cray2-cray-unicos
+-        exit 0 ;;
+-    F300:UNIX_System_V:*:*)
++	exit ;;
++    *:UNICOS/mp:*:*)
++	echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
++	exit ;;
++    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
++	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+         FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+         FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+-        echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+-        exit 0 ;;
+-    F301:UNIX_System_V:*:*)
+-       echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'`
+-       exit 0 ;;
+-    hp300:OpenBSD:*:*)
+-	echo m68k-unknown-openbsd${UNAME_RELEASE}
+-	exit 0 ;;
+-    i?86:BSD/386:*:* | i?86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
++        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
++        exit ;;
++    5000:UNIX_System_V:4.*:*)
++        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
++        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
++        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
++	exit ;;
++    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+ 	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+-	exit 0 ;;
++	exit ;;
+     sparc*:BSD/OS:*:*)
+ 	echo sparc-unknown-bsdi${UNAME_RELEASE}
+-	exit 0 ;;
++	exit ;;
+     *:BSD/OS:*:*)
+ 	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+-	exit 0 ;;
++	exit ;;
+     *:FreeBSD:*:*)
+ 	echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+-	exit 0 ;;
+-    *:OpenBSD:*:*)
+-	echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+-	exit 0 ;;
++	exit ;;
+     i*:CYGWIN*:*)
+ 	echo ${UNAME_MACHINE}-pc-cygwin
+-	exit 0 ;;
++	exit ;;
+     i*:MINGW*:*)
+ 	echo ${UNAME_MACHINE}-pc-mingw32
+-	exit 0 ;;
++	exit ;;
++    i*:windows32*:*)
++    	# uname -m includes "-pc" on this system.
++    	echo ${UNAME_MACHINE}-mingw32
++	exit ;;
+     i*:PW*:*)
+ 	echo ${UNAME_MACHINE}-pc-pw32
+-	exit 0 ;;
++	exit ;;
++    x86:Interix*:[34]*)
++	echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
++	exit ;;
++    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
++	echo i${UNAME_MACHINE}-pc-mks
++	exit ;;
+     i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+ 	# How do we know it's Interix rather than the generic POSIX subsystem?
+ 	# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+ 	# UNAME_MACHINE based on the output of uname instead of i386?
+-	echo i386-pc-interix
+-	exit 0 ;;
++	echo i586-pc-interix
++	exit ;;
+     i*:UWIN*:*)
+ 	echo ${UNAME_MACHINE}-pc-uwin
+-	exit 0 ;;
++	exit ;;
++    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
++	echo x86_64-unknown-cygwin
++	exit ;;
+     p*:CYGWIN*:*)
+ 	echo powerpcle-unknown-cygwin
+-	exit 0 ;;
++	exit ;;
+     prep*:SunOS:5.*:*)
+ 	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+-	exit 0 ;;
++	exit ;;
+     *:GNU:*:*)
++	# the GNU system
+ 	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+-	exit 0 ;;
++	exit ;;
++    *:GNU/*:*:*)
++	# other systems with GNU libc and userland
++	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
++	exit ;;
+     i*86:Minix:*:*)
+ 	echo ${UNAME_MACHINE}-pc-minix
+-	exit 0 ;;
+-    *:Linux:*:*)
+-
++	exit ;;
++    arm*:Linux:*:*)
++	echo ${UNAME_MACHINE}-unknown-linux-gnu
++	exit ;;
++    cris:Linux:*:*)
++	echo cris-axis-linux-gnu
++	exit ;;
++    crisv32:Linux:*:*)
++	echo crisv32-axis-linux-gnu
++	exit ;;
++    frv:Linux:*:*)
++    	echo frv-unknown-linux-gnu
++	exit ;;
++    ia64:Linux:*:*)
++	echo ${UNAME_MACHINE}-unknown-linux-gnu
++	exit ;;
++    m32r*:Linux:*:*)
++	echo ${UNAME_MACHINE}-unknown-linux-gnu
++	exit ;;
++    m68*:Linux:*:*)
++	echo ${UNAME_MACHINE}-unknown-linux-gnu
++	exit ;;
++    mips:Linux:*:*)
++	eval $set_cc_for_build
++	sed 's/^	//' << EOF >$dummy.c
++	#undef CPU
++	#undef mips
++	#undef mipsel
++	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
++	CPU=mipsel
++	#else
++	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
++	CPU=mips
++	#else
++	CPU=
++	#endif
++	#endif
++EOF
++	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
++	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
++	;;
++    mips64:Linux:*:*)
++	eval $set_cc_for_build
++	sed 's/^	//' << EOF >$dummy.c
++	#undef CPU
++	#undef mips64
++	#undef mips64el
++	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
++	CPU=mips64el
++	#else
++	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
++	CPU=mips64
++	#else
++	CPU=
++	#endif
++	#endif
++EOF
++	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
++	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
++	;;
++    or32:Linux:*:*)
++	echo or32-unknown-linux-gnu
++	exit ;;
++    ppc:Linux:*:*)
++	echo powerpc-unknown-linux-gnu
++	exit ;;
++    ppc64:Linux:*:*)
++	echo powerpc64-unknown-linux-gnu
++	exit ;;
++    alpha:Linux:*:*)
++	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
++	  EV5)   UNAME_MACHINE=alphaev5 ;;
++	  EV56)  UNAME_MACHINE=alphaev56 ;;
++	  PCA56) UNAME_MACHINE=alphapca56 ;;
++	  PCA57) UNAME_MACHINE=alphapca56 ;;
++	  EV6)   UNAME_MACHINE=alphaev6 ;;
++	  EV67)  UNAME_MACHINE=alphaev67 ;;
++	  EV68*) UNAME_MACHINE=alphaev68 ;;
++        esac
++	objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
++	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
++	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
++	exit ;;
++    parisc:Linux:*:* | hppa:Linux:*:*)
++	# Look for CPU level
++	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
++	  PA7*) echo hppa1.1-unknown-linux-gnu ;;
++	  PA8*) echo hppa2.0-unknown-linux-gnu ;;
++	  *)    echo hppa-unknown-linux-gnu ;;
++	esac
++	exit ;;
++    parisc64:Linux:*:* | hppa64:Linux:*:*)
++	echo hppa64-unknown-linux-gnu
++	exit ;;
++    s390:Linux:*:* | s390x:Linux:*:*)
++	echo ${UNAME_MACHINE}-ibm-linux
++	exit ;;
++    sh64*:Linux:*:*)
++    	echo ${UNAME_MACHINE}-unknown-linux-gnu
++	exit ;;
++    sh*:Linux:*:*)
++	echo ${UNAME_MACHINE}-unknown-linux-gnu
++	exit ;;
++    sparc:Linux:*:* | sparc64:Linux:*:*)
++	echo ${UNAME_MACHINE}-unknown-linux-gnu
++	exit ;;
++    x86_64:Linux:*:*)
++	echo x86_64-unknown-linux-gnu
++	exit ;;
++    i*86:Linux:*:*)
+ 	# The BFD linker knows what the default object file format is, so
+ 	# first see if it will tell us. cd to the root directory to prevent
+ 	# problems with other programs or directories called `ld' in the path.
+-	ld_supported_emulations=`cd /; ld --help 2>&1 \
+-			 | sed -ne '/supported emulations:/!d
++	# Set LC_ALL=C to ensure ld outputs messages in English.
++	ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
++			 | sed -ne '/supported targets:/!d
+ 				    s/[ 	][ 	]*/ /g
+-				    s/.*supported emulations: *//
++				    s/.*supported targets: *//
+ 				    s/ .*//
+ 				    p'`
+-        case "$ld_supported_emulations" in
+-	  *ia64)
+-		echo "${UNAME_MACHINE}-unknown-linux"
+-		exit 0
+-		;;
+-	  i?86linux)
+-		echo "${UNAME_MACHINE}-pc-linux-gnuaout"
+-		exit 0
+-		;;
+-	  elf_i?86)
++        case "$ld_supported_targets" in
++	  elf32-i386)
+ 		TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
+ 		;;
+-	  i?86coff)
++	  a.out-i386-linux)
++		echo "${UNAME_MACHINE}-pc-linux-gnuaout"
++		exit ;;
++	  coff-i386)
+ 		echo "${UNAME_MACHINE}-pc-linux-gnucoff"
+-		exit 0
+-		;;
+-	  sparclinux)
+-		echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
+-		exit 0
+-		;;
+-	  elf32_sparc)
+-		echo "${UNAME_MACHINE}-unknown-linux-gnu"
+-		exit 0
+-		;;
+-	  armlinux)
+-		echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
+-		exit 0
+-		;;
+-	  elf32arm*)
+-		echo "${UNAME_MACHINE}-unknown-linux-gnuoldld"
+-		exit 0
+-		;;
+-	  armelf_linux*)
+-		echo "${UNAME_MACHINE}-unknown-linux-gnu"
+-		exit 0
+-		;;
+-	  m68klinux)
+-		echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
+-		exit 0
+-		;;
+-	  elf32ppc | elf32ppclinux)
+-		# Determine Lib Version
+-		cat >$dummy.c <<EOF
+-#include <features.h>
+-#if defined(__GLIBC__)
+-extern char __libc_version[];
+-extern char __libc_release[];
+-#endif
+-main(argc, argv)
+-     int argc;
+-     char *argv[];
+-{
+-#if defined(__GLIBC__)
+-  printf("%s %s\n", __libc_version, __libc_release);
+-#else
+-  printf("unkown\n");
+-#endif
+-  return 0;
+-}
+-EOF
+-		LIBC=""
+-		$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null
+-		if test "$?" = 0 ; then
+-			./$dummy | grep 1\.99 > /dev/null
+-			if test "$?" = 0 ; then
+-				LIBC="libc1"
+-			fi
+-		fi
+-		rm -f $dummy.c $dummy
+-		echo powerpc-unknown-linux-gnu${LIBC}
+-		exit 0
+-		;;
+-	  shelf_linux)
+-		echo "${UNAME_MACHINE}-unknown-linux-gnu"
+-		exit 0
+-		;;
++		exit ;;
++	  "")
++		# Either a pre-BFD a.out linker (linux-gnuoldld) or
++		# one that does not give us useful --help.
++		echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
++		exit ;;
+ 	esac
+-
+-	if test "${UNAME_MACHINE}" = "alpha" ; then
+-		cat <<EOF >$dummy.s
+-			.data
+-		\$Lformat:
+-			.byte 37,100,45,37,120,10,0	# "%d-%x\n"
+-
+-			.text
+-			.globl main
+-			.align 4
+-			.ent main
+-		main:
+-			.frame \$30,16,\$26,0
+-			ldgp \$29,0(\$27)
+-			.prologue 1
+-			.long 0x47e03d80 # implver \$0
+-			lda \$2,-1
+-			.long 0x47e20c21 # amask \$2,\$1
+-			lda \$16,\$Lformat
+-			mov \$0,\$17
+-			not \$1,\$18
+-			jsr \$26,printf
+-			ldgp \$29,0(\$26)
+-			mov 0,\$16
+-			jsr \$26,exit
+-			.end main
+-EOF
+-		LIBC=""
+-		$CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
+-		if test "$?" = 0 ; then
+-			case `./$dummy` in
+-			0-0)
+-				UNAME_MACHINE="alpha"
+-				;;
+-			1-0)
+-				UNAME_MACHINE="alphaev5"
+-				;;
+-			1-1)
+-				UNAME_MACHINE="alphaev56"
+-				;;
+-			1-101)
+-				UNAME_MACHINE="alphapca56"
+-				;;
+-			2-303)
+-				UNAME_MACHINE="alphaev6"
+-				;;
+-			2-307)
+-				UNAME_MACHINE="alphaev67"
+-				;;
+-			esac
+-
+-			objdump --private-headers $dummy | \
+-			  grep ld.so.1 > /dev/null
+-			if test "$?" = 0 ; then
+-				LIBC="libc1"
+-			fi
+-		fi
+-		rm -f $dummy.s $dummy
+-		echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0
+-	elif test "${UNAME_MACHINE}" = "mips" ; then
+-	  cat >$dummy.c <<EOF
+-#ifdef __cplusplus
+-#include <stdio.h>  /* for printf() prototype */
+-	int main (int argc, char *argv[]) {
+-#else
+-	int main (argc, argv) int argc; char *argv[]; {
+-#endif
+-#ifdef __MIPSEB__
+-  printf ("%s-unknown-linux-gnu\n", argv[1]);
+-#endif
+-#ifdef __MIPSEL__
+-  printf ("%sel-unknown-linux-gnu\n", argv[1]);
+-#endif
+-  return 0;
+-}
+-EOF
+-	  $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
+-	  rm -f $dummy.c $dummy
+-	elif test "${UNAME_MACHINE}" = "s390"; then
+-	  echo s390-ibm-linux && exit 0
+-	elif test "${UNAME_MACHINE}" = "x86_64"; then
+-	  echo x86_64-unknown-linux-gnu && exit 0
+-	elif test "${UNAME_MACHINE}" = "parisc" -o "${UNAME_MACHINE}" = "hppa"; then
+-	  # Look for CPU level
+-	  case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+-	    PA7*)
+-		echo hppa1.1-unknown-linux-gnu
+-		;;
+-	    PA8*)
+-		echo hppa2.0-unknown-linux-gnu
+-		;;
+-	    *)
+-		echo hppa-unknown-linux-gnu
+-		;;
+-	  esac
+-	  exit 0
+-	else
+-	  # Either a pre-BFD a.out linker (linux-gnuoldld)
+-	  # or one that does not give us useful --help.
+-	  # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout.
+-	  # If ld does not provide *any* "supported emulations:"
+-	  # that means it is gnuoldld.
+-	  test -z "$ld_supported_emulations" \
+-	    && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
+-
+-	  case "${UNAME_MACHINE}" in
+-	  i?86)
+-	    VENDOR=pc;
+-	    ;;
+-	  *)
+-	    VENDOR=unknown;
+-	    ;;
+-	  esac
+-	  # Determine whether the default compiler is a.out or elf
+-	  cat >$dummy.c <<EOF
+-#include <features.h>
+-#ifdef __cplusplus
+-#include <stdio.h>  /* for printf() prototype */
+-	int main (int argc, char *argv[]) {
+-#else
+-	int main (argc, argv) int argc; char *argv[]; {
+-#endif
+-#ifdef __ELF__
+-# ifdef __GLIBC__
+-#  if __GLIBC__ >= 2
+-    printf ("%s-${VENDOR}-linux-gnu\n", argv[1]);
+-#  else
+-    printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
+-#  endif
+-# else
+-   printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
+-# endif
+-#else
+-  printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]);
+-#endif
+-  return 0;
+-}
++	# Determine whether the default compiler is a.out or elf
++	eval $set_cc_for_build
++	sed 's/^	//' << EOF >$dummy.c
++	#include <features.h>
++	#ifdef __ELF__
++	# ifdef __GLIBC__
++	#  if __GLIBC__ >= 2
++	LIBC=gnu
++	#  else
++	LIBC=gnulibc1
++	#  endif
++	# else
++	LIBC=gnulibc1
++	# endif
++	#else
++	#ifdef __INTEL_COMPILER
++	LIBC=gnu
++	#else
++	LIBC=gnuaout
++	#endif
++	#endif
++	#ifdef __dietlibc__
++	LIBC=dietlibc
++	#endif
+ EOF
+-	  $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
+-	  rm -f $dummy.c $dummy
+-	  test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
+-	fi ;;
+-# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.  earlier versions
+-# are messed up and put the nodename in both sysname and nodename.
+-    i?86:DYNIX/ptx:4*:*)
++	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
++	test x"${LIBC}" != x && {
++		echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
++		exit
++	}
++	test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
++	;;
++    i*86:DYNIX/ptx:4*:*)
++	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
++	# earlier versions are messed up and put the nodename in both
++	# sysname and nodename.
+ 	echo i386-sequent-sysv4
+-	exit 0 ;;
+-    i?86:UNIX_SV:4.2MP:2.*)
++	exit ;;
++    i*86:UNIX_SV:4.2MP:2.*)
+         # Unixware is an offshoot of SVR4, but it has its own version
+         # number series starting with 2...
+         # I am not positive that other SVR4 systems won't match this,
+ 	# I just have to hope.  -- rms.
+         # Use sysv4.2uw... so that sysv4* matches it.
+ 	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+-	exit 0 ;;
+-    i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*)
++	exit ;;
++    i*86:OS/2:*:*)
++	# If we were able to find `uname', then EMX Unix compatibility
++	# is probably installed.
++	echo ${UNAME_MACHINE}-pc-os2-emx
++	exit ;;
++    i*86:XTS-300:*:STOP)
++	echo ${UNAME_MACHINE}-unknown-stop
++	exit ;;
++    i*86:atheos:*:*)
++	echo ${UNAME_MACHINE}-unknown-atheos
++	exit ;;
++    i*86:syllable:*:*)
++	echo ${UNAME_MACHINE}-pc-syllable
++	exit ;;
++    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
++	echo i386-unknown-lynxos${UNAME_RELEASE}
++	exit ;;
++    i*86:*DOS:*:*)
++	echo ${UNAME_MACHINE}-pc-msdosdjgpp
++	exit ;;
++    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+ 	UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+ 	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+ 		echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+ 	else
+ 		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+ 	fi
+-	exit 0 ;;
+-    i?86:*:5:7*)
+-        # Fixed at (any) Pentium or better
+-        UNAME_MACHINE=i586
+-        if [ ${UNAME_SYSTEM} = "UnixWare" ] ; then
+-	    echo ${UNAME_MACHINE}-sco-sysv${UNAME_RELEASE}uw${UNAME_VERSION}
+-	else
+-	    echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
+-	fi
+-	exit 0 ;;
+-    i?86:*:3.2:*)
++	exit ;;
++    i*86:*:5:[678]*)
++    	# UnixWare 7.x, OpenUNIX and OpenServer 6.
++	case `/bin/uname -X | grep "^Machine"` in
++	    *486*)	     UNAME_MACHINE=i486 ;;
++	    *Pentium)	     UNAME_MACHINE=i586 ;;
++	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
++	esac
++	echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
++	exit ;;
++    i*86:*:3.2:*)
+ 	if test -f /usr/options/cb.name; then
+ 		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+ 		echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+ 	elif /bin/uname -X 2>/dev/null >/dev/null ; then
+-		UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
+-		(/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
+-		(/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
++		UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
++		(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
++		(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+ 			&& UNAME_MACHINE=i586
+-		(/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \
++		(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+ 			&& UNAME_MACHINE=i686
+-		(/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \
++		(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+ 			&& UNAME_MACHINE=i686
+ 		echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+ 	else
+ 		echo ${UNAME_MACHINE}-pc-sysv32
+ 	fi
+-	exit 0 ;;
+-    i?86:*DOS:*:*)
+-	echo ${UNAME_MACHINE}-pc-msdosdjgpp
+-	exit 0 ;;
++	exit ;;
+     pc:*:*:*)
+ 	# Left here for compatibility:
+         # uname -m prints for DJGPP always 'pc', but it prints nothing about
+         # the processor, so we play safe by assuming i386.
+ 	echo i386-pc-msdosdjgpp
+-        exit 0 ;;
++        exit ;;
+     Intel:Mach:3*:*)
+ 	echo i386-pc-mach3
+-	exit 0 ;;
++	exit ;;
+     paragon:*:*:*)
+ 	echo i860-intel-osf1
+-	exit 0 ;;
++	exit ;;
+     i860:*:4.*:*) # i860-SVR4
+ 	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+ 	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+ 	else # Add other i860-SVR4 vendors below as they are discovered.
+ 	  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
+ 	fi
+-	exit 0 ;;
++	exit ;;
+     mini*:CTIX:SYS*5:*)
+ 	# "miniframe"
+ 	echo m68010-convergent-sysv
+-	exit 0 ;;
+-    M68*:*:R3V[567]*:*)
+-	test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
+-    3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
++	exit ;;
++    mc68k:UNIX:SYSTEM5:3.51m)
++	echo m68k-convergent-sysv
++	exit ;;
++    M680?0:D-NIX:5.3:*)
++	echo m68k-diab-dnix
++	exit ;;
++    M68*:*:R3V[5678]*:*)
++	test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
++    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
+ 	OS_REL=''
+ 	test -r /etc/.relid \
+ 	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ 	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+-	  && echo i486-ncr-sysv4.3${OS_REL} && exit 0
++	  && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+ 	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+-	  && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
++	  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+     3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+         /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+-          && echo i486-ncr-sysv4 && exit 0 ;;
+-    m68*:LynxOS:2.*:*)
++          && { echo i486-ncr-sysv4; exit; } ;;
++    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+ 	echo m68k-unknown-lynxos${UNAME_RELEASE}
+-	exit 0 ;;
++	exit ;;
+     mc68030:UNIX_System_V:4.*:*)
+ 	echo m68k-atari-sysv4
+-	exit 0 ;;
+-    i?86:LynxOS:2.*:* | i?86:LynxOS:3.[01]*:*)
+-	echo i386-unknown-lynxos${UNAME_RELEASE}
+-	exit 0 ;;
++	exit ;;
+     TSUNAMI:LynxOS:2.*:*)
+ 	echo sparc-unknown-lynxos${UNAME_RELEASE}
+-	exit 0 ;;
+-    rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*)
++	exit ;;
++    rs6000:LynxOS:2.*:*)
+ 	echo rs6000-unknown-lynxos${UNAME_RELEASE}
+-	exit 0 ;;
++	exit ;;
++    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
++	echo powerpc-unknown-lynxos${UNAME_RELEASE}
++	exit ;;
+     SM[BE]S:UNIX_SV:*:*)
+ 	echo mips-dde-sysv${UNAME_RELEASE}
+-	exit 0 ;;
++	exit ;;
+     RM*:ReliantUNIX-*:*:*)
+ 	echo mips-sni-sysv4
+-	exit 0 ;;
++	exit ;;
+     RM*:SINIX-*:*:*)
+ 	echo mips-sni-sysv4
+-	exit 0 ;;
++	exit ;;
+     *:SINIX-*:*:*)
+ 	if uname -p 2>/dev/null >/dev/null ; then
+ 		UNAME_MACHINE=`(uname -p) 2>/dev/null`
+@@ -1083,78 +1123,99 @@
+ 	else
+ 		echo ns32k-sni-sysv
+ 	fi
+-	exit 0 ;;
+-    PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+-                           # says <Richard.M.Bartel at ccMail.Census.GOV>
++	exit ;;
++    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
++                      # says <Richard.M.Bartel at ccMail.Census.GOV>
+         echo i586-unisys-sysv4
+-        exit 0 ;;
++        exit ;;
+     *:UNIX_System_V:4*:FTX*)
+ 	# From Gerald Hewes <hewes at openmarket.com>.
+ 	# How about differentiating between stratus architectures? -djm
+ 	echo hppa1.1-stratus-sysv4
+-	exit 0 ;;
++	exit ;;
+     *:*:*:FTX*)
+ 	# From seanf at swdc.stratus.com.
+ 	echo i860-stratus-sysv4
+-	exit 0 ;;
++	exit ;;
++    i*86:VOS:*:*)
++	# From Paul.Green at stratus.com.
++	echo ${UNAME_MACHINE}-stratus-vos
++	exit ;;
++    *:VOS:*:*)
++	# From Paul.Green at stratus.com.
++	echo hppa1.1-stratus-vos
++	exit ;;
+     mc68*:A/UX:*:*)
+ 	echo m68k-apple-aux${UNAME_RELEASE}
+-	exit 0 ;;
++	exit ;;
+     news*:NEWS-OS:6*:*)
+ 	echo mips-sony-newsos6
+-	exit 0 ;;
++	exit ;;
+     R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+ 	if [ -d /usr/nec ]; then
+ 	        echo mips-nec-sysv${UNAME_RELEASE}
+ 	else
+ 	        echo mips-unknown-sysv${UNAME_RELEASE}
+ 	fi
+-        exit 0 ;;
++        exit ;;
+     BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
+ 	echo powerpc-be-beos
+-	exit 0 ;;
++	exit ;;
+     BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
+ 	echo powerpc-apple-beos
+-	exit 0 ;;
++	exit ;;
+     BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
+ 	echo i586-pc-beos
+-	exit 0 ;;
++	exit ;;
+     SX-4:SUPER-UX:*:*)
+ 	echo sx4-nec-superux${UNAME_RELEASE}
+-	exit 0 ;;
++	exit ;;
+     SX-5:SUPER-UX:*:*)
+ 	echo sx5-nec-superux${UNAME_RELEASE}
+-	exit 0 ;;
++	exit ;;
++    SX-6:SUPER-UX:*:*)
++	echo sx6-nec-superux${UNAME_RELEASE}
++	exit ;;
+     Power*:Rhapsody:*:*)
+ 	echo powerpc-apple-rhapsody${UNAME_RELEASE}
+-	exit 0 ;;
++	exit ;;
+     *:Rhapsody:*:*)
+ 	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+-	exit 0 ;;
++	exit ;;
+     *:Darwin:*:*)
+-	echo `uname -p`-apple-darwin${UNAME_RELEASE}
+-	exit 0 ;;
++	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
++	case $UNAME_PROCESSOR in
++	    *86) UNAME_PROCESSOR=i686 ;;
++	    unknown) UNAME_PROCESSOR=powerpc ;;
++	esac
++	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
++	exit ;;
+     *:procnto*:*:* | *:QNX:[0123456789]*:*)
+-	if test "${UNAME_MACHINE}" = "x86pc"; then
++	UNAME_PROCESSOR=`uname -p`
++	if test "$UNAME_PROCESSOR" = "x86"; then
++		UNAME_PROCESSOR=i386
+ 		UNAME_MACHINE=pc
+ 	fi
+-	echo `uname -p`-${UNAME_MACHINE}-nto-qnx
+-	exit 0 ;;
++	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
++	exit ;;
+     *:QNX:*:4*)
+ 	echo i386-pc-qnx
+-	exit 0 ;;
+-    NSR-[KW]:NONSTOP_KERNEL:*:*)
++	exit ;;
++    NSE-?:NONSTOP_KERNEL:*:*)
++	echo nse-tandem-nsk${UNAME_RELEASE}
++	exit ;;
++    NSR-?:NONSTOP_KERNEL:*:*)
+ 	echo nsr-tandem-nsk${UNAME_RELEASE}
+-	exit 0 ;;
++	exit ;;
+     *:NonStop-UX:*:*)
+ 	echo mips-compaq-nonstopux
+-	exit 0 ;;
++	exit ;;
+     BS2000:POSIX*:*:*)
+ 	echo bs2000-siemens-sysv
+-	exit 0 ;;
++	exit ;;
+     DS/*:UNIX_System_V:*:*)
+ 	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+-	exit 0 ;;
++	exit ;;
+     *:Plan9:*:*)
+ 	# "uname -m" is not consistent, so use $cputype instead. 386
+ 	# is converted to i386 for consistency with other x86
+@@ -1165,17 +1226,50 @@
+ 	    UNAME_MACHINE="$cputype"
+ 	fi
+ 	echo ${UNAME_MACHINE}-unknown-plan9
+-	exit 0 ;;
+-    i?86:OS/2:*:*)
+-	# If we were able to find `uname', then EMX Unix compatibility
+-	# is probably installed.
+-	echo ${UNAME_MACHINE}-pc-os2-emx
+-	exit 0 ;;
++	exit ;;
++    *:TOPS-10:*:*)
++	echo pdp10-unknown-tops10
++	exit ;;
++    *:TENEX:*:*)
++	echo pdp10-unknown-tenex
++	exit ;;
++    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
++	echo pdp10-dec-tops20
++	exit ;;
++    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
++	echo pdp10-xkl-tops20
++	exit ;;
++    *:TOPS-20:*:*)
++	echo pdp10-unknown-tops20
++	exit ;;
++    *:ITS:*:*)
++	echo pdp10-unknown-its
++	exit ;;
++    SEI:*:*:SEIUX)
++        echo mips-sei-seiux${UNAME_RELEASE}
++	exit ;;
++    *:DragonFly:*:*)
++	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
++	exit ;;
++    *:*VMS:*:*)
++    	UNAME_MACHINE=`(uname -p) 2>/dev/null`
++	case "${UNAME_MACHINE}" in
++	    A*) echo alpha-dec-vms ; exit ;;
++	    I*) echo ia64-dec-vms ; exit ;;
++	    V*) echo vax-dec-vms ; exit ;;
++	esac ;;
++    *:XENIX:*:SysV)
++	echo i386-pc-xenix
++	exit ;;
++    i*86:skyos:*:*)
++	echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
++	exit ;;
+ esac
+ 
+ #echo '(No uname command or uname output not recognized.)' 1>&2
+ #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+ 
++eval $set_cc_for_build
+ cat >$dummy.c <<EOF
+ #ifdef _SEQUENT_
+ # include <sys/types.h>
+@@ -1201,7 +1295,7 @@
+ #endif
+ 
+ #if defined (__arm) && defined (__acorn) && defined (__unix)
+-  printf ("arm-acorn-riscix"); exit (0);
++  printf ("arm-acorn-riscix\n"); exit (0);
+ #endif
+ 
+ #if defined (hp300) && !defined (hpux)
+@@ -1262,11 +1356,24 @@
+ #endif
+ 
+ #if defined (vax)
+-#if !defined (ultrix)
+-  printf ("vax-dec-bsd\n"); exit (0);
+-#else
+-  printf ("vax-dec-ultrix\n"); exit (0);
+-#endif
++# if !defined (ultrix)
++#  include <sys/param.h>
++#  if defined (BSD)
++#   if BSD == 43
++      printf ("vax-dec-bsd4.3\n"); exit (0);
++#   else
++#    if BSD == 199006
++      printf ("vax-dec-bsd4.3reno\n"); exit (0);
++#    else
++      printf ("vax-dec-bsd\n"); exit (0);
++#    endif
++#   endif
++#  else
++    printf ("vax-dec-bsd\n"); exit (0);
++#  endif
++# else
++    printf ("vax-dec-ultrix\n"); exit (0);
++# endif
+ #endif
+ 
+ #if defined (alliant) && defined (i860)
+@@ -1277,12 +1384,12 @@
+ }
+ EOF
+ 
+-$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm $dummy.c $dummy && exit 0
+-rm -f $dummy.c $dummy
++$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
++	{ echo "$SYSTEM_NAME"; exit; }
+ 
+ # Apollos put the system type in the environment.
+ 
+-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
++test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
+ 
+ # Convex versions that predate uname can use getsysinfo(1)
+ 
+@@ -1291,39 +1398,42 @@
+     case `getsysinfo -f cpu_type` in
+     c1*)
+ 	echo c1-convex-bsd
+-	exit 0 ;;
++	exit ;;
+     c2*)
+ 	if getsysinfo -f scalar_acc
+ 	then echo c32-convex-bsd
+ 	else echo c2-convex-bsd
+ 	fi
+-	exit 0 ;;
++	exit ;;
+     c34*)
+ 	echo c34-convex-bsd
+-	exit 0 ;;
++	exit ;;
+     c38*)
+ 	echo c38-convex-bsd
+-	exit 0 ;;
++	exit ;;
+     c4*)
+ 	echo c4-convex-bsd
+-	exit 0 ;;
++	exit ;;
+     esac
+ fi
+ 
+ cat >&2 <<EOF
+ $0: unable to guess system type
+ 
+-The $version version of this script cannot recognize your system type.
+-Please download the most up to date version of the config scripts:
+-
+-    ftp://ftp.gnu.org/pub/gnu/config/
++This script, last modified $timestamp, has failed to recognize
++the operating system you are using. It is advised that you
++download the most up to date version of the config scripts from
++
++  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
++and
++  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
+ 
+ If the version you run ($0) is already up to date, please
+ send the following data and any information you think might be
+ pertinent to <config-patches at gnu.org> in order to provide the needed
+ information to handle your system.
+ 
+-config.guess version = $version
++config.guess timestamp = $timestamp
+ 
+ uname -m = `(uname -m) 2>/dev/null || echo unknown`
+ uname -r = `(uname -r) 2>/dev/null || echo unknown`
+--- kfocus-1.0.2.orig/admin/ylwrap
++++ kfocus-1.0.2/admin/ylwrap
+@@ -1,6 +1,6 @@
+ #! /bin/sh
+ # ylwrap - wrapper for lex/yacc invocations.
+-# Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
++# Copyright 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+ # Written by Tom Tromey <tromey at cygnus.com>.
+ #
+ # This program is free software; you can redistribute it and/or modify
+@@ -17,45 +17,40 @@
+ # 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 PROGRAM INPUT [OUTPUT DESIRED]... -- [ARGS]...
+-# * PROGRAM is program to run.
++#     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 program to run.
+-prog="$1"
+-shift
+-# Make any relative path in $prog absolute.
+-case "$prog" in
+- /* | [A-Za-z]:*) ;;
+- */*) prog="`pwd`/$prog" ;;
+-esac
+-
+ # The input.
+ input="$1"
+ shift
+ case "$input" in
+- /* | [A-Za-z]:*)
++ [\\/]* | ?:[\\/]*)
+     # Absolute path; do nothing.
+     ;;
+  *)
+-    # Relative path.  Make it absolute.  Why?  Because otherwise any
+-    # debugging info in the generated file will point to the wrong
+-    # place.  This is really gross.
++    # Relative path.  Make it absolute.
+     input="`pwd`/$input"
+     ;;
+ esac
+ 
+-# We don't want to use the absolute path if the input in the current
+-# directory like when making a tar ball.
+-input_base=`echo $input | sed -e 's|.*/||'`
+-if test -f $input_base && cmp $input_base $input >/dev/null 2>&1; then
+-  input=$input_base
+-fi
++# 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
+@@ -67,6 +62,15 @@
+    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$$
+@@ -74,15 +78,7 @@
+ mkdir $dirname || exit 1
+ 
+ cd $dirname
+-case "$input" in
+- /* | [A-Za-z]:*)
+-    # Absolute path; do nothing.
+-    ;;
+- *)
+-    # Make a symbolic link, hard link or hardcopy.
+-    ln -s ../"$input" . > /dev/null 2>&1 || ln ../"$input" . > /dev/null 2>&1 || cp ../"$input" .
+-    ;;
+-esac
++
+ $prog ${1+"$@"} "$input"
+ status=$?
+ 
+@@ -114,10 +110,15 @@
+          # If $2 is an absolute path name, then just use that,
+          # otherwise prepend `../'.
+          case "$2" in
+-	   /* | [A-Za-z]:*) target="$2";;
++	   [\\/]* | ?:[\\/]*) target="$2";;
+ 	   *) target="../$2";;
+ 	 esac
+-	 mv "$from" "$target" || status=$?
++
++	 # 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
+--- kfocus-1.0.2.orig/admin/ltcf-cxx.sh
++++ kfocus-1.0.2/admin/ltcf-cxx.sh
+@@ -1,13 +1,11 @@
+ #### This script is meant to be sourced by ltconfig.
+ 
+-# $Id: ltcf-cxx.sh,v 1.1.1.1 2001/08/28 19:09:08 wehjin Exp $
+-
+ # ltcf-cxx.sh - Create a C++ compiler specific configuration
+ #
+-# Copyright (C) 1996-1999,2000 Free Software Foundation, Inc.
++# Copyright (C) 1996-1999, 2000, 2001 Free Software Foundation, Inc.
+ # Originally by Gordon Matzigkeit <gord at gnu.ai.mit.edu>, 1996
+ #
+-# Original C++ support by:
++# Original C++ support by:Gary V. Vaughan <gvv at techie.com>
+ #    Alexandre Oliva <oliva at lsd.ic.unicamp.br>
+ #    Ossama Othman <ossama at debian.org>
+ #    Thomas Thanner <tanner at gmx.de>
+@@ -123,39 +121,97 @@
+ 
+ echo "ltcf-cxx: with_gcc=$with_gcc ; with_gnu_ld=$with_gnu_ld"
+ 
+-# In general, the C++ compiler should always link C++ objects.
+-LD="$CC"
+-LDFLAGS="$LDFLAGS"
+-
+ # PORTME: fill in a description of your system's C++ link characteristics
+-case "$host_os" in
++case $host_os in
+   aix3*)
+     # FIXME: insert proper C++ library support
+     ld_shlibs=no
+     ;;
+-  aix4*)
+-    case "$cc_basename" in
+-      xlC)
+-        # IBM C++ compiler (xlC).  Anything older than Visual Age C++ 5.0 probably won't work.
+-        archive_cmds='$CC -qmkshrobj $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-G -o $lib'
+-        archive_expsym_cmds='$CC -qmkshrobj $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-G ${wl}-bE:$export_symbols -o $lib'
+-        ;;
+-      *)
+-        if test "$with_gcc" = yes; then
+-          # GNU C++ compiler
+-          archive_cmds='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-G -o $lib'
+-          archive_expsym_cmds='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-G ${wl}-bE:$export_symbols -o $lib'
+-        fi
+-        ;;
+-    esac
+-  
+-    hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
++  aix4* | aix5*)
++    archive_cmds=''
++    hardcode_direct=yes
+     hardcode_libdir_separator=':'
+-    hardcode_direct=unsupported
+     link_all_deplibs=yes
++    # When large executables or shared objects are built, AIX ld can
++    # have problems creating the table of contents.  If linking a library
++    # or program results in "error TOC overflow" add -mminimal-toc to
++    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
++    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
++    if test "$with_gcc" = yes; then
++      case $host_os in aix4.[012]|aix4.[012].*)
++      # We only want to do this on AIX 4.2 and lower, the check
++      # below for broken collect2 doesn't work under 4.3+
++        collect2name=`${CC} -print-prog-name=collect2`
++        if test -f "$collect2name" && \
++	   strings "$collect2name" | grep resolve_lib_name >/dev/null
++        then
++	  # We have reworked collect2
++	  hardcode_direct=yes
++        else
++	  # We have old collect2
++	  hardcode_direct=unsupported
++	  # It fails to find uninstalled libraries when the uninstalled
++	  # path is not listed in the libpath.  Setting hardcode_minus_L
++	  # to unsupported forces relinking
++	  hardcode_minus_L=yes
++	  hardcode_libdir_flag_spec='-L$libdir'
++	  hardcode_libdir_separator=
++        fi
++      esac
++      shared_flag='-shared'
++    else
++      # not using gcc
++      if test "$host_cpu" = ia64; then
++        shared_flag='${wl}-G'
++      else
++        shared_flag='${wl}-bM:SRE'
++      fi
++    fi
++
++    if test "$host_cpu" = ia64; then
++      # On IA64, the linker does run time linking by default, so we don't
++      # have to do anything special.
++      aix_use_runtimelinking=no
++      exp_sym_flag='-Bexport'
++      no_entry_flag=""
++    else
++      # KDE requires run time linking.  Make it the default.
++      aix_use_runtimelinking=yes
++      exp_sym_flag='-bexport'
++      no_entry_flag='-bnoentry'
++    fi
++    # Let the compiler handle the export list.
++    always_export_symbols=no
++    if test "$aix_use_runtimelinking" = yes; then
++      allow_undefined_flag=' ${wl}-berok'
++      # The following three lines along with hardcode_into_libs=yes put the correct path into libraries.
++      hardcode_libdir_flag_spec='${wl}-blibpath:$libdir${libdir:+:}/usr/lib:/lib'
++      archive_cmds='$CC '"$shared_flag"' $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-G '"$hardcode_libdir_flag_spec"' -o $lib'
++      archive_expsym_cmds='$CC '"$shared_flag"' $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-G '"$hardcode_libdir_flag_spec"' ${wl}'"$exp_sym_flag"':$export_symbols -o $lib'
++     else
++      if test "$host_cpu" = ia64; then
++        hardcode_libdir_flag_spec='${wl}-R $libdir${libdir:+:}/usr/lib:/lib'
++        allow_undefined_flag="-z nodefs"
++        archive_cmds='$CC '"$shared_flag"' $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags '"$hardcode_libdir_flag_spec"' -o $lib'
++        archive_expsym_cmds='$CC '"$shared_flag"' $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags '"$hardcode_libdir_flag_spec"' ${wl}'"$exp_sym_flag"':$export_symbols -o $lib'
++      else
++        hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
++        # Warning - without using the other run time loading flags, -berok will
++        #           link without error, but may produce a broken library.
++        no_undefined_flag='${wl}-bnoerok'
++        allow_undefined_flag='${wl}-berok"
++        # -bexpall does not export symbols beginning with underscore (_)
++        always_export_symbols=yes
++        # Exported symbols can be pulled into shared objects from archives
++        whole_archive_flag_spec=' '
++        build_libtool_need_lc=yes
++        # This is similar to how AIX traditionally builds it's shared libraries.
++        archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
++      fi
++    fi
+     ;;
+   chorus*)
+-    case "$cc_basename" in
++    case $cc_basename in
+       *)
+         # FIXME: insert proper C++ library support
+         ld_shlibs=no
+@@ -163,7 +219,7 @@
+     esac
+     ;;
+   dgux*)
+-    case "$cc_basename" in
++    case $cc_basename in
+       ec++)
+         # FIXME: insert proper C++ library support
+         ld_shlibs=no
+@@ -185,23 +241,23 @@
+     remove_lgcc=yes
+     ;;
+   hpux*)
+-    case "$cc_basename" in
++    hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
++    hardcode_libdir_separator=:
++    hardcode_direct=yes
++    hardcode_minus_L=yes # Not in the search PATH, but as the default
++			 # location of the library.
++    export_dynamic_flag_spec='${wl}-E'
++
++    case $cc_basename in
+       CC)
+         # FIXME: insert proper C++ library support
+         ld_shlibs=no
+         ;;
+       aCC)
+-	case "$host_os" in
++	case $host_os in
+ 	hpux9*) archive_cmds='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;;
+ 	*) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;;
+ 	esac
+-	hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+-	hardcode_libdir_separator=:
+-	hardcode_direct=yes
+-	hardcode_minus_L=yes # Not in the search PATH, but as the default
+-			     # location of the library.
+-	export_dynamic_flag_spec='${wl}-E'
+-
+         # Commands to make compiler produce verbose output that lists
+         # what "hidden" libraries, object files and flags are used when
+         # linking a shared library.
+@@ -215,16 +271,14 @@
+       *)
+         if test "$with_gcc" = yes && test "$with_gnu_ld" = no ; then
+ 	  # MM: for HP-UX and g++ -fPIC is needed to link pic objects together
+-	  archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+-	  hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+-	  hardcode_libdir_separator=:
+-	  hardcode_direct=yes
+-	  hardcode_minus_L=yes
+-	  export_dynamic_flag_spec='${wl}-E'
++	  case $host_os in
++	  hpux9*) archive_cmds='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;;
++	  *) archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;;
++	  esac
+ 	  output_verbose_link_cmds='$CC -shared -fPIC $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
+ 	  remove_lgcc=yes
+         fi
+-        if test "$with_gcc" = no ; then
++	if test "$with_gcc" = no ; then
+ 	  # FIXME: insert proper C++ library support
+           ld_shlibs=no
+ 	fi
+@@ -232,7 +286,7 @@
+     esac
+     ;;
+   irix5* | irix6*)
+-    case "$cc_basename" in
++    case $cc_basename in
+       CC)
+         # SGI C++
+         archive_cmds='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
+@@ -242,13 +296,13 @@
+ 	# necessary to make sure instantiated templates are included
+ 	# in the archive.
+ 	old_archive_cmds='$CC -ar -WR,-u -o $oldlib $oldobjs'
+-        ;;
++	;;
+       *)
+         if test "$with_gcc" = yes; then
+           if test "$with_gnu_ld" = no; then
+-            archive_cmds='$CC -nostdlib -D_LANGUAGE_C_CPLUS_PLUS -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
++            archive_cmds='$CC -D_LANGUAGE_C_CPLUS_PLUS -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
+           else
+-            archive_cmds='$LD -shared $predep_objects $libobjs $deplibs $postdep_objects $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -o $lib'
++            archive_cmds='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -o $lib'
+           fi
+         fi
+         ;;
+@@ -258,15 +312,15 @@
+     link_all_deplibs=yes
+     ;;
+   linux*)
+-    case "$cc_basename" in
++    case $cc_basename in
+       KCC)
+         # Kuck and Associates, Inc. (KAI) C++ Compiler
+ 
+         # KCC will only create a shared library if the output file
+         # ends with ".so" (or ".sl" for HP-UX), so rename the library
+         # to its proper name (with version) after linking.
+-        archive_cmds='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+-        archive_expsym_cmds='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
++        archive_cmds='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $libobjs $deplibs $compiler_flags --soname $soname -o \$templib; test \$templib = $lib || mv \$templib $lib'
++        archive_expsym_cmds='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $libobjs $deplibs $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; test \$templib = $lib || mv \$templib $lib'
+ 
+         # Commands to make compiler produce verbose output that lists
+         # what "hidden" libraries, object files and flags are used when
+@@ -276,14 +330,18 @@
+         # explicitly linking system object files so we need to strip them
+         # from the output so that they don't get included in the library
+         # dependencies.
+-        output_verbose_link_cmds='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest.so 2>&1 | egrep "ld"`; rm -f libconftest.so; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
++        output_verbose_link_cmds='echo "go to hell"'
++	skip_need_lc_check=yes
+ 
+         hardcode_libdir_flag_spec='${wl}--rpath,$libdir'
+         export_dynamic_flag_spec='${wl}--export-dynamic'
+ 
+ 	# Archives containing C++ object files must be created using
+ 	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
+-        old_archive_cmds='$CC -Bstatic -o $oldlib $oldobjs'
++	# We add also $compiler_flags, to evetually add any --thread_safe or
++	# --exceptions flags (which is also tested when building an .a
++	# archive.
++        old_archive_cmds='$CC -Bstatic $compiler_flags -o $oldlib $oldobjs'
+         ;;
+       cxx)
+         # Compaq C++
+@@ -329,7 +387,7 @@
+     ld_shlibs=no
+     ;;
+   mvs*)
+-    case "$cc_basename" in
++    case $cc_basename in
+       cxx)
+         # FIXME: insert proper C++ library support
+         ld_shlibs=no
+@@ -338,7 +396,7 @@
+         # FIXME: insert proper C++ library support
+         ld_shlibs=no
+         ;;
+-    esac   
++    esac
+     ;;
+   netbsd*)
+     if test "$with_gcc" = no || test "$with_gnu_ld" = no; then
+@@ -378,7 +436,7 @@
+       # linking a shared library.
+       output_verbose_link_cmds='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
+     else
+-      case "$cc_basename" in
++      case $cc_basename in
+ 	KCC)
+ 	  # Kuck and Associates, Inc. (KAI) C++ Compiler
+ 
+@@ -438,7 +496,7 @@
+       # linking a shared library.
+       output_verbose_link_cmds='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
+     else
+-      case "$cc_basename" in
++      case $cc_basename in
+ 	KCC)
+ 	  # Kuck and Associates, Inc. (KAI) C++ Compiler
+ 
+@@ -489,7 +547,7 @@
+     ld_shlibs=no
+     ;;
+   sco*)
+-    case "$cc_basename" in
++    case $cc_basename in
+       CC)
+         # FIXME: insert proper C++ library support
+         ld_shlibs=no
+@@ -501,7 +559,7 @@
+     esac
+     ;;
+   sunos4*)
+-    case "$cc_basename" in
++    case $cc_basename in
+       CC)
+         # Sun C++ 4.x
+         # FIXME: insert proper C++ library support
+@@ -519,7 +577,7 @@
+     esac
+     ;;
+   solaris*)
+-    case "$cc_basename" in
++    case $cc_basename in
+       CC)
+ 	# Sun C++ 4.2, 5.x and Centerline C++
+         no_undefined_flag=' -ztext'
+@@ -529,7 +587,7 @@
+ 
+         hardcode_libdir_flag_spec='-R$libdir'
+         hardcode_shlibpath_var=no
+-        case "$host_os" in
++        case $host_os in
+           solaris2.[0-5] | solaris2.[0-5].*) ;;
+           *)
+             # The C++ compiler is used as linker so we must use $wl
+@@ -568,9 +626,9 @@
+         # GNU C++ compiler with Solaris linker
+         if test "$with_gcc" = yes && test "$with_gnu_ld" = no; then
+           if $CC --version | egrep -v '^2\.7' > /dev/null; then
+-            archive_cmds='$LD -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib'
++            archive_cmds='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+             archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+-		$LD -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname~$rm $lib.exp'
++		$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
+ 
+             # Commands to make compiler produce verbose output that lists
+             # what "hidden" libraries, object files and flags are used when
+@@ -579,9 +637,9 @@
+           else
+             # g++ 2.7 appears to require `-G' NOT `-shared' on this
+             # platform.
+-            archive_cmds='$LD -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib'
++            archive_cmds='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+             archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+-		$LD -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname~$rm $lib.exp'
++		$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
+ 
+             # Commands to make compiler produce verbose output that lists
+             # what "hidden" libraries, object files and flags are used when
+@@ -595,7 +653,7 @@
+     esac
+     ;;
+   tandem*)
+-    case "$cc_basename" in
++    case $cc_basename in
+       NCC)
+         # NonStop-UX NCC 3.20
+         # FIXME: insert proper C++ library support
+@@ -633,37 +691,45 @@
+ ac_cv_prog_cc_no_builtin=
+ ac_cv_prog_cc_can_build_shared=$can_build_shared
+ 
+-# It is not enough to reset these cached values, they must be unset.
+-unset ac_cv_prog_cc_pic_works
+-unset ac_cv_prog_cc_static_works
++ac_cv_prog_cc_pic_works=
++ac_cv_prog_cc_static_works=
+ 
+ if test "$with_gcc" = yes; then
+   ac_cv_prog_cc_wl='-Wl,'
+   ac_cv_prog_cc_static='-static'
+ 
+-  case "$host_os" in
++  case $host_os in
++  aix*)
++    # All AIX code is PIC.
++    if test "$host_cpu" = ia64; then
++      # AIX 5 now supports IA64 processor
++      lt_cv_prog_cc_static='-Bstatic'
++    else
++      lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
++    fi
++    ;;
++  amigaos*)
++    # FIXME: we need at least 68020 code to build shared libraries, but
++    # adding the `-m68020' flag to GCC prevents building anything better,
++    # like `-m68040'.
++    ac_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
++    ;;
+   beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
+     # PIC is the default for these OSes.
+     ;;
+-  aix*)
+-    # Below there is a dirty hack to force normal static linking with -ldl
+-    # The problem is because libdl dynamically linked with both libc and
+-    # libC (AIX C++ library), which obviously doesn't included in libraries
+-    # list by gcc. This cause undefined symbols with -static flags.
+-    # This hack allows C programs to be linked with "-static -ldl", but
+-    # we not sure about C++ programs.
+-    ac_cv_prog_cc_static="$ac_cv_prog_cc_static ${ac_cv_prog_cc_wl}-lC"
+-    ;;
+   cygwin* | mingw* | os2*)
+     # This hack is so that the source file can tell whether it is being
+     # built for inclusion in a dll (and should export symbols for example).
+     ac_cv_prog_cc_pic='-DDLL_EXPORT'
+     ;;
+-  amigaos*)
+-    # FIXME: we need at least 68020 code to build shared libraries, but
+-    # adding the `-m68020' flag to GCC prevents building anything better,
+-    # like `-m68040'.
+-    ac_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
++  darwin* | rhapsody*)
++    # PIC is the default on this platform
++    # Common symbols not allowed in MH_DYLIB files
++    lt_cv_prog_cc_pic='-fno-common'
++    ;;
++  *djgpp*)
++    # DJGPP does not support shared libraries at all
++    ac_cv_prog_cc_pic=
+     ;;
+   sysv4*MP*)
+     if test -d /usr/nec; then
+@@ -675,12 +741,18 @@
+     ;;
+   esac
+ else
+-  case "$host_os" in
+-    aix4*)
++  case $host_os in
++    aix4* | aix5*)
+       # All AIX code is PIC.
++      if test "$host_cpu" = ia64; then
++        # AIX 5 now supports IA64 processor
++        lt_cv_prog_cc_static='-Bstatic'
++      else
++        lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
++      fi
+       ;;
+     chorus*)
+-      case "$cc_basename" in
++      case $cc_basename in
+       cxch68)
+         # Green Hills C++ Compiler
+         # ac_cv_prog_cc_static="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
+@@ -688,7 +760,7 @@
+       esac
+       ;;
+     dgux*)
+-      case "$cc_basename" in
++      case $cc_basename in
+         ec++)
+           ac_cv_prog_cc_pic='-KPIC'
+           ;;
+@@ -704,7 +776,7 @@
+       # FreeBSD uses GNU C++
+       ;;
+     hpux9* | hpux10* | hpux11*)
+-      case "$cc_basename" in
++      case $cc_basename in
+         CC)
+           ac_cv_prog_cc_wl='-Wl,'
+           ac_cv_prog_cc_static="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
+@@ -720,7 +792,7 @@
+       esac
+       ;;
+     irix5* | irix6*)
+-      case "$cc_basename" in
++      case $cc_basename in
+         CC)
+           ac_cv_prog_cc_wl='-Wl,'
+           ac_cv_prog_cc_static='-non_shared'
+@@ -731,11 +803,12 @@
+       esac
+       ;;
+     linux*)
+-      case "$cc_basename" in
++      case $cc_basename in
+         KCC)
+           # KAI C++ Compiler
+           ac_cv_prog_cc_wl='--backend -Wl,'
+           ac_cv_prog_cc_pic='-fPIC'
++          ac_cv_prog_cc_static='-Bstatic'
+           ;;
+         cxx)
+           # Compaq C++
+@@ -753,7 +826,7 @@
+     m88k*)
+       ;;
+     mvs*)
+-      case "$cc_basename" in
++      case $cc_basename in
+         cxx)
+           ac_cv_prog_cc_pic='-W c,exportall'
+           ;;
+@@ -764,7 +837,7 @@
+     netbsd*)
+       ;;
+     osf3* | osf4* | osf5*)
+-      case "$cc_basename" in
++      case $cc_basename in
+         KCC)
+           ac_cv_prog_cc_wl='--backend -Wl,'
+           ;;
+@@ -787,7 +860,7 @@
+     psos*)
+       ;;
+     sco*)
+-      case "$cc_basename" in
++      case $cc_basename in
+         CC)
+           ac_cv_prog_cc_pic='-fPIC'
+           ;;
+@@ -796,7 +869,7 @@
+       esac
+       ;;
+     solaris*)
+-      case "$cc_basename" in
++      case $cc_basename in
+         CC)
+           # Sun C++ 4.2, 5.x and Centerline C++
+           ac_cv_prog_cc_pic='-KPIC'
+@@ -812,7 +885,7 @@
+       esac
+       ;;
+     sunos4*)
+-      case "$cc_basename" in
++      case $cc_basename in
+         CC)
+           # Sun C++ 4.x
+           ac_cv_prog_cc_pic='-pic'
+@@ -827,7 +900,7 @@
+       esac
+       ;;
+     tandem*)
+-      case "$cc_basename" in
++      case $cc_basename in
+         NCC)
+           # NonStop-UX NCC 3.20
+           ac_cv_prog_cc_pic='-KPIC'
+@@ -845,7 +918,17 @@
+       ;;
+   esac
+ fi
+-ac_cv_prog_cc_pic="$ac_cv_prog_cc_pic -DPIC"
++
++case "$host_os" in
++    # Platforms which do not suport PIC and -DPIC is meaningless
++    # on them:
++    *djgpp*)
++      ac_cv_prog_cc_pic=
++      ;;
++    *)
++      ac_cv_prog_cc_pic="$ac_cv_prog_cc_pic -DPIC"
++      ;;
++esac
+ 
+ 
+ # Figure out "hidden" C++ library dependencies from verbose
+--- kfocus-1.0.2.orig/admin/Makefile.common
++++ kfocus-1.0.2/admin/Makefile.common
+@@ -1,26 +1,24 @@
+ 
++SHELL=/bin/sh
++
+ cvs:
+ 	@if grep '$$(top_srcdir)/acinclude.m4:' Makefile.am >/dev/null; then \
+-	  echo "*** Concatenating configure tests into acinclude.m4" ;\
++	  echo "*** Creating acinclude.m4" ;\
+ 	  rm -f acinclude.m4 configure.files ;\
+ 	  $(MAKE) -f Makefile.am top_srcdir=. acinclude.m4 ;\
+ 	fi
++	@echo "!!! If you get recursion errors from autoconf, it is advisable to set the"
++	@echo "    environment variable M4 to something including \"--nesting-limit=500\""
+ 	@if test -r configure.in.in; then \
+ 	  rm -f subdirs configure.in ;\
+-	  echo "*** Creating list of subdirectories in subdirs" ;\
++	  echo "*** Creating list of subdirectories" ;\
+ 	  $(MAKE) -f Makefile.am top_srcdir=. subdirs ;\
+-	  echo "*** Searching for subdirectories..." ;\
++	  echo "*** Creating configure.in" ;\
+ 	  $(MAKE) -f Makefile.am top_srcdir=. configure.in ;\
+ 	fi
+-	@echo "*** Retrieving configure tests needed by configure.in"
++	@echo "*** Creating aclocal.m4"
+ 	@aclocal
+-	@echo "*** Scanning for include statements"
+-	@autoheader
+-	@echo "*** Building Makefile templates"
+-	@automake
+-	@echo "*** Scanning for moc files and kde tags"
+-	@perl admin/am_edit
+-	@echo "*** Building configure"
++	@echo "*** Creating configure"
+ 	@autoconf
+ 	@if test -r configure.in.in ; then \
+ 	  perl -pi -e 'print "if test \"x\$$with_fast_perl\" = \"xyes\" ;\
+@@ -29,14 +27,22 @@
+ 	  \n  rm -f \$$CONFIG_STATUS.bak;\nfi\
+ 	  \n" if /^\s*chmod\s+.*\+x\s+.*CONFIG_STATUS/;' configure ;\
+ 	fi
+-	@echo "*** Creating date/time stamp"
+-	@touch stamp-h.in
+-	@if egrep "^cvs-local:" Makefile.am >/dev/null; then \
+-	  $(MAKE) -f Makefile.am cvs-local ;\
+-	fi
+ 	@if grep '} \$$ac_kw foo' configure >/dev/null 2>&1; then perl -p -i -e "s/ac_kw foo/ac_kw int foo/" configure; fi
+ #David's hack for autoconf bug when $INSTALL is set
+ 	@perl -pi -e 'if (/\[\/\$$\]\*. INSTALL=/) { print $$_ ; $$_ = "\"\") ;;\n"; }' configure
++	@if egrep "^AM_CONFIG_HEADER" configure.in >/dev/null 2>&1; then \
++	  echo "*** Creating config.h template" ;\
++		autoheader ;\
++	fi
++	@echo "*** Creating Makefile templates"
++	@automake
++	@echo "*** Postprocessing Makefile templates"
++	@perl admin/am_edit
++	@if egrep "^cvs-local:" Makefile.am >/dev/null; then \
++	  $(MAKE) -f Makefile.am cvs-local ;\
++	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"
+@@ -81,38 +87,93 @@
+ 	  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;\
+-	pwd=`pwd` ;\
+-	dirs=`find . -type d | grep -v CVS | sed -e "s#^./##"` ;\
+-	for i in $$dirs; do \
+-	  if test ! -d "$$pwd/$$i/CVS"; then \
+-	    echo "D $$i" ;\
+-	    rm -rf "$$pwd/$$i"; \
+-	    continue; \
+-	  fi ;\
+-	  cd $$pwd/$$i ;\
+-	  for f in * .*; do \
+-	    if test ! -d "$$f"; then \
+-	      if grep "^/$$f/" CVS/Entries > /dev/null; then \
+-		a="b"; \
+-	      else \
+-	        echo "F $$i/$$f"; \
+-		rm -f "$$pwd/$$i/$$f"; \
+-	      fi; \
+-	    fi ; \
+-	  done; \
+-	done
++	  exit 1; \
++	fi; \
++	perl -e '\
++	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 ("");'
+ 
+ 
+ # The Makefiles have to be sorted for slashes, since configure creates
+ # only one directory per Makefile not the whole hierarchy
+ configure.in: configure.files $(shell test -f configure.files && cat configure.files) subdirs
+-	@rm -f configure.in rm -f configure.in.new ;\
++	@rm -f configure.in configure.in.new ;\
++	kde_use_qt_param= ; \
+ 	cat `cat configure.files | egrep -v "^configure.in.bot"` >> configure.in.new ;\
+ 	echo "KDE_CREATE_SUBDIRSLIST" >> configure.in.new ;\
+ 	echo "AC_OUTPUT( \\" >> configure.in.new ;\
+-	mfs=`find . -type d -print | fgrep -v "/." | sed -e "s#\./##" -e "/^debian/d" | sort`; \
++	mfs=`find . -type d -print | fgrep -v "/." | sort`; \
+ 	for i in $$mfs; do \
+ 	  topleveldir=`echo $$i| sed -e "s#/.*##"`; \
+ 	  if test -f $$topleveldir/configure.in; then \
+@@ -128,11 +189,17 @@
+ 	  fi ;\
+ 	  echo "$$i/Makefile \\" >> configure.in.new ;\
+ 	done ;\
+-	egrep '^dnl AC_OUTPUT\(.*\)' `cat configure.files` | sed -e "s#^.*dnl AC_OUTPUT(\(.*\))#\1#" >> configure.in.new ;\
+-	echo ")" >> configure.in.new 
++	egrep '^dnl AC_OUTPUT\(.*\)' `cat configure.files` | sed -e "s#^.*dnl AC_OUTPUT(\(.*\))#\1 \\\\#" >> configure.in.new ;\
++	echo ")" >> configure.in.new
+ 	@modulename= ;\
+ 	if test -f configure.in.in; then \
+-	   if head -2 configure.in.in | egrep "^#MIN_CONFIG$$" > /dev/null; then \
++	   if head -2 configure.in.in | egrep "^#MIN_CONFIG\(.*\)$$" > /dev/null; then \
++	      line=`egrep "^#MIN_CONFIG\(" configure.in.in` ;\
++	      if test -n "$$line"; then \
++		  kde_use_qt_param=`echo $$line | sed -e "s/#MIN_CONFIG(\(.*\))/\1/"` ;\
++	      fi ;\
++	   fi ;\
++	   if head -2 configure.in.in | egrep "^#MIN_CONFI(G|G\(.*\))$$" > /dev/null; then \
+ 	      line=`egrep "^AM_INIT_AUTOMAKE\(" configure.in.in` ;\
+ 	      if test -n "$$line"; then \
+ 		  modulename=`echo $$line | sed -e "s#AM_INIT_AUTOMAKE(\([^,]*\),.*#\1#"` ;\
+@@ -146,8 +213,12 @@
+ 	   modulename=`pwd`; modulename=`basename $$modulename`; \
+ 	fi ;\
+ 	if test -z "$$VERSION" || test "$$VERSION" = "@VERSION@"; then \
+-	     VERSION="\"2.1 beta 2\"";  \
++	     VERSION="\"2.91\"";  \
+ 	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
+ 	@if test -f configure.in.bot ; then cat configure.in.bot >> configure.in ; fi
+@@ -159,7 +230,7 @@
+ 	  if test -x $$i/admin; then admindir=$$i/admin; break; fi; \
+ 	done ;\
+ 	rm -rf configure.files ;\
+-	if test -f configure.in.in && head -2 configure.in.in | egrep "^#MIN_CONFIG$$" > /dev/null; then \
++	if test -f configure.in.in && head -2 configure.in.in | egrep "^#MIN_CONFI(G|G\(.*\))$$" > /dev/null; then \
+ 		echo $$admindir/configure.in.min >> configure.files  ;\
+ 	fi
+ 	@test -f configure.in.in && echo configure.in.in >> configure.files
+@@ -167,7 +238,7 @@
+ 	for i in $$list; do if test -f $$i && test ! `dirname $$i` = "." ; then \
+ 	  echo $$i >> configure.files ;\
+ 	fi; done
+-	@if test -f configure.in.mid ; then echo configure.in.mid >> configure.files ; fi 
++	@if test -f configure.in.mid ; then echo configure.in.mid >> configure.files ; fi
+ 	@if test -f configure.in.bot ; then echo configure.in.bot >> configure.files ; fi
+ 
+ subdirs:
+@@ -191,14 +262,14 @@
+ 	     fi ;\
+ 	   fi; \
+ 	done ;\
+-	rm -f SUBDIRS ;\
++	rm -f _SUBDIRS ;\
+ 	for i in $$dirs; do \
+-	echo $$i >> ./SUBDIRS; \
++	echo $$i >> ./_SUBDIRS; \
+ 	done
+-	@if test -r subdirs && diff subdirs SUBDIRS > /dev/null; then \
+-	  rm -f SUBDIRS; \
++	@if test -r subdirs && diff subdirs _SUBDIRS > /dev/null; then \
++	  rm -f _SUBDIRS; \
+ 	fi
+-	@test -r SUBDIRS && mv SUBDIRS subdirs || true
++	@test -r _SUBDIRS && mv _SUBDIRS subdirs || true
+ 
+ package-merge:
+ 	@catalogs='$(POFILES)'; \
+@@ -231,11 +302,14 @@
+ 	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:-extractrc} *.rc *.ui > rc.cpp ;\
++	   	$$EXTRACTRC *.rc *.ui > rc.cpp ;\
+ 	   else \
+ 		candidates=`ls -1 *.rc *.ui 2>/dev/null` ;\
+ 		if test -n "$$candidates"; then \
+@@ -247,11 +321,11 @@
+ 	   else echo " " > _translatorinfo.cpp ;\
+ 	   fi; \
+ 	   perl -e '$$mes=0; while (<STDIN>) { if (/^messages:/) { $$mes=1; print $$_; next; } if ($$mes) { if (/$$\\(XGETTEXT\)/ && / -o/) { s/ -o \$$\(podir\)/ _translatorinfo.cpp -o \$$\(podir\)/ } print $$_; } else { print $$_; } }' < Makefile.am > _transMakefile ;\
+-	   $(MAKE) -s -f _transMakefile podir=$$podir \
+-	   XGETTEXT="$${XGETTEXT:-xgettext} -C -ki18n \
++	   $(MAKE) -s -f _transMakefile podir=$$podir EXTRACTRC="$$EXTRACTRC" PREPARETIPS="$$PREPARETIPS" \
++	   XGETTEXT="$${XGETTEXT:-xgettext} -C -ki18n -ktr2i18n \
+ 	   -kI18N_NOOP -ktranslate -kaliasLocale \
+ 	   -x $${includedir:-$$KDEDIR/include}/kde.pot" \
+-	   messages ) >$$tmpname 2>&1 ;\
++	   messages ) 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 ;\
+@@ -281,6 +355,9 @@
+ 	@rm -rf po.backup
+ 
+ test:
+-	perl -e '$$mes=0; while (<STDIN>) { if (/^messages:/) { $$mes=1; print $$_; next; } if ($$mes) { if (! /^\t/) { exit(0); } if (/$$\\(XGETTEXT\)/ && / -o/) { s/ -o/ _translatorinfo.cpp -o/ } print $$_;  } }' < Makefile.am 
++	perl -e '$$mes=0; while (<STDIN>) { if (/^messages:/) { $$mes=1; print $$_; next; } if ($$mes) { if (! /^\t/) { exit(0); } if (/$$\\(XGETTEXT\)/ && / -o/) { s/ -o/ _translatorinfo.cpp -o/ } print $$_;  } }' < Makefile.am
+ 
+ .SILENT:
++
++.PHONY: cvs test dist cvs-clean package-merge package-messages
++
+--- kfocus-1.0.2.orig/admin/debianrules
++++ kfocus-1.0.2/admin/debianrules
+@@ -8,36 +8,24 @@
+ chomp $origPwd;
+ 
+ 
+-if (@ARGV && $ARGV[0] eq 'cleanup') {
+-
+-if (-d "debian/tmp/usr/share/config") {
+-	if (! -d "debian/tmp/$kde_confdir") {
+-	  system("mv debian/tmp/usr/share/config debian/tmp/$kde_confdir");
+-	}
+-}
+-system("rm -f `find debian/ -name \".anchors\"`");
+-system("chmod 755 debian/*preinst debian/*postinst");
+-
+-exit;
+-}
+-
+ $QTDIR="/usr/share/qt";
+ $kde_prefix="/usr";
+ $kde_htmldir="$kde_prefix/share/doc/kde/HTML";
+-$kde_icondir="$kde_prefix/share/icons";
+-$kde_sounddir="$kde_prefix/share/sounds";
+-$kde_datadir="$kde_prefix/share/apps";
+-$kde_locale="$kde_prefix/share/locale";
+-$kde_confdir="/etc/kde2";
++$kde_icondir="$kde_prefix/share/kde/icons";
++$kde_sounddir="$kde_prefix/share/kde/sounds";
++$kde_datadir="$kde_prefix/share/kde/apps";
++$kde_locale="$kde_prefix/share/kde/locale";
++$kde_confdir="/etc/kde";
+ $kde_cgidir="$kde_prefix/lib/cgi-bin";
+-$kde_appsdir="$kde_prefix/share/applnk";
+-$kde_mimedir="$kde_prefix/share/mimelnk";
+-$kde_wallpaperdir="$kde_prefix/share/wallpapers";
++$kde_appsdir="$kde_prefix/share/kde/applnk";
++$kde_mimedir="$kde_prefix/share/kde/mimelnk";
++$kde_wallpaperdir="$kde_prefix/share/kde/wallpapers";
+ $kde_bindir="$kde_prefix/bin";
+-$kde_servicesdir="$kde_prefix/share/services";
+-$kde_servicetypesdir="$kde_prefix/share/servicetypes";
++$kde_servicesdir="$kde_prefix/share/kde/services";
++$kde_servicetypesdir="$kde_prefix/share/kde/servicetypes";
+ $kde_includedir="$kde_prefix/include/kde";
+-$kde_libdir="$kde_prefix/lib";
++$kde_libdir="$kde_prefix/lib/kde";
++$kde_moduledir="$kde_prefix/lib/kde3";
+ $mandir="$kde_prefix/share/man"; 
+ $infodir="$kde_prefix/share/info";
+ $IDL="$kde_bindir/cuteidl";
+@@ -63,6 +51,7 @@
+   print STDOUT "export kde_servicetypesdir=$kde_servicetypesdir\n";
+   print STDOUT "export kde_includedir=$kde_includedir\n";
+   print STDOUT "export kde_libdir=$kde_libdir\n";
++  print STDOUT "export kde_moduledir=$kde_moduledir\n";
+   print STDOUT "export mandir=$mandir\n";
+   print STDOUT "export infodir=$infodir\n";
+   print STDOUT "export QTDIR=$QTDIR\n";
+@@ -74,9 +63,9 @@
+   print STDOUT "export KDB2HTML=$KDB2HTML\n";
+   print STDOUT "export MCOPIDL=$MCOPIDL\n";
+   print STDOUT "export ARTSCCONFIG=$ARTSCCONFIG\n";
+-  print STDOUT "configkde=--disable-rpath --prefix=\$(kde_prefix) --libexecdir=\$(kde_bindir) --with-qt-includes=/usr/include/qt --mandir=\$(mandir) --infodir=\$(infodir)\n";
+-  print STDOUT "configkdevelop=--enable-docbase --enable-kdoc2 --disable-rpath --libdir=\$(kde_libdir) --includedir=\$(kde_includedir) --with-qt-includes=/usr/include/qt --mandir=\$(mandir) --with-kdelibsdoc-dir=/usr/share/doc/kdelibs3-doc/html\n";
+-  print STDOUT "configkdepim=--with-extra-includes=/usr/include/libpisock --enable-shared --disable-rpath --prefix=\$(kde_prefix) --libexecdir=\$(kde_bindir) --with-qt-includes=/usr/include/qt --mandir=\$(mandir) --infodir=\$(infodir)\n";
++  print STDOUT "configkde=--enable-debug --prefix=\$(kde_prefix) --libexecdir=\$(kde_bindir) --libdir=\$(kde_libdir) --includedir=\$(kde_includedir) --with-qt-includes=/usr/include/qt --mandir=\$(mandir) --infodir=\$(infodir)\n";
++  print STDOUT "configkdevelop=--enable-debug --enable-docbase --enable-kdoc2 --libdir=\$(kde_libdir) --includedir=\$(kde_includedir) --with-qt-includes=/usr/include/qt --mandir=\$(mandir) --with-kdelibsdoc-dir=/usr/share/doc/kdelibs3-doc/html\n";
++  print STDOUT "configkdepim=--enable-debug --with-extra-includes=/usr/include/libpisock --enable-shared --prefix=\$(kde_prefix) --libexecdir=\$(kde_bindir) --with-qt-includes=/usr/include/qt --mandir=\$(mandir) --infodir=\$(infodir)\n";
+   exit
+ }
+ 
+--- kfocus-1.0.2.orig/admin/mkinstalldirs
++++ kfocus-1.0.2/admin/mkinstalldirs
+@@ -4,7 +4,7 @@
+ # Created: 1993-05-16
+ # Public domain
+ 
+-# $Id: mkinstalldirs,v 1.1.1.1 2001/08/28 19:09:09 wehjin Exp $
++# $Id: mkinstalldirs,v 1.4 2002/09/07 05:02:39 david Exp $
+ 
+ errstatus=0
+ 
+--- kfocus-1.0.2.orig/admin/missing
++++ kfocus-1.0.2/admin/missing
+@@ -1,6 +1,6 @@
+ #! /bin/sh
+ # Common stub for a few missing GNU programs while installing.
+-# Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc.
++# Copyright 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
+ # Originally by Fran,cois Pinard <pinard at iro.umontreal.ca>, 1996.
+ 
+ # This program is free software; you can redistribute it and/or modify
+@@ -18,6 +18,11 @@
+ # 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
+@@ -25,6 +30,14 @@
+ 
+ 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.
+@@ -57,6 +70,7 @@
+   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
+@@ -64,7 +78,7 @@
+     ;;
+ 
+   -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+-    echo "missing 0.2 - GNU automake"
++    echo "missing 0.3 - GNU automake"
+     ;;
+ 
+   -*)
+@@ -76,7 +90,7 @@
+   aclocal)
+     echo 1>&2 "\
+ WARNING: \`$1' is missing on your system.  You should only need it if
+-         you modified \`acinclude.m4' or \`configure.in'.  You might want
++         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
+@@ -85,7 +99,7 @@
+   autoconf)
+     echo 1>&2 "\
+ WARNING: \`$1' is missing on your system.  You should only need it if
+-         you modified \`configure.in'.  You might want to install the
++         you modified \`${configure_ac}'.  You might want to install the
+          \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
+          archive site."
+     touch configure
+@@ -94,10 +108,10 @@
+   autoheader)
+     echo 1>&2 "\
+ WARNING: \`$1' is missing on your system.  You should only need it if
+-         you modified \`acconfig.h' or \`configure.in'.  You might want
++         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.in`
++    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
+@@ -113,7 +127,7 @@
+   automake)
+     echo 1>&2 "\
+ WARNING: \`$1' is missing on your system.  You should only need it if
+-         you modified \`Makefile.am', \`acinclude.m4' or \`configure.in'.
++         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 |
+@@ -174,7 +188,32 @@
+     fi
+     ;;
+ 
++  help2man)
++    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
+@@ -197,9 +236,15 @@
+       exit 1
+     fi
+ 
+-    # we have already tried tar in the generic part
+-    gnutar ${1+"$@"} && exit 0
+-    gtar ${1+"$@"} && exit 0
++    # 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 ${1+"$@"} && exit 0
++    fi
++    if (gtar --version > /dev/null 2>&1); then
++       gtar ${1+"$@"} && exit 0
++    fi
+     firstarg="$1"
+     if shift; then
+ 	case "$firstarg" in
+--- kfocus-1.0.2.orig/admin/ltmain.sh
++++ kfocus-1.0.2/admin/ltmain.sh
+@@ -1,7 +1,8 @@
+ # ltmain.sh - Provide generalized library-building support services.
+ # NOTE: Changing this file will not affect anything until you rerun ltconfig.
+ #
+-# Copyright (C) 1996-2000, 2001 Free Software Foundation, Inc.
++# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
++# Free Software Foundation, Inc.
+ # Originally by Gordon Matzigkeit <gord at gnu.ai.mit.edu>, 1996
+ #
+ # This program is free software; you can redistribute it and/or modify
+@@ -55,7 +56,7 @@
+ PROGRAM=ltmain.sh
+ PACKAGE=libtool
+ VERSION=1.4a
+-TIMESTAMP=" (1.641.2.179mm 2001/02/15 21:55:40)"
++TIMESTAMP=" (1.641.2.206mm 2001/04/03 21:47:47)"
+ 
+ default_mode=
+ help="Try \`$progname --help' for more information."
+@@ -113,14 +114,14 @@
+   arg="$1"
+   shift
+ 
+-  case "$arg" in
++  case $arg in
+   -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
+   *) optarg= ;;
+   esac
+ 
+   # If the previous option needs an argument, assign it.
+   if test -n "$prev"; then
+-    case "$prev" in
++    case $prev in
+     execute_dlfiles)
+       execute_dlfiles="$execute_dlfiles $arg"
+       ;;
+@@ -128,7 +129,7 @@
+       tagname="$arg"
+ 
+       # Check whether tagname contains only valid characters
+-      case "$tagname" in
++      case $tagname in
+       *[!-_A-Za-z0-9,/]*)
+ 	echo "$progname: invalid tag name: $tagname" 1>&2
+ 	exit 1
+@@ -154,7 +155,7 @@
+   fi
+ 
+   # Have we seen a non-optional argument yet?
+-  case "$arg" in
++  case $arg in
+   --help)
+     show_help=yes
+     ;;
+@@ -241,12 +242,12 @@
+ 
+   # Infer the operation mode.
+   if test -z "$mode"; then
+-    case "$nonopt" in
++    case $nonopt in
+     *cc | *++ | gcc* | *-gcc*)
+       mode=link
+       for arg
+       do
+-	case "$arg" in
++	case $arg in
+ 	-c)
+ 	   mode=compile
+ 	   break
+@@ -291,7 +292,7 @@
+   help="Try \`$modename --help --mode=$mode' for more information."
+ 
+   # These modes are in order of execution frequency so that they run quickly.
+-  case "$mode" in
++  case $mode in
+   # libtool compile mode
+   compile)
+     modename="$modename: compile"
+@@ -305,14 +306,14 @@
+     user_target=no
+     for arg
+     do
+-      case "$prev" in
++      case $prev in
+       "") ;;
+       xcompiler)
+ 	# Aesthetically quote the previous argument.
+ 	prev=
+ 	lastarg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+ 
+-	case "$arg" in
++	case $arg in
+ 	# Double-quote args containing other shell metacharacters.
+ 	# Many Bourne shells cannot handle close brackets correctly
+ 	# in scan sets, so we specify it separately.
+@@ -332,7 +333,7 @@
+       esac
+ 
+       # Accept any command-line options.
+-      case "$arg" in
++      case $arg in
+       -o)
+ 	if test "$user_target" != "no"; then
+ 	  $echo "$modename: you cannot specify \`-o' more than once" 1>&2
+@@ -371,7 +372,7 @@
+ 	  # Double-quote args containing other shell metacharacters.
+ 	  # Many Bourne shells cannot handle close brackets correctly
+ 	  # in scan sets, so we specify it separately.
+-	  case "$arg" in
++	  case $arg in
+ 	    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+ 	    arg="\"$arg\""
+ 	    ;;
+@@ -391,7 +392,7 @@
+ 	;;
+       esac
+ 
+-      case "$user_target" in
++      case $user_target in
+       next)
+ 	# The next one is the -o target name
+ 	user_target=yes
+@@ -419,7 +420,7 @@
+       # Double-quote args containing other shell metacharacters.
+       # Many Bourne shells cannot handle close brackets correctly
+       # in scan sets, so we specify it separately.
+-      case "$lastarg" in
++      case $lastarg in
+       *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+ 	lastarg="\"$lastarg\""
+ 	;;
+@@ -433,7 +434,7 @@
+       fi
+     done
+ 
+-    case "$user_target" in
++    case $user_target in
+     set)
+       ;;
+     no)
+@@ -449,7 +450,7 @@
+     # Recognize several different file suffixes.
+     # If the user specifies -o file.o, it is replaced with file.lo
+     xform='[cCFSfmso]'
+-    case "$libobj" in
++    case $libobj in
+     *.ada) xform=ada ;;
+     *.adb) xform=adb ;;
+     *.ads) xform=ads ;;
+@@ -466,7 +467,7 @@
+ 
+     libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
+ 
+-    case "$libobj" in
++    case $libobj in
+     *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
+     *)
+       $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
+@@ -544,7 +545,7 @@
+     trap "$run $rm $removelist; exit 1" 1 2 15
+ 
+     # On Cygwin there's no "real" PIC flag so we must build both object types
+-    case "$host_os" in
++    case $host_os in
+     cygwin* | mingw* | pw32* | os2*)
+       pic_mode=default
+       ;;
+@@ -777,7 +778,7 @@
+   # libtool link mode
+   link | relink)
+     modename="$modename: link"
+-    case "$host" in
++    case $host in
+     *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+       # It is impossible to link a dll without this setting, and
+       # we shouldn't force the makefile maintainer to figure out
+@@ -809,6 +810,7 @@
+     old_convenience=
+     deplibs=
+     old_deplibs=
++    add_flags=
+     compiler_flags=
+     linker_flags=
+     dllsearchpath=
+@@ -843,7 +845,7 @@
+     # We need to know -static, to get the right output filenames.
+     for arg
+     do
+-      case "$arg" in
++      case $arg in
+       -all-static | -static)
+ 	if test "X$arg" = "X-all-static"; then
+ 	  if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
+@@ -873,7 +875,7 @@
+       arg="$1"
+       base_compile="$base_compile $arg"
+       shift
+-      case "$arg" in
++      case $arg in
+       *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+ 	qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
+ 	;;
+@@ -883,14 +885,14 @@
+ 
+       # If the previous option needs an argument, assign it.
+       if test -n "$prev"; then
+-	case "$prev" in
++	case $prev in
+ 	output)
+ 	  compile_command="$compile_command @OUTPUT@"
+ 	  finalize_command="$finalize_command @OUTPUT@"
+ 	  ;;
+ 	esac
+ 
+-	case "$prev" in
++	case $prev in
+ 	dlfiles|dlprefiles)
+ 	  if test "$preload" = no; then
+ 	    # Add the symbol object into the linking commands.
+@@ -898,7 +900,7 @@
+ 	    finalize_command="$finalize_command @SYMFILE@"
+ 	    preload=yes
+ 	  fi
+-	  case "$arg" in
++	  case $arg in
+ 	  *.la | *.lo) ;;  # We handle these cases below.
+ 	  force)
+ 	    if test "$dlself" = no; then
+@@ -950,9 +952,116 @@
+ 	  prev=
+ 	  continue
+ 	  ;;
++	objectlist)
++	  if test -f "$arg"; then
++            save_arg=$arg
++	    moreargs=
++	    for fil in `cat $save_arg`
++	    do
++#	      moreargs="$moreargs $fil"
++              arg=$fil
++              # A libtool-controlled object.
++
++	      # Check to see that this really is a libtool object.
++	      if (sed -e '2q' $arg | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
++                pic_object=
++                non_pic_object=
++
++                # Read the .lo file
++                # If there is no directory component, then add one.
++                case $arg in
++                */* | *\\*) . $arg ;;
++                *) . ./$arg ;;
++                esac
++
++                if test -z "$pic_object" || \
++                   test -z "$non_pic_object" ||
++                   test "$pic_object" = none && \
++                   test "$non_pic_object" = none; then
++                  $echo "$modename: cannot find name of object for \`$arg'" 1>&2
++                  exit 1
++                fi
++
++	        # Extract subdirectory from the argument.
++	        xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
++	        if test "X$xdir" = "X$arg"; then
++	          xdir=
++	        else
++	          xdir="$xdir/"
++	        fi
++
++                if test "$pic_object" != none; then
++                  # Prepend the subdirectory the object is found in.
++	          pic_object="$xdir$pic_object"
++
++	          if test "$prev" = dlfiles; then
++	            if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
++	              dlfiles="$dlfiles $pic_object"
++	              prev=
++	              continue
++	            else
++	              # If libtool objects are unsupported, then we need to preload.
++	              prev=dlprefiles
++	            fi
++	          fi
++
++	          # CHECK ME:  I think I busted this.  -Ossama
++                  if test "$prev" = dlprefiles; then
++	            # Preload the old-style object.
++	            dlprefiles="$dlprefiles $pic_object"
++	            prev=
++                  fi
++
++                  # A PIC object.
++	          libobjs="$libobjs $pic_object"
++	          arg="$pic_object"
++                fi
++
++                # Non-PIC object.
++                if test "$non_pic_object" != none; then
++                  # Prepend the subdirectory the object is found in.
++	          non_pic_object="$xdir$non_pic_object"
++
++                  # A standard non-PIC object
++                  non_pic_objects="$non_pic_objects $non_pic_object"
++                  if test -z "$pic_object" || test "$pic_object" = none ; then
++                    arg="$non_pic_object"
++                  fi
++                fi
++              else
++                # Only an error if not doing a dry-run.
++                if test -z "$run"; then
++                  $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
++                  exit 1
++                else
++                  # Dry-run case.
++
++	          # Extract subdirectory from the argument.
++	          xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
++	          if test "X$xdir" = "X$arg"; then
++	            xdir=
++	          else
++	            xdir="$xdir/"
++	          fi
++
++                  pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
++                  non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
++	          libobjs="$libobjs $pic_object"
++                  non_pic_objects="$non_pic_objects $non_pic_object"
++                fi
++	      fi
++	    done
++	  else
++	    $echo "$modename: link input file \`$save_arg' does not exist"
++	    exit 1
++	  fi
++          arg=$save_arg
++	  prev=
++	  continue
++	  ;;
+ 	rpath | xrpath)
+ 	  # We need an absolute path.
+-	  case "$arg" in
++	  case $arg in
+ 	  [\\/]* | [A-Za-z]:[\\/]*) ;;
+ 	  *)
+ 	    $echo "$modename: only absolute run-paths are allowed" 1>&2
+@@ -998,7 +1107,7 @@
+ 
+       prevarg="$arg"
+ 
+-      case "$arg" in
++      case $arg in
+       -all-static)
+ 	if test -n "$link_static_flag"; then
+ 	  compile_command="$compile_command $link_static_flag"
+@@ -1061,7 +1170,7 @@
+       -L*)
+ 	dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
+ 	# We need an absolute path.
+-	case "$dir" in
++	case $dir in
+ 	[\\/]* | [A-Za-z]:[\\/]*) ;;
+ 	*)
+ 	  absdir=`cd "$dir" && pwd`
+@@ -1079,9 +1188,9 @@
+ 	  lib_search_path="$lib_search_path $dir"
+ 	  ;;
+ 	esac
+-	case "$host" in
++	case $host in
+ 	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+-	  case ":$dllsearchpath:" in
++	  case :$dllsearchpath: in
+ 	  *":$dir:"*) ;;
+ 	  *) dllsearchpath="$dllsearchpath:$dir";;
+ 	  esac
+@@ -1092,25 +1201,27 @@
+ 
+       -l*)
+ 	if test "$arg" = "-lc"; then
+-	  case "$host" in
++	  case $host in
+ 	  *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*)
+ 	    # These systems don't actually have c library (as such)
+ 	    continue
+ 	    ;;
+-	  *-*-rhapsody* | *-*-darwin*)
+-	    # Darwin C library is in the System framework
++	  *-*-rhapsody* | *-*-darwin1.[012])
++	    # Rhapsody C library is in the System framework
+ 	    deplibs="$deplibs -framework System"
++	    continue
+ 	    ;;
+ 	  esac
+ 	elif test "$arg" = "-lm"; then
+-	  case "$host" in
++	  case $host in
+ 	  *-*-cygwin* | *-*-pw32* | *-*-beos*)
+ 	    # These systems don't actually have math library (as such)
+ 	    continue
+ 	    ;;
+-	  *-*-rhapsody* | *-*-darwin*)
+-	    # Darwin math library is in the System framework
++	  *-*-rhapsody* | *-*-darwin1.[012])
++	    # Rhapsody math library is in the System framework
+ 	    deplibs="$deplibs -framework System"
++	    continue
+ 	    ;;
+ 	  esac
+ 	fi
+@@ -1129,7 +1240,7 @@
+ 	;;
+ 
+       -no-install)
+-	case "$host" in
++	case $host in
+ 	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+ 	  # The PATH hackery in wrapper scripts is required on Windows
+ 	  # in order for the loader to find any dlls it needs.
+@@ -1137,10 +1248,6 @@
+ 	  $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
+ 	  fast_install=no
+ 	  ;;
+-	*-*-rhapsody* | *-*-darwin*)
+-	  # Darwin C library is in the System framework
+-	  deplibs="$deplibs -framework System"
+-	  ;;
+ 	*)
+ 	  no_install=yes
+ 	  ;;
+@@ -1153,6 +1260,11 @@
+ 	continue
+ 	;;
+ 
++      -objectlist)
++	prev=objectlist
++	continue
++	;;
++
+       -o) prev=output ;;
+ 
+       -release)
+@@ -1173,7 +1285,7 @@
+       -R*)
+ 	dir=`$echo "X$arg" | $Xsed -e 's/^-R//'`
+ 	# We need an absolute path.
+-	case "$dir" in
++	case $dir in
+ 	[\\/]* | [A-Za-z]:[\\/]*) ;;
+ 	*)
+ 	  $echo "$modename: only absolute run-paths are allowed" 1>&2
+@@ -1212,7 +1324,7 @@
+ 	IFS="${IFS= 	}"; save_ifs="$IFS"; IFS=','
+ 	for flag in $args; do
+ 	  IFS="$save_ifs"
+-	  case "$flag" in
++	  case $flag in
+ 	    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+ 	    flag="\"$flag\""
+ 	    ;;
+@@ -1230,7 +1342,7 @@
+ 	IFS="${IFS= 	}"; save_ifs="$IFS"; IFS=','
+ 	for flag in $args; do
+ 	  IFS="$save_ifs"
+-	  case "$flag" in
++	  case $flag in
+ 	    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+ 	    flag="\"$flag\""
+ 	    ;;
+@@ -1258,11 +1370,12 @@
+ 	# Unknown arguments in both finalize_command and compile_command need
+ 	# to be aesthetically quoted because they are evaled later.
+ 	arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+-	case "$arg" in
++	case $arg in
+ 	*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+ 	  arg="\"$arg\""
+ 	  ;;
+ 	esac
++	add_flags="$add_flags $arg"
+ 	;;
+ 
+       *.$objext)
+@@ -1280,7 +1393,7 @@
+ 
+           # Read the .lo file
+           # If there is no directory component, then add one.
+-          case "$arg" in
++          case $arg in
+           */* | *\\*) . $arg ;;
+           *) . ./$arg ;;
+           esac
+@@ -1392,11 +1505,12 @@
+ 	# Unknown arguments in both finalize_command and compile_command need
+ 	# to be aesthetically quoted because they are evaled later.
+ 	arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+-	case "$arg" in
++	case $arg in
+ 	*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+ 	  arg="\"$arg\""
+ 	  ;;
+ 	esac
++	add_flags="$add_flags $arg"
+ 	;;
+       esac
+ 
+@@ -1494,7 +1608,7 @@
+     fi
+ 
+     # Determine the type of output
+-    case "$output" in
++    case $output in
+     "")
+       $echo "$modename: you must specify an output file" 1>&2
+       $echo "$help" 1>&2
+@@ -1531,7 +1645,7 @@
+     lib)
+ 	passes="conv link"
+ 	for file in $dlfiles $dlprefiles; do
+-	  case "$file" in
++	  case $file in
+ 	  *.la) ;;
+ 	  *)
+ 	    $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
+@@ -1572,7 +1686,7 @@
+       for deplib in $libs; do
+ 	lib=
+ 	found=no
+-	case "$deplib" in
++	case $deplib in
+ 	-l*)
+ 	  if test $linkmode != lib && test $linkmode != prog; then
+ 	    $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
+@@ -1722,7 +1836,7 @@
+ 	installed=yes
+ 
+ 	# Read the .la file
+-	case "$lib" in
++	case $lib in
+ 	*/* | *\\*) . $lib ;;
+ 	*) . ./$lib ;;
+ 	esac
+@@ -1789,7 +1903,7 @@
+ 	fi
+ 
+ 	# We need an absolute path.
+-	case "$ladir" in
++	case $ladir in
+ 	[\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
+ 	*)
+ 	  abs_ladir=`cd "$ladir" && pwd`
+@@ -1864,7 +1978,7 @@
+ 
+ 	  tmp_libs=
+ 	  for deplib in $dependency_libs; do
+-	    case "$deplib" in
++	    case $deplib in
+ 	    -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
+ 	    esac
+ 	    # Need to link against all dependency_libs?
+@@ -1885,7 +1999,6 @@
+ 
+ 	if test "$linkmode,$pass" = "prog,link"; then
+ 	  if test -n "$library_names" &&
+-	     { test "$hardcode_into_libs" != all || test "$alldeplibs" != yes; } &&
+ 	     { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
+ 	    # We need to hardcode the library path
+ 	    if test -n "$shlibpath_var"; then
+@@ -1968,13 +2081,25 @@
+ 	    realname="$2"
+ 	    shift; shift
+ 	    libname=`eval \\$echo \"$libname_spec\"`
+-	    if test -n "$soname_spec"; then
++	    # use dlname if we got it. it's perfectly good, no?
++	    if test -n "$dlname"; then
++	      soname="$dlname"
++	    elif test -n "$soname_spec"; then
++	      # bleh windows
++	      case $host in
++	      *cygwin*)
++		major=`expr $current - $age`
++		versuffix="-$major"
++		;;
++	      esac
+ 	      eval soname=\"$soname_spec\"
+ 	    else
+ 	      soname="$realname"
+ 	    fi
+ 
+ 	    # Make a new name for the extract_expsyms_cmds to use
++	    soroot="$soname"
++	    soname=`echo $soroot | sed -e 's/^.*\///'`
+ 	    newlib="libimp-`echo $soname | sed 's/^lib//;s/\.dll$//'`.a"
+ 
+ 	    # If the library has no export list, then create one now
+@@ -2013,12 +2138,12 @@
+ 	    add_dir=
+ 	    add=
+ 	    lib_linked=yes
+-	    case "$hardcode_action" in
++	    case $hardcode_action in
+ 	    immediate | unsupported)
+ 	      if test "$hardcode_direct" = no; then
+ 		add="$dir/$linklib"
+ 	      elif test "$hardcode_minus_L" = no; then
+-		case "$host" in
++		case $host in
+ 		*-*-sunos*) add_shlibpath="$dir" ;;
+ 		esac
+ 		add_dir="-L$dir"
+@@ -2052,7 +2177,7 @@
+ 	    fi
+ 
+ 	    if test -n "$add_shlibpath"; then
+-	      case ":$compile_shlibpath:" in
++	      case :$compile_shlibpath: in
+ 	      *":$add_shlibpath:"*) ;;
+ 	      *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
+ 	      esac
+@@ -2066,7 +2191,7 @@
+ 	      if test "$hardcode_direct" != yes && \
+ 		 test "$hardcode_minus_L" != yes && \
+ 		 test "$hardcode_shlibpath_var" = yes; then
+-		case ":$finalize_shlibpath:" in
++		case :$finalize_shlibpath: in
+ 		*":$libdir:"*) ;;
+ 		*) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
+ 		esac
+@@ -2085,7 +2210,7 @@
+ 	      add_dir="-L$libdir"
+ 	      add="-l$name"
+ 	    elif test "$hardcode_shlibpath_var" = yes; then
+-	      case ":$finalize_shlibpath:" in
++	      case :$finalize_shlibpath: in
+ 	      *":$libdir:"*) ;;
+ 	      *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
+ 	      esac
+@@ -2138,12 +2263,12 @@
+ 
+ 	if test $linkmode = lib; then
+ 	  if test -n "$dependency_libs" &&
+-	     { test "$hardcode_into_libs" = no || test $build_old_libs = yes ||
++	     { test $hardcode_into_libs != yes || test $build_old_libs = yes ||
+ 	       test $link_static = yes; }; then
+ 	    # Extract -R from dependency_libs
+ 	    temp_deplibs=
+ 	    for libdir in $dependency_libs; do
+-	      case "$libdir" in
++	      case $libdir in
+ 	      -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'`
+ 		   case " $xrpath " in
+ 		   *" $temp_xrpath "*) ;;
+@@ -2171,13 +2296,13 @@
+ 	  if test $link_all_deplibs != no; then
+ 	    # Add the search paths of all dependency libraries
+ 	    for deplib in $dependency_libs; do
+-	      case "$deplib" in
++	      case $deplib in
+ 	      -L*) path="$deplib" ;;
+ 	      *.la)
+ 		dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'`
+ 		test "X$dir" = "X$deplib" && dir="."
+ 		# We need an absolute path.
+-		case "$dir" in
++		case $dir in
+ 		[\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
+ 		*)
+ 		  absdir=`cd "$dir" && pwd`
+@@ -2259,7 +2384,7 @@
+ 	  done
+ 	  tmp_libs=
+ 	  for deplib in $new_libs; do
+-	    case "$deplib" in
++	    case $deplib in
+ 	    -L*)
+ 	      case " $tmp_libs " in
+ 	      *" $deplib "*) ;;
+@@ -2316,7 +2441,7 @@
+ 
+     lib)
+       # Make sure we only generate libraries of the form `libNAME.la'.
+-      case "$outputname" in
++      case $outputname in
+       lib*)
+ 	name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
+ 	eval libname=\"$libname_spec\"
+@@ -2396,7 +2521,7 @@
+ 	age="$4"
+ 
+ 	# Check that each of the things are valid numbers.
+-	case "$current" in
++	case $current in
+ 	0 | [1-9] | [1-9][0-9]*) ;;
+ 	*)
+ 	  $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
+@@ -2405,7 +2530,7 @@
+ 	  ;;
+ 	esac
+ 
+-	case "$revision" in
++	case $revision in
+ 	0 | [1-9] | [1-9][0-9]*) ;;
+ 	*)
+ 	  $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
+@@ -2414,7 +2539,7 @@
+ 	  ;;
+ 	esac
+ 
+-	case "$age" in
++	case $age in
+ 	0 | [1-9] | [1-9][0-9]*) ;;
+ 	*)
+ 	  $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
+@@ -2433,9 +2558,29 @@
+ 	major=
+ 	versuffix=
+ 	verstring=
+-	case "$version_type" in
++	case $version_type in
+ 	none) ;;
+ 
++	darwin)
++	  # Like Linux, but with the current version available in
++	  # verstring for coding it into the library header
++	  major=.`expr $current - $age`
++	  versuffix="$major.$age.$revision"
++	  # Darwin ld doesn't like 0 for these options...
++	  minor_current=`expr $current + 1`
++	  verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
++	  ;;
++
++	freebsd-aout)
++	  major=".$current"
++	  versuffix=".$current.$revision";
++	  ;;
++
++	freebsd-elf)
++	  major=".$current"
++	  versuffix=".$current";
++	  ;;
++
+ 	irix)
+ 	  major=`expr $current - $age + 1`
+ 	  verstring="sgi$major.$revision"
+@@ -2480,16 +2625,6 @@
+ 	  versuffix=".$current.$revision"
+ 	  ;;
+ 
+-	freebsd-aout)
+-	  major=".$current"
+-	  versuffix=".$current.$revision";
+-	  ;;
+-
+-	freebsd-elf)
+-	  major=".$current"
+-	  versuffix=".$current";
+-	  ;;
+-
+ 	windows)
+ 	  # Use '-' rather than '.', since we only want one
+ 	  # extension on DOS 8.3 filesystems.
+@@ -2541,7 +2676,7 @@
+         removelist=
+         tempremovelist=`echo "$output_objdir/*"`
+ 	for p in $tempremovelist; do
+-          case "$p" in
++          case $p in
+             *.$objext)
+                ;;
+             $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
+@@ -2581,7 +2716,7 @@
+ 	  *) finalize_rpath="$finalize_rpath $libdir" ;;
+ 	  esac
+ 	done
+-	if test "$hardcode_into_libs" = no || test $build_old_libs = yes; then
++	if test $hardcode_into_libs != yes || test $build_old_libs = yes; then
+ 	  dependency_libs="$temp_xrpath $dependency_libs"
+ 	fi
+       fi
+@@ -2608,10 +2743,14 @@
+ 
+       if test "$build_libtool_libs" = yes; then
+ 	if test -n "$rpath"; then
+-	  case "$host" in
++	  case $host in
+ 	  *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*)
+ 	    # these systems don't actually have a c library (as such)!
+ 	    ;;
++	  *-*-rhapsody* | *-*-darwin1.[012])
++	    # Rhapsody C library is in the System framework
++	    deplibs="$deplibs -framework System"
++	    ;;
+ 	  *)
+  	    # Add libc to deplibs on all other systems if necessary.
+  	    if test $build_libtool_need_lc = "yes"; then
+@@ -2635,7 +2774,7 @@
+ 	major=""
+ 	newdeplibs=
+ 	droppeddeps=no
+-	case "$deplibs_check_method" in
++	case $deplibs_check_method in
+ 	pass_all)
+ 	  # Don't check for shared/static.  Everything works.
+ 	  # This might be a little naive.  We might want to check
+@@ -2743,7 +2882,7 @@
+ 		      potlib="$potent_lib"
+ 		      while test -h "$potlib" 2>/dev/null; do
+ 			potliblink=`ls -ld $potlib | sed 's/.* -> //'`
+-			case "$potliblink" in
++			case $potliblink in
+ 			[\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
+ 			*) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
+ 			esac
+@@ -2818,6 +2957,21 @@
+ 	    echo "*** The inter-library dependencies that have been dropped here will be"
+ 	    echo "*** automatically added whenever a program is linked with this library"
+ 	    echo "*** or is declared to -dlopen it."
++
++	    if test $allow_undefined = no; then
++	      echo
++	      echo "*** Since this library must not contain undefined symbols,"
++	      echo "*** because either the platform does not support them or"
++	      echo "*** it was explicitly requested with -no-undefined,"
++	      echo "*** libtool will only create a static version of it."
++	      if test "$build_old_libs" = no; then
++		oldlibs="$output_objdir/$libname.$libext"
++		build_libtool_libs=module
++		build_old_libs=yes
++	      else
++		build_libtool_libs=no
++	      fi
++	    fi
+ 	  fi
+ 	fi
+ 	# Done checking deplibs!
+@@ -2831,7 +2985,7 @@
+ 
+       # Test again, we may have decided not to build it any more
+       if test "$build_libtool_libs" = yes; then
+-	if test "$hardcode_into_libs" != no; then
++	if test $hardcode_into_libs = yes; then
+ 	  # Hardcode the library paths
+ 	  hardcode_libdirs=
+ 	  dep_rpath=
+@@ -2844,7 +2998,7 @@
+ 		  hardcode_libdirs="$libdir"
+ 		else
+ 		  # Just accumulate the unique libdirs.
+-		  case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in
++		  case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+ 		  *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+ 		    ;;
+ 		  *)
+@@ -2897,6 +3051,9 @@
+ 	else
+ 	  soname="$realname"
+ 	fi
++	if test x$dlname = x; then
++	  dlname=$soname
++	fi
+ 
+ 	lib="$output_objdir/$realname"
+ 	for link
+@@ -2953,6 +3110,7 @@
+ 
+ 	if test -n "$convenience"; then
+ 	  if test -n "$whole_archive_flag_spec"; then
++	    save_libobjs=$libobjs
+ 	    eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+ 	  else
+ 	    gentop="$output_objdir/${outputname}x"
+@@ -2968,7 +3126,7 @@
+ 
+ 	    for xlib in $convenience; do
+ 	      # Extract the objects.
+-	      case "$xlib" in
++	      case $xlib in
+ 	      [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
+ 	      *) xabs=`pwd`"/$xlib" ;;
+ 	      esac
+@@ -3001,19 +3159,130 @@
+ 	  $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $?
+ 	fi
+ 
++	# Add all flags from the command line.  We here create a library,
++	# but those flags were only added to compile_command and
++	# finalize_command, which are only used when creating executables.
++	# So do it by hand here.
++	compiler_flags="$compiler_flags $add_flags"
++	# Only add it to commands which use CC, instead of LD, i.e.
++	# only to $compiler_flags
++	#linker_flags="$linker_flags $add_flags"
++
+ 	# Do each of the archive commands.
+ 	if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+ 	  eval cmds=\"$archive_expsym_cmds\"
+ 	else
+ 	  eval cmds=\"$archive_cmds\"
+ 	fi
+-	IFS="${IFS= 	}"; save_ifs="$IFS"; IFS='~'
+-	for cmd in $cmds; do
+-	  IFS="$save_ifs"
+-	  $show "$cmd"
+-	  $run eval "$cmd" || exit $?
+-	done
+-	IFS="$save_ifs"
++        if len=`expr "X$cmds" : ".*"` &&
++           test $len -le $max_cmd_len; then
++          :
++        else
++	  # The command line is too long to link in one step, link piecewise.
++          $echo "creating reloadable object files..."
++
++	  # Save the value of $output and $libobjs because we want to
++	  # use them later.  If we have whole_archive_flag_spec, we
++	  # want to use save_libobjs as it was before
++	  # whole_archive_flag_spec was expanded, because we can't
++	  # assume the linker understands whole_archive_flag_spec.
++	  # This may have to be revisited, in case too many
++	  # convenience libraries get linked in and end up exceeding
++	  # the spec.
++	  if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
++	    save_libobjs=$libobjs
++	  fi
++          save_output=$output
++
++	  # Clear the reloadable object creation command queue and
++	  # initialize k to one.
++          test_cmds=
++          concat_cmds=
++          objlist=
++          delfiles=
++          last_robj=
++          k=1
++          output=$output_objdir/$save_output-${k}.$objext
++	  # Loop over the list of objects to be linked.
++          for obj in $save_libobjs
++          do
++            eval test_cmds=\"$reload_cmds $objlist $last_robj\"
++            if test "X$objlist" = X ||
++	       { len=`expr "X$test_cmds" : ".*"` &&
++                 test $len -le $max_cmd_len; }; then
++              objlist="$objlist $obj"
++            else
++	      # The command $test_cmds is almost too long, add a
++	      # command to the queue.
++              if test $k -eq 1 ; then
++	        # The first file doesn't have a previous command to add.
++                eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
++              else
++	        # All subsequent reloadable object files will link in
++	        # the last one created.
++                eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\"
++              fi
++              last_robj=$output_objdir/$save_output-${k}.$objext
++              k=`expr $k + 1`
++              output=$output_objdir/$save_output-${k}.$objext
++              objlist=$obj
++              len=1
++            fi
++          done
++	  # Handle the remaining objects by creating one last
++	  # reloadable object file.  All subsequent reloadable object
++	  # files will link in the last one created.
++	  test -z "$concat_cmds" || concat_cmds=$concat_cmds~
++          eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
++
++	  # Set up a command to remove the reloadale object files
++	  # after they are used.
++          i=0
++          while test $i -lt $k
++          do
++            i=`expr $i + 1`
++            delfiles="$delfiles $output_objdir/$save_output-${i}.$objext"
++          done
++
++          $echo "creating a temporary reloadable object file: $output"
++
++	  # Loop through the commands generated above and execute them.
++          IFS="${IFS= 	}"; save_ifs="$IFS"; IFS='~'
++          for cmd in $concat_cmds; do
++            IFS="$save_ifs"
++            $show "$cmd"
++            $run eval "$cmd" || exit $?
++          done
++          IFS="$save_ifs"
++
++          libobjs=$output
++	  # Restore the value of output.
++          output=$save_output
++
++	  if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
++	    eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
++	  fi
++	  # Expand the library linking commands again to reset the
++	  # value of $libobjs for piecewise linking.
++
++	  # Do each of the archive commands.
++          if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
++            eval cmds=\"$archive_expsym_cmds\"
++          else
++            eval cmds=\"$archive_cmds\"
++          fi
++
++	  # Append the command to remove the reloadable object files
++	  # to the just-reset $cmds.
++          eval cmds=\"\$cmds~$rm $delfiles\"
++        fi
++        IFS="${IFS= 	}"; save_ifs="$IFS"; IFS='~'
++        for cmd in $cmds; do
++          IFS="$save_ifs"
++          $show "$cmd"
++          $run eval "$cmd" || exit $?
++        done
++        IFS="$save_ifs"
+ 
+ 	# Restore the uninstalled library and exit
+ 	if test "$mode" = relink && test "$hardcode_into_libs" = all; then
+@@ -3062,7 +3331,7 @@
+ 	$echo "$modename: warning: \`-release' is ignored for objects" 1>&2
+       fi
+ 
+-      case "$output" in
++      case $output in
+       *.lo)
+ 	if test -n "$objs$old_deplibs"; then
+ 	  $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
+@@ -3107,7 +3376,7 @@
+ 
+ 	  for xlib in $convenience; do
+ 	    # Extract the objects.
+-	    case "$xlib" in
++	    case $xlib in
+ 	    [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
+ 	    *) xabs=`pwd`"/$xlib" ;;
+ 	    esac
+@@ -3203,6 +3472,9 @@
+       ;;
+ 
+     prog)
++      case $host in
++        *cygwin*) output=`echo $output | sed -e 's,.exe$,,;s,$,.exe,'` ;;
++      esac
+       if test -n "$vinfo"; then
+ 	$echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
+       fi
+@@ -3242,7 +3514,7 @@
+ 	      hardcode_libdirs="$libdir"
+ 	    else
+ 	      # Just accumulate the unique libdirs.
+-	      case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in
++	      case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+ 	      *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+ 		;;
+ 	      *)
+@@ -3260,9 +3532,9 @@
+ 	  *) perm_rpath="$perm_rpath $libdir" ;;
+ 	  esac
+ 	fi
+-	case "$host" in
++	case $host in
+ 	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+-	  case ":$dllsearchpath:" in
++	  case :$dllsearchpath: in
+ 	  *":$libdir:"*) ;;
+ 	  *) dllsearchpath="$dllsearchpath:$libdir";;
+ 	  esac
+@@ -3286,7 +3558,7 @@
+ 	      hardcode_libdirs="$libdir"
+ 	    else
+ 	      # Just accumulate the unique libdirs.
+-	      case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in
++	      case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+ 	      *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+ 		;;
+ 	      *)
+@@ -3323,7 +3595,7 @@
+       fi
+ 
+       if test -n "$dlsyms"; then
+-	case "$dlsyms" in
++	case $dlsyms in
+ 	"") ;;
+ 	*.c)
+ 	  # Discover the nlist of each of the dlfiles.
+@@ -3454,7 +3726,7 @@
+ 	  fi
+ 
+ 	  pic_flag_for_symtable=
+-	  case "$host" in
++	  case $host in
+ 	  # compiling the symbol table file with pic_flag works around
+ 	  # a FreeBSD bug that causes programs to crash when -lm is
+ 	  # linked before any other PIC object.  But we must not use
+@@ -3500,9 +3772,14 @@
+       fi
+ 
+       # AIX runtime linking requires linking programs with -Wl,-brtl and libs with -Wl,-G
++      # Also add -bnolibpath to the beginning of the link line, to clear the hardcoded runpath.
++      # Otherwise, things like the -L path to libgcc.a are accidentally hardcoded by ld.
++      # This does not apply on AIX for ia64, which uses a SysV linker.
+       case "$host" in
+-        *-*-aix4*) compile_command="$compile_command $wl-brtl"
+-                   finalize_command="$finalize_command $wl-brtl" ;;
++        ia64-*-aix5*) ;;
++        *-*-aix4* | *-*-aix5*)
++                   compile_command=`$echo "X$compile_command $wl-brtl" | $Xsed -e "s/\$CC/\$CC $wl-bnolibpath/1"`
++                   finalize_command=`$echo "X$finalize_command $wl-brtl" | $Xsed -e "s/\$CC/\$CC $wl-bnolibpath/1"` ;;
+       esac
+ 
+       if test $need_relink = no || test "$build_libtool_libs" != yes; then
+@@ -3528,7 +3805,7 @@
+ 	# We should set the shlibpath_var
+ 	rpath=
+ 	for dir in $temp_rpath; do
+-	  case "$dir" in
++	  case $dir in
+ 	  [\\/]* | [A-Za-z]:[\\/]*)
+ 	    # Absolute path.
+ 	    rpath="$rpath$dir:"
+@@ -3583,7 +3860,7 @@
+ 	exit 0
+       fi
+ 
+-      if test "$hardcode_action" = relink || test "$hardcode_into_libs" = all; then
++      if test "$hardcode_action" = relink; then
+ 	# Fast installation is not supported
+ 	link_command="$compile_var$compile_command$compile_rpath"
+ 	relink_command="$finalize_var$finalize_command$finalize_rpath"
+@@ -3636,7 +3913,7 @@
+ 
+       # Quote $echo for shipping.
+       if test "X$echo" = "X$SHELL $0 --fallback-echo"; then
+-	case "$0" in
++	case $0 in
+ 	[\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $0 --fallback-echo";;
+ 	*) qecho="$SHELL `pwd`/$0 --fallback-echo";;
+ 	esac
+@@ -3652,6 +3929,11 @@
+ 	case $output in
+ 	  *.exe) output=`echo $output|sed 's,.exe$,,'` ;;
+ 	esac
++	# test for cygwin because mv fails w/o .exe extensions
++	case $host in
++	  *cygwin*) exeext=.exe ;;
++	  *) exeext= ;;
++	esac
+ 	$rm $output
+ 	trap "$rm $output; exit 1" 1 2 15
+ 
+@@ -3730,7 +4012,7 @@
+ 
+ 	if test "$fast_install" = yes; then
+ 	  echo >> $output "\
+-  program=lt-'$outputname'
++  program=lt-'$outputname'$exeext
+   progdir=\"\$thisdir/$objdir\"
+ 
+   if test ! -f \"\$progdir/\$program\" || \\
+@@ -3875,7 +4157,7 @@
+ 	# Add in members from convenience archives.
+ 	for xlib in $addlibs; do
+ 	  # Extract the objects.
+-	  case "$xlib" in
++	  case $xlib in
+ 	  [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
+ 	  *) xabs=`pwd`"/$xlib" ;;
+ 	  esac
+@@ -3919,7 +4201,40 @@
+ #	  fi
+ #	done
+ 
+-	eval cmds=\"$old_archive_cmds\"
++	compiler_flags="$compiler_flags $add_flags"
++        eval cmds=\"$old_archive_cmds\"
++
++        if len=`expr "X$cmds" : ".*"` &&
++             test $len -le $max_cmd_len; then
++          :
++        else
++          # the command line is too long to link in one step, link in parts
++          $echo "using piecewise archive linking..."
++	  save_RANLIB=$RANLIB
++	  RANLIB=:
++          objlist=
++          concat_cmds=
++          save_oldobjs=$oldobjs
++          for obj in $save_oldobjs
++          do
++            oldobjs="$objlist $obj"
++            objlist="$objlist $obj"
++            eval test_cmds=\"$old_archive_cmds\"
++            if len=`expr "X$test_cmds" : ".*"` &&
++               test $len -le $max_cmd_len; then
++              :
++            else
++              # the above command should be used before it gets too long
++              oldobjs=$objlist
++	      test -z "$concat_cmds" || concat_cmds=$concat_cmds~
++              eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
++              objlist=
++            fi
++          done
++	  RANLIB=$save_RANLIB
++          oldobjs=$objlist
++          eval cmds=\"\$concat_cmds~$old_archive_cmds\"
++        fi
+       fi
+       IFS="${IFS= 	}"; save_ifs="$IFS"; IFS='~'
+       for cmd in $cmds; do
+@@ -3936,7 +4251,7 @@
+     fi
+ 
+     # Now create the libtool archive.
+-    case "$output" in
++    case $output in
+     *.la)
+       old_library=
+       test "$build_old_libs" = yes && old_library="$libname.$libext"
+@@ -3968,7 +4283,7 @@
+ 	    # Replace all uninstalled libtool libraries with the installed ones
+ 	    newdependency_libs=
+ 	    for deplib in $dependency_libs; do
+-	      case "$deplib" in
++	      case $deplib in
+ 	      *.la)
+ 		name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
+ 		eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+@@ -4006,6 +4321,11 @@
+ 	    dlprefiles="$newdlprefiles"
+ 	  fi
+ 	  $rm $output
++	  # place dlname in correct position for cygwin
++	  tdlname=$dlname
++	  case $host,$output,$installed,$module,$dlname in
++	    *cygwin*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
++	  esac
+ 	  $echo > $output "\
+ # $outputname - a libtool library file
+ # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
+@@ -4014,7 +4334,7 @@
+ # It is necessary for linking the library.
+ 
+ # The name that we can dlopen(3).
+-dlname='$dlname'
++dlname='$tdlname'
+ 
+ # Names of this library.
+ library_names='$library_names'
+@@ -4067,7 +4387,7 @@
+        $echo "X$nonopt" | $Xsed | grep shtool > /dev/null; then
+       # Aesthetically quote it.
+       arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
+-      case "$arg" in
++      case $arg in
+       *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*)
+ 	arg="\"$arg\""
+ 	;;
+@@ -4083,7 +4403,7 @@
+     # The real first argument should be the name of the installation program.
+     # Aesthetically quote it.
+     arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+-    case "$arg" in
++    case $arg in
+     *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*)
+       arg="\"$arg\""
+       ;;
+@@ -4106,7 +4426,7 @@
+ 	continue
+       fi
+ 
+-      case "$arg" in
++      case $arg in
+       -d) isdir=yes ;;
+       -f) prev="-f" ;;
+       -g) prev="-g" ;;
+@@ -4131,7 +4451,7 @@
+ 
+       # Aesthetically quote the argument.
+       arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+-      case "$arg" in
++      case $arg in
+       *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*)
+ 	arg="\"$arg\""
+ 	;;
+@@ -4182,11 +4502,11 @@
+ 	exit 1
+       fi
+     fi
+-    case "$destdir" in
++    case $destdir in
+     [\\/]* | [A-Za-z]:[\\/]*) ;;
+     *)
+       for file in $files; do
+-	case "$file" in
++	case $file in
+ 	*.lo) ;;
+ 	*)
+ 	  $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
+@@ -4208,7 +4528,7 @@
+     for file in $files; do
+ 
+       # Do each installation.
+-      case "$file" in
++      case $file in
+       *.$libext)
+ 	# Do the static libraries later.
+ 	staticlibs="$staticlibs $file"
+@@ -4227,7 +4547,7 @@
+ 	old_library=
+ 	relink_command=
+ 	# If there is no directory component, then add one.
+-	case "$file" in
++	case $file in
+ 	*/* | *\\*) . $file ;;
+ 	*) . ./$file ;;
+ 	esac
+@@ -4323,7 +4643,7 @@
+ 	fi
+ 
+ 	# Deduce the name of the destination old-style object file.
+-	case "$destfile" in
++	case $destfile in
+ 	*.lo)
+ 	  staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"`
+ 	  ;;
+@@ -4370,7 +4690,7 @@
+ 	  relink_command=
+ 
+ 	  # If there is no directory component, then add one.
+-	  case "$file" in
++	  case $file in
+ 	  */* | *\\*) . $file ;;
+ 	  *) . ./$file ;;
+ 	  esac
+@@ -4387,7 +4707,7 @@
+ 	    libdir=
+ 	    if test -f "$lib"; then
+ 	      # If there is no directory component, then add one.
+-	      case "$lib" in
++	      case $lib in
+ 	      */* | *\\*) . $lib ;;
+ 	      *) . ./$lib ;;
+ 	      esac
+@@ -4401,7 +4721,7 @@
+ 
+ 	  relink_command=
+ 	  # If there is no directory component, then add one.
+-	  case "$file" in
++	  case $file in
+ 	  */* | *\\*) . $file ;;
+ 	  *) . ./$file ;;
+ 	  esac
+@@ -4439,6 +4759,25 @@
+ 	  fi
+ 	fi
+ 
++
++	# remove .exe since cygwin /usr/bin/install will append another
++	# one anyways
++	case $install_prog,$host in
++	*/usr/bin/install*,*cygwin*)
++	  case $file:$destfile in
++	  *.exe:*.exe)
++	    # this is ok
++	    ;;
++	  *.exe:*)
++	    destfile=$destfile.exe
++	    ;;
++	  *:*.exe)
++	    destfile=`echo $destfile | sed -e 's,.exe$,,'`
++	    ;;
++	  esac
++	  ;;
++	esac
++
+ 	$show "$install_prog$stripme $file $destfile"
+ 	$run eval "$install_prog\$stripme \$file \$destfile" || exit $?
+ 	test -n "$outputname" && ${rm}r "$tmpdir"
+@@ -4520,7 +4859,7 @@
+     fi
+ 
+     # Exit here if they wanted silent mode.
+-    test "$show" = : && exit 0
++    exit 0
+ 
+     echo "----------------------------------------------------------------------"
+     echo "Libraries have been installed in:"
+@@ -4580,7 +4919,7 @@
+       fi
+ 
+       dir=
+-      case "$file" in
++      case $file in
+       *.la)
+ 	# Check to see that this really is a libtool archive.
+ 	if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+@@ -4595,7 +4934,7 @@
+ 	library_names=
+ 
+ 	# If there is no directory component, then add one.
+-	case "$file" in
++	case $file in
+ 	*/* | *\\*) . $file ;;
+ 	*) . ./$file ;;
+ 	esac
+@@ -4650,13 +4989,13 @@
+     args=
+     for file
+     do
+-      case "$file" in
++      case $file in
+       -*) ;;
+       *)
+ 	# Do a test to see if this is really a libtool program.
+ 	if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+ 	  # If there is no directory component, then add one.
+-	  case "$file" in
++	  case $file in
+ 	  */* | *\\*) . $file ;;
+ 	  *) . ./$file ;;
+ 	  esac
+@@ -4713,7 +5052,7 @@
+ 
+     for arg
+     do
+-      case "$arg" in
++      case $arg in
+       -*) rm="$rm $arg" ;;
+       *) files="$files $arg" ;;
+       esac
+@@ -4725,6 +5064,8 @@
+       exit 1
+     fi
+ 
++    rmdirs=
++
+     for file in $files; do
+       dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
+       if test "X$dir" = "X$file"; then
+@@ -4736,9 +5077,17 @@
+       name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+       test $mode = uninstall && objdir="$dir"
+ 
++      # Remember objdir for removal later, being careful to avoid duplicates
++      if test $mode = clean; then
++        case " $rmdirs " in
++	  *" $objdir "*) ;;
++	  *) rmdirs="$rmdirs $objdir" ;;
++	esac
++      fi
++
+       rmfiles="$file"
+ 
+-      case "$name" in
++      case $name in
+       *.la)
+ 	# Possibly a libtool archive, so verify it.
+ 	if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+@@ -4782,10 +5131,10 @@
+ 
+       *.lo)
+ 	# Possibly a libtool object, so verify it.
+-	if (sed -e '2q' $arg | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
++	if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+ 
+           # Read the .lo file
+-          . ./$file
++          . $dir/$name
+ 
+ 	  # Add PIC object to the list of files to remove.
+           if test -n "$pic_object" \
+@@ -4818,6 +5167,15 @@
+       $show "$rm $rmfiles"
+       $run $rm $rmfiles
+     done
++
++    # Try to remove the ${objdir}s in the directories where we deleted files
++    for dir in $rmdirs; do
++      if test -d "$dir"; then
++        $show "rmdir $dir"
++        $run rmdir $dir >/dev/null 2>&1
++      fi
++    done
++
+     exit 0
+     ;;
+ 
+@@ -4834,7 +5192,7 @@
+ fi # test -z "$show_help"
+ 
+ # We need to display help for each of the modes.
+-case "$mode" in
++case $mode in
+ "") $echo \
+ "Usage: $modename [OPTION]... [MODE-ARG]...
+ 
+@@ -4973,6 +5331,7 @@
+   -no-install       link a not-installable executable
+   -no-undefined     declare that a library does not refer to external symbols
+   -o OUTPUT-FILE    create OUTPUT-FILE from the specified objects
++  -objectlist FILE  Use a list of object files found in FILE to specify objects
+   -release RELEASE  specify package release information
+   -rpath LIBDIR     the created library will eventually be installed in LIBDIR
+   -R[ ]LIBDIR       add LIBDIR to the runtime path of programs and libraries
+--- kfocus-1.0.2.orig/admin/config.pl
++++ kfocus-1.0.2/admin/config.pl
+@@ -10,24 +10,28 @@
+ # 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 at ifh.de>
++# written by Michael Matz <matz at kde.org>
++# adapted by Dirk Mueller <mueller at kde.org>
+ #
+ # the first part was done by looking at the config.status files generated
+ # by configure.
+ # 
+-my $ac_cs_root=$ARGV[0];
+-my $ac_given_srcdir=$ARGV[1];
+-my $ac_given_INSTALL=$ARGV[2];
+-
+-# print "ac_cs_root=$ac_cs_root\n";
+-# print "ac_given_srcdir=$ac_given_srcdir\n";
+-# print "ac_given_INSTALL=$ac_given_INSTALL\n";
++
++my $ac_subs=$ARGV[0];
++my $ac_sacfiles = $ARGV[1];
++my $ac_given_srcdir=$ARGV[2];
++my $ac_given_INSTALL=$ARGV[3];
++
++#print "ac_subs=$ac_subs\n";
++#print "ac_sacfiles=$ac_sacfiles\n";
++#print "ac_given_srcdir=$ac_given_srcdir\n";
++#print "ac_given_INSTALL=$ac_given_INSTALL\n";
+ 
+ my ($srcdir, $top_srcdir);
+ my $INSTALL;
+ my $bad_perl = ($] < 5.005);
+ 
+-open(CF, "< $ac_cs_root.subs") || die "can't open $ac_cs_root.subs: $!";
++open(CF, "< $ac_subs") || die "can't open $ac_subs: $!";
+ my @subs = <CF>;
+ close(CF);
+ chomp @subs;
+@@ -41,39 +45,47 @@
+ 	   || ($pat =~ m%/([^/]*)/([^/]*)/g% )
+ 	   || ($pat =~ /s%([^%]*)%([^%]*)%;t/ )
+ 	   || ($pat =~ m%/([^/]*)/([^/]*)/;t% )
++           || ($pat =~ /s,([^,]*),(.*),;t/)
+ 	   ) {
+             # form : s%bla%blubb%g
+-	    # or     s%bla%blubb%;t t   (newer autoconf)
+-	    push @comp_subs, make_closure($1, $2);
++            # 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_cs_root.subs ($pat)"
++	    die "Uhh. Malformed pattern in $ac_subs ($pat)"
+ 		unless ( $pat =~ /^\s*$/ );   # ignore white lines
+ 	}
+     }
+ } else {
+     foreach my $pat (@subs) {
+-	if (  ($pat =~ /s%([^%]*)%([^%]*)%g/ )
+-	   || ($pat =~ m%/([^/]*)/([^/]*)/g% )
+-	   || ($pat =~ /s%([^%]*)%([^%]*)%;t/ )
+-	   || ($pat =~ m%/([^/]*)/([^/]*)/;t% )
+-	   ) {
+-            # form : s%bla%blubb%g
+-	    # or     s%bla%blubb%;t t   (newer autoconf)
+-	    push @comp_match, eval "qr/\Q$1\E/";  # compile match pattern
+-	    push @comp_subs, $2;
+-	} elsif ( ($pat =~ /%([^%]*)%d/ )
+-	   || ($pat =~ m%/([^/]*)/d% )
+-	   ) {
+-	    push @comp_match, eval "qr/\Q$1\E/";
+-	    push @comp_subs, "";
+-	} else {
+-	    die "Uhh. Malformed pattern in $ac_cs_root.subs ($pat)"
+-		unless ( $pat =~ /^\s*$/ );   # ignore white lines
+-	}
++       if ( ($pat =~ /s%([^%]*)%([^%]*)%g/ ) ||
++            ($pat =~ /s%([^%]*)%([^%]*)%;t/ ) ||
++            ($pat =~ /s,([^,]*),(.*),;t/) ) {
++         # form : s%bla%blubb%g
++         # or     s%bla%blubb%;t t   (autoconf > 2.13 and < 2.52 ?)
++         # or     s,bla,blubb,;t t   (autoconf 2.52)
++         my $srch = $1;
++         my $repl = $2;
++         push @comp_match, eval "qr/\Q$srch\E/";  # compile match pattern
++         $repl =~ s/\\(.)/$1/g;
++         push @comp_subs, $repl;
++      } elsif ( ($pat =~ /%([^%]*)%d/ )
++                || ($pat =~ m%/([^/]*)/d% )
++              ) {
++        push @comp_match, eval "qr/\Q$1\E/";
++        push @comp_subs, "";
++      } else {
++          die "Uhh. Malformed pattern in $ac_cs_root.subs ($pat)"
++          unless ( $pat =~ /^\s*$/ );   # ignore white lines
++      }
+     }
+ }
+ undef @subs;
+@@ -81,11 +93,12 @@
+ # read the list of files to be patched, form:
+ # ./Makefile arts/Makefile arts/examples/Makefile arts/flow/Makefile
+ 
+-open(CF, "< $ac_cs_root.sacfiles") || die "can't open $ac_cs_root.sacfiles: $!";
++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 =~ /\.\./;
+--- kfocus-1.0.2.orig/admin/ltcf-gcj.sh
++++ kfocus-1.0.2/admin/ltcf-gcj.sh
+@@ -41,7 +41,7 @@
+ lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }'
+ 
+ ## Linker Characteristics
+-case "$host_os" in
++case $host_os in
+ cygwin* | mingw*)
+   # FIXME: the MSVC++ port hasn't been tested in a loooong time
+   # When not using gcc, we currently assume that we are using
+@@ -59,7 +59,7 @@
+   wlarc='${wl}'
+ 
+   # See if GNU ld supports shared libraries.
+-  case "$host_os" in
++  case $host_os in
+   aix3* | aix4*)
+     # On AIX, the GNU linker is very broken
+     ld_shlibs=no
+@@ -111,7 +111,7 @@
+       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
+       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
+       else $CC -o impgen impgen.c ; fi)~
+-      $output_objdir/impgen $dir/$soname > $output_objdir/$soname-def'
++      $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
+ 
+     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
+ 
+@@ -120,7 +120,7 @@
+     # FIXME: what about values for MSVC?
+     dll_entry=__cygwin_dll_entry at 12
+     dll_exclude_symbols=DllMain at 12,_cygwin_dll_entry at 12,_cygwin_noncygwin_dll_entry at 12~
+-    case "$host_os" in
++    case $host_os in
+     mingw*)
+       # mingw values
+       dll_entry=_DllMainCRTStartup at 12
+@@ -151,23 +151,29 @@
+       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
+       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
+ 
++    # If the export-symbols file already is a .def file (1st line
++    # is EXPORTS), use it as is.
+     # If DATA tags from a recent dlltool are present, honour them!
+-    archive_expsym_cmds='echo EXPORTS > $output_objdir/$soname-def~
+-      _lt_hint=1;
+-      cat $export_symbols | while read symbol; do
+-	set dummy \$symbol;
+-	case \$# in
+-	  2) echo "	\$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
+-	  *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
+-	esac;
+-	_lt_hint=`expr 1 + \$_lt_hint`;
+-      done~
++    archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
++        cp $export_symbols $output_objdir/$soname-def;
++      else
++        echo EXPORTS > $output_objdir/$soname-def;
++        _lt_hint=1;
++        cat $export_symbols | while read symbol; do
++         set dummy \$symbol;
++         case \[$]# in
++           2) echo "   \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
++           *) echo "     \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
++         esac;
++         _lt_hint=`expr 1 + \$_lt_hint`;
++        done;
++      fi~
+       '"$ltdll_cmds"'
+-      $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_gcj_dll_switch' -Wl,-e,'$dll_entry' -o $lib '$ltdll_obj'$libobjs $deplibs $compiler_flags~
++      $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
+       $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
+-      $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_gcj_dll_switch' -Wl,-e,'$dll_entry' -o $lib '$ltdll_obj'$libobjs $deplibs $compiler_flags~
+-      $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
+-      $CC $output_objdir/$soname-exp '$lt_cv_gcj_dll_switch' -Wl,-e,'$dll_entry' -o $lib '$ltdll_obj'$libobjs $deplibs $compiler_flags'
++      $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
++      $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~
++      $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
+     ;;
+ 
+   netbsd*)
+@@ -239,7 +245,7 @@
+   fi
+ else
+   # PORTME fill in a description of your system's linker (not GNU ld)
+-  case "$host_os" in
++  case $host_os in
+   aix3*)
+     allow_undefined_flag=unsupported
+     always_export_symbols=yes
+@@ -264,7 +270,7 @@
+     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
+     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+     if test "$with_gcc" = yes; then
+-      case "$host_os" in aix4.[012]|aix4.[012].*)
++      case $host_os in aix4.[012]|aix4.[012].*)
+       # We only want to do this on AIX 4.2 and lower, the check
+       # below for broken collect2 doesn't work under 4.3+
+         collect2name=`${CC} -print-prog-name=collect2`
+@@ -398,7 +404,7 @@
+     ;;
+ 
+   hpux9* | hpux10* | hpux11*)
+-    case "$host_os" in
++    case $host_os in
+     hpux9*) archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;;
+     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
+     esac
+@@ -487,7 +493,7 @@
+ 		$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
+     hardcode_libdir_flag_spec='-R$libdir'
+     hardcode_shlibpath_var=no
+-    case "$host_os" in
++    case $host_os in
+     solaris2.[0-5] | solaris2.[0-5].*) ;;
+     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
+       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
+@@ -585,7 +591,7 @@
+     ac_cv_prog_cc_wl='-Wl,'
+     ac_cv_prog_cc_static='-static'
+ 
+-    case "$host_os" in
++    case $host_os in
+     beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
+       # PIC is the default for these OSes.
+       ;;
+@@ -598,6 +604,10 @@
+       # we not sure about C++ programs.
+       ac_cv_prog_cc_static="$ac_cv_prog_cc_static ${ac_cv_prog_cc_wl}-lC"
+       ;;
++    *djgpp*)
++      # DJGPP does not suppot shared libraries at all
++      ac_cv_prog_cc_pic=
++      ;;
+     cygwin* | mingw* | os2*)
+       # This hack is so that the source file can tell whether it is being
+       # built for inclusion in a dll (and should export symbols for example).
+@@ -621,3 +631,6 @@
+ 
+ # GCJ did not exist at the time GCC didn't implicitly link libc in.
+ need_lc=no
++
++# All existing releases of GCJ support `-c -o'.
++lt_cv_compiler_c_o=yes
+--- kfocus-1.0.2.orig/admin/install-sh
++++ kfocus-1.0.2/admin/install-sh
+@@ -93,11 +93,11 @@
+ 
+ 	*)  if [ x"$src" = x ]
+ 	    then
+-		src="$1"
++		src=$1
+ 	    else
+ 		# this colon is to work around a 386BSD /bin/sh bug
+ 		:
+-		dst="$1"
++		dst=$1
+ 	    fi
+ 	    shift
+ 	    continue;;
+@@ -113,11 +113,12 @@
+ fi
+ 
+ if [ x"$dir_arg" != x ]; then
+-	dst="$src"
++	dst=$src
+ 	src=""
+ 	
+ 	if [ -d $dst ]; then
+ 		instcmd=:
++		chmodcmd=""
+ 	else
+ 		instcmd=mkdir
+ 	fi
+@@ -127,7 +128,7 @@
+ # might cause directories to be created, which would be especially bad 
+ # if $src (and thus $dsttmp) contains '*'.
+ 
+-	if [ -f "$src" -o -d "$src" ]
++	if [ -f $src -o -d $src ]
+ 	then
+ 		true
+ 	else
+@@ -146,7 +147,7 @@
+ # 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" ]
++	if [ -d $dst ]
+ 	then
+ 		dst="$dst"/`basename $src`
+ 	else
+@@ -203,9 +204,9 @@
+ 
+ 	if [ x"$transformarg" = x ] 
+ 	then
+-		dstfile=`basename "$dst"`
++		dstfile=`basename $dst`
+ 	else
+-		dstfile=`basename "$dst" $transformbasename | 
++		dstfile=`basename $dst $transformbasename | 
+ 			sed $transformarg`$transformbasename
+ 	fi
+ 
+@@ -213,7 +214,7 @@
+ 
+ 	if [ x"$dstfile" = x ] 
+ 	then
+-		dstfile=`basename "$dst"`
++		dstfile=`basename $dst`
+ 	else
+ 		true
+ 	fi
+@@ -224,9 +225,9 @@
+ 
+ # Move or copy the file name to the temp name
+ 
+-	$doit $instcmd "$src" "$dsttmp" &&
++	$doit $instcmd $src $dsttmp &&
+ 
+-	trap "rm -f \"${dsttmp}\"" 0 &&
++	trap "rm -f ${dsttmp}" 0 &&
+ 
+ # and set any options; do chmod last to preserve setuid bits
+ 
+@@ -240,8 +241,10 @@
+ 	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
+ 
+ # Now rename the file to the real destination.
+-	$doit $rmcmd -f "$dstdir/$dstfile" &&
+-	$doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
++
++	$doit $rmcmd -f $dstdir/$dstfile &&
++	$doit $mvcmd $dsttmp $dstdir/$dstfile 
++
+ fi &&
+ 
+ 
+--- kfocus-1.0.2.orig/admin/cvs-clean.pl
++++ kfocus-1.0.2/admin/cvs-clean.pl
+@@ -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 at kde.org>
++#  inspired by the "old" cvs-clean target from Makefile.common
++#
++# This file is free software in terms of the BSD licence. 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 ("");
+--- kfocus-1.0.2.orig/admin/cvs.sh
++++ kfocus-1.0.2/admin/cvs.sh
+@@ -0,0 +1,473 @@
++#! /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/;" configure
++  fi
++}
++
++strip_makefile()
++{
++  if test -f $makefile_wo; then :; else
++    perl -e '$in=0; while ( <> ) { $in = 1 if ($_=~ m/^if /); print $_ unless ($in); $in = 0 if ($_ =~ m/^endif/); }' < Makefile.am.in > $makefile_wo
++  fi
++}
++
++check_autotool_versions()
++{
++AUTOCONF_VERSION=`$AUTOCONF --version | head -1`
++case $AUTOCONF_VERSION in
++  Autoconf*2.5* | autoconf*2.5* ) : ;;
++  "" )
++    echo "*** AUTOCONF NOT FOUND!."
++    echo "*** KDE requires autoconf 2.52 or 2.53"
++    exit 1
++    ;;
++  * )
++    echo "*** YOU'RE USING $AUTOCONF_VERSION."
++    echo "*** KDE requires autoconf 2.52 or 2.53"
++    exit 1
++    ;;
++esac
++ 
++AUTOHEADER_VERSION=`$AUTOHEADER --version | head -1`
++case $AUTOHEADER_VERSION in
++  Autoconf*2.5* | autoheader*2.5* ) : ;;
++  "" )
++    echo "*** AUTOHEADER NOT FOUND!."
++    echo "*** KDE requires autoheader 2.52 or 2.53 (part of autoconf)"
++    exit 1
++    ;;
++  * )
++    echo "*** YOU'RE USING $AUTOHEADER_VERSION."
++    echo "*** KDE requires autoheader 2.52 or 2.53 (part of autoconf)"
++    exit 1
++    ;;
++esac
++
++AUTOMAKE_STRING=`$AUTOMAKE --version | head -1`
++case $AUTOMAKE_STRING in
++  automake*1.5d* )
++    echo "*** YOU'RE USING $AUTOMAKE_STRING."
++    echo "*** KDE requires automake 1.5"
++    exit 1
++    ;;
++  automake*1.5* | automake*1.5-* | automake*1.6.* ) : ;;
++  "" )
++    echo "*** AUTOMAKE NOT FOUND!."
++    echo "*** KDE requires automake 1.5"
++    exit 1
++    ;;
++  unsermake* ) :
++    echo "*** YOU'RE USING UNSERMAKE."
++    echo "*** GOOD LUCK!! :)"
++    ;;
++  * )
++    echo "*** YOU'RE USING $AUTOMAKE_STRING."
++    echo "*** KDE requires automake 1.5"
++    exit 1
++    ;;
++esac
++}
++
++cvs()
++{
++check_autotool_versions
++ 
++### Produce acinclude.m4
++if grep '\$(top_srcdir)/acinclude.m4:' $makefile_am >/dev/null; then
++  echo "*** Creating acinclude.m4"
++  rm -f acinclude.m4 configure.files
++  
++  strip_makefile
++  $MAKE -f $makefile_wo top_srcdir=. ./acinclude.m4
++fi
++
++### 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 subdirs configure.in
++  echo "*** Creating list of subdirectories"
++  subdirs
++  echo "*** Creating configure.in"
++  configure_files
++  strip_makefile
++  $MAKE -f $makefile_wo top_srcdir=. ./configure.in || exit 1
++fi
++
++echo "*** Creating aclocal.m4"
++$ACLOCAL || 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 admin/am_edit || exit 1
++fi
++
++if egrep "^cvs-local:" $makefile_am >/dev/null; then \
++  strip_makefile
++  $MAKE -f $makefile_wo cvs-local || 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"
++###
++if grep '\$(top_srcdir)/acinclude.m4:' $makefile_am >/dev/null; then
++  strip_makefile
++  $MAKE -f $makefile_wo top_srcdir=. ./acinclude.m4
++fi
++if test -r configure.in.in; then
++  subdirs
++  configure_files
++  strip_makefile
++  $MAKE -f $makefile_wo top_srcdir=. ./configure.in
++fi
++$ACLOCAL
++$AUTOHEADER
++$AUTOMAKE --foreign --include-deps
++perl 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
++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
++fi
++}
++
++subdir_dist()
++{
++$ACLOCAL
++$AUTOHEADER
++$AUTOMAKE --foreign --include-deps
++perl ../admin/am_edit
++call_and_fix_autoconf
++}
++
++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; }
++cat `egrep -v "configure.in.bot" < configure.files` > configure.in.new
++echo "KDE_CREATE_SUBDIRSLIST" >> configure.in.new
++if test -f Makefile.am.in; then
++  subdirs=`cat subdirs`
++  for dir in $subdirs; do
++    dir=`echo $dir | sed -e "s,[-+],_,g"`
++    echo "AM_CONDITIONAL($dir""_SUBDIR_included, test \"x\$$dir""_SUBDIR_included\" = xyes)" >> configure.in.new
++  done
++fi
++# echo "AC_OUTPUT( \\" >> configure.in.new
++mfs=`find . -type d -print | fgrep -v "/." | \
++     sed -e "s#\./##" -e "/^debian/d" | sort`
++for i in $mfs; do
++  topleveldir=`echo $i| sed -e "s#/.*##"`
++  if test -f $topleveldir/configure.in; then
++	continue
++  fi
++  if test -f $i/Makefile.am; then :; else
++	continue
++  fi
++  if test -s inst-apps; then
++    if grep "\"^$topleveldir\"" inst-apps > /dev/null 2>&1; then
++	continue
++    fi
++  fi
++  echo "AC_CONFIG_FILES([ $i/Makefile ])" >> configure.in.new
++  if test -n "$UNSERMAKE"; then
++    echo "AC_CONFIG_FILES([ $i/Makefile.rules ])" >> configure.in.new
++  fi
++done
++egrep '^dnl AC_OUTPUT\(.*\)' `cat configure.files` | sed -e "s#^.*dnl AC_OUTPUT(\(.*\))#AC_CONFIG_FILES([ \1 ])#" >> configure.in.new
++if test -n "$UNSERMAKE"; then
++  echo "AC_CONFIG_FILES([ MakeVars ])" >> configure.in.new
++fi
++echo "AC_OUTPUT" >> configure.in.new
++modulename=
++if test -f configure.in.in; then
++   if head -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 -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 "$modulename" || test "$modulename" = "@MODULENAME@"; then
++   modulename=`pwd`; modulename=`basename $modulename`
++fi
++if test -z "$VERSION" || test "$VERSION" = "@VERSION@"; then
++     VERSION="\"3.0\""
++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
++rm -f configure.in.new
++}
++
++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 -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
++list=`find . -name "configure.in.in" -o -name "configure.in.bot" | sort`
++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
++}
++
++subdirs()
++{
++dirs=
++compilefirst=`sed -ne 's#^COMPILE_FIRST[ ]*=[ ]*##p' $makefile_am | head -1`
++compilelast=`sed -ne 's#^COMPILE_LAST[ ]*=[ ]*##p' $makefile_am | head -1`
++for i in `ls -1`; do
++    if test -f $i/Makefile.am; then
++	case " $compilefirst $compilelast " in
++	  *" $i "*) ;;
++	  *) dirs="$dirs $i"
++	esac
++    fi
++done
++rm -f _SUBDIRS
++for i in $dirs; do
++    echo $i >> ./_SUBDIRS
++done
++if test -f Makefile.am.in; then
++  cp Makefile.am.in Makefile.am
++  topsubdirs=
++  subdirs=
++  if test -n "$compilefirst"; then
++     topsubdirs='$(COMPILE_FIRST)'
++     subdirs='$(COMPILE_FIRST) '
++  fi
++  if test -n "$UNSERMAKE"; then
++    for i in $dirs; 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
++  fi
++  subdirs="$subdirs"'$(TOPSUBDIRS)'
++  if test -n "$compilelast"; then
++     topsubdirs="$topsubdirs "'$(COMPILE_LAST)'
++     subdirs="$subdirs "'$(COMPILE_LAST)'
++  fi
++  if test -n "$UNSERMAKE"; then
++    echo "SUBDIRS=$topsubdirs" >> Makefile.am
++  else
++    echo "SUBDIRS=$subdirs" >> Makefile.am
++  fi
++fi
++if test -r subdirs && diff subdirs _SUBDIRS > /dev/null; then
++  rm -f _SUBDIRS
++fi
++test -r _SUBDIRS && mv _SUBDIRS subdirs || true
++}
++
++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
++  cp 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 > rc.cpp
++   else
++	candidates=`ls -1 *.rc *.ui 2>/dev/null`
++	if test -n "$candidates"; then
++	    echo "$subdir has *.rc or *.ui 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>) { if (/^messages:/) { $mes=1; print $_; next; } if ($mes) { if (/$\\(XGETTEXT\)/ && / -o/) { s/ -o \$\(podir\)/ _translatorinfo.cpp -o \$\(podir\)/ } print $_; } else { print $_; } }' < Makefile.am > _transMakefile
++
++   $MAKE -s -f _transMakefile podir=$podir EXTRACTRC="$EXTRACTRC" PREPARETIPS="$PREPARETIPS" \
++	XGETTEXT="${XGETTEXT:-xgettext} -C -ki18n -ktr2i18n -kI18N_NOOP -ktranslate -kaliasLocale -x ${includedir:-$KDEDIR/include}/kde.pot" \
++	messages 
++   ) 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
++   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"
++	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
++}
++
++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
++if test -f Makefile.am.in; then
++  makefile_am=Makefile.am.in
++  makefile_wo=Makefile.am.in.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 ) $arg ;;
++  * ) 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.am.in.wo; then
++  rm Makefile.am.in.wo
++fi
++
++exit 0
+--- kfocus-1.0.2.orig/admin/detect-autoconf.sh
++++ kfocus-1.0.2/admin/detect-autoconf.sh
+@@ -0,0 +1,71 @@
++#! /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`" ; then	
++    AUTOCONF="`$WHICH autoconf-2.5x`"
++  elif test -x "`$WHICH autoconf-2.53`" ; then
++    AUTOCONF="`$WHICH autoconf-2.53`"
++  elif test -x "`$WHICH autoconf-2.52`" ; then
++    AUTOCONF="`$WHICH autoconf-2.52`"
++  elif test -x "`$WHICH autoconf2.50`" ; then
++    AUTOCONF="`$WHICH autoconf2.50`"
++  fi
++}
++
++checkAutoheader()
++{
++  if test -x "`$WHICH autoheader-2.5x`" ; then
++    AUTOHEADER="`$WHICH autoheader-2.5x`"
++    AUTOM4TE="`$WHICH autom4te-2.5x`"
++  elif test -x "`$WHICH autoheader-2.53`" ; then
++    AUTOHEADER="`$WHICH autoheader-2.53`"
++    AUTOM4TE="`$WHICH autom4te-2.53`"
++  elif test -x "`$WHICH autoheader-2.52`" ; then
++    AUTOHEADER="`$WHICH autoheader-2.52`"
++  elif test -x "`$WHICH autoheader2.50`" ; then
++    AUTOHEADER="`$WHICH autoheader2.50`"
++  fi
++}
++
++checkAutomakeAclocal ()
++{
++  if test -z "$UNSERMAKE"; then
++    if test -x "`$WHICH automake-1.5`" ; then
++      AUTOMAKE="`$WHICH automake-1.5`"
++      ACLOCAL="`$WHICH aclocal-1.5`"
++    elif test -x "`$WHICH automake-1.6`" ; then
++      AUTOMAKE="`$WHICH automake-1.6`"
++      ACLOCAL="`$WHICH aclocal-1.6`"
++    fi
++  else
++     AUTOMAKE="$UNSERMAKE"
++  fi
++}
++
++checkWhich ()
++{
++  WHICH=""
++  for i in "type -p" "which" "type" ; do
++    T=`$i sh`
++    test -x "$T" && WHICH="$i" && break
++  done
++}
++
++checkWhich
++checkAutoconf
++checkAutoheader
++checkAutomakeAclocal
++
++export WHICH AUTOHEADER AUTOCONF AUTOM4TE AUTOMAKE ACLOCAL
+--- kfocus-1.0.2.orig/acinclude.m4
++++ kfocus-1.0.2/acinclude.m4
+@@ -28,6 +28,138 @@
+ dnl Single-module modifications are best placed in configure.in for kdelibs
+ dnl and kdebase or configure.in.in if present.
+ 
++dnl ------------------------------------------------------------------------
++dnl Forward compatibility macros (make autoconf 2.13 look like 2.50),
++dnl thanks to Raja R Harinath.
++dnl ------------------------------------------------------------------------
++dnl
++ifdef([_AC_PATH_X_XMKMF],[],
++   [AC_DEFUN([_AC_PATH_X_XMKMF],[AC_PATH_X_XMKMF])])
++ifdef([AC_OUTPUT_SUBDIRS],[],
++   [AC_DEFUN([AC_OUTPUT_SUBDIRS],[subdirs=$1; _AC_OUTPUT_SUBDIRS])])
++
++# KDE_PATH_X_DIRECT
++dnl Internal subroutine of AC_PATH_X.
++dnl Set ac_x_includes and/or ac_x_libraries.
++AC_DEFUN(KDE_PATH_X_DIRECT,
++[if test "$ac_x_includes" = NO; then
++  # Guess where to find include files, by looking for this one X11 .h file.
++  test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
++
++  # First, try using that file with no special directory specified.
++AC_TRY_CPP([#include <$x_direct_test_include>],
++[# We can compile using X headers with no special include directory.
++ac_x_includes=],
++[# Look for the header file in a standard set of common directories.
++# Check X11 before X11Rn because it is often a symlink to the current release.
++  for ac_dir in               \
++    /usr/X11/include          \
++    /usr/X11R6/include        \
++    /usr/X11R5/include        \
++    /usr/X11R4/include        \
++                              \
++    /usr/include/X11          \
++    /usr/include/X11R6        \
++    /usr/include/X11R5        \
++    /usr/include/X11R4        \
++                              \
++    /usr/local/X11/include    \
++    /usr/local/X11R6/include  \
++    /usr/local/X11R5/include  \
++    /usr/local/X11R4/include  \
++                              \
++    /usr/local/include/X11    \
++    /usr/local/include/X11R6  \
++    /usr/local/include/X11R5  \
++    /usr/local/include/X11R4  \
++                              \
++    /usr/X386/include         \
++    /usr/x386/include         \
++    /usr/XFree86/include/X11  \
++                              \
++    /usr/include              \
++    /usr/local/include        \
++    /usr/unsupported/include  \
++    /usr/athena/include       \
++    /usr/local/x11r5/include  \
++    /usr/lpp/Xamples/include  \
++                              \
++    /usr/openwin/include      \
++    /usr/openwin/share/include \
++    ; \
++  do
++    if test -r "$ac_dir/$x_direct_test_include"; then
++      ac_x_includes=$ac_dir
++      break
++    fi
++  done])
++fi # $ac_x_includes = NO
++
++if test "$ac_x_libraries" = NO; then
++  # Check for the libraries.
++
++  test -z "$x_direct_test_library" && x_direct_test_library=Xt
++  test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
++
++  # See if we find them without any special options.
++  # Don't add to $LIBS permanently.
++  ac_save_LIBS="$LIBS"
++  LIBS="-l$x_direct_test_library $LIBS"
++AC_TRY_LINK(, [${x_direct_test_function}()],
++[LIBS="$ac_save_LIBS"
++# We can link X programs with no special library path.
++ac_x_libraries=],
++[LIBS="$ac_save_LIBS"
++# First see if replacing the include by lib works.
++# Check X11 before X11Rn because it is often a symlink to the current release.
++for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
++    /usr/X11/lib          \
++    /usr/X11R6/lib        \
++    /usr/X11R5/lib        \
++    /usr/X11R4/lib        \
++                          \
++    /usr/lib/X11          \
++    /usr/lib/X11R6        \
++    /usr/lib/X11R5        \
++    /usr/lib/X11R4        \
++                          \
++    /usr/local/X11/lib    \
++    /usr/local/X11R6/lib  \
++    /usr/local/X11R5/lib  \
++    /usr/local/X11R4/lib  \
++                          \
++    /usr/local/lib/X11    \
++    /usr/local/lib/X11R6  \
++    /usr/local/lib/X11R5  \
++    /usr/local/lib/X11R4  \
++                          \
++    /usr/X386/lib         \
++    /usr/x386/lib         \
++    /usr/XFree86/lib/X11  \
++                          \
++    /usr/lib              \
++    /usr/local/lib        \
++    /usr/unsupported/lib  \
++    /usr/athena/lib       \
++    /usr/local/x11r5/lib  \
++    /usr/lpp/Xamples/lib  \
++    /lib/usr/lib/X11	  \
++                          \
++    /usr/openwin/lib      \
++    /usr/openwin/share/lib \
++    ; \
++do
++dnl Don't even attempt the hair of trying to link an X program!
++  for ac_extension in a so sl; do
++    if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
++      ac_x_libraries=$ac_dir
++      break 2
++    fi
++  done
++done])
++fi # $ac_x_libraries = NO
++])
++
+ 
+ dnl ------------------------------------------------------------------------
+ dnl Find a file (or one of more files in a list of dirs)
+@@ -40,7 +172,9 @@
+ do
+   for j in $1;
+   do
++    echo "configure: __oline__: $i/$j" >&AC_FD_CC
+     if test -r "$i/$j"; then
++      echo "taking that" >&AC_FD_CC
+       $3=$i
+       break 2
+     fi
+@@ -144,16 +278,25 @@
+    fi
+ 
+    KDE_FIND_PATH(moc, MOC, [$qt_bindirs], [KDE_MOC_ERROR_MESSAGE])
+-   KDE_FIND_PATH(uic, UIC, [$qt_bindirs], [UIC="" ; KDE_UIC_ERROR_MESSAGE])
+-   if test -z "$UIC" ; then
+-     if test -z "$UIC_NOT_NEEDED" ; then
++   if test -z "$UIC_NOT_NEEDED"; then
++     KDE_FIND_PATH(uic, UIC, [$qt_bindirs], [UIC=""])
++     if test -z "$UIC" ; then
++       KDE_UIC_ERROR_MESSAGE
+        exit 1
+-     else
+-       UIC="echo uic not available: "
+      fi
++   else
++     UIC="echo uic not available: "
+    fi
++
+    AC_SUBST(MOC)
+    AC_SUBST(UIC)
++
++   UIC_TR="i18n"
++   if test $kde_qtver = 3; then
++     UIC_TR="tr2i18n"
++   fi
++
++   AC_SUBST(UIC_TR)
+ ])
+ 
+ AC_DEFUN(KDE_1_CHECK_PATHS,
+@@ -223,6 +366,8 @@
+ 	kde_servicesdir=\"$kde_servicesdir\" \
+ 	kde_servicetypesdir=\"$kde_servicetypesdir\" \
+ 	kde_moduledir=\"$kde_moduledir\" \
++   kde_styledir=\"$kde_styledir\" \
++	kde_widgetdir=\"$kde_widgetdir\" \
+ 	kde_result=$1"
+ ])
+ 
+@@ -276,7 +421,17 @@
+     kde_servicetypesdir='\${prefix}/share/servicetypes'
+   fi
+   if test -z "$kde_moduledir"; then
+-    kde_moduledir='\${prefix}/lib/kde2'
++    if test "$kde_qtver" = "2"; then
++      kde_moduledir='\${exec_prefix}/lib/kde2'
++    else
++      kde_moduledir='\${exec_prefix}/lib/kde3'
++    fi
++  fi
++  if test -z "$kde_styledir"; then
++    kde_styledir='\${exec_prefix}/lib/kde3/plugins/styles'
++  fi
++  if test -z "$kde_widgetdir"; then
++    kde_widgetdir='\${exec_prefix}/lib/kde3/plugins/designer'
+   fi
+ 
+   KDE_SET_PATHS(defaults)
+@@ -302,7 +457,8 @@
+    test -z "$kde_wallpaperdir" || test -z "$kde_templatesdir" ||
+    test -z "$kde_bindir" || test -z "$kde_servicesdir" ||
+    test -z "$kde_servicetypesdir" || test -z "$kde_moduledir" ||
+-   test "$kde_have_all_paths" != "yes"; then
++   test -z "$kde_styledir" || test -z "kde_widgetdir" 
++   test "x$kde_have_all_paths" != "xyes"; then
+      kde_have_all_paths=no
+   fi
+ ])
+@@ -315,9 +471,9 @@
+ ])
+ 
+ AC_DEFUN(KDE_SUBST_PROGRAMS,
+-[AC_REQUIRE([AC_CREATE_KFSSTND])dnl
++[
+ 
+-        kde_default_bindirs="/usr/bin /usr/local/bin /opt/local/bin /usr/X11R6/bin /opt/kde/bin /opt/kde2/bin /usr/kde/bin /usr/local/kde/bin"
++        kde_default_bindirs="/usr/bin /usr/local/bin /opt/local/bin /usr/X11R6/bin /opt/kde/bin /opt/kde3/bin /usr/kde/bin /usr/local/kde/bin"
+         if test -n "$KDEDIRS"; then
+            kde_save_IFS=$IFS
+            IFS=:
+@@ -330,18 +486,30 @@
+         KDE_FIND_PATH(dcopidl, DCOPIDL, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl)])
+         KDE_FIND_PATH(dcopidl2cpp, DCOPIDL2CPP, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl2cpp)])
+         KDE_FIND_PATH(mcopidl, MCOPIDL, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(mcopidl)])
+-        KDE_FIND_PATH(kdb2html, KDB2HTML, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(kdb2html)])
+         KDE_FIND_PATH(artsc-config, ARTSCCONFIG, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(artsc-config)])
+-        KDE_FIND_PATH(kde-config, KDECONFIG, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(kde-config)])
++        KDE_FIND_PATH(kde-config, KDECONFIG, [$kde_default_bindirs])
++        KDE_FIND_PATH(meinproc, MEINPROC, [$kde_default_bindirs])
++      
++        if test -n "$MEINPROC" && test ! "$MEINPROC" = "compiled"; then  
++ 	    kde_sharedirs="/usr/share/kde /usr/local/share /usr/share /opt/kde3/share /opt/kde/share $prefix/share"
++            test -n "$KDEDIR" && kde_sharedirs="$KDEDIR/share $kde_sharedirs"
++            AC_FIND_FILE(apps/ksgmltools2/customization/kde-chunk.xsl, $kde_sharedirs, KDE_XSL_STYLESHEET)
++	    if test "$KDE_XSL_STYLESHEET" = "NO"; then
++		KDE_XSL_STYLESHEET=""
++	    else
++                KDE_XSL_STYLESHEET="$KDE_XSL_STYLESHEET/apps/ksgmltools2/customization/kde-chunk.xsl"
++	    fi
++        fi
+ 
+         DCOP_DEPENDENCIES='$(DCOPIDL)'
+         AC_SUBST(DCOPIDL)
+         AC_SUBST(DCOPIDL2CPP)
+         AC_SUBST(DCOP_DEPENDENCIES)
+         AC_SUBST(MCOPIDL)
+-        AC_SUBST(KDB2HTML)
+         AC_SUBST(ARTSCCONFIG)
+         AC_SUBST(KDECONFIG)
++	AC_SUBST(MEINPROC)
++ 	AC_SUBST(KDE_XSL_STYLESHEET)
+ 
+         if test -x "$KDECONFIG"; then # it can be "compiled"
+           kde_libs_prefix=`$KDECONFIG --prefix`
+@@ -382,6 +550,8 @@
+   kde_mimedir= kde_toolbardir= kde_wallpaperdir= kde_templatesdir=
+   kde_bindir= kde_servicesdir= kde_servicetypesdir= kde_moduledir=
+   kde_have_all_paths=
++  kde_styledir=
++  kde_widgetdir=
+   KDE_SET_DEFAULT_PATHS($1)
+   eval "$kde_cv_all_paths"
+   KDE_CHECK_PATHS_FOR_COMPLETENESS
+@@ -422,6 +592,8 @@
+ AC_SUBST(kde_servicesdir)
+ AC_SUBST(kde_servicetypesdir)
+ AC_SUBST(kde_moduledir)
++AC_SUBST(kde_styledir)
++AC_SUBST(kde_widgetdir)
+ if test "$kde_qtver" = 1; then
+   kde_minidir="$kde_icondir/mini"
+ else
+@@ -438,7 +610,9 @@
+ [
+    AC_LANG_C
+    dnl Checks for libraries.
+-   AC_CHECK_LIB(compat, main, [LIBCOMPAT="-lcompat"]) dnl for FreeBSD
++   AC_CHECK_LIB(util, main, [LIBUTIL="-lutil"]) dnl for *BSD 
++   AC_SUBST(LIBUTIL)
++   AC_CHECK_LIB(compat, main, [LIBCOMPAT="-lcompat"]) dnl for *BSD
+    AC_SUBST(LIBCOMPAT)
+    kde_have_crypt=
+    AC_CHECK_LIB(crypt, crypt, [LIBCRYPT="-lcrypt"; kde_have_crypt=yes],
+@@ -452,7 +626,7 @@
+    if test $kde_have_crypt = yes; then
+       AC_DEFINE_UNQUOTED(HAVE_CRYPT, 1, [Defines if your system has the crypt function])
+    fi
+-   AC_CHECK_KSIZE_T
++   AC_CHECK_SOCKLEN_T
+    AC_LANG_C
+    AC_CHECK_LIB(dnet, dnet_ntoa, [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"])
+    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
+@@ -478,12 +652,27 @@
+    AC_CHECK_FUNC(shmat, ,
+      AC_CHECK_LIB(ipc, shmat, X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"))
+    
+-   # Solaris 2.6 needs -lresolv for res_init
+-   AC_CHECK_FUNC(res_init, ,
+-     AC_CHECK_LIB(resolv, res_init, X_EXTRA_LIBS="$X_EXTRA_LIBS -lresolv"))
++   # Solaris 2.6 and others need -lresolv for res_init
++   AC_CHECK_FUNCS(res_init, , [
++     kde_libs_safe="$LIBS"
++     LIBS="$LIBS $X_EXTRA_LIBS -lresolv"
++     AC_TRY_LINK(
++[
++#include <resolv.h>
++],
++[ 
++res_init(); 
++],
++        LIBRESOLV="-lresolv"
++        X_EXTRA_LIBS="$X_EXTRA_LIBS $LIBRESOLV"
++        AC_DEFINE(HAVE_RES_INIT, 1, [Define if you have the res_init function])
++     )
++     LIBS=$kde_libs_safe
++   ])
+ 
+    LIBSOCKET="$X_EXTRA_LIBS"
+    AC_SUBST(LIBSOCKET)
++   AC_SUBST(LIBRESOLV)
+    AC_SUBST(X_EXTRA_LIBS)
+    AC_CHECK_LIB(ucb, killpg, [LIBUCB="-lucb"]) dnl for Solaris2.4
+    AC_SUBST(LIBUCB)
+@@ -508,8 +697,24 @@
+ dnl
+ AC_DEFUN(K_PATH_X,
+ [
+-AC_REQUIRE([AC_PROG_CPP])dnl
+ AC_REQUIRE([KDE_MISC_TESTS])dnl
++
++AC_ARG_ENABLE(
++  embedded,
++  [  --enable-embedded       link to Qt-embedded, don't use X],
++  kde_use_qt_emb=$enableval,
++  kde_use_qt_emb=no
++)
++
++AC_ARG_ENABLE(
++  qtopia,
++  [  --enable-qtopia       link to Qt-embedded, link to the Qtopia Environment],
++  kde_use_qt_emb_palm=$enableval,
++  kde_use_qt_emb_palm=no
++)
++
++if test "$kde_use_qt_emb" = "no"; then
++
+ AC_MSG_CHECKING(for X)
+ AC_LANG_SAVE
+ AC_LANG_C
+@@ -530,17 +735,22 @@
+ ac_x_libraries=$kde_x_libraries
+ ac_x_includes=$kde_x_includes
+ 
+-AC_PATH_X_DIRECT
++KDE_PATH_X_DIRECT
+ dnl AC_PATH_X_XMKMF picks /usr/lib as the path for the X libraries.
+ dnl Unfortunately, if compiling with the N32 ABI, this is not the correct
+ dnl location. The correct location is /usr/lib32 or an undefined value
+ dnl (the linker is smart enough to pick the correct default library).
+ dnl Things work just fine if you use just AC_PATH_X_DIRECT.
++dnl Solaris has a similar problem. AC_PATH_X_XMKMF forces x_includes to
++dnl /usr/openwin/include, which doesn't work. /usr/include does work, so
++dnl x_includes should be left alone.
+ case "$host" in
+ mips-sgi-irix6*)
+   ;;
++*-*-solaris*)
++  ;;
+ *)
+-  AC_PATH_X_XMKMF
++  _AC_PATH_X_XMKMF
+   if test -z "$ac_x_includes"; then
+     ac_x_includes="."
+   fi
+@@ -573,6 +783,7 @@
+ kde_cv_have_x="have_x=yes \
+          kde_x_includes=$kde_x_includes kde_x_libraries=$kde_x_libraries"
+ ])dnl
++
+ eval "$kde_cv_have_x"
+ 
+ if test "$have_x" != yes; then
+@@ -635,6 +846,9 @@
+ 
+ AC_TRY_LINK([
+ #include <stdio.h>
++#ifdef STDC_HEADERS
++# include <stdlib.h>
++#endif
+ ],
+ [
+ printf("hello Xext\n");
+@@ -655,9 +869,84 @@
+ them either.])
+ fi
+ 
+-])
++AC_MSG_CHECKING(for Xinerama)
++
++ AC_ARG_WITH(xinerama,
++  [  --with-xinerama         enable support for Xinerama ],
++  [
++    no_xinerama=no
++  ], [
++    no_xinerama=yes
++  ]
++)
++
++kde_save_LDFLAGS="$LDFLAGS"
++kde_save_CFLAGS="$CFLAGS"
++kde_save_LIBS="$LIBS"
++LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS"
++CFLAGS="$CFLAGS -I$x_includes"
++LIBS="-lXinerama -lXext"
++
++if test "x$no_xinerama" = "xno"; then
++
++  AC_CACHE_VAL(ac_cv_have_xinerama,
++  [
++	  AC_TRY_LINK([#include <X11/Xlib.h>
++  			#include <X11/extensions/Xinerama.h>],
++	  	  [XineramaIsActive(NULL);],
++		  [ac_cv_have_xinerama="yes"],
++		  [ac_cv_have_xinerama="no"])
++  ])
++else
++  ac_cv_have_xinerama=no;
++fi
++
++AC_MSG_RESULT($ac_cv_have_xinerama)
++
++LIBXINERAMA=""
++
++if test "$ac_cv_have_xinerama" = "yes"; then
++  AC_DEFINE(HAVE_XINERAMA, 1, [Define if you want Xinerama support])
++  LIBXINERAMA="-lXinerama"
++fi
++
++AC_SUBST(LIBXINERAMA)
++
++LDFLAGS="$kde_save_LDFLAGS"
++CFLAGS="$kde_save_CFLAGS"
++LIBS="$kde_save_LIBS"
++
++LIB_XEXT="-lXext"
++QTE_NORTTI=""
++
++else
++  dnl We're using QT Embedded
++  CXXFLAGS="$CXXFLAGS -fno-rtti -DQWS"
++  CFLAGS="$CFLAGS -DQWS"
++  LDFLAGS="$LDFLAGS -DQWS"
++  QTE_NORTTI="-fno-rtti -DQWS"
++  X_PRE_LIBS=""
++  LIB_X11=""
++  LIB_XEXT=""
++  LIBSM=""
++  X_INCLUDES=""
++  X_LDFLAGS=""
++  x_includes=""
++  x_libraries=""
++  AC_SUBST(X_PRE_LIBS)
++  AC_SUBST(LIB_X11)
++  AC_SUBST(LIBSM)
++  AC_SUBST(X_INCLUDES)
++  AC_SUBST(X_LDFLAGS)
++  AC_SUBST(x_includes)
++  AC_SUBST(x_libraries)
++fi
++AC_SUBST(QTE_NORTTI)
++AC_SUBST(LIB_XEXT)
++
+ 
+ AC_LANG_RESTORE
++
+ ])
+ 
+ AC_DEFUN(KDE_PRINT_QT_PROGRAM,
+@@ -667,8 +956,6 @@
+ #include "confdefs.h"
+ #include <qglobal.h>
+ #include <qapplication.h>
+-#include <qapp.h>
+-#include <qobjcoll.h>
+ EOF
+ if test "$kde_qtver" = "2"; then
+ cat >> conftest.$ac_ext <<EOF
+@@ -682,7 +969,14 @@
+ #include <qiconview.h>
+ EOF
+ fi
++fi
+ 
++if test "$kde_qtver" = "3"; then
++cat >> conftest.$ac_ext <<EOF
++#include <qcursor.h>
++#include <qstylefactory.h>
++#include <private/qucomextra_p.h>
++EOF
+ fi
+ 
+ echo "#if ! ($kde_qt_verstring)" >> conftest.$ac_ext
+@@ -695,6 +989,7 @@
+ if test "$kde_qtver" = "2"; then
+ cat >> conftest.$ac_ext <<EOF
+     QStringList *t = new QStringList();
++    Q_UNUSED(t);
+ EOF
+ if test $kde_qtsubver -gt 0; then
+ cat >> conftest.$ac_ext <<EOF
+@@ -702,10 +997,15 @@
+     iv.setWordWrapIconText(false);
+     QString s;
+     s.setLatin1("Elvis is alive", 14);
+-    int magnolia = QEvent::Speech; /* new in 2.2 beta2 */
+ EOF
+ fi
+ fi
++if test "$kde_qtver" = "3"; then
++cat >> conftest.$ac_ext <<EOF
++    (void)QStyleFactory::create(QString::null);
++    QCursor c(Qt::WhatsThisCursor);
++EOF
++fi
+ cat >> conftest.$ac_ext <<EOF
+     return 0;
+ }
+@@ -714,36 +1014,33 @@
+ 
+ AC_DEFUN(KDE_USE_QT,
+ [
+-
+ if test -z "$1"; then
+-  kde_qtver=2
++  kde_qtver=3
+   kde_qtsubver=1
+ else
+-  kde_qtsubver=`echo "$1" | sed -e 's#[0-9]\+\.\([0-9]\+\).*#\1#'`
++  kde_qtsubver=`echo "$1" | sed -e 's#[0-9][0-9]*\.\([0-9][0-9]*\).*#\1#'`
+   # following is the check if subversion isn´t found in passed argument
+   if test "$kde_qtsubver" = "$1"; then
+     kde_qtsubver=1
+   fi
+-  kde_qtver=`echo "$1" | sed -e 's#^\([0-9]\+\)\..*#\1#'`
++  kde_qtver=`echo "$1" | sed -e 's#^\([0-9][0-9]*\)\..*#\1#'`
+   if test "$kde_qtver" = "1"; then
+     kde_qtsubver=42
+-  else
+-   # this is the version number fallback to 2.1, unless major version is 1 or 2
+-   if test "$kde_qtver" != "2"; then
+-    kde_qtver=2
+-    kde_qtsubver=1
+-   fi
+   fi
+ fi
+ 
+ if test -z "$2"; then
+-  if test $kde_qtver = 2; then
++  if test "$kde_qtver" = "2"; then
+     if test $kde_qtsubver -gt 0; then
+       kde_qt_minversion=">= Qt 2.2.2"
+     else
+       kde_qt_minversion=">= Qt 2.0.2"
+     fi
+-  else
++  fi
++  if test "$kde_qtver" = "3"; then
++    kde_qt_minversion=">= Qt 3.0.1"
++  fi
++  if test "$kde_qtver" = "1"; then
+     kde_qt_minversion=">= 1.42 and < 2.0"
+   fi
+ else
+@@ -751,22 +1048,30 @@
+ fi
+ 
+ if test -z "$3"; then
++   if test $kde_qtver = 3; then
++     kde_qt_verstring="QT_VERSION >= 301"
++   fi
+    if test $kde_qtver = 2; then
+-    if test $kde_qtsubver -gt 0; then
+-      kde_qt_verstring="QT_VERSION >= 222"
+-    else
+-      kde_qt_verstring="QT_VERSION >= 200"
+-    fi
+-   else
++     if test $kde_qtsubver -gt 0; then
++       kde_qt_verstring="QT_VERSION >= 222"
++     else
++       kde_qt_verstring="QT_VERSION >= 200"
++     fi
++   fi
++   if test $kde_qtver = 1; then
+     kde_qt_verstring="QT_VERSION >= 142 && QT_VERSION < 200"
+-  fi
++   fi
+ else
+    kde_qt_verstring=$3
+ fi
+ 
++if test $kde_qtver = 3; then
++  kde_qt_dirs="$QTDIR /usr/lib/qt3 /usr/lib/qt"
++fi
+ if test $kde_qtver = 2; then
+    kde_qt_dirs="$QTDIR /usr/lib/qt2 /usr/lib/qt"
+-else
++fi
++if test $kde_qtver = 1; then
+    kde_qt_dirs="$QTDIR /usr/lib/qt"
+ fi
+ ])
+@@ -787,7 +1092,11 @@
+ 
+ CXXFLAGS="$CXXFLAGS -I$qt_includes"
+ LDFLAGS="$LDFLAGS $X_LDFLAGS"
++if test "x$kde_use_qt_emb" != "xyes"; then
+ LIBS="$LIBQT -lXext -lX11 $LIBSOCKET"
++else
++LIBS="$LIBQT $LIBSOCKET"
++fi
+ LD_LIBRARY_PATH=
+ export LD_LIBRARY_PATH
+ LIBRARY_PATH=
+@@ -841,86 +1150,117 @@
+ 
+ AC_ARG_ENABLE(
+   mt,
+-  [  --enable-mt             link to threaded Qt (experimental)],
++  [  --disable-mt            link to non-threaded Qt (deprecated)],
+   kde_use_qt_mt=$enableval,
+-  kde_use_qt_mt=no
++  [
++    if test $kde_qtver = 3; then
++      kde_use_qt_mt=yes
++    else
++      kde_use_qt_mt=no
++    fi
++  ]
+ )
+ 
+ USING_QT_MT=""
+ 
+ dnl ------------------------------------------------------------------------
+-dnl If we got --enable-qt-mt then adjust some vars for the host.
++dnl If we not get --disable-qt-mt then adjust some vars for the host.
+ dnl ------------------------------------------------------------------------
+ 
++KDE_MT_LDFLAGS=
++KDE_MT_LIBS=
+ if test "x$kde_use_qt_mt" = "xyes"; then
+-
+-  case $host in
+-  *-*-linux-*)
+-    if test "x$GCC" = "xyes"; then
+-      CPPFLAGS="$CPPFLAGS -DQT_THREAD_SUPPORT -pthread"
+-      X_EXTRA_LIBS="$X_EXTRA_LIBS -pthread"
+-    else
+-      AC_MSG_WARN([Compiler is not gcc. MT support disabled.])
+-    fi
+-    ;;
+-  *)
+-    AC_MSG_WARN([MT not yet supported on $host - disabled.])
+-    ;;
+-  esac
+-
++  KDE_CHECK_THREADING
++  if test "x$kde_use_threading" = "xyes"; then
++    CPPFLAGS="$USE_THREADS -DQT_THREAD_SUPPORT $CPPFLAGS"
++    KDE_MT_LDFLAGS="$USE_THREADS"
++    KDE_MT_LIBS="$LIBPTHREAD"
++  else
++    kde_use_qt_mt=no
++  fi
+ fi
++AC_SUBST(KDE_MT_LDFLAGS)
++AC_SUBST(KDE_MT_LIBS)
+ 
+ kde_qt_was_given=yes
+ 
+ dnl ------------------------------------------------------------------------
+ dnl If we haven't been told how to link to Qt, we work it out for ourselves.
+ dnl ------------------------------------------------------------------------
+-
+ if test -z "$LIBQT_GLOB"; then
+-
+-  LIBQT_GLOB="libqt.*"
+-
++  if test "x$kde_use_qt_emb" = "xyes"; then
++    LIBQT_GLOB="libqte.*"
++  else
++    LIBQT_GLOB="libqt.*"
++  fi
+ fi
+ 
+ if test -z "$LIBQT"; then
++dnl ------------------------------------------------------------
++dnl If we got --enable-embedded then adjust the Qt library name.
++dnl ------------------------------------------------------------
++  if test "x$kde_use_qt_emb" = "xyes"; then
++    qtlib="qte"
++  else
++    qtlib="qt"
++  fi
++
++  kde_int_qt="-l$qtlib"
++else
++  kde_int_qt="$LIBQT"
++  kde_lib_qt_set=yes
++fi
+ 
+-  LIBQT="-lqt"
+-  kde_int_qt="-lqt"
++if test -z "$LIBQPE"; then
++dnl ------------------------------------------------------------
++dnl If we got --enable-palmtop then add -lqpe to the link line
++dnl ------------------------------------------------------------
++  if test "x$kde_use_qt_emb" = "xyes"; then
++    if test "x$kde_use_qt_emb_palm" = "xyes"; then
++      LIB_QPE="-lqpe"
++    else
++      LIB_QPE=""
++    fi
++  else
++    LIB_QPE=""
++  fi
++fi
+ 
+ dnl ------------------------------------------------------------------------
+ dnl If we got --enable-qt-mt then adjust the Qt library name for the host.
+ dnl ------------------------------------------------------------------------
+ 
+-  if test "x$kde_use_qt_mt" = "xyes"; then
+-
+-      case $host in
+-      *-*-linux-*)
+-        if test "x$GCC" = "xyes"; then
+-          LIBQT="-lqt-mt"
+-          kde_int_qt="-lqt-mt"
+-          LIBQT_GLOB="libqt-mt.*"
+-          USING_QT_MT="using -mt"
+-        fi
+-      ;;
+-      esac
++if test "x$kde_use_qt_mt" = "xyes"; then
++  if test -z "$LIBQT"; then
++    LIBQT="-l$qtlib-mt"
++    kde_int_qt="-l$qtlib-mt"
++  else
++    LIBQT="$qtlib-mt"
++    kde_int_qt="$qtlib-mt"
+   fi
+-
+-  kde_qt_was_given=no
+-
++  LIBQT_GLOB="lib$qtlib-mt.*"
++  USING_QT_MT="using -mt"
+ else
+-  kde_int_qt="$LIBQT"
++  LIBQT="-l$qtlib"
+ fi
+ 
+-if test $kde_qtver = 2; then
++if test $kde_qtver != 1; then
+ 
+   AC_REQUIRE([AC_FIND_PNG])
+   AC_REQUIRE([AC_FIND_JPEG])
+   LIBQT="$LIBQT $LIBPNG $LIBJPEG"
+ fi
+ 
++if test $kde_qtver = 3; then
++  AC_REQUIRE([KDE_CHECK_LIBDL])
++  LIBQT="$LIBQT $LIBDL"
++fi
++
+ AC_MSG_CHECKING([for Qt])
+ 
++if test "x$kde_use_qt_emb" != "xyes"; then
+ LIBQT="$LIBQT $X_PRE_LIBS -lXext -lX11 $LIBSM $LIBSOCKET"
++fi
+ ac_qt_includes=NO ac_qt_libraries=NO ac_qt_bindir=NO
+ qt_libraries=""
+ qt_includes=""
+@@ -952,12 +1292,12 @@
+ for dir in $kde_qt_dirs; do
+    qt_incdirs="$qt_incdirs $dir/include $dir"
+ done
+-qt_incdirs="$QTINC $qt_incdirs /usr/local/qt/include /usr/include/qt /usr/include /usr/X11R6/include/X11/qt /usr/X11R6/include/qt $x_includes"
++qt_incdirs="$QTINC $qt_incdirs /usr/local/qt/include /usr/include/qt /usr/include /usr/X11R6/include/X11/qt /usr/X11R6/include/qt /usr/X11R6/include/qt2 $x_includes"
+ if test ! "$ac_qt_includes" = "NO"; then
+    qt_incdirs="$ac_qt_includes $qt_incdirs"
+ fi
+ 
+-if test "$kde_qtver" = "2"; then
++if test "$kde_qtver" != "1"; then
+   kde_qt_header=qstyle.h
+ else
+   kde_qt_header=qglobal.h
+@@ -993,8 +1333,8 @@
+ ac_libs_safe="$LIBS"
+ 
+ CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
+-LDFLAGS="$LDFLAGS -L$qt_libdir $all_libraries $USER_LDFLAGS"
+-LIBS="$LIBS $LIBQT"
++LDFLAGS="$LDFLAGS -L$qt_libdir $all_libraries $USER_LDFLAGS $KDE_MT_LDFLAGS"
++LIBS="$LIBS $LIBQT $KDE_MT_LIBS"
+ 
+ KDE_PRINT_QT_PROGRAM
+ 
+@@ -1014,6 +1354,7 @@
+ if test "$ac_qt_includes" = NO || test "$ac_qt_libraries" = NO; then
+   ac_cv_have_qt="have_qt=no"
+   ac_qt_notfound=""
++  missing_qt_mt=""
+   if test "$ac_qt_includes" = NO; then
+     if test "$ac_qt_libraries" = NO; then
+       ac_qt_notfound="(headers and libraries)";
+@@ -1021,11 +1362,17 @@
+       ac_qt_notfound="(headers)";
+     fi
+   else
+-    ac_qt_notfound="(libraries)";
++    if test "x$kde_use_qt_mt" = "xyes"; then
++       missing_qt_mt="
++Make sure that you have compiled Qt with thread support!"
++       ac_qt_notfound="(library $qtlib-mt)";
++    else
++       ac_qt_notfound="(library $qtlib)";
++    fi
+   fi
+ 
+   AC_MSG_ERROR([Qt ($kde_qt_minversion) $ac_qt_notfound not found. Please check your installation!
+-For more details about this problem, look at the end of config.log.])
++For more details about this problem, look at the end of config.log.$missing_qt_mt])
+ else
+   have_qt="yes"
+ fi
+@@ -1052,7 +1399,7 @@
+ AC_SUBST(qt_includes)
+ 
+ if test "$qt_includes" = "$x_includes" || test -z "$qt_includes"; then
+- QT_INCLUDES="";
++ QT_INCLUDES=""
+ else
+  QT_INCLUDES="-I$qt_includes"
+  all_includes="$QT_INCLUDES $all_includes"
+@@ -1064,14 +1411,23 @@
+  QT_LDFLAGS="-L$qt_libraries"
+  all_libraries="$all_libraries $QT_LDFLAGS"
+ fi
++test -z "$KDE_MT_LDFLAGS" || all_libraries="$all_libraries $KDE_MT_LDFLAGS"
+ 
+ AC_SUBST(QT_INCLUDES)
+ AC_SUBST(QT_LDFLAGS)
+ AC_PATH_QT_MOC_UIC
+ 
++if test "x$kde_use_qt_emb" != "xyes"; then
+ LIB_QT="$kde_int_qt "'$(LIBPNG) $(LIBJPEG) -lXext $(LIB_X11) $(LIBSM)'
++else
++LIB_QT="$kde_int_qt "'$(LIBPNG) $(LIBJPEG)'
++fi
++test -z "$KDE_MT_LIBS" || LIB_QT="$LIB_QT $KDE_MT_LIBS"
++
+ AC_SUBST(LIB_QT)
++AC_SUBST(LIB_QPE)
+ 
++AC_SUBST(kde_qtver)
+ ])
+ 
+ AC_DEFUN(AC_PATH_QT,
+@@ -1154,7 +1510,7 @@
+ 
+ if test -z "$1"; then
+ 
+-kde_incdirs="/usr/lib/kde/include /usr/local/kde/include /usr/kde/include /usr/include/kde /usr/include /opt/kde2/include /opt/kde/include $x_includes $qt_includes"
++kde_incdirs="/usr/lib/kde/include /usr/local/kde/include /usr/local/include /usr/kde/include /usr/include/kde /usr/include /opt/kde3/include /opt/kde/include $x_includes $qt_includes"
+ test -n "$KDEDIR" && kde_incdirs="$KDEDIR/include $KDEDIR/include/kde $KDEDIR $kde_incdirs"
+ kde_incdirs="$ac_kde_includes $kde_incdirs"
+ AC_FIND_FILE($kde_check_header, $kde_incdirs, kde_incdir)
+@@ -1166,7 +1522,7 @@
+ So, check this please and use another prefix!])
+ fi
+ 
+-kde_libdirs="/usr/lib/kde/lib /usr/local/kde/lib /usr/kde/lib /usr/lib/kde /usr/lib /usr/X11R6/lib /opt/kde2/lib /opt/kde/lib /usr/X11R6/kde/lib"
++kde_libdirs="/usr/lib/kde/lib /usr/local/kde/lib /usr/kde/lib /usr/lib/kde /usr/lib/kde3 /usr/lib /usr/X11R6/lib /usr/local/lib /opt/kde3/lib /opt/kde/lib /usr/X11R6/kde/lib"
+ test -n "$KDEDIR" && kde_libdirs="$KDEDIR/lib $KDEDIR $kde_libdirs"
+ kde_libdirs="$ac_kde_libraries $kde_libdirs"
+ AC_FIND_FILE($kde_check_lib, $kde_libdirs, kde_libdir)
+@@ -1223,7 +1579,7 @@
+ AC_SUBST(kde_libraries)
+ AC_SUBST(kde_includes)
+ 
+-if test "$kde_includes" = "$x_includes" || test "$kde_includes" = "$qt_includes" ; then
++if test "$kde_includes" = "$x_includes" || test "$kde_includes" = "$qt_includes"  || test "$kde_includes" = "/usr/include"; then
+  KDE_INCLUDES=""
+ else
+  KDE_INCLUDES="-I$kde_includes"
+@@ -1309,6 +1665,9 @@
+     AC_LANG_SAVE
+     AC_LANG_CPLUSPLUS
+ cat > conftest.$ac_ext <<EOF
++#ifdef STDC_HEADERS
++# include <stdlib.h>
++#endif
+ #include <stdio.h>
+ #include "confdefs.h"
+ #include <kapp.h>
+@@ -1331,6 +1690,8 @@
+     printf("kde_servicesdir=\\"/tmp/dummy\\"\n");
+     printf("kde_servicetypesdir=\\"/tmp/dummy\\"\n");
+     printf("kde_moduledir=\\"/tmp/dummy\\"\n");
++    printf("kde_styledir=\\"/tmp/dummy\\"\n");
++    printf("kde_widgetdir=\\"/tmp/dummy\\"\n");
+     return 0;
+     }
+ EOF
+@@ -1399,10 +1760,10 @@
+      LIBS="$LIBS $all_libraries $LIBJPEG $LIBTIFF $LIBPNG $LIBQT -lm"
+      AC_CHECK_LIB(kimgio, kimgioRegister, [
+       LIBKIMGIO_EXISTS=yes],LIBKIMGIO_EXISTS=no)
+-      LIBS="$kde_save_LIBS"
+-      AC_LANG_RESTORE
++     LIBS="$kde_save_LIBS"
++     AC_LANG_RESTORE
+    else
+-      LIBKIMGIO_EXISTS=yes
++     LIBKIMGIO_EXISTS=yes
+    fi
+ 
+    if test "$LIBKIMGIO_EXISTS" = "yes"; then
+@@ -1419,13 +1780,35 @@
+    AC_REQUIRE([KDE_CHECK_LIBDL])
+    AC_REQUIRE([K_PATH_X])
+ 
+-if test $kde_qtver = 2; then
++if test $kde_qtver = 3; then
++   LIB_KDECORE='-lkdecore'
++   AC_SUBST(LIB_KDECORE)
++   LIB_KDEUI='-lkdeui'
++   AC_SUBST(LIB_KDEUI)
++   LIB_KIO='-lkio'
++   AC_SUBST(LIB_KIO)
++   LIB_SMB='-lsmb'
++   AC_SUBST(LIB_SMB)
++   LIB_KAB='-lkab'
++   AC_SUBST(LIB_KAB)
++   LIB_KHTML='-lkhtml'
++   AC_SUBST(LIB_KHTML)
++   LIB_KSPELL='-lkspell'
++   AC_SUBST(LIB_KSPELL)
++   LIB_KPARTS='-lkparts'
++   AC_SUBST(LIB_KPARTS)
++   LIB_KDEPRINT='-lkdeprint'
++   AC_SUBST(LIB_KDEPRINT)
++# these are for backward compatibility
++   LIB_KSYCOCA='-lkio'
++   AC_SUBST(LIB_KSYCOCA)
++   LIB_KFILE='-lkio'
++   AC_SUBST(LIB_KFILE)
++elif test $kde_qtver = 2; then
+    LIB_KDECORE='-lkdecore'
+    AC_SUBST(LIB_KDECORE)
+    LIB_KDEUI='-lkdeui'
+    AC_SUBST(LIB_KDEUI)
+-   LIB_KFORMULA='-lkformula'
+-   AC_SUBST(LIB_KFORMULA)
+    LIB_KIO='-lkio'
+    AC_SUBST(LIB_KIO)
+    LIB_KSYCOCA='-lksycoca'
+@@ -1442,8 +1825,8 @@
+    AC_SUBST(LIB_KSPELL)
+    LIB_KPARTS='-lkparts'
+    AC_SUBST(LIB_KPARTS)
+-   LIB_KWRITE='-lkwrite'
+-   AC_SUBST(LIB_KWRITE)
++   LIB_KDEPRINT='-lkdeprint'
++   AC_SUBST(LIB_KDEPRINT)
+ else
+    LIB_KDECORE='-lkdecore -lXext $(LIB_QT)'
+    AC_SUBST(LIB_KDECORE)
+@@ -1617,7 +2000,7 @@
+   [Define if you have gethostname prototype])
+ fi
+ if eval "test \"`echo $ac_cv_func_gethostname`\" = yes"; then
+-  AC_DEFINE(HAVE_GETHOSTNAME, 1, [Define if you have getdomainname])
++  AC_DEFINE(HAVE_GETHOSTNAME, 1, [Define if you have gethostname])
+ fi
+ ])
+ 
+@@ -1678,7 +2061,11 @@
+    [AC_MSG_CHECKING([for giflib])
+ AC_CACHE_VAL(ac_cv_lib_gif,
+ [ac_save_LIBS="$LIBS"
++if test "x$kde_use_qt_emb" != "xyes"; then
+ LIBS="$all_libraries -lgif -lX11 $LIBSOCKET"
++else
++LIBS="$all_libraries -lgif"
++fi
+ AC_TRY_LINK(dnl
+ [
+ #ifdef __cplusplus
+@@ -1753,24 +2140,10 @@
+ KDE_FIND_JPEG_HELPER(6b, 6b,
+    KDE_FIND_JPEG_HELPER(normal, [],
+     [
+-dnl what to do, if the normal way fails:
+-	if test -f "$kde_libraries/libjpeg.so"; then
+-	   test -f ./libjpegkde.so || $LN_S $kde_libraries/libjpeg.so ./libjpegkde.so
+-	   ac_cv_lib_jpeg="-L\${topdir} -ljpegkde"
+-	else if test -f "$kde_libraries/libjpeg.sl"; then
+-	   test -f ./libjpegkde.sl ||$LN_S $kde_libraries/libjpeg.sl ./libjpegkde.sl
+-	   ac_cv_lib_jpeg="-L\${topdir} -ljpegkde"	
+-	else if test -f "$kde_libraries/libjpeg.a"; then
+-	   test -f ./libjpegkde.a || $LN_S $kde_libraries/libjpeg.a ./libjpegkde.a
+-	   ac_cv_lib_jpeg="-L\${topdir} -ljpegkde"
+-        else
+-	  ac_cv_lib_jpeg=
+-	fi
+-      fi
+-   fi
+-
+-   LIBJPEG=$ac_cv_lib_jpeg
+-]))
++       LIBJPEG=
++    ]
++   )
++)
+ 
+ dnl then search the headers (can't use simply AC_TRY_xxx, as jpeglib.h
+ dnl requires system dependent includes loaded before it)
+@@ -1845,7 +2218,11 @@
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ kde_save_LIBS="$LIBS"
++if test "x$kde_use_qt_emb" != "xyes"; then
+ LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lX11 $LIBSOCKET -lm"
++else
++LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lm"
++fi
+ kde_save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
+ 
+@@ -1900,7 +2277,11 @@
+ AC_CACHE_VAL(ac_cv_lib_png,
+ [
+ kde_save_LIBS="$LIBS"
++if test "x$kde_use_qt_emb" != "xyes"; then
+ LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm -lX11 $LIBSOCKET"
++else
++LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm"
++fi
+ kde_save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
+ AC_LANG_C
+@@ -1966,19 +2347,17 @@
+ 
+ AC_DEFUN(KDE_CHECK_COMPILER_FLAG,
+ [
+-AC_REQUIRE([AC_CHECK_COMPILERS])
+ AC_MSG_CHECKING(whether $CXX supports -$1)
+-kde_cache=`echo $1 | sed 'y%.=/+-%___p_%'`
++kde_cache=`echo $1 | sed 'y% .=/+-%____p_%'`
+ AC_CACHE_VAL(kde_cv_prog_cxx_$kde_cache,
+ [
+-echo 'int main() { return 0; }' >conftest.cc
+-eval "kde_cv_prog_cxx_$kde_cache=no"
+-if test -z "`$CXX -$1 -c conftest.cc 2>&1`"; then
+-  if test -z "`$CXX -$1 -o conftest conftest.o 2>&1`"; then
+-    eval "kde_cv_prog_cxx_$kde_cache=yes"
+-  fi
+-fi
+-rm -f conftest*
++  AC_LANG_SAVE
++  AC_LANG_CPLUSPLUS
++  save_CXXFLAGS="$CXXFLAGS"
++  CXXFLAGS="$CXXFLAGS -$1"
++  AC_TRY_LINK([],[ return 0; ], [eval "kde_cv_prog_cxx_$kde_cache=yes"], [])
++  CXXFLAGS="$save_CXXFLAGS"
++  AC_LANG_RESTORE
+ ])
+ if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
+  AC_MSG_RESULT(yes)
+@@ -1991,28 +2370,6 @@
+ fi
+ ])
+ 
+-AC_DEFUN(KDE_PROG_CC_PG,
+-[ AC_CACHE_CHECK(whether ${CC-cc} accepts -pg, kde_cv_prog_cc_pg,
+-  [echo 'void f(){}' > conftest.c
+-   if test -z "`${CC-cc} -pg -c conftest.c 2>&1`"; then
+-     kde_cv_prog_cc_pg=yes
+-   else
+-     kde_cv_prog_cc_pg=no
+-   fi
+-   rm -f conftest*
+-])])
+-
+-AC_DEFUN(KDE_PROG_CXX_PG,
+-[ AC_CACHE_CHECK(whether ${CXX-g++} accepts -pg, kde_cv_prog_cxx_pg,
+-  [echo 'void f(){}' > conftest.cc
+-   if test -z "`${CXX-g++} -pg -c conftest.cc 2>&1`"; then
+-     kde_cv_prog_cxx_pg=yes
+-   else
+-     kde_cv_prog_cxx_pg=no
+-   fi
+-  rm -f conftest*
+-])])
+-
+ dnl AC_REMOVE_FORBIDDEN removes forbidden arguments from variables
+ dnl use: AC_REMOVE_FORBIDDEN(CC, [-forbid -bad-option whatever])
+ dnl it's all white-space separated
+@@ -2039,31 +2396,38 @@
+ dnl AC_VALIDIFY_CXXFLAGS checks for forbidden flags the user may have given
+ AC_DEFUN(AC_VALIDIFY_CXXFLAGS,
+ [dnl
++if test "x$kde_use_qt_emb" != "xyes"; then
+  AC_REMOVE_FORBIDDEN(CXX, [-fno-rtti -rpath])
+  AC_REMOVE_FORBIDDEN(CXXFLAGS, [-fno-rtti -rpath])
++else
++ AC_REMOVE_FORBIDDEN(CXX, [-rpath])
++ AC_REMOVE_FORBIDDEN(CXXFLAGS, [-rpath])
++fi
+ ])
+ 
+ AC_DEFUN(AC_CHECK_COMPILERS,
+ [
+-  dnl this is somehow a fat lie, but prevents other macros from double checking
+-  AC_PROVIDE([AC_PROG_CC])
+-  AC_PROVIDE([AC_PROG_CPP])
+-  AC_PROVIDE([AC_PROG_CXX])
+-  AC_PROVIDE([AC_PROG_CXXCPP])
+-
+-  AC_ARG_ENABLE(debug,[  --enable-debug          enables debug symbols [default=no]],
++  AC_ARG_ENABLE(debug,[  --enable-debug[=ARG]    enables debug symbols (yes|no|full) [default=no]],
+   [
+-   if test $enableval = "no"; dnl
+-     then
+-       kde_use_debug_code="no"
+-       kde_use_debug_define=yes
+-     else
+-       kde_use_debug_code="yes"
+-       kde_use_debug_define=no
+-   fi
+-  ], [kde_use_debug_code="no"
++    case $enableval in
++      yes)
++        kde_use_debug_code="yes"
++        kde_use_debug_define=no
++        ;;
++      full)
++        kde_use_debug_code="full"
++        kde_use_debug_define=no
++        ;;
++      *)
++        kde_use_debug_code="no"
++        kde_use_debug_define=yes
++        ;;
++    esac
++  ], 
++    [kde_use_debug_code="no"
+       kde_use_debug_define=no
+-    ])
++  ])
++
+   dnl Just for configure --help
+   AC_ARG_ENABLE(dummyoption,[  --disable-debug         disables debug output and debug symbols [default=no]],[],[])
+ 
+@@ -2076,271 +2440,187 @@
+     fi
+    ], [kde_use_strict_options="no"])
+ 
++  AC_ARG_ENABLE(warnings,[  --enable-warnings         compiles with -Wall and similiar],
++   [
++    if test $enableval = "no"; then
++         kde_use_warnings="no"
++       else
++         kde_use_warnings="yes"
++    fi
++   ], [kde_use_warnings="no"])
++
++  dnl enable warnings for debug build
++  if test "$kde_use_debug_code" != "no"; then
++    kde_use_warnings=yes
++  fi
++
+   AC_ARG_ENABLE(profile,[  --enable-profile        creates profiling infos [default=no]],
+-     [kde_use_profiling=$enableval],
+-     [kde_use_profiling="no"]
++    [kde_use_profiling=$enableval],
++    [kde_use_profiling="no"]
+   )
+ 
+-dnl this was AC_PROG_CC. I had to include it manualy, since I had to patch it
+-  AC_MSG_CHECKING(for a C-Compiler)
+-  dnl if there is one, print out. if not, don't matter
+-  AC_MSG_RESULT($CC)
+-
+-  if test -z "$CC"; then AC_CHECK_PROG(CC, gcc, gcc) fi
+-  if test -z "$CC"; then AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc) fi
+-  if test -z "$CC"; then AC_CHECK_PROG(CC, xlc, xlc) fi
+-  test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
++  dnl this prevents stupid AC_PROG_CC to add "-g" to the default CFLAGS
++  CFLAGS=" $CFLAGS"
+ 
+-  AC_PROG_CC_WORKS
+-  AC_PROG_CC_GNU
++  AC_PROG_CC 
+ 
+-  if test $ac_cv_prog_gcc = yes; then
+-    GCC=yes
+-  else
+-    GCC=
+-  fi
+-
+-  USER_CFLAGS=$CFLAGS
+-  CFLAGS=
++  AC_PROG_CPP
+ 
+-  if test -z "$CFLAGS"; then
+-    if test "$kde_use_debug_code" = "yes"; then
+-      AC_PROG_CC_G
+-      if test $ac_cv_prog_cc_g = yes; then
+-	CFLAGS="-g"
+-	case $host in
+-   	*-*-linux-gnu)	
+-           CFLAGS="$CFLAGS -ansi -W -Wall -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE -D_BSD_SOURCE"
+-         ;;
+-        esac
+-      fi
+-    else
+-      if test "$GCC" = "yes"; then
+-        CFLAGS="-O2"
++  if test "$GCC" = "yes"; then
++    if test "$kde_use_debug_code" != "no"; then
++      if test $kde_use_debug_code = "full"; then
++        CFLAGS="-g3 $CFLAGS"
+       else
+-        CFLAGS=""
+-      fi
+-      if test "$kde_use_debug_define" = "yes"; then
+-        CFLAGS="$CFLAGS -DNDEBUG"
+-	dnl damn buggy compilers :-(
+-	dnl if test "$GCC" = "yes"; then
+-    	dnl  CFLAGS="$CFLAGS -fomit-frame-pointer"
+-	dnl   CXXFLAGS="$CXXFLAGS -fomit-frame-pointer"
+-	dnl fi
+-      fi
+-    fi
+-
+-    if test "$kde_use_profiling" = yes; then
+-      KDE_PROG_CC_PG
+-      if test "$kde_cv_prog_cc_pg" = yes; then
+-        CFLAGS="$CFLAGS -pg"
++        CFLAGS="-g -O2 $CFLAGS"
+       fi
++    else
++      CFLAGS="-O2 $CFLAGS"
+     fi
++  fi
+ 
+-    if test "$GCC" = "yes"; then
+-     CFLAGS="$CFLAGS"
+-
+-     if test "$kde_use_strict_options" = "yes"; then
+-	CFLAGS="$CFLAGS -W -Wall -ansi -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings"
+-     fi
+-    fi
+-
++  if test "$kde_use_debug_define" = "yes"; then
++    CFLAGS="-DNDEBUG $CFLAGS"
+   fi
+ 
++
+   case "$host" in
+-  *-*-sysv4.2uw*) CFLAGS="$CFLAGS -D_UNIXWARE";;
+-  *-*-sysv5uw7*) CFLAGS="$CFLAGS -D_UNIXWARE7";;
++  *-*-sysv4.2uw*) CFLAGS="-D_UNIXWARE $CFLAGS";;
++  *-*-sysv5uw7*) CFLAGS="-D_UNIXWARE7 $CFLAGS";;
+   esac
+ 
+-  if test -n "$USER_CFLAGS"; then
+-    CFLAGS="$CFLAGS $USER_CFLAGS"
+-  fi
+-
+   if test -z "$LDFLAGS" && test "$kde_use_debug_code" = "no" && test "$GCC" = "yes"; then
+      LDFLAGS=""
+   fi
+ 
++  CXXFLAGS=" $CXXFLAGS"
+ 
+-dnl this is AC_PROG_CPP. I had to include it here, since autoconf checks
+-dnl dependecies between AC_PROG_CPP and AC_PROG_CC (or is it automake?)
+-
+-  AC_MSG_CHECKING(how to run the C preprocessor)
+-  # On Suns, sometimes $CPP names a directory.
+-  if test -n "$CPP" && test -d "$CPP"; then
+-    CPP=
+-  fi
+-  if test -z "$CPP"; then
+-  AC_CACHE_VAL(ac_cv_prog_CPP,
+-  [  # This must be in double quotes, not single quotes, because CPP may get
+-    # substituted into the Makefile and "${CC-cc}" will confuse make.
+-    CPP="${CC-cc} -E"
+-    # On the NeXT, cc -E runs the code through the compiler's parser,
+-    # not just through cpp.
+-    dnl Use a header file that comes with gcc, so configuring glibc
+-    dnl with a fresh cross-compiler works.
+-    AC_TRY_CPP([#include <assert.h>
+-    Syntax Error], ,
+-    CPP="${CC-cc} -E -traditional-cpp"
+-    AC_TRY_CPP([#include <assert.h>
+-    Syntax Error], , CPP=/lib/cpp))
+-    ac_cv_prog_CPP="$CPP"])dnl
+-    CPP="$ac_cv_prog_CPP"
+-  else
+-    ac_cv_prog_CPP="$CPP"
+-  fi
+-  AC_MSG_RESULT($CPP)
+-  AC_SUBST(CPP)dnl
+-
++  AC_PROG_CXX
+ 
+-  AC_MSG_CHECKING(for a C++-Compiler)
+-  dnl if there is one, print out. if not, don't matter
+-  AC_MSG_RESULT($CXX)
+-
+-  if test -z "$CXX"; then AC_CHECK_PROG(CXX, g++, g++) fi
+-  if test -z "$CXX"; then AC_CHECK_PROG(CXX, CC, CC) fi
+-  if test -z "$CXX"; then AC_CHECK_PROG(CXX, xlC, xlC) fi
+-  if test -z "$CXX"; then AC_CHECK_PROG(CXX, DCC, DCC) fi
+-  test -z "$CXX" && AC_MSG_ERROR([no acceptable C++-compiler found in \$PATH])
+-
+-  AC_PROG_CXX_WORKS
+-  AC_PROG_CXX_GNU
+-
+-  if test $ac_cv_prog_gxx = yes; then
+-    GXX=yes
+-  fi
+-
+-  USER_CXXFLAGS=$CXXFLAGS
+-  CXXFLAGS=""
+-
+-  if test -z "$CXXFLAGS"; then
+-    if test "$kde_use_debug_code" = "yes"; then
+-      AC_PROG_CXX_G
+-      if test $ac_cv_prog_cxx_g = yes; then
+-        CXXFLAGS="-g"
+-	case $host in  dnl
+-   	*-*-linux-gnu)
+-           CXXFLAGS="$CXXFLAGS -ansi -D_XOPEN_SOURCE -D_BSD_SOURCE -Wbad-function-cast -Wcast-align -Wundef -Wconversion"
+-         ;;
+-        esac
++  if test "$GXX" = "yes" || test "$CXX" = "KCC"; then
++    if test "$kde_use_debug_code" != "no"; then
++      if test "$CXX" = "KCC"; then
++        CXXFLAGS="+K0 -Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings $CXXFLAGS"
++      else
++        if test "$kde_use_debug_code" = "full"; then
++          CXXFLAGS="-g3 $CXXFLAGS"
++        else
++          CXXFLAGS="-g -O2 $CXXFLAGS"
++        fi
+       fi
++      KDE_CHECK_COMPILER_FLAG(fno-builtin,[CXXFLAGS="-fno-builtin $CXXFLAGS"])
++
++      dnl convenience compiler flags
++      KDE_CHECK_COMPILER_FLAG(Woverloaded-virtual, [WOVERLOADED_VIRTUAL="-Woverloaded-virtual"], [WOVERLOADED_VRITUAL=""])
++      AC_SUBST(WOVERLOADED_VIRTUAL)
+     else
+-      if test "$GXX" = "yes"; then
+-         CXXFLAGS="-O2"
+-      fi
+-      if test "$kde_use_debug_define" = "yes"; then
+-         CXXFLAGS="$CXXFLAGS -DNDEBUG"
+-      fi
++      if test "$CXX" = "KCC"; then
++        CXXFLAGS="+K3 $CXXFLAGS"
++      else
++        CXXFLAGS="-O2 $CXXFLAGS"
++      fi  
+     fi
++  fi
+ 
+-    if test "$kde_use_profiling" = yes; then
+-      KDE_PROG_CXX_PG
+-      if test "$kde_cv_prog_cxx_pg" = yes; then
+-        CXXFLAGS="$CXXFLAGS -pg"
+-      fi
+-    fi
+-    
+-    KDE_CHECK_COMPILER_FLAG(fno-exceptions,
++  if test "$kde_use_debug_define" = "yes"; then
++    CXXFLAGS="-DNDEBUG -DNO_DEBUG $CXXFLAGS"
++  fi  
++
++  if test "$kde_use_profiling" = "yes"; then
++    KDE_CHECK_COMPILER_FLAG(pg,
+     [
+-      CXXFLAGS="$CXXFLAGS -fno-exceptions"
++      CFLAGS="-pg $CFLAGS"
++      CXXFLAGS="-pg $CXXFLAGS"
+     ])
+-      
+-dnl WABA: Nothing wrong with RTTI, keep it on.
+-dnl    KDE_CHECK_COMPILER_FLAG(fno-rtti,
+-dnl	[
+-dnl	  CXXFLAGS="$CXXFLAGS -fno-rtti"
+-dnl	])
+-
+-    KDE_CHECK_COMPILER_FLAG(fno-check-new,
+-	[
+-	  CXXFLAGS="$CXXFLAGS -fno-check-new"
+-	])
+-
+-    if test "$GXX" = "yes"; then
+-       CXXFLAGS="$CXXFLAGS"
+-
+-       if test true || test "$kde_use_debug_code" = "yes"; then
+-	 CXXFLAGS="$CXXFLAGS -Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings"
++  fi
+ 
+-         KDE_CHECK_COMPILER_FLAG(Wno-long-long,
+-	 [
+-	   CXXFLAGS="$CXXFLAGS -Wno-long-long"
+-	 ])
+-         KDE_CHECK_COMPILER_FLAG(Wnon-virtual-dtor,
+-         [
+-           CXXFLAGS="$CXXFLAGS -Wnon-virtual-dtor"
+-         ])
+-         KDE_CHECK_COMPILER_FLAG(fno-builtin,
+-         [
+-           CXXFLAGS="$CXXFLAGS -fno-builtin"
+-         ])
+-	
+-       fi
++  if test "$kde_use_warnings" = "yes"; then
++      if test "$GCC" = "yes"; then
++        case $host in
++          *-*-linux-gnu)	
++            CFLAGS="-ansi -W -Wall -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE $CFLAGS"
++            CXXFLAGS="-ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion $CXXFLAGS"
++          ;;
++        esac
++        CXXFLAGS="-Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings $CXXFLAGS"
++        KDE_CHECK_COMPILER_FLAG(Wundef,[CXXFLAGS="-Wundef $CXXFLAGS"])
++        KDE_CHECK_COMPILER_FLAG(Wbad-function-cast,[CXXFLAGS="-Wbad-function-cast $CXXFLAGS"])
++        KDE_CHECK_COMPILER_FLAG(Wno-long-long,[CXXFLAGS="-Wno-long-long $CXXFLAGS"])
++        KDE_CHECK_COMPILER_FLAG(Wnon-virtual-dtor,[CXXFLAGS="-Wnon-virtual-dtor $CXXFLAGS"])
++     fi
++  fi
+ 
+-       if test "$kde_use_strict_options" = "yes"; then
+-	CXXFLAGS="$CXXFLAGS -Wcast-qual -Wbad-function-cast -Wshadow -Wcast-align"
+-       fi
++  if test "$GCC" = "yes" && test "$kde_use_strict_options" = "yes"; then
++    CXXFLAGS="-Wcast-qual -Wshadow -Wcast-align $CXXFLAGS"
++  fi
++    
++  if test "$GXX" = "yes"; then
++    KDE_CHECK_COMPILER_FLAG(fno-exceptions,[CXXFLAGS="$CXXFLAGS -fno-exceptions"])
++    KDE_CHECK_COMPILER_FLAG(fno-check-new, [CXXFLAGS="$CXXFLAGS -fno-check-new"])
++    KDE_CHECK_COMPILER_FLAG(fexceptions, [USE_EXCEPTIONS="-fexceptions"], USE_EXCEPTIONS=	)
++  fi
++  if test "$CXX" = "KCC"; then
++    dnl unfortunately we currently cannot disable exception support in KCC
++    dnl because doing so is binary incompatible and Qt by default links with exceptions :-(
++    dnl KDE_CHECK_COMPILER_FLAG(-no_exceptions,[CXXFLAGS="$CXXFLAGS --no_exceptions"])
++    dnl KDE_CHECK_COMPILER_FLAG(-exceptions, [USE_EXCEPTIONS="--exceptions"], USE_EXCEPTIONS=	)
+ 
+-       if test "$kde_very_strict" = "yes"; then
+-         CXXFLAGS="$CXXFLAGS -Wold-style-cast -Wredundant-decls -Wconversion"
+-       fi
++    AC_ARG_ENABLE(pch,[  --enable-pch            enables precompiled header support (currently only KCC) [default=no]],
++    [
++      kde_use_pch=$enableval
++    ],[kde_use_pch=no])
++ 
++    if test "$kde_use_pch" = "yes"; then
++      dnl TODO: support --pch-dir!
++      KDE_CHECK_COMPILER_FLAG(-pch,[CXXFLAGS="$CXXFLAGS --pch"])
++      dnl the below works (but the dir must exist), but it's
++      dnl useless for a whole package.
++      dnl The are precompiled headers for each source file, so when compiling
++      dnl from scratch, it doesn't make a difference, and they take up
++      dnl around ~5Mb _per_ sourcefile.
++      dnl KDE_CHECK_COMPILER_FLAG(-pch_dir /tmp,
++      dnl   [CXXFLAGS="$CXXFLAGS --pch_dir `pwd`/pcheaders"])
+     fi
+-  fi
++    dnl this flag controls inlining. by default KCC inlines in optimisation mode
++    dnl all implementations that are defined inside the class {} declaration. 
++    dnl because of templates-compatibility with broken gcc compilers, this
++    dnl can cause excessive inlining. This flag limits it to a sane level
++    KDE_CHECK_COMPILER_FLAG(-inline_keyword_space_time=6,[CXXFLAGS="$CXXFLAGS --inline_keyword_space_time=6"])
++    KDE_CHECK_COMPILER_FLAG(-inline_auto_space_time=2,[CXXFLAGS="$CXXFLAGS --inline_auto_space_time=2"])
++    KDE_CHECK_COMPILER_FLAG(-inline_implicit_space_time=2.0,[CXXFLAGS="$CXXFLAGS --inline_implicit_space_time=2.0"])
++    KDE_CHECK_COMPILER_FLAG(-inline_generated_space_time=2.0,[CXXFLAGS="$CXXFLAGS --inline_generated_space_time=2.0"])
++    dnl Some source files are shared between multiple executables
++    dnl (or libraries) and some of those need template instantiations.
++    dnl In that case KCC needs to compile those sources with
++    dnl --one_instantiation_per_object.  To make it easy for us we compile
++    dnl _all_ objects with that flag (--one_per is a shorthand).
++    KDE_CHECK_COMPILER_FLAG(-one_per, [CXXFLAGS="$CXXFLAGS --one_per"])
++  fi
++  AC_SUBST(USE_EXCEPTIONS)
++  dnl obsolete macro - provided to keep things going
++  USE_RTTI=
++  AC_SUBST(USE_RTTI)
+ 
+-    KDE_CHECK_COMPILER_FLAG(fexceptions,
+-	[
+-	  USE_EXCEPTIONS="-fexceptions"
+-	],
+-	  USE_EXCEPTIONS=
+-	)
+-    AC_SUBST(USE_EXCEPTIONS)
+-
+-    KDE_CHECK_COMPILER_FLAG(frtti,
+-	[
+-	  USE_RTTI="-frtti"
+-	],
+-	  USE_RTTI=
+-	)
+-    AC_SUBST(USE_RTTI)
+-
+-    case "$host" in
+-      *-*-irix*)  test "$GXX" = yes && CXXFLAGS="$CXXFLAGS -D_LANGUAGE_C_PLUS_PLUS -D__LANGUAGE_C_PLUS_PLUS" ;;
+-      *-*-sysv4.2uw*) CXXFLAGS="$CXXFLAGS -D_UNIXWARE";;
+-      *-*-sysv5uw7*) CXXFLAGS="$CXXFLAGS -D_UNIXWARE7";;
++  case "$host" in
++      *-*-irix*)  test "$GXX" = yes && CXXFLAGS="-D_LANGUAGE_C_PLUS_PLUS -D__LANGUAGE_C_PLUS_PLUS $CXXFLAGS" ;;
++      *-*-sysv4.2uw*) CXXFLAGS="-D_UNIXWARE $CXXFLAGS";;
++      *-*-sysv5uw7*) CXXFLAGS="-D_UNIXWARE7 $CXXFLAGS";;
+       *-*-solaris*) 
+         if test "$GXX" = yes; then
+-          libstdcpp=`gcc -print-file-name=libstdc++.so`
++          libstdcpp=`$CXX -print-file-name=libstdc++.so`
+           if test ! -f $libstdcpp; then
+              AC_MSG_ERROR([You've compiled gcc without --enable-shared. This doesn't work with KDE. Please recompile gcc with --enable-shared to receive a libstdc++.so])
+           fi
+         fi
+         ;;
+-    esac
+-
+-    if test -n "$USER_CXXFLAGS"; then
+-       CXXFLAGS="$CXXFLAGS $USER_CXXFLAGS"
+-    fi
++  esac
+ 
+-    AC_VALIDIFY_CXXFLAGS
++  AC_VALIDIFY_CXXFLAGS
+ 
+-    AC_MSG_CHECKING(how to run the C++ preprocessor)
+-    if test -z "$CXXCPP"; then
+-      AC_CACHE_VAL(ac_cv_prog_CXXCPP,
+-      [
+-         AC_LANG_SAVE[]dnl
+-         AC_LANG_CPLUSPLUS[]dnl
+-         CXXCPP="${CXX-g++} -E"
+-         AC_TRY_CPP([#include <stdlib.h>], , CXXCPP=/lib/cpp)
+-         ac_cv_prog_CXXCPP="$CXXCPP"
+-         AC_LANG_RESTORE[]dnl
+-     ])dnl
+-     CXXCPP="$ac_cv_prog_CXXCPP"
+-    fi
+-    AC_MSG_RESULT($CXXCPP)
+-    AC_SUBST(CXXCPP)dnl
++  AC_PROG_CXXCPP
+ 
+-    # the following is to allow programs, that are known to
+-    # have problems when compiled with -O2
+-    if test -n "$CXXFLAGS"; then
++  # the following is to allow programs, that are known to
++  # have problems when compiled with -O2
++  if test -n "$CXXFLAGS"; then
+       kde_safe_IFS=$IFS
+       IFS=" "
+       NOOPT_CXXFLAGS=""
+@@ -2349,20 +2629,42 @@
+           -O*)
+                 ;;
+           *)
+-                NOOPT_CXXFLAGS="$NOOPT_CXXFLAGS $i"
++                NOOPT_CXXFLAGS="$NOOPT_CXXFLAGS $i"
++                ;;
++        esac
++      done
++      IFS=$kde_safe_IFS
++  fi
++
++  if test -n "$CFLAGS"; then
++      kde_safe_IFS=$IFS
++      IFS=" "
++      NOOPT_CFLAGS=""
++      for i in $CFLAGS; do
++        case $i in
++          -O*)
++                ;;
++          *)
++                NOOPT_CFLAGS="$NOOPT_CFLAGS $i"
+                 ;;
+         esac
+       done
+       IFS=$kde_safe_IFS
+-    fi
+-    AC_SUBST(NOOPT_CXXFLAGS)
++  fi
++
++  if test "x$kde_use_qt_emb" = "xyes"; then
++    NOOPT_CXXFLAGS="$NOOPT_CXXFLAGS -fno-rtti -DQWS"
++  fi
++
++  AC_SUBST(NOOPT_CXXFLAGS)
++  AC_SUBST(NOOPT_CFLAGS)
+ 
+-    KDE_CHECK_FINAL
++  KDE_CHECK_FINAL
+ 
+-    ifdef([AM_DEPENDENCIES], AC_REQUIRE([KDE_ADD_DEPENDENCIES]), [])
++  ifdef([AM_DEPENDENCIES], AC_REQUIRE([KDE_ADD_DEPENDENCIES]), [])
+ 
+-    KDE_CXXFLAGS=
+-    AC_SUBST(KDE_CXXFLAGS)
++  KDE_CXXFLAGS=
++  AC_SUBST(KDE_CXXFLAGS)
+ ])
+ 
+ AC_DEFUN(KDE_ADD_DEPENDENCIES,
+@@ -2391,7 +2693,7 @@
+ 
+ LIBTOOL_SHELL="/bin/sh ./libtool"
+ #  LIBTOOL="$LIBTOOL --silent"
+-KDE_PLUGIN="-avoid-version -module -no-undefined"
++KDE_PLUGIN="-avoid-version -module -no-undefined \$(KDE_RPATH) \$(KDE_MT_LDFLAGS)"
+ AC_SUBST(KDE_PLUGIN)
+ ])
+ 
+@@ -2399,6 +2701,7 @@
+ [  AC_CHECK_SIZEOF(int, 4)dnl
+   AC_CHECK_SIZEOF(long, 4)dnl
+   AC_CHECK_SIZEOF(char *, 4)dnl
++  AC_CHECK_SIZEOF(char, 1)dnl
+ ])dnl
+ 
+ AC_DEFUN(KDE_DO_IT_ALL,
+@@ -2442,47 +2745,39 @@
+ ])
+ 
+ dnl Check for the type of the third argument of getsockname
+-AC_DEFUN(AC_CHECK_KSIZE_T,
+-[AC_MSG_CHECKING(for the third argument of getsockname)
+-AC_CACHE_VAL(ac_cv_ksize_t,
+-AC_LANG_SAVE
+-AC_LANG_CPLUSPLUS
+-[AC_TRY_COMPILE([
++AC_DEFUN(AC_CHECK_SOCKLEN_T, [
++  AC_MSG_CHECKING(for socklen_t)
++  AC_CACHE_VAL(ac_cv_socklen_t, [
++    AC_LANG_SAVE
++    AC_LANG_CPLUSPLUS
++    AC_TRY_COMPILE([
+ #include <sys/types.h>
+ #include <sys/socket.h>
+-],[
++      ],[
+ socklen_t a=0;
+ getsockname(0,(struct sockaddr*)0, &a);
+-],
+-ac_cv_ksize_t=socklen_t,
+-ac_cv_ksize_t=)
+-if test -z "$ac_cv_ksize_t"; then
+-ac_safe_cxxflags="$CXXFLAGS"
+-if test "$GCC" = "yes"; then
+-  CXXFLAGS="-Werror $CXXFLAGS"
+-fi
+-AC_TRY_COMPILE([
++      ],
++      ac_cv_socklen_t=socklen_t,
++      AC_TRY_COMPILE([
+ #include <sys/types.h>
+ #include <sys/socket.h>
+-],[
++        ],[
+ int a=0;
+ getsockname(0,(struct sockaddr*)0, &a);
+-],
+-ac_cv_ksize_t=int,
+-ac_cv_ksize_t=size_t)
+-CXXFLAGS="$ac_safe_cxxflags"
+-fi
+-AC_LANG_RESTORE
+-])
+-
+-if test -z "$ac_cv_ksize_t"; then
+-  ac_cv_ksize_t=int
+-fi
++        ],
++        ac_cv_socklen_t=int,
++        ac_cv_socklen_t=size_t
++      )
++    )
++    AC_LANG_RESTORE
++  ])
+ 
+-AC_MSG_RESULT($ac_cv_ksize_t)
+-AC_DEFINE_UNQUOTED(ksize_t, $ac_cv_ksize_t,
+-      [Define the type of the third argument for getsockname]
+-)
++  AC_MSG_RESULT($ac_cv_socklen_t)
++  if test "$ac_cv_socklen_t" != "socklen_t"; then
++    AC_DEFINE_UNQUOTED(socklen_t, $ac_cv_socklen_t,
++        [Define the real type of socklen_t])
++  fi
++  AC_DEFINE_UNQUOTED(ksize_t, socklen_t, [Compatibility define])
+ 
+ ])
+ 
+@@ -2600,7 +2895,7 @@
+ dnl From Jim Meyering.
+ dnl FIXME: migrate into libit.
+ 
+-AC_DEFUN(AM_FUNC_OBSTACK,
++AC_DEFUN([AM_FUNC_OBSTACK],
+ [AC_CACHE_CHECK([for obstacks], am_cv_func_obstack,
+  [AC_TRY_LINK([#include "obstack.h"],
+ 	      [struct obstack *mem;obstack_free(mem,(char *) 0)],
+@@ -2616,7 +2911,7 @@
+ dnl From Jim Meyering.  Use this if you use the GNU error.[ch].
+ dnl FIXME: Migrate into libit
+ 
+-AC_DEFUN(AM_FUNC_ERROR_AT_LINE,
++AC_DEFUN([AM_FUNC_ERROR_AT_LINE],
+ [AC_CACHE_CHECK([for error_at_line], am_cv_lib_error_at_line,
+  [AC_TRY_LINK([],[error_at_line(0, 0, "", 0, "");],
+               am_cv_lib_error_at_line=yes,
+@@ -2713,7 +3008,11 @@
+     AC_LANG_C
+     ac_save_ldflags="$LDFLAGS"
+     ac_save_cflags="$CFLAGS"
+-    LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm -lX11 -lXext $LIBZ $LIBSOCKET"
++    if test "x$kde_use_qt_emb" != "xyes"; then
++      LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm -lX11 -lXext $LIBZ $LIBSOCKET"
++    else
++      LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm $LIBZ $LIBSOCKET"
++    fi
+     CFLAGS="$CFLAGS $X_INCLUDES $USER_INCLUDES"
+     test -n "$XPM_INCLUDE" && CFLAGS="-I$XPM_INCLUDE $CFLAGS"
+     AC_TRY_LINK([#include <X11/xpm.h>],[],
+@@ -2765,41 +3064,46 @@
+    dnl 'yes' means DPMS_LIB="", '-lXdpms' means DPMS_LIB="-lXdpms".
+    AC_CACHE_VAL(ac_cv_have_dpms,
+    [
+-    AC_LANG_C
+-    ac_save_ldflags="$LDFLAGS"
+-    ac_save_cflags="$CFLAGS"
+-    ac_save_libs="$LIBS"
+-    LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries -lX11 -lXext $LIBSOCKET"
+-    CFLAGS="$CFLAGS $X_INCLUDES"
+-    test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
+-    AC_TRY_LINK([
+-	#include <X11/Xproto.h>
+-	#include <X11/X.h>
+-	#include <X11/Xlib.h>
+-	#include <X11/extensions/dpms.h>
+-	int foo_test_dpms()
+-	{ return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
+-	ac_cv_have_dpms="yes", [
+-            LDFLAGS="$ac_save_ldflags"
+-            CFLAGS="$ac_save_cflags"
+-            LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries -lX11 -lXext $LIBSOCKET"
+-            LIBS="$LIBS -lXdpms"
+-            CFLAGS="$CFLAGS $X_INCLUDES"
+-            test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
+-            AC_TRY_LINK([
+-	        #include <X11/Xproto.h>
+-        	#include <X11/X.h>
+-        	#include <X11/Xlib.h>
+-        	#include <X11/extensions/dpms.h>
+-        	int foo_test_dpms()
+-        	{ return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
+-        	[
+-                ac_cv_have_dpms="-lXdpms"
+-                ],ac_cv_have_dpms="no")
+-            ])
+-    LDFLAGS="$ac_save_ldflags"
+-    CFLAGS="$ac_save_cflags"
+-    LIBS="$ac_save_libs"
++    if test "x$kde_use_qt_emb" = "xyes"; then
++      AC_MSG_RESULT(no)
++      ac_cv_have_dpms="no"
++    else
++      AC_LANG_C
++      ac_save_ldflags="$LDFLAGS"
++      ac_save_cflags="$CFLAGS"
++      ac_save_libs="$LIBS"
++      LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries -lX11 -lXext $LIBSOCKET"
++      CFLAGS="$CFLAGS $X_INCLUDES"
++      test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
++      AC_TRY_LINK([
++	  #include <X11/Xproto.h>
++	  #include <X11/X.h>
++	  #include <X11/Xlib.h>
++	  #include <X11/extensions/dpms.h>
++	  int foo_test_dpms()
++	  { return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
++	  ac_cv_have_dpms="yes", [
++              LDFLAGS="$ac_save_ldflags"
++              CFLAGS="$ac_save_cflags"
++              LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries -lX11 -lXext $LIBSOCKET"
++              LIBS="$LIBS -lXdpms"
++              CFLAGS="$CFLAGS $X_INCLUDES"
++              test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
++              AC_TRY_LINK([
++	          #include <X11/Xproto.h>
++        	  #include <X11/X.h>
++        	  #include <X11/Xlib.h>
++        	  #include <X11/extensions/dpms.h>
++        	  int foo_test_dpms()
++        	  { return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
++        	  [
++                  ac_cv_have_dpms="-lXdpms"
++                  ],ac_cv_have_dpms="no")
++              ])
++      LDFLAGS="$ac_save_ldflags"
++      CFLAGS="$ac_save_cflags"
++      LIBS="$ac_save_libs"
++    fi
+    ])dnl
+ 
+   if test "$ac_cv_have_dpms" = no; then
+@@ -2839,7 +3143,10 @@
+ 
+  AC_ARG_WITH(gl, [  --without-gl            disable 3D GL modes],
+ 	gl_test=$withval, gl_test="yes")
+- if test "x$gl_test" = xno; then
++ if test "x$kde_use_qt_emb" = "xyes"; then
++   # GL and Qt Embedded is a no-go for now.
++   ac_cv_have_gl=no
++ elif test "x$gl_test" = xno; then
+    ac_cv_have_gl=no
+  else
+    AC_MSG_CHECKING(for GL)
+@@ -2848,15 +3155,19 @@
+     AC_LANG_C
+     ac_save_ldflags="$LDFLAGS"
+     ac_save_cflags="$CFLAGS"
+-    LDFLAGS="$LDFLAGS $GL_LDFLAGS $X_LDFLAGS $all_libraries -lMesaGL -lMesaGLU -lX11 -lXext -lm $LIBSOCKET"
++    LDFLAGS="$LDFLAGS $GL_LDFLAGS $X_LDFLAGS $all_libraries -lMesaGL -lMesaGLU"
++    test "x$kde_use_qt_emb" != xyes && LDFLAGS="$LDFLAGS -lX11"
++    LDFLAGS="$LDFLAGS $LIB_XEXT -lm $LIBSOCKET"
+     CFLAGS="$CFLAGS $X_INCLUDES"
+     test -n "$GL_INCLUDE" && CFLAGS="-I$GL_INCLUDE $CFLAGS"
+     AC_TRY_LINK([#include <GL/gl.h>
+-#include <GL/glu.h>           
++#include <GL/glu.h>
+ ], [],
+ 	ac_cv_have_gl="mesa", ac_cv_have_gl="no")
+     if test "x$ac_cv_have_gl" = "xno"; then
+-      LDFLAGS="$ac_save_ldflags $X_LDFLAGS $GL_LDFLAGS $all_libraries -lGL -lGLU -lX11 -lXext -lm $LIBSOCKET"
++      LDFLAGS="$ac_save_ldflags $X_LDFLAGS $GL_LDFLAGS $all_libraries -lGL -lGLU"
++      test "x$kde_use_qt_emb" != xyes && LDFLAGS="$LDFLAGS -lX11"
++      LDFLAGS="$LDFLAGS $LIB_XEXT -lm $LIBSOCKET"
+       CFLAGS="$ac_save_cflags $X_INCLUDES"
+       test -n "$GL_INCLUDE" && CFLAGS="-I$GL_INCLUDE $CFLAGS"
+       AC_TRY_LINK([#include <GL/gl.h>
+@@ -2901,153 +3212,163 @@
+  AC_SUBST(GLLIB)
+ ])
+ 
+- dnl PAM pam
+-
+- dnl Should test for PAM (Pluggable Authentication Modules)
+- AC_DEFUN(AC_PATH_PAM_DIRECT,
+- [
+- test -z "$pam_direct_test_library" && pam_direct_test_library=pam
+- test -z "$pam_direct_test_include" && pam_direct_test_include=security/pam_appl.h
+-
+-   for ac_dir in               \
+-                               \
+-     /usr/local/include        \
+-     /usr/include              \
+-     /usr/unsupported/include  \
+-     /opt/include              \
+-     /usr/pam/include          \
+-     /usr/local/pam/include    \
+-     /usr/lib/pam/include      \
+- 			      \
+-     $extra_include            \
+-     ; \
+-   do
+-     if test -r "$ac_dir/$pam_direct_test_include"; then
+-       no_pam= ac_pam_includes=$ac_dir
+-       break
+-     fi
+-   done
+ 
+- # First see if replacing the include by lib works.
+- for ac_dir in `echo "$ac_pam_includes" | sed s/include/lib/` \
+-                           \
+-     /lib                  \
+-     /usr/lib              \
+-     /usr/local/lib        \
+-     /usr/unsupported/lib  \
+-     /lib/security         \
+-     /usr/security/lib     \
+-     $extra_lib            \
+-     ; \
+- do
+-   for ac_extension in a so sl; do
+-     if test -r $ac_dir/lib${pam_direct_test_library}.$ac_extension; then
+-       no_pam= ac_pam_libraries=$ac_dir
+-       break 2
+-     fi
+-   done
+- done
+-])
++ dnl shadow password and PAM magic - maintained by ossi at kde.org
+ 
+-AC_DEFUN(AC_PATH_PAM,
+- [
++AC_DEFUN(KDE_PAM, [
+   AC_REQUIRE([KDE_CHECK_LIBDL])
+-  AC_REQUIRE_CPP()dnl
+-
+-dnl AC_CHECK_LIB(pam_misc, main, [PAM_MISC_LIB="-lpam_misc"
+-dnl              AC_DEFINE_UNQUOTED(HAVE_PAM_MISC, 1, [Define if you have a PAM implementation with the pam_misc library])], [], [-lpam $LIBDL])
+ 
+- AC_MSG_CHECKING(for PAM)
+- AC_ARG_WITH(pam,
+-[  --with-pam[=ARG]        enable support for PAM: ARG=[yes|no|service name]],
+-  [
+-    if test "x$withval" = "xyes"; then
+-      no_pam=
+-      default_pam=yes
+-    elif test "x$withval" = "xno"; then
+-      no_pam=yes
+-    else
+-      no_pam=
+-      pam_service="$withval"
+-        if test -z "$pam_service"; then
+-        default_pam=yes
+-        else
+-        default_pam=
+-        fi
++  AC_ARG_WITH(pam,
++    [  --with-pam[=ARG]        enable support for PAM: ARG=[yes|no|service name]],
++    [ if test "x$withval" = "xyes"; then
++        use_pam=yes
++        pam_service=kde
++      elif test "x$withval" = "xno"; then
++        use_pam=no
++      else
++        use_pam=yes
++        pam_service=$withval
+       fi
+-  ], no_pam=yes
+- )
++      ac_cv_path_pam="use_pam=$use_pam pam_service=$pam_service"
++    ], [
++      AC_CACHE_VAL(ac_cv_path_pam,
++        [ use_pam=no
++          AC_CHECK_LIB(pam, pam_start,
++            [ AC_CHECK_HEADER(security/pam_appl.h,
++                [ use_pam=yes
++                  pam_service=kde ]) 
++            ], , $LIBDL)
++          ac_cv_path_pam="use_pam=$use_pam pam_service=$pam_service"
++        ])
++    ])
++  eval "$ac_cv_path_pam"
+ 
+- if test ! "$no_pam" = yes; then
++  AC_MSG_CHECKING(for PAM)
++  if test "x$use_pam" = xno; then
++    AC_MSG_RESULT(no)
++    PAMLIBS=""
++  else
++    AC_MSG_RESULT(yes)
++    AC_DEFINE(HAVE_PAM, 1, [Defines if you have PAM (Pluggable Authentication Modules)])
++    PAMLIBS="$PAM_MISC_LIB -lpam $LIBDL"
+ 
+- AC_CACHE_VAL(ac_cv_path_pam,
+- [
+- ac_pam_includes=NONE
+- ac_pam_libraries=NONE
+- if test -z "$pam_libraries"; then
+-   pam_libraries=NONE
+- fi
+- if test -z "$pam_includes"; then
+-   pam_includes=NONE
+- fi
++    dnl test whether struct pam_message is const (Linux) or not (Sun)
++    AC_MSG_CHECKING(for const pam_message)
++    AC_EGREP_HEADER([struct pam_message], security/pam_appl.h,
++      [ AC_EGREP_HEADER([const struct pam_message], security/pam_appl.h,
++                        [AC_MSG_RESULT([const: Linux-type PAM])],
++                        [AC_MSG_RESULT([nonconst: Sun-type PAM])
++                        AC_DEFINE(PAM_MESSAGE_NONCONST, 1, [Define if your PAM support takes non-const arguments (Solaris)])]
++                        )],
++      [AC_MSG_RESULT([not found - assume const, Linux-type PAM])])
++  fi
+ 
+- AC_PATH_PAM_DIRECT
++  AC_SUBST(PAMLIBS)
++])
+ 
+- test "x$pam_includes" = xNONE && pam_includes=$ac_pam_includes
+- test "x$pam_libraries" = xNONE && pam_libraries=$ac_pam_libraries
++dnl DEF_PAM_SERVICE(arg name, full name, define name)
++AC_DEFUN(DEF_PAM_SERVICE, [
++  AC_ARG_WITH($1-pam,
++    [  --with-$1-pam=[val]    override PAM service from --with-pam for $2],
++    [ if test "x$use_pam" = xyes; then
++        $3_PAM_SERVICE="$withval"
++      else
++        AC_MSG_ERROR([Cannot use use --with-$1-pam, as no PAM was detected.
++You may want to enforce it by using --with-pam.])
++      fi
++    ], 
++    [ if test "x$use_pam" = xyes; then
++        $3_PAM_SERVICE="$pam_service"
++      fi
++    ])
++    if test -n "$$3_PAM_SERVICE"; then
++      AC_MSG_RESULT([The PAM service used by $2 will be $$3_PAM_SERVICE])
++      AC_DEFINE_UNQUOTED($3_PAM_SERVICE, "$$3_PAM_SERVICE", [The PAM service to be used by $2])
++    fi
++    AC_SUBST($3_PAM_SERVICE)
++])
+ 
+- if test ! "x$pam_includes" = xNONE && test ! "x$pam_libraries" = xNONE; then
+-   ac_pam_libs="-lpam $PAM_MISC_LIB $LIBDL"
+-   ac_cv_path_pam="no_pam= ac_pam_includes=$ac_pam_includes ac_pam_libraries=$ac_pam_libraries ac_pam_libs=\"$ac_pam_libs\""
+- else
+-   ac_cv_path_pam="no_pam=yes"
+- fi
+- ])
++AC_DEFUN(KDE_SHADOWPASSWD, [
++  AC_REQUIRE([KDE_PAM])
+ 
+- eval "$ac_cv_path_pam"
++  AC_CHECK_LIB(shadow, getspent,
++    [ LIBSHADOW="-lshadow"
++      ac_use_shadow=yes
++    ],
++    [ dnl for UnixWare
++      AC_CHECK_LIB(gen, getspent, 
++        [ LIBGEN="-lgen"
++          ac_use_shadow=yes
++        ], 
++        [ AC_CHECK_FUNC(getspent, 
++            [ ac_use_shadow=yes ],
++            [ ac_use_shadow=no ])
++	])
++    ])
++  AC_SUBST(LIBSHADOW)
++  AC_SUBST(LIBGEN)
++  
++  AC_MSG_CHECKING([for shadow passwords])
++
++  AC_ARG_WITH(shadow,
++    [  --with-shadow		  If you want shadow password support ],
++    [ if test "x$withval" != "xno"; then
++        use_shadow=yes
++      else
++        use_shadow=no
++      fi
++    ], [
++      use_shadow="$ac_use_shadow"
++    ])
+ 
+- fi
++  if test "x$use_shadow" = xyes; then
++    AC_MSG_RESULT(yes)
++    AC_DEFINE(HAVE_SHADOW, 1, [Define if you use shadow passwords])
++  else
++    AC_MSG_RESULT(no)
++    LIBSHADOW=
++    LIBGEN=
++  fi
+ 
+- if test "$no_pam" = yes; then
+-   AC_MSG_RESULT(no)
+- else
+-   AC_DEFINE(HAVE_PAM, 1, [Defines if you have PAM (Pluggable Authentication Modules); Redhat-Users!])
+-   PAMLIBS="$ac_pam_libs"
+-   test "x$pam_includes" = xNONE && pam_includes=$ac_pam_includes
+-   test "x$pam_libraries" = xNONE && pam_libraries=$ac_pam_libraries
+-   AC_MSG_RESULT([libraries $pam_libraries, headers $pam_includes])
+- if test "$default_pam" = yes; then
+-   AC_MSG_RESULT(["default pam service name will be used"])
+- else
+-   AC_DEFINE_UNQUOTED(KDE_PAM_SERVICE,"$pam_service", [Define to change the default name of the PAM service used by KDE])
+-   AC_MSG_RESULT(["pam service name will be: " $pam_service])
+- fi
+-dnl test whether struct pam_message is const (Linux) or not (Sun)
+-   pam_appl_h="$ac_pam_includes/security/pam_appl.h"
+-   AC_MSG_CHECKING(for const pam_message)
+-   AC_EGREP_HEADER([struct pam_message],
+-      $pam_appl_h,
+-      [ AC_EGREP_HEADER([const struct pam_message],
+-                        $pam_appl_h,
+-                        [AC_MSG_RESULT(["const: Linux-type PAM"]) ],
+-                        [AC_MSG_RESULT(["nonconst: Sun-type PAM"])
+-                        AC_DEFINE(PAM_MESSAGE_NONCONST, 1, [Define if your PAM support takes non-const arguments (Solaris)])]
+-                        )],
+-       [AC_MSG_RESULT(["not found - assume const, Linux-type PAM"])]
+-       )
+- fi
++  dnl finally make the relevant binaries setuid root, if we have shadow passwds.
++  dnl this still applies, if we could use it indirectly through pam.
++  if test "x$use_shadow" = xyes || 
++     ( test "x$use_pam" = xyes && test "x$ac_use_shadow" = xyes ); then
++      case $host in
++      *-*-freebsd* | *-*-netbsd* | *-*-openbsd*)
++	SETUIDFLAGS="-m 4755 -o root";;
++      *)
++	SETUIDFLAGS="-m 4755";;
++      esac
++  fi
++  AC_SUBST(SETUIDFLAGS)
+ 
+- if test "x$pam_libraries" != x && test "x$pam_libraries" != xNONE ; then
+-     PAMLIBPATHS="-L$pam_libraries"
+- fi
+- if test "x$pam_includes" != x && test "x$pam_includes" != xNONE ; then
+-     PAMINC="-I$pam_includes"
+- fi
++])
++
++AC_DEFUN(KDE_PASSWDLIBS, [
++  AC_REQUIRE([KDE_MISC_TESTS]) dnl for LIBCRYPT
++  AC_REQUIRE([KDE_PAM])
++  AC_REQUIRE([KDE_SHADOWPASSWD])
+ 
+- AC_SUBST(PAMINC)
+- AC_SUBST(PAMLIBS)
+- AC_SUBST(PAMLIBPATHS)
++  if test "x$use_pam" = "xyes"; then 
++    PASSWDLIBS="$PAMLIBS"
++  else
++    PASSWDLIBS="$LIBCRYPT $LIBSHADOW $LIBGEN"
++  fi
++
++  dnl FreeBSD uses a shadow-like setup, where /etc/passwd holds the users, but
++  dnl /etc/master.passwd holds the actual passwords.  /etc/master.passwd requires
++  dnl root to read, so kcheckpass needs to be root (even when using pam, since pam
++  dnl may need to read /etc/master.passwd).
++  case $host in
++  *-*-freebsd*)
++    SETUIDFLAGS="-m 4755 -o root"
++    ;;
++  *)
++    ;;
++  esac
+ 
++  AC_SUBST(PASSWDLIBS)
+ ])
+ 
+ AC_DEFUN(KDE_CHECK_LIBDL,
+@@ -3350,21 +3671,20 @@
+     case $host_os in
+  	solaris*)
+ 		KDE_CHECK_COMPILER_FLAG(mt, [USE_THREADS="-mt"])
+-                CPPFLAGS="$CPPFLAGS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_SOLARIS"
+-                echo "Setting Solaris pthread compilation options"
++                CPPFLAGS="$CPPFLAGS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_SOLARIS -DSVR4"
+     		;;
+         freebsd*)
+                 CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
+-                echo "Setting FreeBSD pthread compilation options"
+                 ;;
+         aix*)
+                 CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
+                 LIBPTHREAD="$LIBPTHREAD -lc_r"
+-                echo "Setting AIX pthread compilation options"
+                 ;;
+         linux*) CPPFLAGS="$CPPFLAGS -D_REENTRANT"
+-                USE_THREADS="$USE_THREADS -DPIC -fPIC"
+-                echo "Setting Linux pthread compilation options"
++                if test "$CXX" = "KCC"; then
++                  CXXFLAGS="$CXXFLAGS --thread_safe"
++		  NOOPT_CXXFLAGS="$NOOPT_CXXFLAGS --thread_safe"
++                fi
+                 ;;
+ 	*)
+ 		;;
+@@ -3379,13 +3699,16 @@
+   AC_REQUIRE([KDE_CHECK_PTHREAD_OPTION])
+   dnl default is yes if libpthread is found and no if no libpthread is available
+   if test -z "$LIBPTHREAD"; then
+-    kde_check_threading_default=no
++    if test -z "$USE_THREADS"; then
++      kde_check_threading_default=no
++    else
++      kde_check_threading_default=yes
++    fi
+   else
+     kde_check_threading_default=yes
+   fi
+   AC_ARG_ENABLE(threading, [  --disable-threading     disables threading even if libpthread found ],
+    kde_use_threading=$enableval, kde_use_threading=$kde_check_threading_default)
+-
+   if test "x$kde_use_threading" = "xyes"; then
+     AC_DEFINE(HAVE_LIBPTHREAD, 1, [Define if you have a working libpthread (will enable threaded code)])
+   fi
+@@ -3443,13 +3766,10 @@
+ 
+ ])
+ 
+-AC_DEFUN(KDE_CHECK_PYTHON,
++AC_DEFUN(KDE_CHECK_PYTHON_DIR,
+ [
+-AC_REQUIRE([KDE_CHECK_LIBDL])
+-AC_REQUIRE([KDE_CHECK_LIBPTHREAD])
+-
+ AC_MSG_CHECKING([for Python directory])
+-
++ 
+ AC_CACHE_VAL(kde_cv_pythondir,
+ [
+   if test -z "$PYTHONDIR"; then
+@@ -3458,15 +3778,22 @@
+     kde_cv_pythondir="$PYTHONDIR"
+   fi
+ ])
+-
++ 
+ AC_ARG_WITH(pythondir,
+ [  --with-pythondir=pythondir   use python installed in pythondir ],
+ [
+   ac_python_dir=$withval
+ ], ac_python_dir=$kde_cv_pythondir
+ )
+-
++ 
+ AC_MSG_RESULT($ac_python_dir)
++])
++
++AC_DEFUN(KDE_CHECK_PYTHON_INTERN,
++[
++AC_REQUIRE([KDE_CHECK_LIBDL])
++AC_REQUIRE([KDE_CHECK_LIBPTHREAD])
++AC_REQUIRE([KDE_CHECK_PYTHON_DIR])
+ 
+ if test -z "$1"; then
+   version="1.5"
+@@ -3482,7 +3809,7 @@
+   AC_FIND_FILE(python$version/Python.h, $python_incdirs, python_incdir)
+   python_incdir=$python_incdir/python$version
+   if test ! -r $python_incdir/Python.h; then
+-    AC_MSG_ERROR(Python.h not found.)
++    python_incdir=no
+   fi
+ fi
+ 
+@@ -3494,47 +3821,70 @@
+   AC_FIND_FILE(python$version/config/libpython$version.a, $python_libdirs, python_libdir)
+   python_libdir=$python_libdir/python$version/config
+   if test ! -r $python_libdir/libpython$version.a; then
+-    AC_MSG_ERROR(libpython$version.a not found.)
++    python_libdir=no
+   fi
+ fi
+ 
+ PYTHONLIB=-L$python_libdir
++kde_orig_LIBPYTHON=$LIBPYTHON
+ if test -z "$LIBPYTHON"; then
+-LIBPYTHON=-lpython$version
++  LIBPYTHON=-lpython$version
+ fi
+ 
+ python_libdirs="$ac_python_dir/lib /usr/lib /usr/local /usr/lib $kde_extra_libs"
+ AC_FIND_FILE(python$version/copy.py, $python_libdirs, python_moddir)
+ python_moddir=$python_moddir/python$version
+ if test ! -r $python_moddir/copy.py; then
+-  AC_MSG_ERROR(python module directory not found.)
++  python_moddir=no
+ fi
+ 
+ PYTHONMODDIR=$python_moddir
+ 
+ AC_MSG_RESULT(header $python_incdir library $python_libdir modules $python_moddir)
+ 
+-dnl Note: this test is very weak
+-kde_python_link_found=no
+-KDE_TRY_LINK_PYTHON(normal)
+-KDE_TRY_LINK_PYTHON(m, -lm)
+-KDE_TRY_LINK_PYTHON(pthread, $LIBPTHREAD)
+-KDE_TRY_LINK_PYTHON(tcl, -ltcl)
+-KDE_TRY_LINK_PYTHON(m_and_thread, [$LIBPTHREAD -lm], [],
++if test x$python_incdir = xno ||  test x$python_libdir = xno ||  test x$python_moddir = xno; then
++   LIBPYTHON=$kde_orig_LIBPYTHON
++   test "x$PYTHONLIB" = "x-Lno" && PYTHONLIB=""
++   test "x$PYTHONINC" = "x-Ino" && PYTHONINC=""
++   $2
++else 
++  dnl Note: this test is very weak
++  kde_python_link_found=no
++  KDE_TRY_LINK_PYTHON(normal)
++  KDE_TRY_LINK_PYTHON(m, -lm)
++  KDE_TRY_LINK_PYTHON(pthread, $LIBPTHREAD)
++  KDE_TRY_LINK_PYTHON(tcl, -ltcl)
++  KDE_TRY_LINK_PYTHON(db2, -ldb2)
++  KDE_TRY_LINK_PYTHON(m_and_thread, [$LIBPTHREAD -lm])
++  KDE_TRY_LINK_PYTHON(m_and_thread_and_util, [$LIBPTHREAD -lm -lutil])
++  KDE_TRY_LINK_PYTHON(m_and_thread_and_db3, [$LIBPTHREAD -lm -ldb-3 -lutil])
++  KDE_TRY_LINK_PYTHON(pthread_and_db3, [$LIBPTHREAD -ldb-3])
++  KDE_TRY_LINK_PYTHON(m_and_thread_and_db, [$LIBPTHREAD -lm -ldb -ltermcap -lutil])
++  KDE_TRY_LINK_PYTHON(pthread_and_dl, [$LIBPTHREAD $LIBDL -lutil -lreadline -lncurses -lm])
++  KDE_TRY_LINK_PYTHON(m_and_thread_and_db_special, [$LIBPTHREAD -lm -ldb -lutil], [],
+ 	[AC_MSG_WARN([it seems, Python depends on another library.
+-    Pleae use \"make LIBPTYHON='-lpython$version -lotherlib'\" to fix this
++    Pleae set LIBPYTHON to '-lpython$version -lotherlib' before calling configure to fix this
+     and contact the authors to let them know about this problem])
+ 	])
+ 
+-LIBPYTHON="$LIBPYTHON $LIBDL $LIBSOCKET"
+-AC_SUBST(PYTHONINC)
+-AC_SUBST(PYTHONLIB)
+-AC_SUBST(LIBPYTHON)
+-AC_SUBST(PYTHONMODDIR)
++  LIBPYTHON="$LIBPYTHON $LIBDL $LIBSOCKET"
++  AC_SUBST(PYTHONINC)
++  AC_SUBST(PYTHONLIB)
++  AC_SUBST(LIBPYTHON)
++  AC_SUBST(PYTHONMODDIR)
++  AC_DEFINE(HAVE_PYTHON, 1, [Define if you have the development files for python])
++fi
+ 
+ ])
+ 
+ 
++AC_DEFUN(KDE_CHECK_PYTHON,
++[
++  KDE_CHECK_PYTHON_INTERN("2.1", [KDE_CHECK_PYTHON_INTERN("2.0",
++        [ KDE_CHECK_PYTHON_INTERN($1, $2) ])
++  ])
++])
++
+ AC_DEFUN(KDE_CHECK_STL_SGI,
+ [
+     AC_MSG_CHECKING([if STL implementation is SGI like])
+@@ -3576,7 +3926,7 @@
+    AC_MSG_RESULT($kde_cv_stl_type_hp)
+ 
+    if test "$kde_cv_stl_type_hp" = "yes"; then
+-	AC_DEFINE_UNQUOTED(HAVE_HP_STL, 1, [Define if you have a STL implementation by SGI])
++	AC_DEFINE_UNQUOTED(HAVE_HP_STL, 1, [Define if you have a STL implementation by HP])
+    fi
+ ])
+ 
+@@ -3592,7 +3942,7 @@
+        KDE_CHECK_STL_HP
+ 
+        if test "$kde_cv_stl_type_hp" = "no"; then
+-         AC_MSG_ERROR("no known STL type found")
++         AC_MSG_ERROR("no known STL type found - did you forget to install libstdc++[-devel] ?")
+        fi
+     fi
+ 
+@@ -3815,6 +4165,9 @@
+ [
+ AC_LANG_C
+ cat > conftest.$ac_ext <<EOF
++#ifdef STDC_HEADERS
++# include <stdlib.h>
++#endif
+ #include <stdio.h>
+ #include <sys/param.h>
+ #ifndef MAXPATHLEN
+@@ -3883,16 +4236,6 @@
+    AC_LANG_RESTORE
+ ])
+ 
+-AC_DEFUN(KDE_CHECK_QWSPRITEFIELD,
+-[
+-  KDE_CHECK_HEADER(QwSpriteField.h, ,
+-  [
+-    AC_MSG_WARN([you don't have QwSpriteField.h somewhere. Please install
+-       QwSpriteField out of kdesupport.])
+-      $1
+-  ])
+-])
+-
+ AC_DEFUN(KDE_FAST_CONFIGURE,
+ [
+   dnl makes configure fast (needs perl)
+@@ -4018,6 +4361,7 @@
+   foo = foo+1;
+   ],
+   kde_cv_c_long_long=yes, kde_cv_c_long_long=no)
++  AC_LANG_RESTORE
+ ])
+ AC_MSG_RESULT($kde_cv_c_long_long)
+ if test "$kde_cv_c_long_long" = yes; then
+@@ -4025,6 +4369,307 @@
+ fi
+ ])
+ 
++AC_DEFUN(KDE_CHECK_LIB,
++[
++     kde_save_LIBS="$LIBS"
++     LIBS="$LIBS $all_libraries"
++     case $host_os in
++      aix*) LIBS="-brtl $LIBS"
++	test "$GCC" = yes && LIBS="-Wl,$LIBS"
++	;;
++     esac
++     AC_CHECK_LIB($1, $2, $3, $4, $5)
++     LIBS="$kde_save_LIBS"
++])
++
++
++
++
++AC_DEFUN(KDE_CHECK_INITGROUPS,
++[ 
++  AC_REQUIRE([AC_CANONICAL_HOST])
++  AC_CHECK_FUNCS(initgroups)
++  if test "x$ac_cv_func_initgroups" = "xyes"; then
++    case $host_os in
++      aix*) AC_LANG_SAVE
++            AC_LANG_CPLUSPLUS
++            AC_MSG_CHECKING([for initgroups prototype])
++            AC_CACHE_VAL(kde_cv_check_initgroups_proto,
++            [ AC_TRY_COMPILE(
++              [ #include <grp.h>
++              ],
++              [ char buffer[10];
++                gid_t id;
++                int x = initgroups(buffer,id);
++              ],
++              kde_cv_check_initgroups_proto=yes,
++              kde_cv_check_initgroups_proto=no)
++            ])
++            AC_MSG_RESULT($kde_cv_check_initgroups_proto)
++            AC_LANG_RESTORE
++            ;;
++      *)
++            kde_cv_check_initgroups_proto=yes
++            ;;
++    esac
++  else
++    kde_cv_check_initgroups_proto=no
++  fi
++  if test "x$kde_cv_check_initgroups_proto" = "xyes"; then
++    kde_check_initgroups_proto=1
++  else
++    kde_check_initgroups_proto=0
++  fi
++  AC_DEFINE_UNQUOTED(HAVE_INITGROUPS_PROTO,$kde_check_initgroups_proto,
++           [initgroups may exist but not its prototype (e.g. AIX<4.3.3:8)])
++])
++
++
++AC_DEFUN(KDE_CHECK_JAVA_DIR,
++[
++AC_MSG_CHECKING([for Java directory])
++
++AC_ARG_WITH(java,
++[  --with-java=javadir     use java installed in javadir, --without-java disables ],
++[  ac_java_dir=$withval
++], ac_java_dir=""
++)
++
++dnl at this point ac_java_dir is either a dir, 'no' to disable, or '' to say look in $PATH
++if test "x$ac_java_dir" = xno; then
++   kde_cv_java_bindir=no
++   kde_cv_java_includedir=no
++   kde_java_libjvmdir=no
++   kde_java_libhpidir=no
++else
++  if test "x$ac_java_dir" = x; then
++    dnl No option set -> look in $PATH
++    AC_CACHE_VAL(kde_cv_java_bindir,
++    [
++      dnl First look for javac in $PATH. If not found we'll look at the option.
++      KDE_FIND_PATH(javac, JAVAC, [], [])
++      if test -n "$JAVAC"; then
++          kde_cv_java_bindir=`echo $JAVAC | sed -e 's,/javac$,/,'`
++          dnl this substitution might not work - well, we test for jni.h below
++          kde_cv_java_includedir=`echo $kde_cv_java_bindir | sed -e 's,bin/$,include/,'`
++      else
++          kde_cv_java_bindir=no
++      fi
++    ])
++  else
++    dnl config option set
++    kde_cv_java_bindir=$ac_java_dir/bin
++    kde_cv_java_includedir=$ac_java_dir/include
++  fi
++fi
++
++dnl At this point kde_cv_java_bindir and kde_cv_java_includedir are either set or "no"
++if test ! "x$kde_cv_java_bindir" = xno; then
++
++  dnl Look for libjvm.so
++  kde_java_libjvmdir=`find $kde_cv_java_bindir/.. -name libjvm.so | sed 's,libjvm.so,,'|head -n 1`
++  dnl Look for libhpi.so and avoid green threads
++  kde_java_libhpidir=`find $kde_cv_java_bindir/.. -name libhpi.so | grep -v green | sed 's,libhpi.so,,'`
++
++  dnl Now check everything's fine under there
++
++  if test ! -x "$kde_cv_java_bindir/javac"; then
++    AC_MSG_ERROR([javac not found under $kde_cv_java_bindir - it seems you passed a wrong --with-java.])
++  fi
++  if test ! -x "$kde_cv_java_bindir/javah"; then
++    AC_MSG_ERROR([javah not found under $kde_cv_java_bindir. javac was found though! Use --with-java or --without-java.])
++  fi
++  if test ! -x "$kde_cv_java_bindir/jar"; then
++    AC_MSG_ERROR([jar not found under $kde_cv_java_bindir. javac was found though! Use --with-java or --without-java.])
++  fi
++  if test ! -r "$kde_cv_java_includedir/jni.h"; then
++    AC_MSG_ERROR([jni.h not found under $kde_cv_java_includedir. Use --with-java or --without-java.])
++  fi
++  if test ! -r "$kde_java_libjvmdir/libjvm.so"; then
++    AC_MSG_ERROR([libjvm.so not found under $kde_java_libjvmdir. Use --without-java.])
++  fi
++  if test ! -r "$kde_java_libhpidir/libhpi.so"; then
++    AC_MSG_ERROR([libhpi.so not found under $kde_java_libhpidir. Use --without-java.])
++  fi
++
++  jni_includes="-I$kde_cv_java_includedir"
++  dnl Strange thing, jni.h requires jni_md.h which is under genunix here..
++  dnl and under linux here..
++  test -d "$kde_cv_java_includedir/linux" && jni_includes="$jni_includes -I$kde_cv_java_includedir/linux"
++  test -d "$kde_cv_java_includedir/genunix" && jni_includes="$jni_includes -I$kde_cv_java_includedir/genunix"
++
++  dnl Check for JNI version
++  AC_LANG_SAVE
++  AC_LANG_CPLUSPLUS
++  ac_cxxflags_safe="$CXXFLAGS"
++  CXXFLAGS="$CXXFLAGS $all_includes $jni_includes"
++
++  AC_TRY_COMPILE([
++#include <jni.h>
++	    ],
++	    [
++#ifndef JNI_VERSION_1_2
++Syntax Error
++#endif
++	    ],[ kde_jni_works=yes ],
++            [ kde_jni_works=no ])
++
++  if test $kde_jni_works = no; then
++    AC_MSG_ERROR([Incorrect version of $kde_cv_java_includedir/jni.h.
++	          You need to have Java Development Kit (JDK) version 1.2. 
++	
++	          Use --with-java to specify another location.
++	          Use --without-java to configure without java support.
++        	  Or download a newer JDK and try again. 
++	          See e.g. http://java.sun.com/products/jdk/1.2 ])
++  fi
++
++  CXXFLAGS="$ac_cxxflags_safe"    
++  AC_LANG_RESTORE
++
++  dnl All tests ok, inform and subst the variables
++  AC_MSG_RESULT([javac/javah/jar in $kde_cv_java_bindir, jni.h in $kde_cv_java_includedir])
++
++  JAVAC=$kde_cv_java_bindir/javac
++  AC_SUBST(JAVAC)
++  JAVAH=$kde_cv_java_bindir/javah
++  AC_SUBST(JAVAH)
++  JAR=$kde_cv_java_bindir/jar
++  AC_SUBST(JAR)
++  AC_SUBST(jni_includes)
++  JVMLIBS="-L$kde_java_libjvmdir -ljvm -L$kde_cv_java_libhpidir -lhpi"
++  AC_SUBST(JVMLIBS)
++fi
++])
++
++dnl this is a redefinition of autoconf 2.5x's AC_FOREACH.
++dnl When the argument list becomes big, as in KDE for AC_OUTPUT in
++dnl big packages, m4_foreach is dog-slow.  So use our own version of
++dnl it.  (matz at kde.org)
++m4_define([mm_foreach],
++[m4_pushdef([$1])_mm_foreach($@)m4_popdef([$1])])
++m4_define([mm_car], [[$1]])
++m4_define([mm_car2], [[$@]])
++m4_define([_mm_foreach],
++[m4_if(m4_quote($2), [], [],
++       [m4_define([$1], [mm_car($2)])$3[]_mm_foreach([$1],
++                                                     mm_car2(m4_shift($2)),
++                                                     [$3])])])
++m4_define([AC_FOREACH],
++[mm_foreach([$1], m4_split(m4_normalize([$2])), [$3])])
++
++AC_DEFUN(KDE_NEED_FLEX,
++[
++AC_REQUIRE([AM_PROG_LEX])
++if test -z "$LEXLIB"; then
++    AC_MSG_ERROR([You need to have flex installed.])
++fi
++AC_SUBST(LEXLIB)
++])
++
++AC_DEFUN(AC_PATH_QTOPIA,
++[
++  dnl TODO: use AC_CACHE_VAL
++
++  if test -z "$1"; then
++    qtopia_minver_maj=1
++    qtopia_minver_min=5
++    qtopia_minver_pat=0
++  else
++    qtopia_minver_maj=`echo "$1" | sed -e "s/^\(.*\)\..*\..*$/\1/"`
++    qtopia_minver_min=`echo "$1" | sed -e "s/^.*\.\(.*\)\..*$/\1/"`
++    qtopia_minver_pat=`echo "$1" | sed -e "s/^.*\..*\.\(.*\)$/\1/"`
++  fi
++
++  qtopia_minver="$qtopia_minver_maj$qtopia_minver_min$qtopia_minver_pat"
++  qtopia_minverstr="$qtopia_minver_maj.$qtopia_minver_min.$qtopia_minver_pat"
++
++  AC_REQUIRE([AC_PATH_QT])
++
++  AC_MSG_CHECKING([for Qtopia])
++
++  LIB_QTOPIA="-lqpe"
++  AC_SUBST(LIB_QTOPIA)
++
++  kde_qtopia_dirs="$QPEDIR /opt/Qtopia"
++
++  ac_qtopia_incdir=NO
++
++  AC_ARG_WITH(qtopia-dir,
++              [  --with-qtopia-dir=DIR   where the root of Qtopia is installed ],
++              [  ac_qtopia_incdir="$withval"/include] ) 
++  
++  qtopia_incdirs=""
++  for dir in $kde_qtopia_dirs; do
++    qtopia_incdirs="$qtopia_incdirs $dir/include"
++  done
++
++  if test ! "$ac_qtopia_incdir" = "NO"; then
++    qtopia_incdirs="$ac_qtopia_incdir $qtopia_incdirs"
++  fi
++
++  qtopia_incdir=""
++  AC_FIND_FILE(qpe/qpeapplication.h, $qtopia_incdirs, qtopia_incdir)
++  ac_qtopia_incdir="$qtopia_incdir"
++
++  if test -z "$qtopia_incdir"; then
++    AC_MSG_ERROR([Cannot find Qtopia headers. Please check your installation.])
++  fi
++
++  qtopia_ver_maj=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION "\(.*\)\..*\..*".*,\1,p'`;
++  qtopia_ver_min=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION ".*\.\(.*\)\..*".*,\1,p'`;
++  qtopia_ver_pat=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION ".*\..*\.\(.*\)".*,\1,p'`;
++
++  qtopia_ver="$qtopia_ver_maj$qtopia_ver_min$qtopia_ver_pat"
++  qtopia_verstr="$qtopia_ver_maj.$qtopia_ver_min.$qtopia_ver_pat"
++  if test "$qtopia_ver" -lt "$qtopia_minver"; then
++    AC_MSG_ERROR([found Qtopia version $qtopia_verstr but version $qtopia_minverstr
++is required.])
++  fi
++
++  AC_LANG_SAVE
++  AC_LANG_CPLUSPLUS
++
++  ac_cxxflags_safe="$CXXFLAGS"
++  ac_ldflags_safe="$LDFLAGS"
++  ac_libs_safe="$LIBS"
++
++  CXXFLAGS="$CXXFLAGS -I$qtopia_incdir $all_includes"
++  LDFLAGS="$LDFLAGS $QT_LDFLAGS $all_libraries $USER_LDFLAGS $KDE_MT_LDFLAGS"
++  LIBS="$LIBS $LIB_QTOPIA $LIBQT"
++
++  cat > conftest.$ac_ext <<EOF
++#include "confdefs.h"
++#include <qpe/qpeapplication.h>
++#include <qpe/version.h>
++
++int main( int argc, char **argv )
++{
++    QPEApplication app( argc, argv );
++    return 0;
++}
++EOF
++
++  if AC_TRY_EVAL(ac_link) && test -s conftest; then
++    rm -f conftest*
++  else
++    rm -f conftest*
++    AC_MSG_ERROR([Cannot link small Qtopia Application. For more details look at
++the end of config.log])
++  fi
++
++  CXXFLAGS="$ac_cxxflags_safe"
++  LDFLAGS="$ac_ldflags_safe"
++  LIBS="$ac_libs_safe"
++
++  AC_LANG_RESTORE
++
++  QTOPIA_INCLUDES="-I$qtopia_incdir"
++  AC_SUBST(QTOPIA_INCLUDES)
++
++  AC_MSG_RESULT([found version $qtopia_verstr with headers at $qtopia_incdir])
++])
++
+ ## libtool.m4 - Configure libtool for the host system. -*-Shell-script-*-
+ ## Copyright 1996, 1997, 1998, 1999, 2000, 2001
+ ## Free Software Foundation, Inc.
+@@ -4131,7 +4776,7 @@
+ dnl
+ 
+ # Only perform the check for file, if the check method requires it
+-case "$deplibs_check_method" in
++case $deplibs_check_method in
+ file_magic*)
+   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+     AC_PATH_MAGIC
+@@ -4166,12 +4811,12 @@
+ 
+ # Some flags need to be propagated to the compiler or linker for good
+ # libtool support.
+-case "$host" in
++case $host in
+ *-*-irix6*)
+   # Find out which ABI we are using.
+   echo '[#]line __oline__ "configure"' > conftest.$ac_ext
+   if AC_TRY_EVAL(ac_compile); then
+-    case "`/usr/bin/file conftest.$ac_objext`" in
++    case `/usr/bin/file conftest.$ac_objext` in
+     *32-bit*)
+       LD="${LD-ld} -32"
+       ;;
+@@ -4215,7 +4860,7 @@
+       DllMain (0, 0, 0);],
+       [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
+ 
+-  case "$host/$CC" in
++  case $host/$CC in
+   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
+     # old mingw systems require "-dll" to link a DLL, while more recent ones
+     # require "-mdll"
+@@ -4251,7 +4896,7 @@
+ <<  --enable-shared[=PKGS]  build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
+ changequote([, ])dnl
+ [p=${PACKAGE-default}
+-case "$enableval" in
++case $enableval in
+ yes) enable_shared=yes ;;
+ no) enable_shared=no ;;
+ *)
+@@ -4284,7 +4929,7 @@
+ <<  --enable-static[=PKGS]  build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
+ changequote([, ])dnl
+ [p=${PACKAGE-default}
+-case "$enableval" in
++case $enableval in
+ yes) enable_static=yes ;;
+ no) enable_static=no ;;
+ *)
+@@ -4319,7 +4964,7 @@
+ <<  --enable-fast-install[=PKGS]  optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
+ changequote([, ])dnl
+ [p=${PACKAGE-default}
+-case "$enableval" in
++case $enableval in
+ yes) enable_fast_install=yes ;;
+ no) enable_fast_install=no ;;
+ *)
+@@ -4355,7 +5000,7 @@
+ AC_DEFUN([AC_PATH_TOOL_PREFIX],
+ [AC_MSG_CHECKING([for $1])
+ AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
+-[case "$MAGIC_CMD" in
++[case $MAGIC_CMD in
+   /*)
+   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+   ;;
+@@ -4374,7 +5019,7 @@
+     if test -f $ac_dir/$1; then
+       lt_cv_path_MAGIC_CMD="$ac_dir/$1"
+       if test -n "$file_magic_test_file"; then
+-	case "$deplibs_check_method" in
++	case $deplibs_check_method in
+ 	"file_magic "*)
+ 	  file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
+ 	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+@@ -4446,12 +5091,10 @@
+   *)
+     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+   esac
+-  case "$ac_prog" in
++  case $ac_prog in
+     # Accept absolute paths.
+-changequote(,)dnl
+-    [\\/]* | [A-Za-z]:[\\/]*)
+-      re_direlt='/[^/][^/]*/\.\./'
+-changequote([,])dnl
++    [[\\/]* | [A-Za-z]:[\\/]*)]
++      re_direlt=['/[^/][^/]*/\.\./']
+       # Canonicalize the path of ld
+       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
+       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+@@ -4543,8 +5186,8 @@
+ # If you have `file' or equivalent on your system and you're not sure
+ # whether `pass_all' will *always* work, you probably want this one.
+ 
+-case "$host_os" in
+-aix4*)
++case $host_os in
++aix*)
+   lt_cv_deplibs_check_method=pass_all
+   ;;
+ 
+@@ -4553,9 +5196,7 @@
+   ;;
+ 
+ bsdi4*)
+-  changequote(,)dnl
+-  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
+-  changequote([, ])dnl
++  lt_cv_deplibs_check_method=['file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)']
+   lt_cv_file_magic_cmd='/usr/bin/file -L'
+   lt_cv_file_magic_test_file=/shlib/libc.so
+   ;;
+@@ -4567,19 +5208,24 @@
+ 
+ darwin* | rhapsody*)
+   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
+-  lt_cv_file_magic_cmd=/usr/bin/file
+-  lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
++  lt_cv_file_magic_cmd='/usr/bin/file -L'
++  case "$host_os" in
++  rhapsody* | darwin1.[012])
++    lt_cv_file_magic_test_file='/System/Library/Frameworks/System.framework/System'
++    ;;
++  *) # Darwin 1.3 on
++    lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
++    ;;
++  esac
+   ;;
+ 
+ freebsd* )
+   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+-    case "$host_cpu" in
++    case $host_cpu in
+     i*86 )
+       # Not sure whether the presence of OpenBSD here was a mistake.
+       # Let's accept both of them until this is cleared up.
+-      changequote(,)dnl
+-      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
+-      changequote([, ])dnl
++      lt_cv_deplibs_check_method=['file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library']
+       lt_cv_file_magic_cmd=/usr/bin/file
+       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+       ;;
+@@ -4594,31 +5240,26 @@
+   ;;
+ 
+ hpux10.20*|hpux11*)
+-  # TODO:  Does this work for hpux-11 too?
+-  changequote(,)dnl
+-  lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
+-  changequote([, ])dnl
++  lt_cv_deplibs_check_method=['file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library']
+   lt_cv_file_magic_cmd=/usr/bin/file
+   lt_cv_file_magic_test_file=/usr/lib/libc.sl
+   ;;
+ 
+ irix5* | irix6*)
+-  case "$host_os" in
++  case $host_os in
+   irix5*)
+     # this will be overridden with pass_all, but let us keep it just in case
+     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
+     ;;
+   *)
+-    case "$LD" in
++    case $LD in
+     *-32|*"-32 ") libmagic=32-bit;;
+     *-n32|*"-n32 ") libmagic=N32;;
+     *-64|*"-64 ") libmagic=64-bit;;
+     *) libmagic=never-match;;
+     esac
+     # this will be overridden with pass_all, but let us keep it just in case
+-    changequote(,)dnl
+-    lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
+-    changequote([, ])dnl
++    lt_cv_deplibs_check_method=["file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"]
+     ;;
+   esac
+   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
+@@ -4627,14 +5268,12 @@
+ 
+ # This must be Linux ELF.
+ linux-gnu*)
+-  case "$host_cpu" in
+-  alpha* | i*86 | powerpc* | sparc* | ia64* | s390* )
++  case $host_cpu in
++  alpha* | i*86 | powerpc* | sparc* | ia64* | s390* | m68k* | arm* | mips* | hppa* | sh* )
+     lt_cv_deplibs_check_method=pass_all ;;
+   *)
+     # glibc up to 2.1.1 does not perform some relocations on ARM
+-    changequote(,)dnl
+-    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
+-    changequote([, ])dnl
++    lt_cv_deplibs_check_method=['file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'] ;;
+   esac
+   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
+   ;;
+@@ -4688,14 +5327,12 @@
+   ;;
+ 
+ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+-  case "$host_vendor" in
++  case $host_vendor in
+   ncr)
+     lt_cv_deplibs_check_method=pass_all
+     ;;
+   motorola)
+-    changequote(,)dnl
+-    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
+-    changequote([, ])dnl
++    lt_cv_deplibs_check_method=['file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]']
+     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+     ;;
+   esac
+@@ -4747,7 +5384,7 @@
+ AC_DEFUN([AC_CHECK_LIBM],
+ [AC_REQUIRE([AC_CANONICAL_HOST])dnl
+ LIBM=
+-case "$host" in
++case $host in
+ *-*-beos* | *-*-cygwin* | *-*-pw32*)
+   # These system don't have libm
+   ;;
+@@ -4773,7 +5410,7 @@
+ # top_srcdir appropriately in the Makefiles.
+ AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
+ [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+-  case "$enable_ltdl_convenience" in
++  case $enable_ltdl_convenience in
+   no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
+   "") enable_ltdl_convenience=yes
+       ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
+--- kfocus-1.0.2.orig/doc/en/Makefile.in
++++ kfocus-1.0.2/doc/en/Makefile.in
+@@ -1,7 +1,8 @@
+-# KDE tags expanded automatically by am_edit - $Revision: 1.1.1.1 $ 
+-# Makefile.in generated automatically by automake 1.4 from Makefile.am
++# KDE tags expanded automatically by am_edit - $Revision: 1.4 $ 
++# Makefile.in generated automatically by automake 1.5 from Makefile.am.
+ 
+-# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
++# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
++# Free Software Foundation, Inc.
+ # This Makefile.in is free software; the Free Software Foundation
+ # gives unlimited permission to copy and/or distribute it,
+ # with or without modifications, as long as this notice is preserved.
+@@ -11,8 +12,9 @@
+ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ # PARTICULAR PURPOSE.
+ 
+-####### kdevelop will overwrite this part!!! (begin)##########
++ at SET_MAKE@
+ 
++####### kdevelop will overwrite this part!!! (begin)##########
+ 
+ SHELL = @SHELL@
+ 
+@@ -21,10 +23,6 @@
+ VPATH = @srcdir@
+ prefix = @prefix@
+ exec_prefix = @exec_prefix@
+-#>- 
+-bindir = @bindir@
+-#>+ 3
+-DEPDIR = .deps
+ 
+ bindir = @bindir@
+ sbindir = @sbindir@
+@@ -38,13 +36,9 @@
+ mandir = @mandir@
+ includedir = @includedir@
+ oldincludedir = /usr/include
+-
+-DESTDIR =
+-
+ pkgdatadir = $(datadir)/@PACKAGE@
+ pkglibdir = $(libdir)/@PACKAGE@
+ pkgincludedir = $(includedir)/@PACKAGE@
+-
+ top_builddir = ../..
+ 
+ ACLOCAL = @ACLOCAL@
+@@ -53,11 +47,11 @@
+ AUTOHEADER = @AUTOHEADER@
+ 
+ INSTALL = @INSTALL@
+-INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
++INSTALL_PROGRAM = @INSTALL_PROGRAM@
+ INSTALL_DATA = @INSTALL_DATA@
+ INSTALL_SCRIPT = @INSTALL_SCRIPT@
++INSTALL_HEADER = $(INSTALL_DATA)
+ transform = @program_transform_name@
+-
+ NORMAL_INSTALL = :
+ PRE_INSTALL = :
+ POST_INSTALL = :
+@@ -70,9 +64,11 @@
+ host_triplet = @host@
+ target_alias = @target_alias@
+ target_triplet = @target@
++AMTAR = @AMTAR@
+ ARTSCCONFIG = @ARTSCCONFIG@
+ AS = @AS@
+ AUTODIRS = @AUTODIRS@
++AWK = @AWK@
+ CC = @CC@
+ CONF_FILES = @CONF_FILES@
+ CPP = @CPP@
+@@ -81,6 +77,7 @@
+ DCOPIDL = @DCOPIDL@
+ DCOPIDL2CPP = @DCOPIDL2CPP@
+ DCOP_DEPENDENCIES = @DCOP_DEPENDENCIES@
++DEPDIR = @DEPDIR@
+ DLLTOOL = @DLLTOOL@
+ DPMSINC = @DPMSINC@
+ DPMSLIB = @DPMSLIB@
+@@ -92,21 +89,31 @@
+ GMSGFMT = @GMSGFMT@
+ IDL = @IDL@
+ IDL_DEPENDENCIES = @IDL_DEPENDENCIES@
+-KDB2HTML = @KDB2HTML@
++INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
++JAR = @JAR@
++JAVAC = @JAVAC@
++JAVAH = @JAVAH@
++JVMLIBS = @JVMLIBS@
+ KDECONFIG = @KDECONFIG@
+ KDE_CXXFLAGS = @KDE_CXXFLAGS@
+ KDE_EXTRA_RPATH = @KDE_EXTRA_RPATH@
+ KDE_INCLUDES = @KDE_INCLUDES@
+ KDE_LDFLAGS = @KDE_LDFLAGS@
++KDE_MT_LDFLAGS = @KDE_MT_LDFLAGS@
++KDE_MT_LIBS = @KDE_MT_LIBS@
+ KDE_PLUGIN = @KDE_PLUGIN@
+ KDE_RPATH = @KDE_RPATH@
+ KDE_USE_CLOSURE_FALSE = @KDE_USE_CLOSURE_FALSE@
+ KDE_USE_CLOSURE_TRUE = @KDE_USE_CLOSURE_TRUE@
+ KDE_USE_FINAL_FALSE = @KDE_USE_FINAL_FALSE@
+ KDE_USE_FINAL_TRUE = @KDE_USE_FINAL_TRUE@
++KDE_XSL_STYLESHEET = @KDE_XSL_STYLESHEET@
++LEX = @LEX@
++LEXLIB = @LEXLIB@
+ LIBCOMPAT = @LIBCOMPAT@
+ LIBCRYPT = @LIBCRYPT@
+ LIBDL = @LIBDL@
++LIBGEN = @LIBGEN@
+ LIBJPEG = @LIBJPEG@
+ LIBMICO = @LIBMICO@
+ LIBOBJS = @LIBOBJS@
+@@ -114,59 +121,70 @@
+ LIBPTHREAD = @LIBPTHREAD@
+ LIBPYTHON = @LIBPYTHON@
+ LIBQIMGIO = @LIBQIMGIO@
++LIBRESOLV = @LIBRESOLV@
++LIBSHADOW = @LIBSHADOW@
+ LIBSM = @LIBSM@
+ LIBSOCKET = @LIBSOCKET@
+ LIBTIFF = @LIBTIFF@
+ LIBTOOL = @LIBTOOL@
+ LIBUCB = @LIBUCB@
++LIBUTIL = @LIBUTIL@
++LIBXINERAMA = @LIBXINERAMA@
+ LIBZ = @LIBZ@
+ LIB_KAB = @LIB_KAB@
+ LIB_KDECORE = @LIB_KDECORE@
++LIB_KDEPRINT = @LIB_KDEPRINT@
+ LIB_KDEUI = @LIB_KDEUI@
+ LIB_KFILE = @LIB_KFILE@
+ LIB_KFM = @LIB_KFM@
+-LIB_KFORMULA = @LIB_KFORMULA@
+ LIB_KHTML = @LIB_KHTML@
+ LIB_KIMGIO = @LIB_KIMGIO@
+ LIB_KIO = @LIB_KIO@
+ LIB_KPARTS = @LIB_KPARTS@
+ LIB_KSPELL = @LIB_KSPELL@
+ LIB_KSYCOCA = @LIB_KSYCOCA@
+-LIB_KWRITE = @LIB_KWRITE@
++LIB_QPE = @LIB_QPE@
+ LIB_QT = @LIB_QT@
++LIB_QTOPIA = @LIB_QTOPIA@
+ LIB_SMB = @LIB_SMB@
+ LIB_X11 = @LIB_X11@
++LIB_XEXT = @LIB_XEXT@
+ LN_S = @LN_S@
+-MAKEINFO = @MAKEINFO@
+ MCOPIDL = @MCOPIDL@
++MEINPROC = @MEINPROC@
+ MICO_INCLUDES = @MICO_INCLUDES@
+ MICO_LDFLAGS = @MICO_LDFLAGS@
+ MOC = @MOC@
+ MSGFMT = @MSGFMT@
++NOOPT_CFLAGS = @NOOPT_CFLAGS@
+ NOOPT_CXXFLAGS = @NOOPT_CXXFLAGS@
+ NOREPO = @NOREPO@
+ OBJDUMP = @OBJDUMP@
+ OBJEXT = @OBJEXT@
+ PACKAGE = @PACKAGE@
+-PAMINC = @PAMINC@
+-PAMLIBPATHS = @PAMLIBPATHS@
+ PAMLIBS = @PAMLIBS@
++PASSWDLIBS = @PASSWDLIBS@
+ PYTHONINC = @PYTHONINC@
+ PYTHONLIB = @PYTHONLIB@
+ PYTHONMODDIR = @PYTHONMODDIR@
++QTE_NORTTI = @QTE_NORTTI@
++QTOPIA_INCLUDES = @QTOPIA_INCLUDES@
+ QT_INCLUDES = @QT_INCLUDES@
+ QT_LDFLAGS = @QT_LDFLAGS@
+ RANLIB = @RANLIB@
+ REPO = @REPO@
++SETUIDFLAGS = @SETUIDFLAGS@
+ STRIP = @STRIP@
+ TOPSUBDIRS = @TOPSUBDIRS@
+ UIC = @UIC@
++UIC_TR = @UIC_TR@
+ USER_INCLUDES = @USER_INCLUDES@
+ USER_LDFLAGS = @USER_LDFLAGS@
+ USE_EXCEPTIONS = @USE_EXCEPTIONS@
+ USE_RTTI = @USE_RTTI@
+ USE_THREADS = @USE_THREADS@
+ VERSION = @VERSION@
++WOVERLOADED_VIRTUAL = @WOVERLOADED_VIRTUAL@
+ XGETTEXT = @XGETTEXT@
+ XPMINC = @XPMINC@
+ XPMLIB = @XPMLIB@
+@@ -176,7 +194,11 @@
+ X_PRE_LIBS = @X_PRE_LIBS@
+ all_includes = @all_includes@
+ all_libraries = @all_libraries@
++am__include = @am__include@
++am__quote = @am__quote@
+ idldir = @idldir@
++install_sh = @install_sh@
++jni_includes = @jni_includes@
+ kde_appsdir = @kde_appsdir@
+ kde_bindir = @kde_bindir@
+ kde_confdir = @kde_confdir@
+@@ -190,11 +212,14 @@
+ kde_locale = @kde_locale@
+ kde_mimedir = @kde_mimedir@
+ kde_moduledir = @kde_moduledir@
++kde_qtver = @kde_qtver@
+ kde_servicesdir = @kde_servicesdir@
+ kde_servicetypesdir = @kde_servicetypesdir@
+ kde_sounddir = @kde_sounddir@
++kde_styledir = @kde_styledir@
+ kde_templatesdir = @kde_templatesdir@
+ kde_wallpaperdir = @kde_wallpaperdir@
++kde_widgetdir = @kde_widgetdir@
+ micodir = @micodir@
+ qt_includes = @qt_includes@
+ qt_libraries = @qt_libraries@
+@@ -203,132 +228,156 @@
+ 
+ EXTRA_DIST = index.docbook about.png completetask.png newproject.png tasklist.png loglist.png screenshot.png 
+ 
+-####### kdevelop will overwrite this part!!! (end)############
+ 
++####### kdevelop will overwrite this part!!! (end)############
+ KDE_LANG = en
+ KDE_DOCS = kfocus
++subdir = ./doc/en
+ mkinstalldirs = $(SHELL) $(top_srcdir)/admin/mkinstalldirs
+-CONFIG_HEADER = ../../config.h
+-CONFIG_CLEAN_FILES = 
+-DIST_COMMON =  Makefile.am Makefile.in
+-
+-
+-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+-
+-TAR = gtar
+-GZIP_ENV = --best
+-#>- all: all-redirect
++CONFIG_HEADER = $(top_builddir)/config.h
++CONFIG_CLEAN_FILES =
++DIST_SOURCES =
++DIST_COMMON = Makefile.am Makefile.in
++#>- all: all-am
+ #>+ 1
+-all: docs-am  all-redirect
++all: docs-am  all-am
++
+ .SUFFIXES:
+-$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
+-#>- 	cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps doc/en/Makefile
+-#>+ 2
+-	cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps doc/en/Makefile
+-	cd $(top_srcdir) && perl admin/am_edit doc/en/Makefile.in
+ 
+-Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
+-	cd $(top_builddir) \
+-	  && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
++mostlyclean-libtool:
++	-rm -f *.lo
+ 
++clean-libtool:
++	-rm -rf .libs _libs
++
++distclean-libtool:
++	-rm -f libtool
++$(srcdir)/Makefile.in:  Makefile.am  $(top_srcdir)/configure.in $(ACLOCAL_M4)
++#>- 	cd $(top_srcdir) && \
++#>- $(AUTOMAKE) --gnu  ./doc/en/Makefile
++#>+ 3
++	cd $(top_srcdir) && \
++	$(AUTOMAKE) --gnu  ./doc/en/Makefile
++	cd $(top_srcdir) && perl admin/am_edit doc/en/Makefile.in
++Makefile:  $(srcdir)/Makefile.in  $(top_builddir)/config.status
++	cd $(top_builddir) && \
++	CONFIG_HEADERS= CONFIG_LINKS= \
++	CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
++uninstall-info-am:
+ tags: TAGS
+ TAGS:
+ 
+ 
+-distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
++#>- DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
++#>+ 4
++KDE_DIST=index.xml 
++
++DISTFILES= $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) $(KDE_DIST)
+ 
+-subdir = doc/en
++
++top_distdir = ../..
++distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
+ 
+ #>- distdir: $(DISTFILES)
+ #>+ 1
+ distdir: distdir-nls  $(DISTFILES)
+-#>- 	@for file in $(DISTFILES); do \
+-#>- 	  d=$(srcdir); \
+-#>- 	  if test -d $$d/$$file; then \
+-#>- 	    cp -pr $$/$$file $(distdir)/$$file; \
+-#>- 	  else \
+-#>- 	    test -f $(distdir)/$$file \
+-#>- 	    || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+-#>- 	    || cp -p $$d/$$file $(distdir)/$$file || :; \
+-#>- 	  fi; \
+-#>- 	done
+-#>+ 10
+ 	@for file in $(DISTFILES); do \
+-	  d=$(srcdir); \
+-	  if test -d $$d/$$file; then \
+-	    cp -pr $$d/$$file $(distdir)/$$file; \
+-	  else \
+-	    test -f $(distdir)/$$file \
+-	    || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+-	    || cp -p $$d/$$file $(distdir)/$$file || :; \
+-	  fi; \
++	if test -f $$file; then d=.; else d=$(srcdir); fi; \
++	dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
++	if test "$$dir" != "$$file" && test "$$dir" != "."; then \
++	$(mkinstalldirs) "$(distdir)/$$dir"; \
++	fi; \
++	if test -d $$d/$$file; then \
++	cp -pR $$d/$$file $(distdir) \
++	|| exit 1; \
++	else \
++	test -f $(distdir)/$$file \
++	|| cp -p $$d/$$file $(distdir)/$$file \
++	|| exit 1; \
++	fi; \
+ 	done
+-info-am:
+-info: info-am
+-dvi-am:
+-dvi: dvi-am
+ check-am: all-am
+ check: check-am
+-installcheck-am:
+-installcheck: installcheck-am
+-install-exec-am:
+-install-exec: install-exec-am
++all-am: Makefile
+ 
+-#>- install-data-am: install-data-local
+-#>+ 1
+-install-data-am: install-docs install-nls install-data-local
+-install-data: install-data-am
++installdirs:
+ 
+-install-am: all-am
+-	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+ install: install-am
+-uninstall-am: uninstall-local
++install-exec: install-exec-am
++install-data: install-data-am
+ #>- uninstall: uninstall-am
+ #>+ 1
+ uninstall: uninstall-docs uninstall-nls  uninstall-am
+-all-am: Makefile
+-all-redirect: all-am
+-install-strip:
+-	$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+-installdirs:
+ 
++install-am: all-am
++	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+ 
++installcheck: installcheck-am
++install-strip:
++	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
++	`test -z '$(STRIP)' || \
++	echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+ mostlyclean-generic:
+ 
+ clean-generic:
+ 
+ distclean-generic:
+-	-rm -f Makefile $(CONFIG_CLEAN_FILES)
+-	-rm -f config.cache config.log stamp-h stamp-h[0-9]*
++	-rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
+ 
+ maintainer-clean-generic:
+-mostlyclean-am:  mostlyclean-generic
+-
+-mostlyclean: mostlyclean-am
+-
+-clean-am:  clean-generic mostlyclean-am
+-
++	@echo "This command is intended for maintainers to use"
++	@echo "it deletes files that may require special tools to rebuild."
+ #>- clean: clean-am
+ #>+ 1
+ clean: kde-rpo-clean  clean-am
+ 
+-distclean-am:  distclean-generic clean-am
+-	-rm -f libtool
++#>- clean-am: clean-generic clean-libtool mostlyclean-am
++#>+ 1
++clean-am: clean-docs  clean-generic clean-libtool mostlyclean-am
+ 
+ distclean: distclean-am
+ 
+-maintainer-clean-am:  maintainer-clean-generic distclean-am
+-	@echo "This command is intended for maintainers to use;"
+-	@echo "it deletes files that may require special tools to rebuild."
++distclean-am: clean-am distclean-generic distclean-libtool
++
++dvi: dvi-am
++
++dvi-am:
++
++info: info-am
++
++info-am:
++
++#>- install-data-am: install-data-local
++#>+ 1
++install-data-am: install-docs install-nls install-data-local
++
++install-exec-am:
++
++install-info: install-info-am
++
++install-man:
++
++installcheck-am:
+ 
+ maintainer-clean: maintainer-clean-am
+ 
+-.PHONY: tags distdir info-am info dvi-am dvi check check-am \
+-installcheck-am installcheck install-exec-am install-exec \
+-install-data-local install-data-am install-data install-am install \
+-uninstall-local uninstall-am uninstall all-redirect all-am all \
+-installdirs mostlyclean-generic distclean-generic clean-generic \
+-maintainer-clean-generic clean mostlyclean distclean maintainer-clean
++maintainer-clean-am: distclean-am maintainer-clean-generic
++
++mostlyclean: mostlyclean-am
++
++mostlyclean-am: mostlyclean-generic mostlyclean-libtool
++
++uninstall-am: uninstall-info-am uninstall-local
++
++.PHONY: all all-am check check-am clean clean-generic clean-libtool \
++	distclean distclean-generic distclean-libtool distdir dvi \
++	dvi-am info info-am install install-am install-data \
++	install-data-am install-data-local install-exec install-exec-am \
++	install-info install-info-am install-man install-strip \
++	installcheck installcheck-am installdirs maintainer-clean \
++	maintainer-clean-generic mostlyclean mostlyclean-generic \
++	mostlyclean-libtool uninstall uninstall-am uninstall-info-am \
++	uninstall-local
+ 
+ 
+ install-data-local:
+@@ -388,65 +437,56 @@
+ #>- 	-rm -f $(kde_htmldir)/en/kfocus/screenshot.png
+ #>+ 1
+ 	-rm -f $(DESTDIR)$(kde_htmldir)/en/kfocus/screenshot.png
+-
+ # Tell versions [3.59,3.63) of GNU make to not export all variables.
+ # Otherwise a system limit (for SysV at least) may be exceeded.
+ .NOEXPORT:
+ 
+-#>+ 30
+-docs-am: HTML HTML/index.html
++#>+ 21
++index.cache.bz2: $(srcdir)/index.docbook $(KDE_XSL_STYLESHEET) screenshot.png index.docbook completetask.png about.png newproject.png tasklist.png loglist.png index.xml 
++	- at if test -n "$(MEINPROC)"; then echo $(MEINPROC) --check --cache index.cache.bz2 $(srcdir)/index.docbook; $(MEINPROC) --check --cache index.cache.bz2 $(srcdir)/index.docbook; fi
+ 
+-HTML:
+-	test -d HTML || mkdir HTML
++docs-am: index.cache.bz2
+ 
+-HTML/index.html: HTML index.docbook
+-	@test -d HTML && rm -r HTML
+-	$(KDB2HTML) $(srcdir)/index.docbook
+-
+-install-docs:
++install-docs: docs-am install-nls
+ 	$(mkinstalldirs) $(DESTDIR)$(kde_htmldir)/$(KDE_LANG)/kfocus
+-	- at filelist="" ;\
+-	if test -d HTML; then \
+-	  filelist=`(cd HTML && ls -1 * .anchors 2> /dev/null)`; \
+-	  dir=HTML; \
+-	else if test -d $(srcdir)/HTML; then \
+-	  filelist=`(cd $(srcdir)/HTML && ls -1 * .anchors 2> /dev/null)`; \
+-	  dir="$(srcdir)/HTML" ;\
+-	fi ; fi ;\
+-	for file in $$filelist; do if test -f $$dir/$$file; then \
+-	echo $(INSTALL_DATA) $$dir/$$file $(DESTDIR)$(kde_htmldir)/$(KDE_LANG)/kfocus/$$file ;\
+-	$(INSTALL_DATA) $$dir/$$file $(DESTDIR)$(kde_htmldir)/$(KDE_LANG)/kfocus/$$file; \
+-	fi; done
++	@if test -f index.cache.bz2; then \
++	echo $(INSTALL_DATA) index.cache.bz2 $(DESTDIR)$(kde_htmldir)/$(KDE_LANG)/kfocus/; \
++	$(INSTALL_DATA) index.cache.bz2 $(DESTDIR)$(kde_htmldir)/$(KDE_LANG)/kfocus/; \
++	fi
+ 	-rm -f $(DESTDIR)$(kde_htmldir)/$(KDE_LANG)/kfocus/common
+ 	$(LN_S) $(kde_libs_htmldir)/$(KDE_LANG)/common $(DESTDIR)$(kde_htmldir)/$(KDE_LANG)/kfocus/common
+ 
+ uninstall-docs:
+ 	-rm -rf $(kde_htmldir)/$(KDE_LANG)/kfocus
+ 
++clean-docs:
++	-rm -f index.cache.bz2
++
+ 
+ #>+ 13
+ install-nls:
+ 	$(mkinstalldirs) $(DESTDIR)$(kde_htmldir)/$(KDE_LANG)/kfocus
+-	@for base in screenshot.png index.docbook completetask.png about.png newproject.png tasklist.png loglist.png ; do \
++	@for base in screenshot.png index.docbook completetask.png about.png newproject.png tasklist.png loglist.png index.xml ; do \
+ 	  echo $(INSTALL_DATA) $$base $(DESTDIR)$(kde_htmldir)/$(KDE_LANG)/kfocus/$$base ;\
+ 	  $(INSTALL_DATA) $(srcdir)/$$base $(DESTDIR)$(kde_htmldir)/$(KDE_LANG)/kfocus/$$base ;\
+ 	done
+ 
+ uninstall-nls:
+-	for base in screenshot.png index.docbook completetask.png about.png newproject.png tasklist.png loglist.png ; do \
++	for base in screenshot.png index.docbook completetask.png about.png newproject.png tasklist.png loglist.png index.xml ; do \
+ 	  rm -f $(DESTDIR)$(kde_htmldir)/$(KDE_LANG)/kfocus/$$base ;\
+ 	done
+ 
+ 
+ #>+ 5
+ distdir-nls:
+-	for file in screenshot.png index.docbook completetask.png about.png newproject.png tasklist.png loglist.png ; do \
++	for file in screenshot.png index.docbook completetask.png about.png newproject.png tasklist.png loglist.png index.xml ; do \
+ 	  cp $(srcdir)/$$file $(distdir); \
+ 	done
+ 
+-#>+ 5
++#>+ 6
+ force-reedit:
+-		cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps doc/en/Makefile
++		cd $(top_srcdir) && \
++	$(AUTOMAKE) --gnu  ./doc/en/Makefile
+ 	cd $(top_srcdir) && perl admin/am_edit doc/en/Makefile.in
+ 
+ 
+@@ -454,8 +494,14 @@
+ final:
+ 	$(MAKE) all-am
+ #>+ 2
++final-install:
++	$(MAKE) install-am
++#>+ 2
+ no-final:
+ 	$(MAKE) all-am
++#>+ 2
++no-final-install:
++	$(MAKE) install-am
+ #>+ 3
+ cvs-clean:
+ 	$(MAKE) -f $(top_srcdir)/admin/Makefile.common cvs-clean
+--- kfocus-1.0.2.orig/doc/en/index.xml
++++ kfocus-1.0.2/doc/en/index.xml
+@@ -0,0 +1,751 @@
++<?xml version="1.0" ?><!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.1-Based Variant V1.0//EN" "dtd/kdex.dtd" [
++  <!ENTITY kappname "&kfocus;" > <!-- replace kfocus here -->
++  <!ENTITY kfocus "<application>KFocus</application>">
++  <!ENTITY httpsite "http://kfocus.sourceforge.net">
++  <!ENTITY ftpsite "http://sourceforge.net/projects/kfocus">
++  <!ENTITY % addindex "IGNORE">
++  <!ENTITY % English "INCLUDE" > <!-- change language only here -->
++  
++  <!ENTITY pngpath ".">
++  
++  <!-- Do not define any other entities; instead, use the entities
++       from kde-genent.entities and $LANG/user.entities. -->
++]>
++<!-- kdoctemplate v0.8 October 1 1999 
++     Minor update to "Credits and Licenses" section on August 24, 2000
++     Removed "Revision history" section on 22 January 2001   -->
++
++<!--
++This template was designed by: David Rugge davidrugge at mindspring.com
++with lots of help from: Eric Bischoff ebisch at cybercable.tm.fr
++and Frederik Fouvry fouvry at sfs.nphil.uni-tuebingen.de
++of the KDE DocBook team.
++
++You may freely use this template for writing any sort of KDE documentation.
++If you have any changes or improvements, please let us know.
++
++In the future, we may want to change from SGML-based DocBook to XML-based
++DocBook. To make this change easier, please be careful :
++- in XML, the case of the <tags> and attributes is relevant ;
++- also, quote all attributes.
++
++Please don't forget to remove all these comments in your final documentation,
++thanks ;-).
++-->
++
++<!-- ................................................................ -->
++
++<!-- The language must NOT be changed here. -->
++
++<book lang="&language;">
++
++<!-- This header contains all of the meta-information for the document such
++as Authors, publish date, the abstract, and Keywords -->
++
++<bookinfo>
++<title>The &kappname; Handbook</title>
++
++<authorgroup>
++<author>
++<firstname>Jeffrey</firstname>
++<othername>W.</othername>
++<surname>Yu</surname>
++<affiliation>
++<address><email>wehjin at users sourceforge.net</email></address>
++</affiliation>
++</author>
++</authorgroup>
++
++
++<copyright>
++<year>2001</year>
++<holder>Jeffrey W. Yu</holder>
++</copyright>
++<!-- Translators: put here the copyright notice of the translation -->
++<!-- Put here the FDL notice.  Read the explanation in fdl-notice.docbook 
++     and in the FDL itself on how to use it. -->
++<legalnotice>&FDLNotice;</legalnotice>
++
++<!-- Date and version information of the documentation
++Don't forget to include this last date and this last revision number, we
++need them for translation coordination !
++Please respect the format of the date (DD/MM/YYYY) and of the version
++(V.MM.LL), it could be used by automation scripts.
++Do NOT change these in the translation. -->
++
++<date>10/13/2001</date>
++<releaseinfo>1.00.01</releaseinfo>
++
++<!-- Abstract about this handbook -->
++
++<abstract>
++	<para> This manual explains how to use &kfocus;, a project-management
++		application for the KDE desktop environment. </para>
++		
++	<para> Visit the &kappname;	<ulink url="http://kfocus.sourceforge.net">homepage</ulink>
++		for more information about the &kappname; project. </para>
++	
++	</abstract>
++
++<!-- This is a set of Keywords for indexing by search engines.
++Please at least include KDE, the KDE package it is in, the name
++ of your application, and a few relevant keywords. -->
++
++<keywordset>
++<keyword>KDE</keyword>
++<keyword>kdeutils</keyword>
++<keyword>KFocus</keyword>
++<keyword>project</keyword>
++<keyword>tasklist</keyword>
++<keyword>todolist</keyword>
++<keyword>logbook</keyword>
++<keyword>task</keyword>
++<keyword>log</keyword>
++<keyword>todo</keyword>
++<keyword>management</keyword>
++</keywordset>
++
++</bookinfo>
++
++<!-- The contents of the documentation begin here.  Label
++each chapter so with the id attribute. This is necessary for two reasons: it
++allows you to easily reference the chapter from other chapters of your
++document, and if there is no ID, the name of the generated HTML files will vary
++from time to time making it hard to manage for maintainers and for the CVS
++system. Any chapter labelled (OPTIONAL) may be left out at the author's
++discretion. Other chapters should not be left out in order to maintain a
++consistent documentation style across all KDE apps. -->
++
++<chapter id="introduction">
++<title>Introduction</title>
++
++<!-- The introduction chapter contains a brief introduction for the
++application that explains what it does and where to report
++problems. Basically a long version of the abstract.  Don't include a
++revision history. (see installation appendix comment) -->
++
++<para>
++	<screenshot>
++		<screeninfo>Here's a screenshot of &kfocus;</screeninfo>
++		<mediaobject>
++	  	<imageobject>
++	   		<imagedata fileref="&pngpath;/about.png" format="PNG"/>
++	  		</imageobject>
++	  	<textobject>
++	   		<phrase>Screenshot</phrase>
++	  		</textobject>
++			</mediaobject>
++		</screenshot>
++	</para>
++	
++<para> &kfocus; helps you manage your time. Use it to keep track of all your personal projects.
++	</para>
++
++<para> Please report <ulink url="http://sourceforge.net/tracker/?group_id=34358&amp;atid=411376">problems</ulink>
++	or <ulink url="http://sourceforge.net/tracker/?atid=411379&amp;group_id=34358&amp;func=browse">feature
++	requests</ulink> to the &kappname; <ulink url="http://sourceforge.net/projects/kfocus/">development site</ulink>.
++	</para>
++
++</chapter>
++
++<chapter id="using-kfocus">
++<title>Using &kappname;</title>
++
++<!-- This chapter should tell the user how to use your app. You should use as
++many sections (Chapter, Sect1, Sect3, etc...) as is necessary to fully document
++your application. -->
++
++<para>
++
++<!-- Note that all graphics should be in .png format. Use no gifs because of
++patent issues. -->
++
++	<screenshot>
++		<screeninfo>Here's a screenshot of &kfocus;</screeninfo>
++		<mediaobject>
++	  	<imageobject>
++	   		<imagedata fileref="&pngpath;/screenshot.png" format="PNG"/>
++	  		</imageobject>
++	  	<textobject>
++	   		<phrase>Screenshot</phrase>
++	  		</textobject>
++			</mediaobject>
++		</screenshot>
++	</para>
++
++<para> &kfocus; is a project-management program for KDE.  To begin using it,
++    	create a new project in the project-list.  Every project you create has a	
++    	tasklist and a logbook. The tasklist serves as a project-planning
++    	tool.  Add new tasks to the tasklist as you think of them.  The
++			logbook, on the other hand, serves as a project history.  When you complete
++			a task, make a log for it in the logbook.  At the end of the project, you
++			will have a complete record of the project.
++	</para>
++
++<sect1 id="managing-projects">
++ 	<title>Project Management</title>
++ 	
++	<screenshot>
++		<screeninfo>Here's a screenshot of &kfocus;</screeninfo>
++		<mediaobject>
++	  	<imageobject>
++	   		<imagedata fileref="&pngpath;/newproject.png" format="PNG"/>
++	  		</imageobject>
++	  	<textobject>
++	   		<phrase>Screenshot</phrase>
++	  		</textobject>
++			</mediaobject>
++		</screenshot>	
++ 	
++ 	<para>Create a project by clicking <command>New</command> in the
++		<emphasis>Project</emphasis> panel.  A dialog will appear asking for
++		the name of the project.  Click <command>Ok</command> to place the new
++		project into the project-list.
++		</para>
++		 	
++	<para>To remove a project, select the project in the project-list and click
++		on <command>Delete</command> in the <emphasis>Project</emphasis> 		
++		panel.
++		</para>
++
++	<para>Clicking <command>Change</command> in the project-information panel
++		lets you change the name of an existing project.
++		</para>
++		  	 	 	 	 	
++</sect1> <sect1 id="managing-tasks">
++ 	<title>Task Management</title>
++ 	
++	<screenshot>
++		<screeninfo>Here's a screenshot of &kfocus;</screeninfo>
++		<mediaobject>
++	  	<imageobject>
++	   		<imagedata fileref="&pngpath;/tasklist.png" format="PNG"/>
++	  		</imageobject>
++	  	<textobject>
++	   		<phrase>Screenshot</phrase>
++	  		</textobject>
++			</mediaobject>
++		</screenshot>	
++ 	 	
++ 	<para>Once you create a project, you are ready to add tasks to your project.
++		First, make the tasklist visible by clicking on <command>Tasks</command>
++		in the project information panel.  Click on <command>Add</command> below the
++		tasklist to add a task to your project.  The <emphasis>Task
++		Information</emphasis> panel to the far right of the tasklist lets you
++		change the task title and comments.  You can also change the position of
++		your task using the arrows to the immediate right of the tasklist.
++		</para>
++		
++	<sect2 id="task-dates">
++		<title>Start and End Dates</title>
++		
++		<para>Every task has a start date.  By default, this is set to the day
++			the task is created.  For some tasks, you will want to set the start date
++			to a day in the future. </para>
++			
++		<para>When the start date for a task is in the past or is the same as the
++			current date, the task is considered <emphasis>active</emphasis>.  When the
++			start date for a task is in the future, the task is <emphasis>pending
++			</emphasis>.  In the tasklist, <emphasis> pending </emphasis> tasks are
++			marked with brackets in the <emphasis>ETA</emphasis> column and they
++			always appear below <emphasis> active </emphasis> tasks. </para>
++
++		<para>Tasks can optionally have an end date.  In the tasklist, <emphasis>
++			active </emphasis> tasks with an end date appear above <emphasis> active
++			</emphasis> tasks with no end date. Likewise for <emphasis>	pending
++			</emphasis> tasks.  The <emphasis> ETA </emphasis> column shows the number
++			of days from the current day to	the end date of tasks in the tasklist.
++			When an ETA becomes negative, it means the end date for the task has
++			passed. </para>
++
++		</sect2>
++ 	
++ 	<sect2 id="completing-tasks">
++		<title>Completing Tasks</title>
++		<screenshot>
++			<screeninfo>Here's a screenshot</screeninfo>
++			<mediaobject>
++  			<imageobject>
++   				<imagedata fileref="&pngpath;/completetask.png" format="PNG"/>
++  				</imageobject>
++	  		<textobject>
++   				<phrase>Screenshot</phrase>
++  				</textobject>
++				</mediaobject>
++			</screenshot>
++		
++		<para>When you are done with a task, click <command>Complete</command> below
++			the	tasklist. The <emphasis>Complete Task</emphasis> dialog will appear.
++			To complete the task and remove it from the tasklist, click <command>
++			Continue</command> at the bottom of the dialog.  If you change your
++			mind about completing the task, click <command>Cancel</command> 			
++			instead. </para>
++			 		
++		<para>The optional section at the lower left corner of the dialog lets you 			
++			generate a log when you click <command>Continue</command>. Click the checkbox
++			next to it to enter the log information.
++			</para>
++			
++		<para>The right side of the dialog is a second optional section; use it
++			to schedule a followup task. Click the checkbox at the top to enter 			
++			information for the followup task.
++			</para>
++
++		</sect2>
++	</sect1>
++	
++<sect1 id="managing-logs">
++	<title>Log Management</title>
++	<screenshot>
++		<screeninfo>Here's a screenshot of &kfocus;</screeninfo>
++		<mediaobject>
++			<imageobject>
++				<imagedata fileref="&pngpath;/loglist.png" format="PNG"/>
++				</imageobject>
++	 		<textobject>
++				<phrase>Screenshot</phrase>
++				</textobject>
++			</mediaobject>
++		</screenshot>
++	
++	<para>Logs are records of your past activities.  Typically, you
++		create a log when you finish a task.  However, you can also create a
++		log independently of any task.  Creating a log for each completed task
++		in a project gives you an easy way to review the history of the project.
++		</para>
++		
++	<para>To view your logs, click on <command> Logs </command> in your project
++		information panel.  This makes your logbook visible. </para>
++		
++	<sect2 id="adding-logs">
++		<title>Adding Logs</title>
++		
++		<para>Click on <command> New </command> at the bottom of your logbook. Pick
++			a date for the	log in the dialog that pops up.  A new log will appear
++			in your	logbook. </para>
++			
++		</sect2>
++		
++	<sect2 id="deleting-logs">
++		<title>Deleting Logs</title>
++		
++		<para>Select a log from your logbook.	Click <command> Delete </command> at the
++			bottom of your logbook.  The selected log will disappear from the logbook. </para>
++			
++		</sect2>
++		
++	<sect2 id="editing-logs">
++		<title>Editing Logs</title>
++		
++		<para>Select a log from your logbook.  The log information in the logbook
++			will change to reflect the log you selected.  Edit the body of the log as
++			needed. </para>
++			
++		</sect2>
++		
++	</sect1>
++
++<!--
++<sect1 id="kfocus-features">
++<title>More &kappname; features</title>
++
++<para>It slices! It dices! and it comes with a free toaster!</para>
++<para>
++The Squiggle Tool <guiicon><inlinemediaobject>
++	  <imageobject>
++	    <imagedata fileref="squiggle.png" format="PNG"/>
++	  </imageobject>
++	  <imageobject>
++	    <imagedata fileref="squiggle.eps" format="EPS"/>
++	  </imageobject>
++	  <textobject>
++	    <phrase>Squiggle</phrase>
++	  </textobject>
++</inlinemediaobject></guiicon> is used to draw squiggly lines all over
++the &kfocus; main window. It's not a bug, it's a feature!
++</para>
++
++</sect1>
++-->
++
++</chapter>
++
++<chapter id="commands">
++<title>Command Reference</title>
++
++<!-- (OPTIONAL, BUT RECOMMENDED) This chapter should list all of the
++application windows and their menubar and toolbar commands for easy reference.
++Also include any keys that have a special function but have no equivalent in the
++menus or toolbars. This may not be necessary for small apps or apps with no tool
++or menu bars. -->
++
++<sect1 id="kfocus-mainwindow">
++<title>The main &kappname; window</title>
++<para></para>
++
++<sect2>
++<title>The File Menu</title>
++<para>
++<variablelist>
++<varlistentry>
++<term><menuchoice>
++<shortcut>
++<keycombo><keycap>Ctrl</keycap><keycap>n</keycap></keycombo>
++</shortcut>
++<guimenu>File</guimenu>
++<guimenuitem>New</guimenuitem>
++</menuchoice></term>
++<listitem><para><action>Creates a new document</action></para></listitem>
++</varlistentry>
++<varlistentry>
++<term><menuchoice>
++<shortcut>
++<keycombo><keycap>Ctrl</keycap><keycap>s</keycap></keycombo>
++</shortcut>
++<guimenu>File</guimenu>
++<guimenuitem>Save</guimenuitem>
++</menuchoice></term>
++<listitem><para><action>Saves the document</action></para></listitem>
++</varlistentry>
++<varlistentry>
++<term><menuchoice>
++<shortcut>
++<keycombo><keycap>Ctrl</keycap><keycap>q</keycap></keycombo>
++</shortcut>
++<guimenu>File</guimenu>
++<guimenuitem>Quit</guimenuitem>
++</menuchoice></term>
++<listitem><para><action>Quits</action> &kfocus;</para></listitem>
++</varlistentry>
++</variablelist>
++</para>
++
++</sect2>
++
++</sect1>
++</chapter>
++
++
++<chapter id="developers">
++<title>Developer's Guide to &kappname;</title>
++
++<!-- (OPTIONAL) A Programming/Scripting reference chapter should be
++used for apps that use plugins or that provide their own scripting hooks
++and/or development libraries. -->
++<para>
++Programming &kfocus; plugins is a joy to behold. Just read through the next
++66 pages of API's to learn how!
++</para>
++<!-- Use refentries to describe APIs.  Refentries are fairly complicated and you
++should consult the docbook reference for further details. The example below was
++taken from that reference and shortened a bit for readability. -->
++<!--
++<refentry id="re-1007-unmanagechildren-1">
++<refmeta>
++<refentrytitle>XtUnmanageChildren</refentrytitle>
++<refmiscinfo>Xt - Geometry Management</refmiscinfo>
++</refmeta>
++<refnamediv>
++<refname>XtUnmanageChildren
++</refname>
++<refpurpose>remove a list of children from a parent widget's managed list.
++</refpurpose>
++<indexterm id="ix-1007-unmanagechildren-1"><primary>widgets</primary><secondary>removing</secondary></indexterm>
++<indexterm id="ix-1007-unmanagechildren-2"><primary>XtUnmanageChildren</primary></indexterm>
++</refnamediv>
++<refsynopsisdiv>
++<refsynopsisdivinfo>
++<date>4 March 1996</date>
++</refsynopsisdivinfo>
++<synopsis>
++void XtUnmanageChildren(<replaceable parameter>children</replaceable>, <replaceable parameter>num_children</replaceable>)
++    WidgetList <replaceable parameter>children</replaceable>;
++    Cardinal <replaceable parameter>num_children</replaceable>;
++</synopsis>
++
++<refsect2 id="r2-1007-unmanagechildren-1">
++<title>Inputs</title>
++<variablelist>
++<varlistentry>
++<term><replaceable parameter>children</replaceable>
++</term>
++<listitem>
++<para>Specifies an array of child widgets. Each child must be of
++class RectObj or any subclass thereof.
++</para>
++</listitem>
++</varlistentry>
++<varlistentry>
++<term><replaceable parameter>num_children</replaceable>
++</term>
++<listitem>
++<para>Specifies the number of elements in <replaceable parameter>children</replaceable>.
++</para>
++</listitem>
++</varlistentry>
++</variablelist>
++</refsect2></refsynopsisdiv>
++
++<refsect1 id="r1-1007-unmanagechildren-1">
++<title>Description
++</title>
++<para><function>XtUnmanageChildren()</function> unmaps the specified widgets
++and removes them from their parent's geometry management.
++The widgets will disappear from the screen, and (depending
++on its parent) may no longer have screen space allocated for
++them.
++</para>
++<para>Each of the widgets in the <replaceable parameter>children</replaceable> array must have
++the same parent.
++</para>
++<para>See the &ldquo;Algorithm&rdquo; section below for full details of the
++widget unmanagement procedure.
++</para>
++</refsect1>
++
++<refsect1 id="r1-1007-unmanagechildren-2">
++<title>Usage</title>
++<para>Unmanaging widgets is the usual method for temporarily
++making them invisible.  They can be re-managed with
++<function>XtManageChildren()</function>.
++</para>
++<para>You can unmap a widget, but leave it under geometry
++management by calling <function>XtUnmapWidget()</function>.  You can
++destroy a widget's window without destroying the widget by
++calling <function>XtUnrealizeWidget()</function>.  You can destroy a
++widget completely with <function>XtDestroyWidget()</function>.
++</para>
++<para>If you are only going to unmanage a single widget, it is
++more convenient to call <function>XtUnmanageChild()</function>.  It is
++often more convenient to call <function>XtUnmanageChild()</function>
++several times than it is to declare and initialize an array
++of widgets to pass to <function>XtUnmanageChildren()</function>.  Calling
++<function>XtUnmanageChildren()</function> is more efficient, however,
++because it only calls the parent's <function>change_managed()</function>
++method once.
++</para>
++</refsect1>
++
++<refsect1 id="r1-1007-unmanagechildren-3">
++<title>Algorithm
++</title>
++<para><function>XtUnmanageChildren()</function> performs the following:
++</para>
++<variablelist>
++<varlistentry>
++<term>-
++</term>
++<listitem>
++<para>Ignores the child if it already is unmanaged or is being
++destroyed.
++</para>
++</listitem>
++</varlistentry>
++<varlistentry>
++<term>-
++</term>
++<listitem>
++<para>Otherwise, if the child is realized, it makes it nonvisible
++by unmapping it.
++</para>
++</listitem>
++</varlistentry>
++</variablelist>
++<para>
++</para>
++</refsect1>
++
++<refsect1 id="r1-1007-unmanagechildren-4">
++<title>Structures</title>
++<para>The <type>WidgetList</type> type is simply an array of widgets:
++</para>
++<screen id="sc-1007-unmanagechildren-1">typedef Widget *WidgetList;
++</screen>
++</refsect1>
++</refentry>
++-->
++</chapter>
++
++<chapter id="faq">
++<title>Questions and Answers</title>
++
++<!-- (OPTIONAL but recommended) This chapter should include all of the silly
++(and not-so-silly) newbie questions that fill up your mailbox. This chapter
++should be reserved for BRIEF questions and answers! If one question uses more
++than a page or so then it should probably be part of the
++"Using this Application" chapter instead. You should use links to
++cross-reference questions to the parts of your documentation that answer them.
++This is also a great place to provide pointers to other FAQ's if your users
++must do some complicated configuration on other programs in order for your
++application work. -->
++
++&reporting.bugs;
++&updating.documentation;
++
++<para></para>
++<!--
++<qandaset id="faqlist">
++<qandaentry>
++<question>
++<para>My Mouse doesn't work. How do I quit &kfocus;?</para>
++</question>
++<answer>
++<para>You silly goose! Check out the <link linkend="commands">Commands
++Section</link> for the answer.</para>
++</answer>
++</qandaentry>
++<qandaentry>
++<question>
++<para>Why can't I twiddle my documents?</para>
++</question>
++<answer>
++<para>You can only twiddle your documents if you have the foobar.lib
++installed.</para>
++</answer>
++</qandaentry>
++</qandaset>
++-->
++</chapter>
++
++<chapter id="credits">
++
++<!-- Include credits for the programmers, documentation writers, and
++contributors here. The license for your software should then be included below
++the credits with a reference to the appropriate license file included in the KDE
++distribution. -->
++
++	<title>Credits and License</title>
++	<para>
++		&kfocus;
++		</para>
++	<para>
++		Program copyright 2001 Jeffrey W. Yu <email>wehjin at users.sourceforge.net</email>
++		</para>
++
++	<para>
++		Contributors:
++		<itemizedlist>
++			<listitem><para>Steven Hatfield</para>
++				</listitem>
++			<listitem><para>A.J. Bonnema<email>abonnema at users.sourceforge.net</email></para>
++				</listitem>
++			<listitem><para>Roman</para>
++				</listitem>
++			<!--
++			<listitem><para>Tux the Linux Penguin <email>tux at linux.org</email></para>
++				</listitem>
++			-->
++			</itemizedlist>
++		</para>
++
++	<para>
++		Documentation copyright 2001 Jeffrey W. Yu <email>wehjin at yahoo.com</email>
++		</para>
++	<!--
++	<para>
++		Translations done by:
++		<itemizedlist>
++			<listitem>
++				<para>Babel D. Fish <email>babelfish at kde.org</email> (Sanskrit)</para>
++				</listitem>
++			</itemizedlist>
++		</para>
++		-->
++	
++	&underFDL;               <!-- FDL: do not remove -->
++
++	<!-- Determine which license your application is licensed under,
++  	   and delete all the remaining licenses below:
++
++    	 (NOTE:  All documentation are licensed under the FDL,
++     		regardless of what license the application uses) -->
++
++	&underGPL;        	 <!-- GPL License -->
++	<!-- &underBSDLicense; -->        <!-- BSD License -->
++	<!-- &underArtisticLicense; -->  <!-- BSD Artistic License -->
++	<!-- &underX11License; -->       <!-- X11 License  -->
++
++</chapter>
++
++<appendix id="installation">
++	<title>Installation</title>
++	<sect1 id="getting-kfocus">
++		<title>How to obtain &kappname;</title>
++		<para>
++			&kfocus; is based on the <ulink url="http://www.kde.org">KDE</ulink>
++			project and is hosted at <ulink url="&ftpsite;">SourceForge</ulink>,
++			the main development site for the &kfocus; project.
++			</para>
++		</sect1>
++
++	<sect1 id="requirements">
++		<title>Requirements</title>
++
++	<!--
++	List any special requirements for your application here. This should include:
++	.Libraries or other software that is not included in kdesupport,
++	kdelibs, or kdebase.
++	.Hardware requirements like amount of RAM, disk space, graphics card
++	capabilities, screen resolution, special expansion cards, etc.
++	.Operating systems the app will run on. If your app is designed only for a
++	specific OS, (you wrote a graphical LILO configurator for example) put this
++	information here.
++	-->
++
++		<para>
++			In order to successfully use &kfocus;, you need KDE 2.1.
++			<!--
++			Foobar.lib is required in order to support the advanced &kfocus;
++			features. &kfocus; uses about 5 megs of	memory to run, but this may
++			vary depending on your platform and	configuration.
++				-->
++			</para>
++		<!--
++		<para>
++			All required libraries as well as &kfocus; itself can be found
++			on <ulink url="ftp://ftp.kfocus.org">The &kfocus; home page</ulink>.
++			</para>
++			-->
++		
++		<!-- For a list of updates, you may refer to the application web site
++			or the ChangeLog file, or ... -->
++		<!--
++		<para>
++			You can find a list of changes at <ulink
++				url="http://apps.kde.org/kfocus">http://apps.kde.org/kfocus</ulink>.
++				</para>
++			-->
++		</sect1>
++	<sect1 id="compilation">
++		<title>Compilation and installation</title>
++		<para>
++			In order to compile and install &kappname; on your system, type the following in the base
++			directory of the &kappname; distribution:
++			<screen width="40">
++				<prompt>%</prompt> <userinput>./configure</userinput>
++				<prompt>%</prompt> <userinput>make</userinput>
++				<prompt>%</prompt> <userinput>make install</userinput>
++				</screen>
++			</para>
++		<para>Since &kappname; uses autoconf and automake you should have not trouble compiling it.
++			Should you run into problems please report them to the &kappname; mailing lists.</para>
++		</sect1>
++	<!--
++	<sect1 id="configuration">
++		<title>Configuration</title>
++		<para>Don't forget to tell your system to start the <filename>dtd</filename>
++			dicer-toaster daemon first, or KApp won't work !</para>
++		</sect1>
++		-->
++</appendix>
++
++&documentation.index;
++</book>
++<!--
++Local Variables:
++mode: sgml
++sgml-minimize-attributes: nil
++sgml-general-insert-case: lower
++End:
++-->
++
+--- kfocus-1.0.2.orig/doc/Makefile.in
++++ kfocus-1.0.2/doc/Makefile.in
+@@ -1,7 +1,8 @@
+-# KDE tags expanded automatically by am_edit - $Revision: 1.1.1.1 $ 
+-# Makefile.in generated automatically by automake 1.4 from Makefile.am
++# KDE tags expanded automatically by am_edit - $Revision: 1.4 $ 
++# Makefile.in generated automatically by automake 1.5 from Makefile.am.
+ 
+-# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
++# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
++# Free Software Foundation, Inc.
+ # This Makefile.in is free software; the Free Software Foundation
+ # gives unlimited permission to copy and/or distribute it,
+ # with or without modifications, as long as this notice is preserved.
+@@ -11,8 +12,9 @@
+ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ # PARTICULAR PURPOSE.
+ 
+-####### kdevelop will overwrite this part!!! (begin)##########
++ at SET_MAKE@
+ 
++####### kdevelop will overwrite this part!!! (begin)##########
+ 
+ SHELL = @SHELL@
+ 
+@@ -21,10 +23,6 @@
+ VPATH = @srcdir@
+ prefix = @prefix@
+ exec_prefix = @exec_prefix@
+-#>- 
+-bindir = @bindir@
+-#>+ 3
+-DEPDIR = .deps
+ 
+ bindir = @bindir@
+ sbindir = @sbindir@
+@@ -38,13 +36,9 @@
+ mandir = @mandir@
+ includedir = @includedir@
+ oldincludedir = /usr/include
+-
+-DESTDIR =
+-
+ pkgdatadir = $(datadir)/@PACKAGE@
+ pkglibdir = $(libdir)/@PACKAGE@
+ pkgincludedir = $(includedir)/@PACKAGE@
+-
+ top_builddir = ..
+ 
+ ACLOCAL = @ACLOCAL@
+@@ -53,11 +47,11 @@
+ AUTOHEADER = @AUTOHEADER@
+ 
+ INSTALL = @INSTALL@
+-INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
++INSTALL_PROGRAM = @INSTALL_PROGRAM@
+ INSTALL_DATA = @INSTALL_DATA@
+ INSTALL_SCRIPT = @INSTALL_SCRIPT@
++INSTALL_HEADER = $(INSTALL_DATA)
+ transform = @program_transform_name@
+-
+ NORMAL_INSTALL = :
+ PRE_INSTALL = :
+ POST_INSTALL = :
+@@ -70,9 +64,11 @@
+ host_triplet = @host@
+ target_alias = @target_alias@
+ target_triplet = @target@
++AMTAR = @AMTAR@
+ ARTSCCONFIG = @ARTSCCONFIG@
+ AS = @AS@
+ AUTODIRS = @AUTODIRS@
++AWK = @AWK@
+ CC = @CC@
+ CONF_FILES = @CONF_FILES@
+ CPP = @CPP@
+@@ -81,6 +77,7 @@
+ DCOPIDL = @DCOPIDL@
+ DCOPIDL2CPP = @DCOPIDL2CPP@
+ DCOP_DEPENDENCIES = @DCOP_DEPENDENCIES@
++DEPDIR = @DEPDIR@
+ DLLTOOL = @DLLTOOL@
+ DPMSINC = @DPMSINC@
+ DPMSLIB = @DPMSLIB@
+@@ -92,21 +89,31 @@
+ GMSGFMT = @GMSGFMT@
+ IDL = @IDL@
+ IDL_DEPENDENCIES = @IDL_DEPENDENCIES@
+-KDB2HTML = @KDB2HTML@
++INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
++JAR = @JAR@
++JAVAC = @JAVAC@
++JAVAH = @JAVAH@
++JVMLIBS = @JVMLIBS@
+ KDECONFIG = @KDECONFIG@
+ KDE_CXXFLAGS = @KDE_CXXFLAGS@
+ KDE_EXTRA_RPATH = @KDE_EXTRA_RPATH@
+ KDE_INCLUDES = @KDE_INCLUDES@
+ KDE_LDFLAGS = @KDE_LDFLAGS@
++KDE_MT_LDFLAGS = @KDE_MT_LDFLAGS@
++KDE_MT_LIBS = @KDE_MT_LIBS@
+ KDE_PLUGIN = @KDE_PLUGIN@
+ KDE_RPATH = @KDE_RPATH@
+ KDE_USE_CLOSURE_FALSE = @KDE_USE_CLOSURE_FALSE@
+ KDE_USE_CLOSURE_TRUE = @KDE_USE_CLOSURE_TRUE@
+ KDE_USE_FINAL_FALSE = @KDE_USE_FINAL_FALSE@
+ KDE_USE_FINAL_TRUE = @KDE_USE_FINAL_TRUE@
++KDE_XSL_STYLESHEET = @KDE_XSL_STYLESHEET@
++LEX = @LEX@
++LEXLIB = @LEXLIB@
+ LIBCOMPAT = @LIBCOMPAT@
+ LIBCRYPT = @LIBCRYPT@
+ LIBDL = @LIBDL@
++LIBGEN = @LIBGEN@
+ LIBJPEG = @LIBJPEG@
+ LIBMICO = @LIBMICO@
+ LIBOBJS = @LIBOBJS@
+@@ -114,59 +121,70 @@
+ LIBPTHREAD = @LIBPTHREAD@
+ LIBPYTHON = @LIBPYTHON@
+ LIBQIMGIO = @LIBQIMGIO@
++LIBRESOLV = @LIBRESOLV@
++LIBSHADOW = @LIBSHADOW@
+ LIBSM = @LIBSM@
+ LIBSOCKET = @LIBSOCKET@
+ LIBTIFF = @LIBTIFF@
+ LIBTOOL = @LIBTOOL@
+ LIBUCB = @LIBUCB@
++LIBUTIL = @LIBUTIL@
++LIBXINERAMA = @LIBXINERAMA@
+ LIBZ = @LIBZ@
+ LIB_KAB = @LIB_KAB@
+ LIB_KDECORE = @LIB_KDECORE@
++LIB_KDEPRINT = @LIB_KDEPRINT@
+ LIB_KDEUI = @LIB_KDEUI@
+ LIB_KFILE = @LIB_KFILE@
+ LIB_KFM = @LIB_KFM@
+-LIB_KFORMULA = @LIB_KFORMULA@
+ LIB_KHTML = @LIB_KHTML@
+ LIB_KIMGIO = @LIB_KIMGIO@
+ LIB_KIO = @LIB_KIO@
+ LIB_KPARTS = @LIB_KPARTS@
+ LIB_KSPELL = @LIB_KSPELL@
+ LIB_KSYCOCA = @LIB_KSYCOCA@
+-LIB_KWRITE = @LIB_KWRITE@
++LIB_QPE = @LIB_QPE@
+ LIB_QT = @LIB_QT@
++LIB_QTOPIA = @LIB_QTOPIA@
+ LIB_SMB = @LIB_SMB@
+ LIB_X11 = @LIB_X11@
++LIB_XEXT = @LIB_XEXT@
+ LN_S = @LN_S@
+-MAKEINFO = @MAKEINFO@
+ MCOPIDL = @MCOPIDL@
++MEINPROC = @MEINPROC@
+ MICO_INCLUDES = @MICO_INCLUDES@
+ MICO_LDFLAGS = @MICO_LDFLAGS@
+ MOC = @MOC@
+ MSGFMT = @MSGFMT@
++NOOPT_CFLAGS = @NOOPT_CFLAGS@
+ NOOPT_CXXFLAGS = @NOOPT_CXXFLAGS@
+ NOREPO = @NOREPO@
+ OBJDUMP = @OBJDUMP@
+ OBJEXT = @OBJEXT@
+ PACKAGE = @PACKAGE@
+-PAMINC = @PAMINC@
+-PAMLIBPATHS = @PAMLIBPATHS@
+ PAMLIBS = @PAMLIBS@
++PASSWDLIBS = @PASSWDLIBS@
+ PYTHONINC = @PYTHONINC@
+ PYTHONLIB = @PYTHONLIB@
+ PYTHONMODDIR = @PYTHONMODDIR@
++QTE_NORTTI = @QTE_NORTTI@
++QTOPIA_INCLUDES = @QTOPIA_INCLUDES@
+ QT_INCLUDES = @QT_INCLUDES@
+ QT_LDFLAGS = @QT_LDFLAGS@
+ RANLIB = @RANLIB@
+ REPO = @REPO@
++SETUIDFLAGS = @SETUIDFLAGS@
+ STRIP = @STRIP@
+ TOPSUBDIRS = @TOPSUBDIRS@
+ UIC = @UIC@
++UIC_TR = @UIC_TR@
+ USER_INCLUDES = @USER_INCLUDES@
+ USER_LDFLAGS = @USER_LDFLAGS@
+ USE_EXCEPTIONS = @USE_EXCEPTIONS@
+ USE_RTTI = @USE_RTTI@
+ USE_THREADS = @USE_THREADS@
+ VERSION = @VERSION@
++WOVERLOADED_VIRTUAL = @WOVERLOADED_VIRTUAL@
+ XGETTEXT = @XGETTEXT@
+ XPMINC = @XPMINC@
+ XPMLIB = @XPMLIB@
+@@ -176,7 +194,11 @@
+ X_PRE_LIBS = @X_PRE_LIBS@
+ all_includes = @all_includes@
+ all_libraries = @all_libraries@
++am__include = @am__include@
++am__quote = @am__quote@
+ idldir = @idldir@
++install_sh = @install_sh@
++jni_includes = @jni_includes@
+ kde_appsdir = @kde_appsdir@
+ kde_bindir = @kde_bindir@
+ kde_confdir = @kde_confdir@
+@@ -190,11 +212,14 @@
+ kde_locale = @kde_locale@
+ kde_mimedir = @kde_mimedir@
+ kde_moduledir = @kde_moduledir@
++kde_qtver = @kde_qtver@
+ kde_servicesdir = @kde_servicesdir@
+ kde_servicetypesdir = @kde_servicetypesdir@
+ kde_sounddir = @kde_sounddir@
++kde_styledir = @kde_styledir@
+ kde_templatesdir = @kde_templatesdir@
+ kde_wallpaperdir = @kde_wallpaperdir@
++kde_widgetdir = @kde_widgetdir@
+ micodir = @micodir@
+ qt_includes = @qt_includes@
+ qt_libraries = @qt_libraries@
+@@ -202,30 +227,44 @@
+ x_libraries = @x_libraries@
+ 
+ SUBDIRS = en 
++subdir = ./doc
+ mkinstalldirs = $(SHELL) $(top_srcdir)/admin/mkinstalldirs
+-CONFIG_HEADER = ../config.h
+-CONFIG_CLEAN_FILES = 
+-DIST_COMMON =  Makefile.am Makefile.in
+-
+-
+-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+-
+-TAR = gtar
+-GZIP_ENV = --best
+-#>- all: all-redirect
++CONFIG_HEADER = $(top_builddir)/config.h
++CONFIG_CLEAN_FILES =
++DIST_SOURCES =
++
++RECURSIVE_TARGETS = info-recursive dvi-recursive install-info-recursive \
++	uninstall-info-recursive all-recursive install-data-recursive \
++	install-exec-recursive installdirs-recursive install-recursive \
++	uninstall-recursive check-recursive installcheck-recursive
++DIST_COMMON = Makefile.am Makefile.in
++DIST_SUBDIRS = $(SUBDIRS)
++#>- all: all-recursive
+ #>+ 1
+-all: docs-am  all-redirect
++all: docs-am  all-recursive
++
+ .SUFFIXES:
+-$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
+-#>- 	cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps doc/Makefile
+-#>+ 2
+-	cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps doc/Makefile
+-	cd $(top_srcdir) && perl admin/am_edit doc/Makefile.in
+ 
+-Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
+-	cd $(top_builddir) \
+-	  && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
++mostlyclean-libtool:
++	-rm -f *.lo
+ 
++clean-libtool:
++	-rm -rf .libs _libs
++
++distclean-libtool:
++	-rm -f libtool
++$(srcdir)/Makefile.in:  Makefile.am  $(top_srcdir)/configure.in $(ACLOCAL_M4)
++#>- 	cd $(top_srcdir) && \
++#>- $(AUTOMAKE) --gnu  ./doc/Makefile
++#>+ 3
++	cd $(top_srcdir) && \
++	$(AUTOMAKE) --gnu  ./doc/Makefile
++	cd $(top_srcdir) && perl admin/am_edit doc/Makefile.in
++Makefile:  $(srcdir)/Makefile.in  $(top_builddir)/config.status
++	cd $(top_builddir) && \
++	CONFIG_HEADERS= CONFIG_LINKS= \
++	CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
++uninstall-info-am:
+ 
+ # This directory's subdirectories are mostly independent; you can cd
+ # into them and run `make' without going through this Makefile.
+@@ -233,199 +272,213 @@
+ # (1) if the variable is set in `config.status', edit `config.status'
+ #     (which will cause the Makefiles to be regenerated when you run `make');
+ # (2) otherwise, pass the desired values on the `make' command line.
+-
+- at SET_MAKE@
+-
+-all-recursive install-data-recursive install-exec-recursive \
+-installdirs-recursive install-recursive uninstall-recursive  \
+-check-recursive installcheck-recursive info-recursive dvi-recursive:
++$(RECURSIVE_TARGETS):
+ 	@set fnord $(MAKEFLAGS); amf=$$2; \
+ 	dot_seen=no; \
+ 	target=`echo $@ | sed s/-recursive//`; \
+ 	list='$(SUBDIRS)'; for subdir in $$list; do \
+-	  echo "Making $$target in $$subdir"; \
+-	  if test "$$subdir" = "."; then \
+-	    dot_seen=yes; \
+-	    local_target="$$target-am"; \
+-	  else \
+-	    local_target="$$target"; \
+-	  fi; \
+-	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+-	   || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
++	echo "Making $$target in $$subdir"; \
++	if test "$$subdir" = "."; then \
++	dot_seen=yes; \
++	local_target="$$target-am"; \
++	else \
++	local_target="$$target"; \
++	fi; \
++	(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
++	|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+ 	done; \
+ 	if test "$$dot_seen" = "no"; then \
+-	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
++	$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ 	fi; test -z "$$fail"
+ 
+ mostlyclean-recursive clean-recursive distclean-recursive \
+-maintainer-clean-recursive:
++	maintainer-clean-recursive:
+ 	@set fnord $(MAKEFLAGS); amf=$$2; \
+ 	dot_seen=no; \
+-	rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
+-	  rev="$$subdir $$rev"; \
+-	  test "$$subdir" = "." && dot_seen=yes; \
++	case "$@" in \
++	distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
++	*) list='$(SUBDIRS)' ;; \
++	esac; \
++	rev=''; for subdir in $$list; do \
++	if test "$$subdir" = "."; then :; else \
++	rev="$$subdir $$rev"; \
++	fi; \
+ 	done; \
+-	test "$$dot_seen" = "no" && rev=". $$rev"; \
++	rev="$$rev ."; \
+ 	target=`echo $@ | sed s/-recursive//`; \
+ 	for subdir in $$rev; do \
+-	  echo "Making $$target in $$subdir"; \
+-	  if test "$$subdir" = "."; then \
+-	    local_target="$$target-am"; \
+-	  else \
+-	    local_target="$$target"; \
+-	  fi; \
+-	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+-	   || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
++	echo "Making $$target in $$subdir"; \
++	if test "$$subdir" = "."; then \
++	local_target="$$target-am"; \
++	else \
++	local_target="$$target"; \
++	fi; \
++	(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
++	|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+ 	done && test -z "$$fail"
+ tags-recursive:
+ 	list='$(SUBDIRS)'; for subdir in $$list; do \
+-	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
++	test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+ 	done
+ 
+ tags: TAGS
+ 
+-ID: $(HEADERS) $(SOURCES) $(LISP)
+-	list='$(SOURCES) $(HEADERS)'; \
+-	unique=`for i in $$list; do echo $$i; done | \
+-	  awk '    { files[$$0] = 1; } \
+-	       END { for (i in files) print i; }'`; \
+-	here=`pwd` && cd $(srcdir) \
+-	  && mkid -f$$here/ID $$unique $(LISP)
++ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
++	list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
++	unique=`for i in $$list; do \
++	if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
++	done | \
++	$(AWK) '    { files[$$0] = 1; } \
++	END { for (i in files) print i; }'`; \
++	mkid -fID $$unique $(LISP)
+ 
+-TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) $(LISP)
++TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
++	$(TAGS_FILES) $(LISP)
+ 	tags=; \
+ 	here=`pwd`; \
+ 	list='$(SUBDIRS)'; for subdir in $$list; do \
+-   if test "$$subdir" = .; then :; else \
+-	    test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
+-   fi; \
++	if test "$$subdir" = .; then :; else \
++	test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
++	fi; \
+ 	done; \
+-	list='$(SOURCES) $(HEADERS)'; \
+-	unique=`for i in $$list; do echo $$i; done | \
+-	  awk '    { files[$$0] = 1; } \
+-	       END { for (i in files) print i; }'`; \
++	list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
++	unique=`for i in $$list; do \
++	if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
++	done | \
++	$(AWK) '    { files[$$0] = 1; } \
++	END { for (i in files) print i; }'`; \
+ 	test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
+-	  || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags  $$unique $(LISP) -o $$here/TAGS)
+-
+-mostlyclean-tags:
++	|| etags $(ETAGS_ARGS) $$tags  $$unique $(LISP)
+ 
+-clean-tags:
++GTAGS:
++	here=`CDPATH=: && cd $(top_builddir) && pwd` \
++	&& cd $(top_srcdir) \
++	&& gtags -i $(GTAGS_ARGS) $$here
+ 
+ distclean-tags:
+-	-rm -f TAGS ID
++	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
+ 
+-maintainer-clean-tags:
++DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ 
+-distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+-
+-subdir = doc
++top_distdir = ..
++distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
+ 
+ distdir: $(DISTFILES)
+-#>- 	@for file in $(DISTFILES); do \
+-#>- 	  d=$(srcdir); \
+-#>- 	  if test -d $$d/$$file; then \
+-#>- 	    cp -pr $$/$$file $(distdir)/$$file; \
+-#>- 	  else \
+-#>- 	    test -f $(distdir)/$$file \
+-#>- 	    || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+-#>- 	    || cp -p $$d/$$file $(distdir)/$$file || :; \
+-#>- 	  fi; \
+-#>- 	done
+-#>+ 10
+ 	@for file in $(DISTFILES); do \
+-	  d=$(srcdir); \
+-	  if test -d $$d/$$file; then \
+-	    cp -pr $$d/$$file $(distdir)/$$file; \
+-	  else \
+-	    test -f $(distdir)/$$file \
+-	    || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+-	    || cp -p $$d/$$file $(distdir)/$$file || :; \
+-	  fi; \
++	if test -f $$file; then d=.; else d=$(srcdir); fi; \
++	dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
++	if test "$$dir" != "$$file" && test "$$dir" != "."; then \
++	$(mkinstalldirs) "$(distdir)/$$dir"; \
++	fi; \
++	if test -d $$d/$$file; then \
++	cp -pR $$d/$$file $(distdir) \
++	|| exit 1; \
++	else \
++	test -f $(distdir)/$$file \
++	|| cp -p $$d/$$file $(distdir)/$$file \
++	|| exit 1; \
++	fi; \
+ 	done
+ 	for subdir in $(SUBDIRS); do \
+-	  if test "$$subdir" = .; then :; else \
+-	    test -d $(distdir)/$$subdir \
+-	    || mkdir $(distdir)/$$subdir \
+-	    || exit 1; \
+-	    chmod 777 $(distdir)/$$subdir; \
+-	    (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(top_distdir) distdir=../$(distdir)/$$subdir distdir) \
+-	      || exit 1; \
+-	  fi; \
++	if test "$$subdir" = .; then :; else \
++	test -d $(distdir)/$$subdir \
++	|| mkdir $(distdir)/$$subdir \
++	|| exit 1; \
++	(cd $$subdir && \
++	$(MAKE) $(AM_MAKEFLAGS) \
++	top_distdir="$(top_distdir)" \
++	distdir=../$(distdir)/$$subdir \
++	distdir) \
++	|| exit 1; \
++	fi; \
+ 	done
+-info-am:
+-info: info-recursive
+-dvi-am:
+-dvi: dvi-recursive
+ check-am: all-am
+ check: check-recursive
+-installcheck-am:
+-installcheck: installcheck-recursive
+-install-exec-am:
+-install-exec: install-exec-recursive
++all-am: Makefile
++installdirs: installdirs-recursive
++installdirs-am:
+ 
+-install-data-am:
++install: install-recursive
++install-exec: install-exec-recursive
+ install-data: install-data-recursive
++uninstall: uninstall-recursive
+ 
+ install-am: all-am
+ 	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+-install: install-recursive
+-uninstall-am:
+-uninstall: uninstall-recursive
+-all-am: Makefile
+-all-redirect: all-recursive
+-install-strip:
+-	$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+-installdirs: installdirs-recursive
+-installdirs-am:
+-
+ 
++installcheck: installcheck-recursive
++install-strip:
++	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
++	`test -z '$(STRIP)' || \
++	echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+ mostlyclean-generic:
+ 
+ clean-generic:
+ 
+ distclean-generic:
+-	-rm -f Makefile $(CONFIG_CLEAN_FILES)
+-	-rm -f config.cache config.log stamp-h stamp-h[0-9]*
++	-rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
+ 
+ maintainer-clean-generic:
+-mostlyclean-am:  mostlyclean-tags mostlyclean-generic
+-
+-mostlyclean: mostlyclean-recursive
+-
+-clean-am:  clean-tags clean-generic mostlyclean-am
+-
++	@echo "This command is intended for maintainers to use"
++	@echo "it deletes files that may require special tools to rebuild."
+ #>- clean: clean-recursive
+ #>+ 1
+ clean: kde-rpo-clean  clean-recursive
+ 
+-distclean-am:  distclean-tags distclean-generic clean-am
+-	-rm -f libtool
++clean-am: clean-generic clean-libtool mostlyclean-am
+ 
+ distclean: distclean-recursive
+ 
+-maintainer-clean-am:  maintainer-clean-tags maintainer-clean-generic \
+-		distclean-am
+-	@echo "This command is intended for maintainers to use;"
+-	@echo "it deletes files that may require special tools to rebuild."
++distclean-am: clean-am distclean-generic distclean-libtool \
++	distclean-tags
++
++dvi: dvi-recursive
++
++dvi-am:
++
++info: info-recursive
++
++info-am:
++
++install-data-am:
++
++install-exec-am:
++
++install-info: install-info-recursive
++
++install-man:
++
++installcheck-am:
+ 
+ maintainer-clean: maintainer-clean-recursive
+ 
+-.PHONY: install-data-recursive uninstall-data-recursive \
+-install-exec-recursive uninstall-exec-recursive installdirs-recursive \
+-uninstalldirs-recursive all-recursive check-recursive \
+-installcheck-recursive info-recursive dvi-recursive \
+-mostlyclean-recursive distclean-recursive clean-recursive \
+-maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
+-distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
+-dvi-am dvi check check-am installcheck-am installcheck install-exec-am \
+-install-exec install-data-am install-data install-am install \
+-uninstall-am uninstall all-redirect all-am all installdirs-am \
+-installdirs mostlyclean-generic distclean-generic clean-generic \
+-maintainer-clean-generic clean mostlyclean distclean maintainer-clean
++maintainer-clean-am: distclean-am maintainer-clean-generic
+ 
++mostlyclean: mostlyclean-recursive
+ 
+-####### kdevelop will overwrite this part!!! (end)############
++mostlyclean-am: mostlyclean-generic mostlyclean-libtool
++
++uninstall-am: uninstall-info-am
++
++uninstall-info: uninstall-info-recursive
+ 
++.PHONY: $(RECURSIVE_TARGETS) GTAGS all all-am check check-am clean \
++	clean-generic clean-libtool clean-recursive distclean \
++	distclean-generic distclean-libtool distclean-recursive \
++	distclean-tags distdir dvi dvi-am dvi-recursive info info-am \
++	info-recursive install install-am install-data install-data-am \
++	install-data-recursive install-exec install-exec-am \
++	install-exec-recursive install-info install-info-am \
++	install-info-recursive install-man install-recursive \
++	install-strip installcheck installcheck-am installdirs \
++	installdirs-am installdirs-recursive maintainer-clean \
++	maintainer-clean-generic maintainer-clean-recursive mostlyclean \
++	mostlyclean-generic mostlyclean-libtool mostlyclean-recursive \
++	tags tags-recursive uninstall uninstall-am uninstall-info-am \
++	uninstall-info-recursive uninstall-recursive
++
++
++####### kdevelop will overwrite this part!!! (end)############
+ # Tell versions [3.59,3.63) of GNU make to not export all variables.
+ # Otherwise a system limit (for SysV at least) may be exceeded.
+ .NOEXPORT:
+@@ -433,9 +486,10 @@
+ #>+ 2
+ docs-am:
+ 
+-#>+ 5
++#>+ 6
+ force-reedit:
+-		cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps doc/Makefile
++		cd $(top_srcdir) && \
++	$(AUTOMAKE) --gnu  ./doc/Makefile
+ 	cd $(top_srcdir) && perl admin/am_edit doc/Makefile.in
+ 
+ 
+@@ -443,8 +497,14 @@
+ final:
+ 	$(MAKE) all-am
+ #>+ 2
++final-install:
++	$(MAKE) install-am
++#>+ 2
+ no-final:
+ 	$(MAKE) all-am
++#>+ 2
++no-final-install:
++	$(MAKE) install-am
+ #>+ 3
+ cvs-clean:
+ 	$(MAKE) -f $(top_srcdir)/admin/Makefile.common cvs-clean
+--- kfocus-1.0.2.orig/configure.in
++++ kfocus-1.0.2/configure.in
+@@ -1,3 +1,21 @@
++dnl    This file is part of the KDE libraries/packages
++dnl    Copyright (C) 2001 Stephan Kulow (coolo at 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 at kde.org
+ # I lifted it in some mater. (Stephan Kulow)
+ # I used much code from Janos Farkas
+@@ -9,11 +27,16 @@
+ 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(kfocus, 1.0.2) dnl searches for some needed programs
++AM_INIT_AUTOMAKE(kfocus, 1.1.0) dnl searches for some needed programs
+ 
+ KDE_SET_PREFIX
+ 
+@@ -30,11 +53,8 @@
+ dnl WITH_NLS is for the po files
+ AM_KDE_WITH_NLS
+ 
++dnl KDE_USE_QT
+ AC_PATH_KDE
+-
+-dnl Perform program name transformation
+-AC_ARG_PROGRAM
+-
+ #MIN_CONFIG
+ 
+ dnl PACKAGE set before
+@@ -42,8 +62,8 @@
+ KDE_CREATE_SUBDIRSLIST
+ AC_OUTPUT( \
+ ./Makefile \
+-doc/Makefile \
+-doc/en/Makefile \
+-kfocus/Makefile \
+-po/Makefile \
++./doc/Makefile \
++./doc/en/Makefile \
++./kfocus/Makefile \
++./po/Makefile \
+ )
+--- kfocus-1.0.2.orig/Makefile.in
++++ kfocus-1.0.2/Makefile.in
+@@ -1,7 +1,8 @@
+-# KDE tags expanded automatically by am_edit - $Revision: 1.1.1.1 $ 
+-# Makefile.in generated automatically by automake 1.4 from Makefile.am
++# KDE tags expanded automatically by am_edit - $Revision: 1.4 $ 
++# Makefile.in generated automatically by automake 1.5 from Makefile.am.
+ 
+-# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
++# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
++# Free Software Foundation, Inc.
+ # This Makefile.in is free software; the Free Software Foundation
+ # gives unlimited permission to copy and/or distribute it,
+ # with or without modifications, as long as this notice is preserved.
+@@ -11,8 +12,9 @@
+ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ # PARTICULAR PURPOSE.
+ 
+-####### kdevelop will overwrite this part!!! (begin)##########
++ at SET_MAKE@
+ 
++####### kdevelop will overwrite this part!!! (begin)##########
+ 
+ SHELL = @SHELL@
+ 
+@@ -21,10 +23,6 @@
+ VPATH = @srcdir@
+ prefix = @prefix@
+ exec_prefix = @exec_prefix@
+-#>- 
+-bindir = @bindir@
+-#>+ 3
+-DEPDIR = .deps
+ 
+ bindir = @bindir@
+ sbindir = @sbindir@
+@@ -38,13 +36,9 @@
+ mandir = @mandir@
+ includedir = @includedir@
+ oldincludedir = /usr/include
+-
+-DESTDIR =
+-
+ pkgdatadir = $(datadir)/@PACKAGE@
+ pkglibdir = $(libdir)/@PACKAGE@
+ pkgincludedir = $(includedir)/@PACKAGE@
+-
+ top_builddir = .
+ 
+ ACLOCAL = @ACLOCAL@
+@@ -53,11 +47,11 @@
+ AUTOHEADER = @AUTOHEADER@
+ 
+ INSTALL = @INSTALL@
+-INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
++INSTALL_PROGRAM = @INSTALL_PROGRAM@
+ INSTALL_DATA = @INSTALL_DATA@
+ INSTALL_SCRIPT = @INSTALL_SCRIPT@
++INSTALL_HEADER = $(INSTALL_DATA)
+ transform = @program_transform_name@
+-
+ NORMAL_INSTALL = :
+ PRE_INSTALL = :
+ POST_INSTALL = :
+@@ -70,9 +64,11 @@
+ host_triplet = @host@
+ target_alias = @target_alias@
+ target_triplet = @target@
++AMTAR = @AMTAR@
+ ARTSCCONFIG = @ARTSCCONFIG@
+ AS = @AS@
+ AUTODIRS = @AUTODIRS@
++AWK = @AWK@
+ CC = @CC@
+ CONF_FILES = @CONF_FILES@
+ CPP = @CPP@
+@@ -81,6 +77,7 @@
+ DCOPIDL = @DCOPIDL@
+ DCOPIDL2CPP = @DCOPIDL2CPP@
+ DCOP_DEPENDENCIES = @DCOP_DEPENDENCIES@
++DEPDIR = @DEPDIR@
+ DLLTOOL = @DLLTOOL@
+ DPMSINC = @DPMSINC@
+ DPMSLIB = @DPMSLIB@
+@@ -92,21 +89,31 @@
+ GMSGFMT = @GMSGFMT@
+ IDL = @IDL@
+ IDL_DEPENDENCIES = @IDL_DEPENDENCIES@
+-KDB2HTML = @KDB2HTML@
++INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
++JAR = @JAR@
++JAVAC = @JAVAC@
++JAVAH = @JAVAH@
++JVMLIBS = @JVMLIBS@
+ KDECONFIG = @KDECONFIG@
+ KDE_CXXFLAGS = @KDE_CXXFLAGS@
+ KDE_EXTRA_RPATH = @KDE_EXTRA_RPATH@
+ KDE_INCLUDES = @KDE_INCLUDES@
+ KDE_LDFLAGS = @KDE_LDFLAGS@
++KDE_MT_LDFLAGS = @KDE_MT_LDFLAGS@
++KDE_MT_LIBS = @KDE_MT_LIBS@
+ KDE_PLUGIN = @KDE_PLUGIN@
+ KDE_RPATH = @KDE_RPATH@
+ KDE_USE_CLOSURE_FALSE = @KDE_USE_CLOSURE_FALSE@
+ KDE_USE_CLOSURE_TRUE = @KDE_USE_CLOSURE_TRUE@
+ KDE_USE_FINAL_FALSE = @KDE_USE_FINAL_FALSE@
+ KDE_USE_FINAL_TRUE = @KDE_USE_FINAL_TRUE@
++KDE_XSL_STYLESHEET = @KDE_XSL_STYLESHEET@
++LEX = @LEX@
++LEXLIB = @LEXLIB@
+ LIBCOMPAT = @LIBCOMPAT@
+ LIBCRYPT = @LIBCRYPT@
+ LIBDL = @LIBDL@
++LIBGEN = @LIBGEN@
+ LIBJPEG = @LIBJPEG@
+ LIBMICO = @LIBMICO@
+ LIBOBJS = @LIBOBJS@
+@@ -114,59 +121,70 @@
+ LIBPTHREAD = @LIBPTHREAD@
+ LIBPYTHON = @LIBPYTHON@
+ LIBQIMGIO = @LIBQIMGIO@
++LIBRESOLV = @LIBRESOLV@
++LIBSHADOW = @LIBSHADOW@
+ LIBSM = @LIBSM@
+ LIBSOCKET = @LIBSOCKET@
+ LIBTIFF = @LIBTIFF@
+ LIBTOOL = @LIBTOOL@
+ LIBUCB = @LIBUCB@
++LIBUTIL = @LIBUTIL@
++LIBXINERAMA = @LIBXINERAMA@
+ LIBZ = @LIBZ@
+ LIB_KAB = @LIB_KAB@
+ LIB_KDECORE = @LIB_KDECORE@
++LIB_KDEPRINT = @LIB_KDEPRINT@
+ LIB_KDEUI = @LIB_KDEUI@
+ LIB_KFILE = @LIB_KFILE@
+ LIB_KFM = @LIB_KFM@
+-LIB_KFORMULA = @LIB_KFORMULA@
+ LIB_KHTML = @LIB_KHTML@
+ LIB_KIMGIO = @LIB_KIMGIO@
+ LIB_KIO = @LIB_KIO@
+ LIB_KPARTS = @LIB_KPARTS@
+ LIB_KSPELL = @LIB_KSPELL@
+ LIB_KSYCOCA = @LIB_KSYCOCA@
+-LIB_KWRITE = @LIB_KWRITE@
++LIB_QPE = @LIB_QPE@
+ LIB_QT = @LIB_QT@
++LIB_QTOPIA = @LIB_QTOPIA@
+ LIB_SMB = @LIB_SMB@
+ LIB_X11 = @LIB_X11@
++LIB_XEXT = @LIB_XEXT@
+ LN_S = @LN_S@
+-MAKEINFO = @MAKEINFO@
+ MCOPIDL = @MCOPIDL@
++MEINPROC = @MEINPROC@
+ MICO_INCLUDES = @MICO_INCLUDES@
+ MICO_LDFLAGS = @MICO_LDFLAGS@
+ MOC = @MOC@
+ MSGFMT = @MSGFMT@
++NOOPT_CFLAGS = @NOOPT_CFLAGS@
+ NOOPT_CXXFLAGS = @NOOPT_CXXFLAGS@
+ NOREPO = @NOREPO@
+ OBJDUMP = @OBJDUMP@
+ OBJEXT = @OBJEXT@
+ PACKAGE = @PACKAGE@
+-PAMINC = @PAMINC@
+-PAMLIBPATHS = @PAMLIBPATHS@
+ PAMLIBS = @PAMLIBS@
++PASSWDLIBS = @PASSWDLIBS@
+ PYTHONINC = @PYTHONINC@
+ PYTHONLIB = @PYTHONLIB@
+ PYTHONMODDIR = @PYTHONMODDIR@
++QTE_NORTTI = @QTE_NORTTI@
++QTOPIA_INCLUDES = @QTOPIA_INCLUDES@
+ QT_INCLUDES = @QT_INCLUDES@
+ QT_LDFLAGS = @QT_LDFLAGS@
+ RANLIB = @RANLIB@
+ REPO = @REPO@
++SETUIDFLAGS = @SETUIDFLAGS@
+ STRIP = @STRIP@
+ TOPSUBDIRS = @TOPSUBDIRS@
+ UIC = @UIC@
++UIC_TR = @UIC_TR@
+ USER_INCLUDES = @USER_INCLUDES@
+ USER_LDFLAGS = @USER_LDFLAGS@
+ USE_EXCEPTIONS = @USE_EXCEPTIONS@
+ USE_RTTI = @USE_RTTI@
+ USE_THREADS = @USE_THREADS@
+ VERSION = @VERSION@
++WOVERLOADED_VIRTUAL = @WOVERLOADED_VIRTUAL@
+ XGETTEXT = @XGETTEXT@
+ XPMINC = @XPMINC@
+ XPMLIB = @XPMLIB@
+@@ -176,7 +194,11 @@
+ X_PRE_LIBS = @X_PRE_LIBS@
+ all_includes = @all_includes@
+ all_libraries = @all_libraries@
++am__include = @am__include@
++am__quote = @am__quote@
+ idldir = @idldir@
++install_sh = @install_sh@
++jni_includes = @jni_includes@
+ kde_appsdir = @kde_appsdir@
+ kde_bindir = @kde_bindir@
+ kde_confdir = @kde_confdir@
+@@ -190,11 +212,14 @@
+ kde_locale = @kde_locale@
+ kde_mimedir = @kde_mimedir@
+ kde_moduledir = @kde_moduledir@
++kde_qtver = @kde_qtver@
+ kde_servicesdir = @kde_servicesdir@
+ kde_servicetypesdir = @kde_servicetypesdir@
+ kde_sounddir = @kde_sounddir@
++kde_styledir = @kde_styledir@
+ kde_templatesdir = @kde_templatesdir@
+ kde_wallpaperdir = @kde_wallpaperdir@
++kde_widgetdir = @kde_widgetdir@
+ micodir = @micodir@
+ qt_includes = @qt_includes@
+ qt_libraries = @qt_libraries@
+@@ -203,7 +228,7 @@
+ 
+ SUBDIRS = kfocus po doc 
+ 
+-EXTRA_DIST = admin 
++EXTRA_DIST = kfocus.kdevprj AUTHORS COPYING ChangeLog INSTALL README TODO kfocus.lsm 
+ 
+ ####### kdevelop will overwrite this part!!! (end)############
+ # not a GNU package. You can remove this line, if 
+@@ -211,73 +236,85 @@
+ AUTOMAKE_OPTIONS = foreign 
+ 
+ MAINTAINERCLEANFILES = subdirs configure.in acinclude.m4 configure.files 
++subdir = .
+ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+ mkinstalldirs = $(SHELL) $(top_srcdir)/admin/mkinstalldirs
+ CONFIG_HEADER = config.h
+-CONFIG_CLEAN_FILES = 
+-DIST_COMMON =  README ./stamp-h.in AUTHORS COPYING ChangeLog INSTALL \
+-Makefile.am Makefile.in TODO acinclude.m4 aclocal.m4 config.h.in \
+-configure configure.in
++CONFIG_CLEAN_FILES =
++DIST_SOURCES =
+ 
++RECURSIVE_TARGETS = info-recursive dvi-recursive install-info-recursive \
++	uninstall-info-recursive all-recursive install-data-recursive \
++	install-exec-recursive installdirs-recursive install-recursive \
++	uninstall-recursive check-recursive installcheck-recursive
++DIST_COMMON = README ./stamp-h.in AUTHORS COPYING ChangeLog INSTALL \
++	Makefile.am Makefile.in TODO acinclude.m4 aclocal.m4 \
++	admin/config.guess admin/config.sub admin/depcomp \
++	admin/install-sh admin/ltcf-c.sh admin/ltcf-cxx.sh \
++	admin/ltcf-gcj.sh admin/ltconfig admin/ltmain.sh admin/missing \
++	admin/mkinstalldirs admin/ylwrap config.h.in configure \
++	configure.in
++DIST_SUBDIRS = $(SUBDIRS)
++#>- all: config.h
++#>+ 1
++all: docs-am  config.h
++	$(MAKE) $(AM_MAKEFLAGS) all-recursive
+ 
+-#>- DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+-#>+ 4
+-KDE_DIST=Makefile.dist configure.in.in kfocus.kdevprj kfocus.lsm 
++.SUFFIXES:
+ 
+-DISTFILES= $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) $(KDE_DIST)
++mostlyclean-libtool:
++	-rm -f *.lo
+ 
++clean-libtool:
++	-rm -rf .libs _libs
+ 
+-TAR = gtar
+-GZIP_ENV = --best
+-#>- all: all-redirect
+-#>+ 1
+-all: docs-am  all-redirect
+-.SUFFIXES:
+-$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
+-#>- 	cd $(top_srcdir) && $(AUTOMAKE) --foreign --include-deps ./Makefile
+-#>+ 2
+-	cd $(top_srcdir) && $(AUTOMAKE) --foreign --include-deps ./Makefile
++distclean-libtool:
++	-rm -f libtool
++$(srcdir)/Makefile.in:  Makefile.am  $(top_srcdir)/configure.in $(ACLOCAL_M4)
++#>- 	cd $(top_srcdir) && \
++#>- $(AUTOMAKE) --foreign  ./Makefile
++#>+ 3
++	cd $(top_srcdir) && \
++	$(AUTOMAKE) --foreign  ./Makefile
+ 	cd $(top_srcdir) && perl admin/am_edit Makefile.in
++Makefile:  $(srcdir)/Makefile.in  $(top_builddir)/config.status
++	cd $(top_builddir) && \
++	CONFIG_HEADERS= CONFIG_LINKS= \
++	CONFIG_FILES=$@ $(SHELL) ./config.status
+ 
+-Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
+-	cd $(top_builddir) \
+-	  && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
+-
+-$(ACLOCAL_M4):  configure.in  acinclude.m4
+-	cd $(srcdir) && $(ACLOCAL)
+-
+-config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
++$(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ 	$(SHELL) ./config.status --recheck
+-$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
++$(srcdir)/configure:  $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
+ 	cd $(srcdir) && $(AUTOCONF)
+ 
++$(ACLOCAL_M4):  configure.in acinclude.m4
++	cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+ config.h: stamp-h
+ 	@if test ! -f $@; then \
+-		rm -f stamp-h; \
+-		$(MAKE) stamp-h; \
++	rm -f stamp-h; \
++	$(MAKE) stamp-h; \
+ 	else :; fi
+ stamp-h: $(srcdir)/config.h.in $(top_builddir)/config.status
++	@rm -f stamp-h stamp-hT
++	@echo timestamp > stamp-hT 2> /dev/null
+ 	cd $(top_builddir) \
+-	  && CONFIG_FILES= CONFIG_HEADERS=config.h \
+-	     $(SHELL) ./config.status
+-	@echo timestamp > stamp-h 2> /dev/null
+-$(srcdir)/config.h.in: $(srcdir)/stamp-h.in
++	&& CONFIG_FILES= CONFIG_HEADERS=config.h \
++	$(SHELL) ./config.status
++	@mv stamp-hT stamp-h
++$(srcdir)/config.h.in:  $(srcdir)/./stamp-h.in
+ 	@if test ! -f $@; then \
+-		rm -f $(srcdir)/stamp-h.in; \
+-		$(MAKE) $(srcdir)/stamp-h.in; \
++	rm -f $(srcdir)/./stamp-h.in; \
++	$(MAKE) $(srcdir)/./stamp-h.in; \
+ 	else :; fi
+-$(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) 
++$(srcdir)/./stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) 
++	@rm -f $(srcdir)/./stamp-h.in $(srcdir)/./stamp-h.inT
++	@echo timestamp > $(srcdir)/./stamp-h.inT 2> /dev/null
+ 	cd $(top_srcdir) && $(AUTOHEADER)
+-	@echo timestamp > $(srcdir)/stamp-h.in 2> /dev/null
+-
+-mostlyclean-hdr:
+-
+-clean-hdr:
++	@mv $(srcdir)/./stamp-h.inT $(srcdir)/./stamp-h.in
+ 
+ distclean-hdr:
+ 	-rm -f config.h
+-
+-maintainer-clean-hdr:
++uninstall-info-am:
+ 
+ # This directory's subdirectories are mostly independent; you can cd
+ # into them and run `make' without going through this Makefile.
+@@ -285,235 +322,269 @@
+ # (1) if the variable is set in `config.status', edit `config.status'
+ #     (which will cause the Makefiles to be regenerated when you run `make');
+ # (2) otherwise, pass the desired values on the `make' command line.
+-
+- at SET_MAKE@
+-
+-all-recursive install-data-recursive install-exec-recursive \
+-installdirs-recursive install-recursive uninstall-recursive  \
+-check-recursive installcheck-recursive info-recursive dvi-recursive:
++$(RECURSIVE_TARGETS):
+ 	@set fnord $(MAKEFLAGS); amf=$$2; \
+ 	dot_seen=no; \
+ 	target=`echo $@ | sed s/-recursive//`; \
+ 	list='$(SUBDIRS)'; for subdir in $$list; do \
+-	  echo "Making $$target in $$subdir"; \
+-	  if test "$$subdir" = "."; then \
+-	    dot_seen=yes; \
+-	    local_target="$$target-am"; \
+-	  else \
+-	    local_target="$$target"; \
+-	  fi; \
+-	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+-	   || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
++	echo "Making $$target in $$subdir"; \
++	if test "$$subdir" = "."; then \
++	dot_seen=yes; \
++	local_target="$$target-am"; \
++	else \
++	local_target="$$target"; \
++	fi; \
++	(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
++	|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+ 	done; \
+ 	if test "$$dot_seen" = "no"; then \
+-	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
++	$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ 	fi; test -z "$$fail"
+ 
+ mostlyclean-recursive clean-recursive distclean-recursive \
+-maintainer-clean-recursive:
++	maintainer-clean-recursive:
+ 	@set fnord $(MAKEFLAGS); amf=$$2; \
+ 	dot_seen=no; \
+-	rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
+-	  rev="$$subdir $$rev"; \
+-	  test "$$subdir" = "." && dot_seen=yes; \
++	case "$@" in \
++	distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
++	*) list='$(SUBDIRS)' ;; \
++	esac; \
++	rev=''; for subdir in $$list; do \
++	if test "$$subdir" = "."; then :; else \
++	rev="$$subdir $$rev"; \
++	fi; \
+ 	done; \
+-	test "$$dot_seen" = "no" && rev=". $$rev"; \
++	rev="$$rev ."; \
+ 	target=`echo $@ | sed s/-recursive//`; \
+ 	for subdir in $$rev; do \
+-	  echo "Making $$target in $$subdir"; \
+-	  if test "$$subdir" = "."; then \
+-	    local_target="$$target-am"; \
+-	  else \
+-	    local_target="$$target"; \
+-	  fi; \
+-	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+-	   || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
++	echo "Making $$target in $$subdir"; \
++	if test "$$subdir" = "."; then \
++	local_target="$$target-am"; \
++	else \
++	local_target="$$target"; \
++	fi; \
++	(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
++	|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+ 	done && test -z "$$fail"
+ tags-recursive:
+ 	list='$(SUBDIRS)'; for subdir in $$list; do \
+-	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
++	test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+ 	done
+ 
+ tags: TAGS
+ 
+-ID: $(HEADERS) $(SOURCES) $(LISP)
+-	list='$(SOURCES) $(HEADERS)'; \
+-	unique=`for i in $$list; do echo $$i; done | \
+-	  awk '    { files[$$0] = 1; } \
+-	       END { for (i in files) print i; }'`; \
+-	here=`pwd` && cd $(srcdir) \
+-	  && mkid -f$$here/ID $$unique $(LISP)
++ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
++	list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
++	unique=`for i in $$list; do \
++	if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
++	done | \
++	$(AWK) '    { files[$$0] = 1; } \
++	END { for (i in files) print i; }'`; \
++	mkid -fID $$unique $(LISP)
+ 
+-TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) $(LISP)
++TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
++	$(TAGS_FILES) $(LISP)
+ 	tags=; \
+ 	here=`pwd`; \
+ 	list='$(SUBDIRS)'; for subdir in $$list; do \
+-   if test "$$subdir" = .; then :; else \
+-	    test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
+-   fi; \
++	if test "$$subdir" = .; then :; else \
++	test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
++	fi; \
+ 	done; \
+-	list='$(SOURCES) $(HEADERS)'; \
+-	unique=`for i in $$list; do echo $$i; done | \
+-	  awk '    { files[$$0] = 1; } \
+-	       END { for (i in files) print i; }'`; \
++	list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
++	unique=`for i in $$list; do \
++	if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
++	done | \
++	$(AWK) '    { files[$$0] = 1; } \
++	END { for (i in files) print i; }'`; \
+ 	test -z "$(ETAGS_ARGS)config.h.in$$unique$(LISP)$$tags" \
+-	  || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags config.h.in $$unique $(LISP) -o $$here/TAGS)
+-
+-mostlyclean-tags:
++	|| etags $(ETAGS_ARGS) $$tags config.h.in $$unique $(LISP)
+ 
+-clean-tags:
++GTAGS:
++	here=`CDPATH=: && cd $(top_builddir) && pwd` \
++	&& cd $(top_srcdir) \
++	&& gtags -i $(GTAGS_ARGS) $$here
+ 
+ distclean-tags:
+-	-rm -f TAGS ID
++	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
++
++#>- DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
++#>+ 4
++KDE_DIST=subdirs configure.files Makefile.dist configure.in.in 
+ 
+-maintainer-clean-tags:
++DISTFILES= $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) $(KDE_DIST)
+ 
++
++top_distdir = .
++# Avoid unsightly `./'.
+ distdir = $(PACKAGE)-$(VERSION)
+-top_distdir = $(distdir)
+ 
+-# This target untars the dist file and tries a VPATH configuration.  Then
+-# it guarantees that the distribution is self-contained by making another
+-# tarfile.
+-distcheck: dist
+-	-rm -rf $(distdir)
+-	GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
+-	mkdir $(distdir)/=build
+-	mkdir $(distdir)/=inst
+-	dc_install_base=`cd $(distdir)/=inst && pwd`; \
+-	cd $(distdir)/=build \
+-	  && ../configure --srcdir=.. --prefix=$$dc_install_base \
+-	  && $(MAKE) $(AM_MAKEFLAGS) \
+-	  && $(MAKE) $(AM_MAKEFLAGS) dvi \
+-	  && $(MAKE) $(AM_MAKEFLAGS) check \
+-	  && $(MAKE) $(AM_MAKEFLAGS) install \
+-	  && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+-	  && $(MAKE) $(AM_MAKEFLAGS) dist
+-	-rm -rf $(distdir)
+-	@banner="$(distdir).tar.gz is ready for distribution"; \
+-	dashes=`echo "$$banner" | sed s/./=/g`; \
+-	echo "$$dashes"; \
+-	echo "$$banner"; \
+-	echo "$$dashes"
+-dist: distdir
+-	-chmod -R a+r $(distdir)
+-	GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
+-	-rm -rf $(distdir)
+-dist-all: distdir
+-	-chmod -R a+r $(distdir)
+-	GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
+-	-rm -rf $(distdir)
++GZIP_ENV = --best
++
+ distdir: $(DISTFILES)
+-	-rm -rf $(distdir)
++	-chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
+ 	mkdir $(distdir)
+-	-chmod 777 $(distdir)
+-#>- 	@for file in $(DISTFILES); do \
+-#>- 	  d=$(srcdir); \
+-#>- 	  if test -d $$d/$$file; then \
+-#>- 	    cp -pr $$/$$file $(distdir)/$$file; \
+-#>- 	  else \
+-#>- 	    test -f $(distdir)/$$file \
+-#>- 	    || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+-#>- 	    || cp -p $$d/$$file $(distdir)/$$file || :; \
+-#>- 	  fi; \
+-#>- 	done
+-#>+ 10
++	$(mkinstalldirs) $(distdir)/admin
+ 	@for file in $(DISTFILES); do \
+-	  d=$(srcdir); \
+-	  if test -d $$d/$$file; then \
+-	    cp -pr $$d/$$file $(distdir)/$$file; \
+-	  else \
+-	    test -f $(distdir)/$$file \
+-	    || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+-	    || cp -p $$d/$$file $(distdir)/$$file || :; \
+-	  fi; \
++	if test -f $$file; then d=.; else d=$(srcdir); fi; \
++	dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
++	if test "$$dir" != "$$file" && test "$$dir" != "."; then \
++	$(mkinstalldirs) "$(distdir)/$$dir"; \
++	fi; \
++	if test -d $$d/$$file; then \
++	cp -pR $$d/$$file $(distdir) \
++	|| exit 1; \
++	else \
++	test -f $(distdir)/$$file \
++	|| cp -p $$d/$$file $(distdir)/$$file \
++	|| exit 1; \
++	fi; \
+ 	done
+ 	for subdir in $(SUBDIRS); do \
+-	  if test "$$subdir" = .; then :; else \
+-	    test -d $(distdir)/$$subdir \
+-	    || mkdir $(distdir)/$$subdir \
+-	    || exit 1; \
+-	    chmod 777 $(distdir)/$$subdir; \
+-	    (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \
+-	      || exit 1; \
+-	  fi; \
++	if test "$$subdir" = .; then :; else \
++	test -d $(distdir)/$$subdir \
++	|| mkdir $(distdir)/$$subdir \
++	|| exit 1; \
++	(cd $$subdir && \
++	$(MAKE) $(AM_MAKEFLAGS) \
++	top_distdir="$(top_distdir)" \
++	distdir=../$(distdir)/$$subdir \
++	distdir) \
++	|| exit 1; \
++	fi; \
+ 	done
+-	$(MAKE) $(AM_MAKEFLAGS) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-hook
+-info-am:
+-info: info-recursive
+-dvi-am:
+-dvi: dvi-recursive
++	$(MAKE) $(AM_MAKEFLAGS) \
++	top_distdir="${top_distdir}" distdir="$(distdir)" \
++	dist-hook
++	-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
++	! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
++	! -type d ! -perm -400 -exec chmod a+r {} \; -o \
++	! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
++	|| chmod -R a+r $(distdir)
++dist: distdir
++	$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
++	-chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
++
++# This target untars the dist file and tries a VPATH configuration.  Then
++# it guarantees that the distribution is self-contained by making another
++# tarfile.
++distcheck: dist
++	-chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
++	GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf -
++	chmod -R a-w $(distdir); chmod a+w $(distdir)
++	mkdir $(distdir)/=build
++	mkdir $(distdir)/=inst
++	chmod a-w $(distdir)
++	dc_install_base=`CDPATH=: && cd $(distdir)/=inst && pwd` \
++	&& cd $(distdir)/=build \
++	&& ../configure --srcdir=.. --prefix=$$dc_install_base \
++	&& $(MAKE) $(AM_MAKEFLAGS) \
++	&& $(MAKE) $(AM_MAKEFLAGS) dvi \
++	&& $(MAKE) $(AM_MAKEFLAGS) check \
++	&& $(MAKE) $(AM_MAKEFLAGS) install \
++	&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
++	&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
++	&& (test `find $$dc_install_base -type f -print | wc -l` -le 1 \
++	|| (echo "Error: files left after uninstall" 1>&2; \
++	exit 1) ) \
++	&& $(MAKE) $(AM_MAKEFLAGS) dist \
++	&& $(MAKE) $(AM_MAKEFLAGS) distclean \
++	&& rm -f $(distdir).tar.gz \
++	&& (test `find . -type f -print | wc -l` -eq 0 \
++	|| (echo "Error: files left after distclean" 1>&2; \
++	exit 1) )
++	-chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
++	@echo "$(distdir).tar.gz is ready for distribution" | \
++	sed 'h;s/./=/g;p;x;p;x'
+ check-am: all-am
+ check: check-recursive
+-installcheck-am:
+-installcheck: installcheck-recursive
+-all-recursive-am: config.h
+-	$(MAKE) $(AM_MAKEFLAGS) all-recursive
++all-am: Makefile config.h
++installdirs: installdirs-recursive
++installdirs-am:
+ 
+-install-exec-am:
++install: install-recursive
+ install-exec: install-exec-recursive
+-
+-install-data-am:
+ install-data: install-data-recursive
++uninstall: uninstall-recursive
+ 
+ install-am: all-am
+ 	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+-install: install-recursive
+-uninstall-am:
+-uninstall: uninstall-recursive
+-all-am: Makefile config.h
+-all-redirect: all-recursive-am
+-install-strip:
+-	$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+-installdirs: installdirs-recursive
+-installdirs-am:
+-
+ 
++installcheck: installcheck-recursive
++install-strip:
++	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
++	`test -z '$(STRIP)' || \
++	echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+ mostlyclean-generic:
+ 
+ clean-generic:
+ 
+ distclean-generic:
+-	-rm -f Makefile $(CONFIG_CLEAN_FILES)
+-	-rm -f config.cache config.log stamp-h stamp-h[0-9]*
++	-rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
+ 
+ maintainer-clean-generic:
++	@echo "This command is intended for maintainers to use"
++	@echo "it deletes files that may require special tools to rebuild."
+ 	-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+-mostlyclean-am:  mostlyclean-hdr mostlyclean-tags mostlyclean-generic
+-
+-mostlyclean: mostlyclean-recursive
+-
+-clean-am:  clean-hdr clean-tags clean-generic mostlyclean-am
+-
+ #>- clean: clean-recursive
+ #>+ 1
+ clean: kde-rpo-clean  clean-recursive
+ 
+-distclean-am:  distclean-hdr distclean-tags distclean-generic clean-am
+-	-rm -f libtool
++clean-am: clean-generic clean-libtool mostlyclean-am
+ 
++dist-all: distdir
++	$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
++	-chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
+ distclean: distclean-recursive
+-	-rm -f config.status
++	-rm -f config.status config.cache config.log
++distclean-am: clean-am distclean-generic distclean-hdr distclean-libtool \
++	distclean-tags
+ 
+-maintainer-clean-am:  maintainer-clean-hdr maintainer-clean-tags \
+-		maintainer-clean-generic distclean-am
+-	@echo "This command is intended for maintainers to use;"
+-	@echo "it deletes files that may require special tools to rebuild."
++dvi: dvi-recursive
++
++dvi-am:
++
++info: info-recursive
++
++info-am:
++
++install-data-am:
++
++install-exec-am:
++
++install-info: install-info-recursive
++
++install-man:
++
++installcheck-am:
+ 
+ maintainer-clean: maintainer-clean-recursive
+-	-rm -f config.status
+ 
+-.PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \
+-install-data-recursive uninstall-data-recursive install-exec-recursive \
+-uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \
+-all-recursive check-recursive installcheck-recursive info-recursive \
+-dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \
+-maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
+-distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
+-dvi-am dvi check check-am installcheck-am installcheck all-recursive-am \
+-install-exec-am install-exec install-data-am install-data install-am \
+-install uninstall-am uninstall all-redirect all-am all installdirs-am \
+-installdirs mostlyclean-generic distclean-generic clean-generic \
+-maintainer-clean-generic clean mostlyclean distclean maintainer-clean
++maintainer-clean-am: distclean-am maintainer-clean-generic
++
++mostlyclean: mostlyclean-recursive
++
++mostlyclean-am: mostlyclean-generic mostlyclean-libtool
++
++uninstall-am: uninstall-info-am
++
++uninstall-info: uninstall-info-recursive
++
++.PHONY: $(RECURSIVE_TARGETS) GTAGS all all-am check check-am clean \
++	clean-generic clean-libtool clean-recursive dist dist-all \
++	distcheck distclean distclean-generic distclean-hdr \
++	distclean-libtool distclean-recursive distclean-tags distdir \
++	dvi dvi-am dvi-recursive info info-am info-recursive install \
++	install-am install-data install-data-am install-data-recursive \
++	install-exec install-exec-am install-exec-recursive \
++	install-info install-info-am install-info-recursive install-man \
++	install-recursive install-strip installcheck installcheck-am \
++	installdirs installdirs-am installdirs-recursive \
++	maintainer-clean maintainer-clean-generic \
++	maintainer-clean-recursive mostlyclean mostlyclean-generic \
++	mostlyclean-libtool mostlyclean-recursive tags tags-recursive \
++	uninstall uninstall-am uninstall-info-am \
++	uninstall-info-recursive uninstall-recursive
+ 
+ 
+ $(top_srcdir)/configure.in: configure.in.in $(top_srcdir)/subdirs
+@@ -532,7 +603,6 @@
+ dist-hook:
+ 	cd $(top_distdir) && perl admin/am_edit -padmin
+ 	cd $(top_distdir) && $(MAKE) -f admin/Makefile.common subdirs
+-
+ # Tell versions [3.59,3.63) of GNU make to not export all variables.
+ # Otherwise a system limit (for SysV at least) may be exceeded.
+ .NOEXPORT:
+@@ -540,9 +610,10 @@
+ #>+ 2
+ docs-am:
+ 
+-#>+ 5
++#>+ 6
+ force-reedit:
+-		cd $(top_srcdir) && $(AUTOMAKE) --foreign --include-deps ./Makefile
++		cd $(top_srcdir) && \
++	$(AUTOMAKE) --foreign  ./Makefile
+ 	cd $(top_srcdir) && perl admin/am_edit Makefile.in
+ 
+ 
+@@ -550,8 +621,14 @@
+ final:
+ 	$(MAKE) all-am
+ #>+ 2
++final-install:
++	$(MAKE) install-am
++#>+ 2
+ no-final:
+ 	$(MAKE) all-am
++#>+ 2
++no-final-install:
++	$(MAKE) install-am
+ #>+ 3
+ cvs-clean:
+ 	$(MAKE) -f $(top_srcdir)/admin/Makefile.common cvs-clean
+--- kfocus-1.0.2.orig/configure.files
++++ kfocus-1.0.2/configure.files
+@@ -0,0 +1,2 @@
++./admin/configure.in.min
++configure.in.in

Deleted: kde-extras/kfocus/trunk/stamp-h.in




More information about the pkg-kde-commits mailing list