--- kdebase-3.5.0/drkonqi/Makefile.am	2005-09-10 04:25:55.000000000 -0400
+++ kdebase-3.5.0-new/drkonqi/Makefile.am	2005-11-13 08:25:50.000000000 -0500
@@ -8,15 +8,17 @@
 
 EXTRA_DIST = LICENSE
 
-bin_PROGRAMS = drkonqi
+bin_PROGRAMS = 
+lib_LTLIBRARIES =
+kdeinit_LTLIBRARIES = drkonqi.la
 
 # Libraries:
-AM_LDFLAGS = $(all_libraries) $(KDE_RPATH)
-LDADD  = $(LIB_KDEUI) $(LIB_KIO)
+drkonqi_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module
+drkonqi_la_LIBADD  = $(LIB_KDEUI) $(LIB_KIO)
 
 # toplevel.cpp must be last in row due to X-headers being included. (--enable-final)
 # Did I mention already that X header files really suck?
-drkonqi_SOURCES = krashdcopinterface.skel main.cpp debugger.cpp krashconf.cpp drbugreport.cpp backtrace.cpp toplevel.cpp
+drkonqi_la_SOURCES = krashdcopinterface.skel main.cpp debugger.cpp krashconf.cpp drbugreport.cpp backtrace.cpp toplevel.cpp
 
 
 check_PROGRAMS = crashtest
--- kdebase-3.5.0/drkonqi/main.cpp	2005-09-10 04:25:55.000000000 -0400
+++ kdebase-3.5.0-new/drkonqi/main.cpp	2005-11-13 08:25:50.000000000 -0500
@@ -57,7 +57,7 @@
   KCmdLineLastOption
 };
 
-int main( int argc, char* argv[] )
+extern "C" KDE_EXPORT int kdemain( int argc, char* argv[] )
 {
   // Drop privs.
   setgid(getgid());
--- kdebase-3.5.0/kappfinder/Makefile.am	2005-09-10 04:25:41.000000000 -0400
+++ kdebase-3.5.0-new/kappfinder/Makefile.am	2005-11-13 08:25:50.000000000 -0500
@@ -1,9 +1,17 @@
 SUBDIRS = apps
 
-bin_PROGRAMS = kappfinder
-kappfinder_SOURCES = main.cpp toplevel.cpp common.cpp
-kappfinder_LDADD = $(LIB_KDEUI) $(LIB_KIO)
-kappfinder_LDFLAGS = $(all_libraries) $(KDE_RPATH)
+bin_PROGRAMS = 
+lib_LTLIBRARIES =
+kdeinit_LTLIBRARIES = kappfinder.la
+
+kappfinder_la_SOURCES = main.cpp toplevel.cpp kacommon.cpp
+kappfinder_la_LIBADD = $(LIB_KDEUI) $(LIB_KIO)
+kappfinder_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module
+
+$(srcdir)/kacommon.cpp: $(srcdir)/common.cpp
+	cat $(srcdir)/common.cpp > $(srcdir)/kacommon.cpp
+
+DISTCLEANFILES = kacommon.cpp
 
 noinst_PROGRAMS = kappfinder_install
 kappfinder_install_SOURCES = main_install.cpp common.cpp
--- kdebase-3.5.0/kappfinder/main.cpp	2005-10-10 11:04:07.000000000 -0400
+++ kdebase-3.5.0-new/kappfinder/main.cpp	2005-11-13 08:25:50.000000000 -0500
@@ -31,7 +31,7 @@
   KCmdLineLastOption
 };
 
-int main( int argc, char *argv[] )
+extern "C" KDE_EXPORT int kdemain( int argc, char *argv[] )
 {
   KAboutData aboutData( "kappfinder", I18N_NOOP( "KAppfinder" ),
                         "1.0", description, KAboutData::License_GPL,
--- kdebase-3.5.0/kcontrol/filetypes/Makefile.am	2005-09-10 04:25:08.000000000 -0400
+++ kdebase-3.5.0-new/kcontrol/filetypes/Makefile.am	2005-11-13 08:25:50.000000000 -0500
@@ -12,16 +12,18 @@
 	kservicelistwidget.h typeslistitem.h newtypedlg.h \
 	kserviceselectdlg.h
 
-bin_PROGRAMS = keditfiletype
+bin_PROGRAMS = 
+lib_LTLIBRARIES =
+kdeinit_LTLIBRARIES = keditfiletype.la
 
 noinst_LTLIBRARIES = libfiletypes.la
 libfiletypes_la_SOURCES = filetypesview.cpp filetypedetails.cpp filegroupdetails.cpp \
 		 kservicelistwidget.cpp typeslistitem.cpp newtypedlg.cpp \
 		 kserviceselectdlg.cpp
 
-keditfiletype_SOURCES = keditfiletype.cpp
-keditfiletype_LDADD = libfiletypes.la $(LIB_KIO)
-keditfiletype_LDFLAGS = $(KDE_RPATH) $(all_libraries)
+keditfiletype_la_SOURCES = keditfiletype.cpp
+keditfiletype_la_LIBADD = libfiletypes.la $(LIB_KIO)
+keditfiletype_la_LDFLAGS = $(KDE_PLUGIN) $(all_libraries) -module
 
 messages:
 	$(XGETTEXT) *.cpp -o $(podir)/filetypes.pot
--- kdebase-3.5.0/kcontrol/filetypes/keditfiletype.cpp	2005-10-10 11:03:47.000000000 -0400
+++ kdebase-3.5.0-new/kcontrol/filetypes/keditfiletype.cpp	2005-11-13 08:25:51.000000000 -0500
@@ -108,7 +108,7 @@
   KCmdLineLastOption
 };
 
-int main(int argc, char ** argv)
+extern "C" KDE_EXPORT int kdemain(int argc, char ** argv)
 {
   KServiceTypeProfile::setConfigurationMode();
   KLocale::setMainCatalogue("filetypes");
--- kdebase-3.5.0/kdcop/Makefile.am	2005-09-10 04:25:53.000000000 -0400
+++ kdebase-3.5.0-new/kdcop/Makefile.am	2005-11-13 08:25:51.000000000 -0500
@@ -7,10 +7,13 @@
 
 INCLUDES = $(all_includes)
 
-bin_PROGRAMS = kdcop
-
-kdcop_SOURCES = kdcop.cpp kdcopwindow.cpp kdcoplistview.cpp kdcopview.ui
-kdcop_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_KDEUI) $(LIB_KDECORE) $(LIB_KIO) -lDCOP $(LIB_QT)
+bin_PROGRAMS = 
+lib_LTLIBRARIES =
+kdeinit_LTLIBRARIES = kdcop.la
+
+kdcop_la_SOURCES = kdcop.cpp kdcopwindow.cpp kdcoplistview.cpp kdcopview.ui
+kdcop_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module
+kdcop_la_LIBADD  = $(LIB_KDEUI) $(LIB_KDECORE) $(LIB_KIO) -lDCOP $(LIB_QT)
 
 noinst_HEADERS = kdcopwindow.h
 METASOURCES =	AUTO
--- kdebase-3.5.0/kdcop/kdcop.cpp	2005-09-10 04:25:53.000000000 -0400
+++ kdebase-3.5.0-new/kdcop/kdcop.cpp	2005-11-13 08:25:51.000000000 -0500
@@ -15,7 +15,7 @@
     KCmdLineLastOption
 };
 
-int main( int argc, char ** argv )
+extern "C" KDE_EXPORT int kdemain( int argc, char ** argv )
 {
   KAboutData aboutData( "kdcop", I18N_NOOP("KDCOP"),
 			"0.1", I18N_NOOP( "A graphical DCOP browser/client" ),
--- kdebase-3.5.0/kdebugdialog/Makefile.am	2005-09-10 04:24:57.000000000 -0400
+++ kdebase-3.5.0-new/kdebugdialog/Makefile.am	2005-11-13 08:25:51.000000000 -0500
@@ -4,12 +4,14 @@
 
 ####### Files
 
-bin_PROGRAMS = kdebugdialog
+bin_PROGRAMS = 
+lib_LTLIBRARIES =
+kdeinit_LTLIBRARIES = kdebugdialog.la
 
-kdebugdialog_SOURCES = main.cpp kabstractdebugdialog.cpp kdebugdialog.cpp klistdebugdialog.cpp
-kdebugdialog_METASOURCES = AUTO
-kdebugdialog_LDFLAGS =       $(all_libraries) $(KDE_RPATH)
-kdebugdialog_LDADD   =       $(LIB_KDEUI)
+kdebugdialog_la_SOURCES = main.cpp kabstractdebugdialog.cpp kdebugdialog.cpp klistdebugdialog.cpp
+kdebugdialog_la_METASOURCES = AUTO
+kdebugdialog_la_LDFLAGS =       $(all_libraries) $(KDE_PLUGIN) -module
+kdebugdialog_la_LIBADD   =       $(LIB_KDEUI)
 
 messages:
 	$(XGETTEXT) *.cpp -o $(podir)/kdebugdialog.pot	
--- kdebase-3.5.0/kdebugdialog/main.cpp	2005-10-10 11:03:40.000000000 -0400
+++ kdebase-3.5.0-new/kdebugdialog/main.cpp	2005-11-13 08:25:51.000000000 -0500
@@ -75,7 +75,7 @@
   KCmdLineLastOption
 };
 
-int main(int argc, char ** argv)
+extern "C" KDE_EXPORT int kdemain(int argc, char ** argv)
 {
   KAboutData data( "kdebugdialog", I18N_NOOP( "KDebugDialog"),
     "1.0", I18N_NOOP("A dialog box for setting preferences for debug output"),
--- kdebase-3.5.0/kdepasswd/Makefile.am	2005-09-10 04:24:59.000000000 -0400
+++ kdebase-3.5.0-new/kdepasswd/Makefile.am	2005-11-13 08:25:51.000000000 -0500
@@ -1,10 +1,13 @@
 
 SUBDIRS = kcm
 
-bin_PROGRAMS = kdepasswd
-kdepasswd_SOURCES = kdepasswd.cpp passwd.cpp passwddlg.cpp
-kdepasswd_LDFLAGS = $(all_libraries) $(KDE_RPATH)
-kdepasswd_LDADD = $(LIB_KIO)
+bin_PROGRAMS = 
+lib_LTLIBRARIES =
+kdeinit_LTLIBRARIES = kdepasswd.la
+
+kdepasswd_la_SOURCES = kdepasswd.cpp passwd.cpp passwddlg.cpp
+kdepasswd_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module
+kdepasswd_la_LIBADD = $(LIB_KIO)
 
 METASOURCES =  AUTO
 AM_CPPFLAGS= -I$(top_srcdir)/libkonq $(all_includes)
--- kdebase-3.5.0/kdepasswd/kdepasswd.cpp	2005-09-10 04:24:59.000000000 -0400
+++ kdebase-3.5.0-new/kdepasswd/kdepasswd.cpp	2005-11-13 08:25:51.000000000 -0500
@@ -26,7 +26,7 @@
 };
 
 
-int main(int argc, char **argv)
+extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
 {
     KAboutData aboutData("kdepasswd", I18N_NOOP("KDE passwd"),
             VERSION, I18N_NOOP("Changes a UNIX password."),
--- kdebase-3.5.0/kdeprint/kdeprintfax/Makefile.am	2005-09-10 04:25:38.000000000 -0400
+++ kdebase-3.5.0-new/kdeprint/kdeprintfax/Makefile.am	2005-11-13 08:25:51.000000000 -0500
@@ -1,11 +1,14 @@
 INCLUDES= $(all_includes)
 
-bin_PROGRAMS = kdeprintfax
-kdeprintfax_SOURCES = main.cpp kdeprintfax.cpp faxab.cpp faxctrl.cpp confgeneral.cpp configdlg.cpp \
+bin_PROGRAMS = 
+lib_LTLIBRARIES =
+kdeinit_LTLIBRARIES = kdeprintfax.la
+
+kdeprintfax_la_SOURCES = main.cpp kdeprintfax.cpp faxab.cpp faxctrl.cpp confgeneral.cpp configdlg.cpp \
 		      conffax.cpp confsystem.cpp conffilters.cpp filterdlg.cpp defcmds.cpp
-kdeprintfax_LDFLAGS = $(all_libraries) $(KDE_RPATH)
-kdeprintfax_LDADD   = $(LIB_KDEUI) $(LIB_KIO) $(LIB_KDEPRINT) -lkabc
-kdeprintfax_METASOURCES = AUTO
+kdeprintfax_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module
+kdeprintfax_la_LIBADD  = $(LIB_KDEUI) $(LIB_KIO) $(LIB_KDEPRINT) -lkabc
+kdeprintfax_la_METASOURCES = AUTO
 
 xdg_apps_DATA = kdeprintfax.desktop
 
--- kdebase-3.5.0/kdeprint/kdeprintfax/main.cpp	2005-10-10 11:04:02.000000000 -0400
+++ kdebase-3.5.0-new/kdeprint/kdeprintfax/main.cpp	2005-11-13 08:25:51.000000000 -0500
@@ -44,7 +44,7 @@
   // INSERT YOUR COMMANDLINE OPTIONS HERE
 };
 
-int main(int argc, char *argv[])
+extern "C" KDE_EXPORT int kdemain(int argc, char *argv[])
 {
 
   KAboutData aboutData( "kdeprintfax", I18N_NOOP("KdeprintFax"),
--- kdebase-3.5.0/kdeprint/kprinter/printwrapper.cpp	2005-10-10 11:04:05.000000000 -0400
+++ kdebase-3.5.0-new/kdeprint/kprinter/printwrapper.cpp	2005-11-13 08:25:51.000000000 -0500
@@ -137,10 +137,6 @@
 {
 	KCmdLineArgs	*args = KCmdLineArgs::parsedArgs();
 
-#if defined(HAVE_SIGACTION) && !defined(HAVE_SIGSET)
-	struct sigaction action;
-#endif /* HAVE_SIGACTION && !HAVE_SIGSET*/
-
 	// read variables from command line
 	QString	printer = args->getOption("d");
 	QString	title = args->getOption("t");
@@ -325,6 +321,10 @@
 
 		// print from stdin
 
+#if defined(HAVE_SIGACTION) && !defined(HAVE_SIGSET)
+	struct sigaction action;
+#endif /* HAVE_SIGACTION && !HAVE_SIGSET*/
+
 #  if defined(HAVE_SIGSET)
 		sigset(SIGHUP, signal_handler);
 		sigset(SIGINT, signal_handler);
--- kdebase-3.5.0/kdesktop/Makefile.am	2005-09-10 04:25:45.000000000 -0400
+++ kdebase-3.5.0-new/kdesktop/Makefile.am	2005-11-13 08:29:01.000000000 -0500
@@ -8,9 +8,9 @@
 
 ####### Files
 
-bin_PROGRAMS = kcheckrunning
+bin_PROGRAMS = 
 lib_LTLIBRARIES =
-kdeinit_LTLIBRARIES = kdesktop.la
+kdeinit_LTLIBRARIES = kdesktop.la kcheckrunning.la
 noinst_LTLIBRARIES = libkdesktopsettings.la
 
 libkdesktopsettings_la_LDFLAGS = $(all_libraries) -no-undefined
@@ -31,9 +31,9 @@
 	xautolock.h lockeng.h init.h minicli.h \
 	pixmapserver.h startupid.h xautolock_c.h
 
-kcheckrunning_SOURCES = kcheckrunning.cpp
-kcheckrunning_LDFLAGS = $(all_libraries)
-kcheckrunning_LDADD = $(LIB_X11)
+kcheckrunning_la_SOURCES = kcheckrunning.cpp
+kcheckrunning_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module
+kcheckrunning_la_LIBADD = $(LIB_X11)
 
 METASOURCES = AUTO
 
--- kdebase-3.5.0/kdesktop/init.h	2005-10-10 11:04:11.000000000 -0400
+++ kdebase-3.5.0-new/kdesktop/init.h	2005-11-13 08:25:51.000000000 -0500
@@ -27,4 +27,18 @@
  */
 void testLocalInstallation();
 
+typedef struct fileinfobuf {
+   u_int32_t info_length;
+   union {
+     struct {
+       u_int32_t type;
+       u_int32_t creator;
+       u_int16_t fdFlags;
+       u_int16_t location;
+       u_int32_t padding[4];
+     } finder;
+     off_t rsrcForkSize;
+   } data;
+} fileinfobuf;
+
 #endif
--- kdebase-3.5.1/kdesktop/kcheckrunning.cpp.orig	2006-02-27 14:36:42.000000000 -0500
+++ kdebase-3.5.1/kdesktop/kcheckrunning.cpp	2006-02-27 14:37:11.000000000 -0500
@@ -18,8 +18,9 @@
 */
 
 #include <X11/Xlib.h>
+#include <kdemacros.h>
 
-int main()
+extern "C" KDE_EXPORT int kdemain()
     {
     Display* dpy = XOpenDisplay( NULL );
     if( dpy == NULL )
--- kdebase-3.5.0/kdesktop/kwebdesktop/Makefile.am	2005-09-10 04:25:45.000000000 -0400
+++ kdebase-3.5.0-new/kdesktop/kwebdesktop/Makefile.am	2005-11-13 08:25:52.000000000 -0500
@@ -2,12 +2,15 @@
 INCLUDES= $(all_includes)
 LDADD = $(LIB_KHTML)
 
-bin_PROGRAMS = 	kwebdesktop
+bin_PROGRAMS =
+lib_LTLIBRARIES =
+kdeinit_LTLIBRARIES = kwebdesktop.la
 
 METASOURCES = AUTO
 
-kwebdesktop_SOURCES = kwebdesktop.cpp kwebdesktopsettings.kcfgc 
-kwebdesktop_LDFLAGS = $(all_libraries) $(KDE_RPATH)
+kwebdesktop_la_SOURCES = kwebdesktop.cpp kwebdesktopsettings.kcfgc 
+kwebdesktop_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module
+kwebdesktop_la_LIBADD  = $(LIB_KHTML)
 
 kdesktop_kwebdesktop_data_DATA = kwebdesktop.desktop
 kdesktop_kwebdesktop_datadir = $(kde_datadir)/kdesktop/programs
--- kdebase-3.5.0/kdesktop/kwebdesktop/kwebdesktop.cpp	2005-10-10 11:04:07.000000000 -0400
+++ kdebase-3.5.0-new/kdesktop/kwebdesktop/kwebdesktop.cpp	2005-11-13 08:25:52.000000000 -0500
@@ -84,7 +84,7 @@
 }
 
 
-int main( int argc, char **argv )
+extern "C" KDE_EXPORT int kdemain( int argc, char **argv )
 {
     KAboutData data( "kwebdesktop", I18N_NOOP("KDE Web Desktop"),
                      VERSION,
--- kdebase-3.5.0/kdesktop/lock/Makefile.am	2005-09-10 04:25:41.000000000 -0400
+++ kdebase-3.5.0-new/kdesktop/lock/Makefile.am	2005-11-13 08:25:53.000000000 -0500
@@ -1,14 +1,16 @@
 ## Makefile.am of kdebase/kdesktop/lock
 
 INCLUDES = -I.. -I$(top_srcdir)/kcheckpass -I$(top_srcdir)/kdmlib $(GLINC) $(all_includes)
-kdesktop_lock_LDFLAGS  = $(all_libraries) $(KDE_RPATH)
-kdesktop_lock_LDADD    = ../libkdesktopsettings.la ../../kdmlib/libdmctl.la $(LIB_KIO) $(LIB_XF86MISC) $(GLLIB)
+kdesktop_lock_la_LDFLAGS  = $(all_libraries) $(KDE_RPATH) -module -avoid-version
+kdesktop_lock_la_LIBADD    = ../libkdesktopsettings.la ../../kdmlib/libdmctl.la $(LIB_KIO) $(LIB_XF86MISC) $(GLLIB)
 
 ####### Files
 
-bin_PROGRAMS = kdesktop_lock
+bin_PROGRAMS = 
+lib_LTLIBRARIES =
+kdeinit_LTLIBRARIES = kdesktop_lock.la
 
-kdesktop_lock_SOURCES = lockprocess.cc lockdlg.cc autologout.cc main.cc
+kdesktop_lock_la_SOURCES = lockprocess.cc lockdlg.cc autologout.cc main.cc
 
 noinst_HEADERS = lockprocess.h lockdlg.h autologout.h main.h
 
--- kdebase-3.5.0/kdesktop/lock/main.cc	2005-10-10 11:04:07.000000000 -0400
+++ kdebase-3.5.0-new/kdesktop/lock/main.cc	2005-11-13 08:25:52.000000000 -0500
@@ -58,7 +58,7 @@
 
 // -----------------------------------------------------------------------------
 
-int main( int argc, char **argv )
+extern "C" KDE_EXPORT int kdemain( int argc, char **argv )
 {
     KLocale::setMainCatalogue("kdesktop");
 
--- kdebase-3.5.0/kdesu/kdesu/Makefile.am	2005-09-10 04:26:14.000000000 -0400
+++ kdebase-3.5.0-new/kdesu/kdesu/Makefile.am	2005-11-13 08:25:52.000000000 -0500
@@ -3,11 +3,14 @@
 INCLUDES= $(all_includes)
 
 ## kdesu
-bin_PROGRAMS = 	kdesu
-kdesu_SOURCES = kdesu.cpp sudlg.cpp
-kdesu_LDFLAGS = $(all_libraries) $(KDE_RPATH)
-kdesu_LDADD   = $(LIB_KIO) -lkdesu
-kdesu_METASOURCES =  AUTO
+bin_PROGRAMS =
+lib_LTLIBRARIES =
+kdeinit_LTLIBRARIES = kdesu.la
+
+kdesu_la_SOURCES = kdesu.cpp sudlg.cpp
+kdesu_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module
+kdesu_la_LIBADD  = $(LIB_KIO) -lkdesu
+kdesu_la_METASOURCES =  AUTO
 noinst_HEADERS = sudlg.h
 
 ## Messages
--- kdebase-3.5.0/kdesu/kdesu/kdesu.cpp	2005-11-08 17:37:00.000000000 -0500
+++ kdebase-3.5.0-new/kdesu/kdesu/kdesu.cpp	2005-11-13 08:25:52.000000000 -0500
@@ -85,7 +85,7 @@
 
 static int startApp();
 
-int main(int argc, char *argv[])
+extern "C" KDE_EXPORT int kdemain(int argc, char *argv[])
 {
     // FIXME: this can be considered a poor man's solution, as it's not
     // directly obvious to a gui user. :)
--- kdebase-3.5.0/kdesu/kdesud/Makefile.am	2005-09-10 04:26:13.000000000 -0400
+++ kdebase-3.5.0-new/kdesu/kdesud/Makefile.am	2005-11-13 08:30:17.000000000 -0500
@@ -4,10 +4,13 @@
 
 KDE_CXXFLAGS = $(KDE_USE_FPIE)
 
-bin_PROGRAMS = kdesud
-kdesud_SOURCES = kdesud.cpp repo.cpp lexer.cpp handler.cpp secure.cpp 
-kdesud_LDFLAGS = $(KDE_USE_PIE) $(all_libraries) $(KDE_RPATH)
-kdesud_LDADD = $(LIB_KDECORE) -lkdesu $(LIBSOCKET)
+bin_PROGRAMS = 
+lib_LTLIBRARIES = 
+kdeinit_LTLIBRARIES = kdesud.la
+
+kdesud_la_SOURCES = kdesud.cpp repo.cpp lexer.cpp handler.cpp secure.cpp 
+kdesud_la_LDFLAGS = $(KDE_USE_PIE) $(all_libraries) $(KDE_PLUGIN) -module
+kdesud_la_LIBADD = $(LIB_KDECORE) -lkdesu $(LIBSOCKET)
 noinst_HEADERS = repo.h handler.h lexer.h secure.h
 
 ## kdesud needs to be suid or sgid something
--- kdebase-3.5.0/kdesu/kdesud/kdesud.cpp	2005-09-10 04:26:13.000000000 -0400
+++ kdebase-3.5.0-new/kdesu/kdesud/kdesud.cpp	2005-11-13 08:25:52.000000000 -0500
@@ -246,7 +246,7 @@
  * Main program
  */
 
-int main(int argc, char *argv[])
+extern "C" KDE_EXPORT int kdemain(int argc, char *argv[])
 {
     KAboutData aboutData("kdesud", I18N_NOOP("KDE su daemon"),
             Version, I18N_NOOP("Daemon used by kdesu"),
--- kdebase-3.5.0/kdialog/Makefile.am	2005-09-10 04:25:36.000000000 -0400
+++ kdebase-3.5.0-new/kdialog/Makefile.am	2005-11-13 08:25:52.000000000 -0500
@@ -1,11 +1,13 @@
 KDE_CXXFLAGS = -DQT_NO_CAST_ASCII -DQT_NO_ASCII_CAST
 INCLUDES = $(all_includes)
 
-bin_PROGRAMS = kdialog
+bin_PROGRAMS = 
+lib_LTLIBRARIES =
+kdeinit_LTLIBRARIES = kdialog.la
 
-kdialog_SOURCES = kdialog.cpp widgets.cpp klistboxdialog.cpp progressdialog.cpp progressdialogiface.skel
-kdialog_LDADD = $(LIB_KIO)
-kdialog_LDFLAGS = $(all_libraries) $(KDE_RPATH)
+kdialog_la_SOURCES = kdialog.cpp widgets.cpp klistboxdialog.cpp progressdialog.cpp progressdialogiface.skel
+kdialog_la_LIBADD = $(LIB_KIO)
+kdialog_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module
 
 METASOURCES = AUTO
 
--- kdebase-3.5.0/kdialog/kdialog.cpp	2005-10-10 11:04:00.000000000 -0400
+++ kdebase-3.5.0-new/kdialog/kdialog.cpp	2005-11-13 08:25:52.000000000 -0500
@@ -661,7 +661,7 @@
 }
 
 
-int main(int argc, char *argv[])
+extern "C" KDE_EXPORT int kdemain(int argc, char *argv[])
 {
   KAboutData aboutData( "kdialog", I18N_NOOP("KDialog"),
                         "1.0", I18N_NOOP( "KDialog can be used to show nice dialog boxes from shell scripts" ),
--- kdebase-3.5.0/kfind/Makefile.am	2005-09-10 04:25:00.000000000 -0400
+++ kdebase-3.5.0-new/kfind/Makefile.am	2005-11-13 08:25:52.000000000 -0500
@@ -28,9 +28,12 @@
 
 #And this is for kfind
 
-bin_PROGRAMS = kfind
-kfind_SOURCES = kfwin.cpp kfinddlg.cpp main.cpp 
-kfind_LDADD   =  libkfind_common.la $(LIB_KPARTS)
+bin_PROGRAMS = 
+lib_LTLIBRARIES =
+kdeinit_LTLIBRARIES = kfind.la
+
+kfind_la_SOURCES = kfwin.cpp kfinddlg.cpp main.cpp 
+kfind_la_LIBADD  =  libkfind_common.la $(LIB_KPARTS)
 
 # the library search path.
-kfind_LDFLAGS = $(all_libraries) $(KDE_RPATH)
+kfind_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module
--- kdebase-3.5.0/kfind/main.cpp	2005-09-10 04:25:00.000000000 -0400
+++ kdebase-3.5.0-new/kfind/main.cpp	2005-11-13 08:25:52.000000000 -0500
@@ -19,7 +19,7 @@
   KCmdLineLastOption
 };
 
-int main( int argc, char ** argv )
+extern "C" KDE_EXPORT int kdemain( int argc, char ** argv )
 {
   KLocale::setMainCatalogue("kfindpart");
   KAboutData aboutData( "kfind", I18N_NOOP("KFind"),
--- kdebase-3.5.0/khelpcenter/Makefile.am	2005-09-10 04:25:18.000000000 -0400
+++ kdebase-3.5.0-new/khelpcenter/Makefile.am	2005-11-13 08:25:52.000000000 -0500
@@ -3,14 +3,14 @@
 INCLUDES = $(all_includes)
 METASOURCES = AUTO
 
-bin_PROGRAMS = khc_indexbuilder
+bin_PROGRAMS = 
 lib_LTLIBRARIES = 
 
-khc_indexbuilder_LDFLAGS = $(all_libraries) $(KDE_RPATH)
-khc_indexbuilder_LDADD = $(LIB_KDECORE)
-khc_indexbuilder_SOURCES = khc_indexbuilder.cpp
+khc_indexbuilder_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module
+khc_indexbuilder_la_LIBADD = $(LIB_KDECORE)
+khc_indexbuilder_la_SOURCES = khc_indexbuilder.cpp
 
-kdeinit_LTLIBRARIES = khelpcenter.la
+kdeinit_LTLIBRARIES = khelpcenter.la khc_indexbuilder.la
 
 khelpcenter_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN)
 khelpcenter_la_LIBADD = $(LIB_KHTML)
--- kdebase-3.5.0/khelpcenter/htmlsearch/Makefile.am	2005-09-10 04:25:18.000000000 -0400
+++ kdebase-3.5.0-new/khelpcenter/htmlsearch/Makefile.am	2005-11-13 08:25:52.000000000 -0500
@@ -21,14 +21,15 @@
 
 xdg_apps_DATA = htmlsearch.desktop
 
-bin_PROGRAMS = khtmlindex
+bin_PROGRAMS = 
+kdeinit_LTLIBRARIES = khtmlindex.la
 
 wrapperdir = $(kde_datadir)/khelpcenter/
 wrapper_SCRIPTS = meinproc_wrapper
 
-khtmlindex_SOURCES = index.cpp
-khtmlindex_LDFLAGS = $(KDE_RPATH) $(all_libraries)
-khtmlindex_LDADD = libhtmlsearch.la $(LIB_KDEUI)
+khtmlindex_la_SOURCES = index.cpp
+khtmlindex_la_LDFLAGS = $(KDE_PLUGIN) $(all_libraries) -module
+khtmlindex_la_LIBADD = libhtmlsearch.la $(LIB_KDEUI)
 
 xpm_DATA = unchecked.xpm checked.xpm
 xpmdir = $(kde_datadir)/khelpcenter/pics
--- kdebase-3.5.0/khelpcenter/htmlsearch/index.cpp	2005-09-10 04:25:18.000000000 -0400
+++ kdebase-3.5.0-new/khelpcenter/htmlsearch/index.cpp	2005-11-13 08:25:52.000000000 -0500
@@ -13,7 +13,7 @@
 };
 
 
-int main(int argc, char *argv[])
+extern "C" KDE_EXPORT int kdemain(int argc, char *argv[])
 {
   KAboutData aboutData( "khtmlindex", I18N_NOOP("KHtmlIndex"),
 	"",
--- kdebase-3.5.0/khelpcenter/khc_indexbuilder.cpp	2005-10-10 11:03:57.000000000 -0400
+++ kdebase-3.5.0-new/khelpcenter/khc_indexbuilder.cpp	2005-11-13 08:25:52.000000000 -0500
@@ -163,7 +163,7 @@
   KCmdLineLastOption
 };
 
-int main( int argc, char **argv )
+extern "C" KDE_EXPORT int kdemain( int argc, char **argv )
 {
   KAboutData aboutData( "khc_indexbuilder",
                         I18N_NOOP("KHelpCenter Index Builder"),
--- kdebase-3.5.0/kicker/extensions/kasbar/Makefile.am	2005-09-10 04:25:29.000000000 -0400
+++ kdebase-3.5.0-new/kicker/extensions/kasbar/Makefile.am	2005-11-13 08:25:52.000000000 -0500
@@ -35,10 +35,12 @@
 
 EXTRA_DIST = $(lnk_DATA)
 
-bin_PROGRAMS = kasbar
-kasbar_SOURCES = kasbarapp.cpp
-kasbar_LDFLAGS = $(all_libraries) $(KDE_RPATH)
-kasbar_LDADD = 	libkasbar.la \
+bin_PROGRAMS = 
+kdeinit_LTLIBRARIES = kasbar.la
+
+kasbar_la_SOURCES = kasbarapp.cpp
+kasbar_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module
+kasbar_la_LIBADD = 	libkasbar.la \
 		$(LIB_QT) $(LIB_KDECORE) $(LIB_KDEUI)
 
 
--- kdebase-3.5.0/kicker/extensions/kasbar/kasbarapp.cpp	2005-10-10 11:03:59.000000000 -0400
+++ kdebase-3.5.0-new/kicker/extensions/kasbar/kasbarapp.cpp	2005-11-13 08:25:52.000000000 -0500
@@ -73,7 +73,7 @@
    KCmdLineLastOption
 };
 
-int main( int argc, char **argv )
+extern "C" KDE_EXPORT int kdemain( int argc, char **argv )
 {
   KCmdLineArgs::init( argc, argv, "kasbar", "KasBar", I18N_NOOP( "An alternative task manager" ), VERSION_STRING );
   KCmdLineArgs::addCmdLineOptions( options );
--- kdebase-3.5.0/kioslave/info/kde-info2html.conf	2005-09-10 04:25:37.000000000 -0400
+++ kdebase-3.5.0-new/kioslave/info/kde-info2html.conf	2005-11-13 08:25:52.000000000 -0500
@@ -25,6 +25,7 @@
 
 #-- location of info files.
 our @INFODIR = (
+	    "@FINKPREFIX@/share/info",
 	    "/usr/share/info",
 	    "/usr/info",
 	    "/usr/lib/info",
--- kdebase-3.5.0/kioslave/media/mounthelper/Makefile.am	2005-09-10 04:25:36.000000000 -0400
+++ kdebase-3.5.0-new/kioslave/media/mounthelper/Makefile.am	2005-11-13 08:31:13.000000000 -0500
@@ -1,12 +1,14 @@
-bin_PROGRAMS = kio_media_mounthelper
+bin_PROGRAMS = 
+lib_LTLIBRARIES =
+kdeinit_LTLIBRARIES = kio_media_mounthelper.la
 
 INCLUDES = -I$(srcdir)/../libmediacommon $(all_includes)
 AM_LDFLAGS = $(all_libraries)
 
-kio_media_mounthelper_SOURCES = kio_media_mounthelper.cpp
+kio_media_mounthelper_la_SOURCES = kio_media_mounthelper.cpp
 
-kio_media_mounthelper_LDFLAGS = $(KDE_RPATH) $(all_libraries)
-kio_media_mounthelper_LDADD = $(LIB_KIO) ../libmediacommon/libmediacommon.la
+kio_media_mounthelper_la_LDFLAGS = $(KDE_RPATH) $(all_libraries) -module
+kio_media_mounthelper_la_LIBADD = $(LIB_KIO) ../libmediacommon/libmediacommon.la
 
 METASOURCES = AUTO
 
--- kdebase-3.5.0/kioslave/media/mounthelper/kio_media_mounthelper.cpp	2005-10-10 11:04:00.000000000 -0400
+++ kdebase-3.5.0-new/kioslave/media/mounthelper/kio_media_mounthelper.cpp	2005-11-13 08:25:53.000000000 -0500
@@ -191,7 +191,7 @@
 };
 
 
-int main(int argc, char **argv)
+extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
 {
 	KCmdLineArgs::init(argc, argv, "kio_media_mounthelper",
 	                   "kio_media_mounthelper", "kio_media_mounthelper",
--- kdebase-3.5.0/kioslave/trash/Makefile.am	2005-09-10 04:25:37.000000000 -0400
+++ kdebase-3.5.0-new/kioslave/trash/Makefile.am	2005-11-13 08:25:53.000000000 -0500
@@ -9,10 +9,13 @@
 kio_trash_la_LIBADD  = libtrashcommon.la $(LIB_KIO)
 kio_trash_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN) -no-undefined
 
-bin_PROGRAMS = ktrash
-ktrash_SOURCES = ktrash.cpp
-ktrash_LDADD = $(LIB_KIO)
-ktrash_LDFLAGS = $(all_libraries) $(KDE_RPATH)
+bin_PROGRAMS = 
+lib_LTLIBRARIES =
+kdeinit_LTLIBRARIES = ktrash.la
+
+ktrash_la_SOURCES = ktrash.cpp
+ktrash_la_LIBADD = $(LIB_KIO)
+ktrash_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module
 
 kde_services_DATA = trash.protocol
 
--- kdebase-3.5.0/kioslave/trash/ktrash.cpp	2005-10-10 11:04:01.000000000 -0400
+++ kdebase-3.5.0-new/kioslave/trash/ktrash.cpp	2005-11-13 08:25:53.000000000 -0500
@@ -35,7 +35,7 @@
     KCmdLineLastOption
 };
 
-int main(int argc, char *argv[])
+extern "C" KDE_EXPORT int kdemain(int argc, char *argv[])
 {
     KApplication::disableAutoDcopRegistration();
     KCmdLineArgs::init( argc, argv, "ktrash",
--- kdebase-3.5.0/knetattach/Makefile.am	2005-09-10 04:25:49.000000000 -0400
+++ kdebase-3.5.0-new/knetattach/Makefile.am	2005-11-13 08:25:53.000000000 -0500
@@ -1,9 +1,12 @@
 INCLUDES= $(all_includes)
 
-bin_PROGRAMS = knetattach
-knetattach_SOURCES = knetattach.ui main.cpp
-knetattach_LDFLAGS = $(all_libraries) $(KDE_RPATH)
-knetattach_LDADD   = $(LIB_KIO)
+bin_PROGRAMS = 
+lib_LTLIBRARIES =
+kdeinit_LTLIBRARIES = knetattach.la
+
+knetattach_la_SOURCES = knetattach.ui main.cpp
+knetattach_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module
+knetattach_la_LIBADD  = $(LIB_KIO)
 METASOURCES = AUTO
 xdg_apps_DATA = knetattach.desktop
 KDE_ICON = AUTO
--- kdebase-3.5.0/knetattach/main.cpp	2005-10-10 11:04:20.000000000 -0400
+++ kdebase-3.5.0-new/knetattach/main.cpp	2005-11-13 08:25:53.000000000 -0500
@@ -25,7 +25,7 @@
 
 #include "knetattach.h"
 
-int main(int argc, char **argv) {
+extern "C" KDE_EXPORT int kdemain(int argc, char **argv) {
 	KAboutData about("knetattach", I18N_NOOP("KDE Network Wizard"), "1.0",
 		I18N_NOOP("KDE Network Wizard"),
 		KAboutData::License_GPL,
--- kdebase-3.5.0/konqueror/keditbookmarks/Makefile.am	2005-09-10 04:25:49.000000000 -0400
+++ kdebase-3.5.0-new/konqueror/keditbookmarks/Makefile.am	2005-11-13 08:25:53.000000000 -0500
@@ -2,13 +2,13 @@
 
 METASOURCES = AUTO
 
-bin_PROGRAMS = kbookmarkmerger
+bin_PROGRAMS = 
 lib_LTLIBRARIES =
-kdeinit_LTLIBRARIES = keditbookmarks.la
+kdeinit_LTLIBRARIES = keditbookmarks.la kbookmarkmerger.la
 
-kbookmarkmerger_SOURCES = kbookmarkmerger.cpp
-kbookmarkmerger_LDFLAGS = $(all_libraries) $(KDE_RPATH)
-kbookmarkmerger_LDADD = $(LIB_KIO)
+kbookmarkmerger_la_SOURCES = kbookmarkmerger.cpp
+kbookmarkmerger_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module
+kbookmarkmerger_la_LIBADD = $(LIB_KIO)
 
 dcop_DCOPIDLNG = true
 keditbookmarks_la_SOURCES = main.cpp listview.cpp toplevel.cpp actionsimpl.cpp commands.cpp importers.cpp dcop.skel dcop.cpp bookmarkiterator.cpp  \
--- kdebase-3.5.0/konqueror/keditbookmarks/kbookmarkmerger.cpp	2005-09-10 04:25:49.000000000 -0400
+++ kdebase-3.5.0-new/konqueror/keditbookmarks/kbookmarkmerger.cpp	2005-11-13 08:25:53.000000000 -0500
@@ -55,7 +55,7 @@
 	return XGetSelectionOwner( dpy, atom ) != None;
 }
 
-int main( int argc, char**argv )
+extern "C" KDE_EXPORT int kdemain( int argc, char**argv )
 {
 	const bool kdeRunning = kdeIsRunning();
 
--- kdebase-3.5.0/kpager/Makefile.am	2005-09-10 04:25:36.000000000 -0400
+++ kdebase-3.5.0-new/kpager/Makefile.am	2005-11-13 08:25:53.000000000 -0500
@@ -1,14 +1,16 @@
 INCLUDES= $(all_includes)
 
-bin_PROGRAMS = kpager
+bin_PROGRAMS = 
+lib_LTLIBRARIES =
+kdeinit_LTLIBRARIES = kpager.la
 
-kpager_SOURCES = desktop.cpp kpager.cpp config.cpp windowdrag.cpp \
+kpager_la_SOURCES = desktop.cpp kpager.cpp config.cpp windowdrag.cpp \
 	kpagerIface.skel main.cpp  
 
-kpager_METASOURCES = AUTO
-kpager_LDFLAGS = $(all_libraries) $(KDE_RPATH)
+kpager_la_METASOURCES = AUTO
+kpager_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module
 
-kpager_LDADD = $(LIB_KDEUI)
+kpager_la_LIBADD = $(LIB_KDEUI)
 
 KDE_ICON = kpager
 
--- kdebase-3.5.0/kpager/main.cpp	2005-10-10 11:04:00.000000000 -0400
+++ kdebase-3.5.0-new/kpager/main.cpp	2005-11-13 08:25:53.000000000 -0500
@@ -62,7 +62,7 @@
 
 };
 
-int main(int argc, char **argv)
+extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
 {
     KAboutData *aboutdata = new KAboutData("kpager", "KPager", "1.5",
 					   I18N_NOOP("Desktop Overview"), KAboutData::License_GPL,
--- kdebase-3.5.0/kpersonalizer/Makefile.am	2005-09-10 04:25:00.000000000 -0400
+++ kdebase-3.5.0-new/kpersonalizer/Makefile.am	2005-11-13 08:25:53.000000000 -0500
@@ -1,11 +1,14 @@
-bin_PROGRAMS = kpersonalizer
-kpersonalizer_SOURCES = stylepreview.ui krefinepage.cpp \
+bin_PROGRAMS =
+lib_LTLIBRARIES =
+kdeinit_LTLIBRARIES = kpersonalizer.la
+
+kpersonalizer_la_SOURCES = stylepreview.ui krefinepage.cpp \
       kstylepage.cpp keyecandypage.cpp kospage.cpp kcountrypage.cpp kpersonalizer.cpp \
       main.cpp kfindlanguage.cpp \
       kcountrypagedlg.ui kospagedlg.ui keyecandypagedlg.ui kstylepagedlg.ui \
       krefinepagedlg.ui  ksysinfo.cpp
 
-kpersonalizer_LDADD   = $(LIB_KIO) 
+kpersonalizer_la_LIBADD  = $(LIB_KIO) 
 
 EXTRA_DIST = main.cpp kpersonalizer.cpp kpersonalizer.h kpersonalizer.desktop kcountrypage.cpp kcountrypage.h kospage.cpp kospage.h keyecandypage.cpp keyecandypage.h kstylepage.cpp kstylepage.h krefinepage.cpp krefinepage.h cr16-app-kpersonalizer.png cr32-app-kpersonalizer.png README kcountrypagedlg.ui kospage.ui keyecandypagedlg.ui kstylepagedlg.ui krefinepagedlg.ui kfindlanguage.cpp kfindlanguage.h
 
@@ -38,7 +41,7 @@
 
 KDE_ICON= AUTO
 # the library search path. 
-kpersonalizer_LDFLAGS = $(all_libraries) $(KDE_RPATH)
+kpersonalizer_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module
 
 # Uncomment the following two lines if you add a ui.rc file for your application to make use of
 # KDE´s XML GUI builing
--- kdebase-3.5.0/kpersonalizer/main.cpp	2005-09-10 04:25:00.000000000 -0400
+++ kdebase-3.5.0-new/kpersonalizer/main.cpp	2005-11-13 08:25:53.000000000 -0500
@@ -33,7 +33,7 @@
         KCmdLineLastOption
 };
 
-int main(int argc, char *argv[])
+extern "C" KDE_EXPORT int kdemain(int argc, char *argv[])
 {
 	KAboutData aboutData( "kpersonalizer", I18N_NOOP("KPersonalizer"),
 		VERSION, description, KAboutData::License_GPL,
--- kdebase-3.5.0/kreadconfig/Makefile.am	2005-09-10 04:25:36.000000000 -0400
+++ kdebase-3.5.0-new/kreadconfig/Makefile.am	2005-11-13 08:25:53.000000000 -0500
@@ -1,12 +1,17 @@
 AM_CPPFLAGS = -DQT_NO_CAST_ASCII 
 
 INCLUDES = $(all_includes)
-AM_LDFLAGS = $(all_libraries) $(KDE_RPATH)
-LDADD   =       $(LIB_KDECORE)
 
-bin_PROGRAMS	= kreadconfig kwriteconfig
-kreadconfig_SOURCES	= kreadconfig.cpp
-kwriteconfig_SOURCES	= kwriteconfig.cpp
+bin_PROGRAMS	= 
+lib_LTLIBRARIES =
+kdeinit_LTLIBRARIES = kreadconfig.la kwriteconfig.la
+kreadconfig_la_SOURCES = kreadconfig.cpp
+kreadconfig_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module
+kreadconfig_la_LIBADD  = $(LIB_KDECORE)
+
+kwriteconfig_la_SOURCES	= kwriteconfig.cpp
+kwriteconfig_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module
+kwriteconfig_la_LIBADD  = $(LIB_KDECORE)
 
 messages:
 	$(XGETTEXT) $(kreadconfig_SOURCES) -o $(podir)/kreadconfig.pot
--- kdebase-3.5.0/kreadconfig/kreadconfig.cpp	2005-09-10 04:25:36.000000000 -0400
+++ kdebase-3.5.0-new/kreadconfig/kreadconfig.cpp	2005-11-13 08:25:53.000000000 -0500
@@ -41,7 +41,7 @@
 	{ "type <type>", I18N_NOOP("Type of variable"), 0 },
         KCmdLineLastOption
 };
-int main(int argc, char **argv)
+extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
 {
 	KAboutData aboutData("kreadconfig", I18N_NOOP("KReadConfig"),
 		"1.0.1",
--- kdebase-3.5.0/kreadconfig/kwriteconfig.cpp	2005-09-10 04:25:36.000000000 -0400
+++ kdebase-3.5.0-new/kreadconfig/kwriteconfig.cpp	2005-11-13 08:25:53.000000000 -0500
@@ -23,7 +23,7 @@
 	{ "+value", I18N_NOOP( "The value to write. Mandatory, on a shell use '' for empty" ), 0 },
         KCmdLineLastOption
 };
-int main(int argc, char **argv)
+extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
 {
 	KAboutData aboutData("kwriteconfig", I18N_NOOP("KWriteConfig"),
 		"1.0.0",
--- kdebase-3.5.0/ksplashml/Makefile.am	2005-09-10 04:25:51.000000000 -0400
+++ kdebase-3.5.0-new/ksplashml/Makefile.am	2005-11-13 08:25:53.000000000 -0500
@@ -4,10 +4,13 @@
 
 METASOURCES=AUTO
 
-bin_PROGRAMS = ksplash
-ksplash_SOURCES = wndmain.cpp ksplashiface.skel main.cpp
-ksplash_LDFLAGS = $(all_libraries) $(KDE_RPATH)
-ksplash_LDADD = $(LIB_KDEUI) themeengine/default/libthemedefault.la themeengine/libksplashthemes.la $(LIB_KIO)
+bin_PROGRAMS = 
+lib_LTLIBRARIES =
+kdeinit_LTLIBRARIES = ksplash.la
+
+ksplash_la_SOURCES = wndmain.cpp ksplashiface.skel main.cpp
+ksplash_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module
+ksplash_la_LIBADD = $(LIB_KDEUI) themeengine/default/libthemedefault.la themeengine/libksplashthemes.la $(LIB_KIO)
 
 noinst_HEADERS = ksplashiface.h wndmain.h
 
--- kdebase-3.5.0/ksplashml/main.cpp	2005-09-10 04:25:51.000000000 -0400
+++ kdebase-3.5.0-new/ksplashml/main.cpp	2005-11-13 08:25:53.000000000 -0500
@@ -37,7 +37,7 @@
   KCmdLineLastOption
 };
 
-int main( int argc, char **argv )
+extern "C" KDE_EXPORT int kdemain( int argc, char **argv )
 {
   KAboutData about(
     "ksplash",
--- kdebase-3.5.0/ksplashml/themeengine/simple/Makefile.am	2005-09-10 04:25:50.000000000 -0400
+++ kdebase-3.5.0-new/ksplashml/themeengine/simple/Makefile.am	2005-11-13 08:25:53.000000000 -0500
@@ -1,7 +1,10 @@
 
 INCLUDES = $(all_includes)
 
-bin_PROGRAMS = ksplashsimple
-ksplashsimple_SOURCES = main.cpp
-ksplashsimple_LDFLAGS = $(all_libraries) $(KDE_RPATH)
-ksplashsimple_LDADD = $(LIB_XINERAMA) $(LIB_X11)
+bin_PROGRAMS = 
+lib_LTLIBRARIES =
+kdeinit_LTLIBRARIES = ksplashsimple.la
+
+ksplashsimple_la_SOURCES = main.cpp
+ksplashsimple_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module
+ksplashsimple_la_LIBADD = $(LIB_XINERAMA) $(LIB_X11)
--- kdebase-3.5.1/ksplashml/themeengine/simple/main.cpp.orig	2006-02-27 10:56:40.000000000 -0500
+++ kdebase-3.5.1/ksplashml/themeengine/simple/main.cpp	2006-02-27 10:56:55.000000000 -0500
@@ -31,10 +31,11 @@
 # endif
 #endif
 
+#include <kdemacros.h>
 
 //#define DEBUG
 
-int main( int argc, char* argv[])
+extern "C" KDE_EXPORT int kdemain( int argc, char* argv[])
     {
     if( fork() != 0 )
         return 0;
--- kdebase-3.5.0/kstart/Makefile.am	2005-09-10 04:25:55.000000000 -0400
+++ kdebase-3.5.0-new/kstart/Makefile.am	2005-11-13 08:25:53.000000000 -0500
@@ -6,10 +6,13 @@
 
 #######	Files
 
-bin_PROGRAMS	= kstart
-kstart_SOURCES	= kstart.cpp
-kstart_LDFLAGS  = $(all_libraries) $(KDE_RPATH)
-kstart_LDADD    = $(LIB_KDECORE)
+bin_PROGRAMS	= 
+lib_LTLIBRARIES =
+kdeinit_LTLIBRARIES = kstart.la
+
+kstart_la_SOURCES	= kstart.cpp
+kstart_la_LDFLAGS  = $(all_libraries) $(KDE_PLUGIN) -module
+kstart_la_LIBADD   = $(LIB_KDECORE)
 METASOURCES =	kstart.moc 
 
 noinst_HEADERS = kstart.h version.h
--- kdebase-3.5.0/kstart/kstart.cpp	2005-09-10 04:25:55.000000000 -0400
+++ kdebase-3.5.0-new/kstart/kstart.cpp	2005-11-13 08:25:53.000000000 -0500
@@ -283,7 +283,7 @@
   KCmdLineLastOption
 };
 
-int main( int argc, char *argv[] )
+extern "C" KDE_EXPORT int kdemain( int argc, char *argv[] )
 {
   // David, 05/03/2000
   KAboutData aboutData( "kstart", I18N_NOOP("KStart"), KSTART_VERSION,
--- kdebase-3.5.0/ksysguard/gui/Makefile.am	2005-09-10 04:26:15.000000000 -0400
+++ kdebase-3.5.0-new/ksysguard/gui/Makefile.am	2005-11-13 08:32:24.000000000 -0500
@@ -18,21 +18,23 @@
  
 ####### This part is very ksysguard specific
 # you can add here more. This one gets installed 
-bin_PROGRAMS = ksysguard kpm
+bin_PROGRAMS = kpm
+lib_LTLIBRARIES =
+kdeinit_LTLIBRARIES = ksysguard.la
 
 # Which sources should be compiled for ksysguard.
-ksysguard_SOURCES = \
+ksysguard_la_SOURCES = \
 	SensorBrowser.cc \
 	WorkSheet.cc \
 	WorkSheetSettings.cc \
 	Workspace.cc \
 	ksysguard.cc ksysguard.skel
 
-ksysguard_LDADD = \
+ksysguard_la_LIBADD = \
 	ksgrd/libksgrd.la \
 	SensorDisplayLib/libsensordisplays.la \
 	$(LIB_KDEUI) $(LIB_KIO) $(LIB_KDNSSD)
-ksysguard_LDFLAGS = $(all_libraries) $(KDE_RPATH)
+ksysguard_la_LDFLAGS = $(all_libraries) $(KDE_RPATH) -module
 
 kpm_SOURCES = kpm.c
 
--- kdebase-3.5.0/ksysguard/gui/ksysguard.cc	2005-10-10 11:04:32.000000000 -0400
+++ kdebase-3.5.0-new/ksysguard/gui/ksysguard.cc	2005-11-13 08:25:53.000000000 -0500
@@ -520,7 +520,7 @@
 /*
  * Once upon a time...
  */
-int main( int argc, char** argv )
+extern "C" KDE_EXPORT int kdemain( int argc, char** argv )
 {
   // initpipe is used to keep the parent process around till the child
   // has registered with dcop.
--- kdebase-3.5.0/ksystraycmd/Makefile.am	2005-09-10 04:26:16.000000000 -0400
+++ kdebase-3.5.0-new/ksystraycmd/Makefile.am	2005-11-13 08:25:53.000000000 -0500
@@ -1,16 +1,19 @@
 ####### Fiddle here
 
 INCLUDES = $(all_includes)
-LDADD    = $(LIB_KDEUI)
 
 #######	Files
 
-bin_PROGRAMS	= ksystraycmd
+bin_PROGRAMS = 
+lib_LTLIBRARIES =
+kdeinit_LTLIBRARIES = ksystraycmd.la
+
 METASOURCES	= ksystraycmd.moc
 noinst_HEADERS  = ksystraycmd.h
 
-ksystraycmd_SOURCES = ksystraycmd.cpp main.cpp
-ksystraycmd_LDFLAGS  = $(all_libraries) $(KDE_RPATH)
+ksystraycmd_la_SOURCES = ksystraycmd.cpp main.cpp
+ksystraycmd_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module
+ksystraycmd_la_LIBADD  = $(LIB_KDEUI)
 
 messages:
 	$(XGETTEXT) $(ksystraycmd_SOURCES) -o $(podir)/ksystraycmd.pot
--- kdebase-3.5.0/ksystraycmd/main.cpp	2005-09-10 04:26:16.000000000 -0400
+++ kdebase-3.5.0-new/ksystraycmd/main.cpp	2005-11-13 08:25:53.000000000 -0500
@@ -45,7 +45,7 @@
   KCmdLineLastOption
 };
 
-int main( int argc, char *argv[] )
+extern "C" KDE_EXPORT int kdemain( int argc, char *argv[] )
 {
   KAboutData aboutData( "ksystraycmd", I18N_NOOP( "KSysTrayCmd" ),
 			"KSysTrayCmd 0.1",
--- kdebase-3.5.0/ktip/Makefile.am	2005-09-10 04:25:55.000000000 -0400
+++ kdebase-3.5.0-new/ktip/Makefile.am	2005-11-13 08:25:53.000000000 -0500
@@ -2,10 +2,13 @@
 
 SUBDIRS = pics
 
-bin_PROGRAMS = ktip
-ktip_SOURCES = ktipwindow.cpp
-ktip_LDADD = $(LIB_KDEUI)
-ktip_LDFLAGS = $(all_libraries) $(KDE_RPATH)
+bin_PROGRAMS = 
+lib_LTLIBRARIES =
+kdeinit_LTLIBRARIES = ktip.la
+
+ktip_la_SOURCES = ktipwindow.cpp
+ktip_la_LIBADD = $(LIB_KDEUI)
+ktip_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module
 
 METASOURCES = AUTO
 KDE_ICON = AUTO
--- kdebase-3.5.0/ktip/ktipwindow.cpp	2005-10-10 11:04:21.000000000 -0400
+++ kdebase-3.5.0-new/ktip/ktipwindow.cpp	2005-11-13 08:25:53.000000000 -0500
@@ -31,7 +31,7 @@
 
 static const char description[] = I18N_NOOP("Useful tips");
 
-int main(int argc, char *argv[])
+extern "C" KDE_EXPORT int kdemain(int argc, char *argv[])
 {
 	KAboutData aboutData("ktip", I18N_NOOP("KTip"),
 				"0.3", description, KAboutData::License_GPL,
--- kdebase-3.5.0/kwin/clients/kwmtheme/cli_installer/Makefile.am	2005-09-10 04:25:55.000000000 -0400
+++ kdebase-3.5.0-new/kwin/clients/kwmtheme/cli_installer/Makefile.am	2005-11-13 08:25:53.000000000 -0500
@@ -4,15 +4,17 @@
 
 ####### This part is very kwmtheme specific
 # you can add here more. This one gets installed 
-bin_PROGRAMS = 	kwmtheme
+bin_PROGRAMS = 	
+lib_LTLIBRARIES = 
+kdeinit_LTLIBRARIES = kwmtheme.la
 
 # Which sources should be compiled for kwmtheme.
-kwmtheme_SOURCES = main.cpp 
+kwmtheme_la_SOURCES = main.cpp 
 
 # the library search path. 
-kwmtheme_LDFLAGS = $(all_libraries) $(KDE_RPATH)
+kwmtheme_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module
 
 # the libraries to link against. Be aware of the order. First the libraries,
 # that depend on the following ones.
-kwmtheme_LDADD   = $(LIB_KDECORE)
+kwmtheme_la_LIBADD   = $(LIB_KDECORE)
 
--- kdebase-3.5.0/kwin/clients/kwmtheme/cli_installer/main.cpp	2005-09-10 04:25:55.000000000 -0400
+++ kdebase-3.5.0-new/kwin/clients/kwmtheme/cli_installer/main.cpp	2005-11-13 08:25:53.000000000 -0500
@@ -37,7 +37,7 @@
     copyOutput.close();
 }
 
-int main(int argc, char **argv)
+extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
 {
     KCmdLineArgs::init(argc, argv, "kwmtheme", description, "0.1");
     KCmdLineArgs::addCmdLineOptions( options );
--- kdebase-3.5.0/kwin/killer/Makefile.am	2005-09-10 04:25:55.000000000 -0400
+++ kdebase-3.5.0-new/kwin/killer/Makefile.am	2005-11-13 08:25:53.000000000 -0500
@@ -1,9 +1,11 @@
 INCLUDES = $(all_includes)
 
-bin_PROGRAMS = kwin_killer_helper
+bin_PROGRAMS = 
+lib_LTLIBRARIES =
+kdeinit_LTLIBRARIES = kwin_killer_helper.la
 
-kwin_killer_helper_SOURCES = killer.cpp
-kwin_killer_helper_LDADD = $(LIB_KDEUI)
-kwin_killer_helper_LDFLAGS = $(all_libraries) $(KDE_RPATH)
+kwin_killer_helper_la_SOURCES = killer.cpp
+kwin_killer_helper_la_LIBADD = $(LIB_KDEUI)
+kwin_killer_helper_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module
 
 METASOURCES = AUTO
--- kdebase-3.5.0/kwin/killer/killer.cpp	2005-09-10 04:25:55.000000000 -0400
+++ kdebase-3.5.0-new/kwin/killer/killer.cpp	2005-11-13 08:25:53.000000000 -0500
@@ -43,7 +43,7 @@
         KCmdLineLastOption
     };
 
-int main( int argc, char* argv[] )
+extern "C" KDE_EXPORT int kdemain( int argc, char* argv[] )
     {
     KLocale::setMainCatalogue( "kwin" ); // the messages are in kwin's .po file
     KCmdLineArgs::init( argc, argv, "kwin_killer_helper", I18N_NOOP( "KWin" ),
--- kdebase-3.5.0/libkonq/Makefile.am	2005-10-10 11:04:21.000000000 -0400
+++ kdebase-3.5.0-new/libkonq/Makefile.am	2005-11-13 08:25:53.000000000 -0500
@@ -21,7 +21,7 @@
 
 lib_LTLIBRARIES = libkonq.la
 libkonq_la_LDFLAGS = $(all_libraries) -version-info 6:0:2 -no-undefined
-libkonq_la_LIBADD = $(LIB_KPARTS)
+libkonq_la_LIBADD = $(LIB_KPARTS) $(LIBZ)
 
 libkonq_la_SOURCES = konq_popupmenu.cc knewmenu.cc \
    konq_xmlguiclient.cc\
--- kdebase-3.5.0/nsplugins/Makefile.am	2005-09-10 04:25:39.000000000 -0400
+++ kdebase-3.5.0-new/nsplugins/Makefile.am	2005-11-13 08:25:53.000000000 -0500
@@ -13,10 +13,13 @@
 libnsplugin_la_LDFLAGS = $(all_libraries) -avoid-version -module $(KDE_PLUGIN) -no-undefined
 libnsplugin_la_LIBADD  = -lkparts
 
-bin_PROGRAMS = nspluginscan
-nspluginscan_SOURCES = pluginscan.cpp
-nspluginscan_LDFLAGS =  $(KDE_RPATH) $(all_libraries) -export-dynamic
-nspluginscan_LDADD = $(LIB_KDEUI) $(LIB_KSYCOCA) -lXt
+bin_PROGRAMS = 
+lib_LTLIBRARIES =
+kdeinit_LTLIBRARIES = nspluginscan.la
+
+nspluginscan_la_SOURCES = pluginscan.cpp
+nspluginscan_la_LDFLAGS =  $(KDE_PLUGIN) $(all_libraries) -export-dynamic -module
+nspluginscan_la_LIBADD = $(LIB_KDEUI) $(LIB_KSYCOCA) -lXt
 
 kcm_nsplugins_la_SOURCES = kcm_nsplugins.cpp
 kcm_nsplugins_la_LDFLAGS = $(all_libraries) -module -avoid-version -no-undefined
--- kdebase-3.5.0/nsplugins/pluginscan.cpp	2005-10-10 11:04:05.000000000 -0400
+++ kdebase-3.5.0-new/nsplugins/pluginscan.cpp	2005-11-13 08:25:53.000000000 -0500
@@ -547,7 +547,7 @@
 };
 
 
-int main( int argc, char **argv )
+extern "C" KDE_EXPORT int kdemain( int argc, char **argv )
 {
     KAboutData aboutData( "nspluginscan", I18N_NOOP("nspluginscan"),
                           "0.3", "nspluginscan", KAboutData::License_GPL,
--- kdebase-3.5.0/nsplugins/viewer/Makefile.am	2005-09-10 04:25:39.000000000 -0400
+++ kdebase-3.5.0-new/nsplugins/viewer/Makefile.am	2005-11-13 08:25:53.000000000 -0500
@@ -1,12 +1,14 @@
 INCLUDES = -I$(top_srcdir)/nsplugins -I$(top_builddir)/nsplugins $(all_includes)
 METASOURCES = AUTO
 
-bin_PROGRAMS = nspluginviewer 
+bin_PROGRAMS = 
+lib_LTLIBRARIES = 
+kdeinit_LTLIBRARIES = nspluginviewer.la
 
-nspluginviewer_SOURCES = NSPluginCallbackIface.stub NSPluginClassIface.skel \
+nspluginviewer_la_SOURCES = NSPluginCallbackIface.stub NSPluginClassIface.skel \
 	nsplugin.cpp viewer.cpp kxt.cpp qxteventloop.cpp
-nspluginviewer_LDFLAGS = $(all_libraries) $(KDE_RPATH) -export-dynamic
-nspluginviewer_LDADD = $(LIB_KIO) $(LIB_KPARTS) -lXt
+nspluginviewer_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -export-dynamic -module
+nspluginviewer_la_LIBADD = $(LIB_KIO) $(LIB_KPARTS) -lXt
 
 NSPluginCallbackIface_DIR = $(srcdir)/..
 
--- kdebase-3.5.0/startkde	2005-11-08 17:37:01.000000000 -0500
+++ kdebase-3.5.0-new/startkde	2005-11-13 08:33:35.000000000 -0500
@@ -3,6 +3,11 @@
 #  DEFAULT KDE STARTUP SCRIPT ( KDE-3.5 )
 #
 
+source "@FINKPREFIX@/bin/init.sh"
+
+[ -x @FINKPREFIX@/bin/remap-bad-apple-keys.pl ] && @FINKPREFIX@/bin/remap-bad-apple-keys.pl
+
+
 # When the X server dies we get a HUP signal from xinit. We must ignore it
 # because we still need to do some cleanup.
 trap 'echo GOT SIGHUP' HUP
@@ -257,20 +262,23 @@
 
 echo 'startkde: Starting up...'  1>&2
 
-# run KPersonalizer before the session, if this is the first login
-if test "$kpersonalizerrc_general_firstlogin" = "true"; then
-    # start only dcopserver, don't start whole kdeinit (takes too long)
-    echo 'startkde: Running kpersonalizer...'  1>&2
-    dcopserver
-    kwin --lock &
-    kpersonalizer --before-session
-    # handle kpersonalizer restarts (language change)
-    while test $? -eq 1; do
-        kpersonalizer --r --before-session
-    done
-    dcopquit kwin
-    dcopserver_shutdown --wait
-fi
+# on osx we skip this, the defaults are sane and most people
+# do bad things like "mac os menus" which makes it worse
+
+## run KPersonalizer before the session, if this is the first login
+#if test "$kpersonalizerrc_general_firstlogin" = "true"; then
+#    # start only dcopserver, don't start whole kdeinit (takes too long)
+#    echo 'startkde: Running kpersonalizer...'  1>&2
+#    dcopserver
+#    kwin --lock &
+#    kpersonalizer --before-session
+#    # handle kpersonalizer restarts (language change)
+#    while test $? -eq 1; do
+#        kpersonalizer --r --before-session
+#    done
+#    dcopquit kwin
+#    dcopserver_shutdown --wait
+#fi
 
 # the splashscreen and progress indicator
 case "$ksplashrc_ksplash_theme" in 
@@ -316,7 +324,29 @@
 # We only check for 255 which means that the ksmserver process could not be 
 # started, any problems thereafter, e.g. ksmserver failing to initialize, 
 # will remain undetected.
-test -n "$KDEWM" && KDEWM="--windowmanager $KDEWM"
+
+USE_PROXY=0
+if test -n "$KDEWM"; then
+  if test -z `expr "$KDEWM" : '\(.*quartz-wm.*\)'`; then
+    USE_PROXY=1
+  fi
+  KDEWM="--windowmanager $KDEWM"
+else
+  KDEWM="--windowmanager kwin"
+  USE_PROXY=1
+fi
+
+if test "$USE_PROXY" = "1"; then
+  if test -x /usr/X11R6/bin/quartz-wm; then
+    /usr/X11R6/bin/quartz-wm --only-proxy >/dev/null 2>&1 &
+  else
+    AUTOCUTSEL=`which autocutsel 2>/dev/null`
+    if test -n "$AUTOCUTSEL" && test -x "$AUTOCUTSEL"; then
+      $AUTOCUTSEL >/dev/null 2>&1 &
+    fi
+  fi
+fi
+
 kwrapper ksmserver $KDEWM 
 if test $? -eq 255; then
   # Startup error
--- kdebase-3.5.0/kioslave/man/kio_man.cpp	2005-10-10 11:04:01.000000000 -0400
+++ kdebase-3.5.0-new/kioslave/man/kio_man.cpp	2005-11-16 11:25:22.000000000 -0500
@@ -50,7 +50,7 @@
 
 MANProtocol *MANProtocol::_self = 0;
 
-#define SGML2ROFF_DIRS "/usr/lib/sgml"
+#define SGML2ROFF_DIRS "@FINKPREFIX@/share/sgml"
 
 /*
  * Drop trailing ".section[.gz]" from name
@@ -883,6 +883,7 @@
 
     // Default paths
     static const char *manpaths[] = {
+        "@FINKPREFIX@/share/man",
         "/usr/X11/man",
         "/usr/X11R6/man",
         "/usr/man",
--- kdebase-3.5.0/kioslave/ldap/configure.in.in	2005-10-10 11:04:01.000000000 -0400
+++ kdebase-3.5.0-new/kioslave/ldap/configure.in.in	2005-11-16 13:59:13.000000000 -0500
@@ -42,6 +42,7 @@
   AC_DEFINE_UNQUOTED(HAVE_LIBLDAP, 1, [Define if you have LDAP libraries])
   LDAP_SUBDIR="ldap"
   AC_MSG_RESULT(Apple framework)
+  with_ldap=FOUND
   ;;
 FOUND)
   AC_MSG_RESULT(incs=$ldap_incdir libs=$ldap_libdir)
--- kdebase-3.5.0/nsplugins/viewer/viewer.cpp	Mon Oct 10 11:04:05 2005
+++ kdebase-3.5.0-new/nsplugins/viewer/viewer.cpp	Wed Dec  7 21:54:25 2005
@@ -54,6 +54,9 @@
 #include "qxteventloop.h"
 #endif
 
+#if defined(__APPLE__) && !defined(RLIMIT_AS) && defined(RLIMIT_RSS)
+#define RLIMIT_AS RLIMIT_RSS
+#endif
 
 
 /**
@@ -206,7 +209,7 @@
 #endif
 
 
-int main(int argc, char** argv)
+extern "C" KDE_EXPORT int kdemain(int argc, char** argv)
 {
     // nspluginviewer is a helper app, it shouldn't do session management at all
    setenv( "SESSION_MANAGER", "", 1 );
--- kdebase-3.5.0/kioslave/nfs/mount.h	Sat Sep 10 04:25:37 2005
+++ kdebase-3.5.0-new/kioslave/nfs/mount.h	Thu Dec  8 10:09:04 2005
@@ -8,6 +8,22 @@
 
 #include <rpc/rpc.h>
 
+#if !defined(IXDR_GET_INT32)
+#define IXDR_GET_INT32(buf)             ((int32_t)ntohl((u_int32_t)*(buf)++))
+#endif
+
+#if !defined(IXDR_PUT_INT32)
+#define IXDR_PUT_INT32(buf, v)          (*(buf)++ =(int32_t)htonl((u_int32_t)v))
+#endif
+
+#if !defined(IXDR_GET_U_INT32) && defined(IXDR_GET_INT32)
+#define IXDR_GET_U_INT32(buf)           ((u_int32_t)IXDR_GET_INT32(buf))
+#endif
+
+#if !defined(IXDR_PUT_U_INT32) && defined(IXDR_PUT_INT32)
+#define IXDR_PUT_U_INT32(buf, v)        IXDR_PUT_INT32((buf), ((int32_t)(v)))
+#endif
+
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
--- kdebase-3.5.0/applnk/Makefile.am	Sat Sep 10 04:25:45 2005
+++ kdebase-3.5.0-patched/applnk/Makefile.am	Mon Dec 12 14:42:14 2005
@@ -3,7 +3,7 @@
 xdg_menu_DATA = kde-settings.menu kde-information.menu kde-screensavers.menu
 
 xdg_mergedmenu_DATA = kde-essential.menu
-xdg_mergedmenudir = $(xdg_menudir)/applications-merged
+xdg_mergedmenudir = $(xdg_menudir)/kde-applications-merged
 
 xdg_directory_DATA = \
 kde-main.directory \
--- kdebase-3.5.0/doc/userguide/kde-for-admins.docbook	Tue Nov  8 17:36:17 2005
+++ kdebase-3.5.0-patched/doc/userguide/kde-for-admins.docbook	Mon Dec 12 14:42:42 2005
@@ -1650,7 +1650,7 @@
 </para>
 
 <informalexample>
-<para>Example from <filename>applications.menu</filename>:
+<para>Example from <filename>kde-applications.menu</filename>:
 <programlisting>
 <markup>
 	&lt;Menu&gt;
@@ -1724,7 +1724,7 @@
 information, see <ulink url="http://www.freedesktop.org/Standards/basedir-spec">http://www.freedesktop.org/Standards/basedir-spec</ulink></para>
 
 <informalexample>
-<para>Example from <filename>applications.menu</filename>:
+<para>Example from <filename>kde-applications.menu</filename>:
 <programlisting>
 <markup>
              &lt;Menu&gt;
@@ -1776,7 +1776,7 @@
 <title>Essential Menus</title>
 
 <para><filename
-class="directory">$<envar>KDEDIR</envar>/etc/xdg/menus/applications-merged/</filename>
+class="directory">$<envar>KDEDIR</envar>/etc/xdg/menus/kde-applications-merged/</filename>
 contains <filename>kde-essential.menu</filename> which includes some
 essential menus that are normally not shown in the &kde; menu itself:
 <itemizedlist>
--- kdebase-3.5.0/kcontrol/fonts/Makefile.am	Sat Sep 10 04:25:04 2005
+++ kdebase-3.5.0-patched/kcontrol/fonts/Makefile.am	Mon Dec 12 21:08:01 2005
@@ -4,13 +4,13 @@
 libkxftconfig_la_LIBADD = $(LIBFONTCONFIG_LIBS)
 libkxftconfig_la_LDFLAGS = $(LIBFONTCONFIG_RPATH)
 
-AM_CPPFLAGS  = $(all_includes) $(LIBFONTCONFIG_CFLAGS) -D_LARGEFILE64_SOURCE
+AM_CPPFLAGS  = $(LIBFONTCONFIG_CFLAGS) -D_LARGEFILE64_SOURCE $(all_includes)
 
 kde_module_LTLIBRARIES = kcm_fonts.la
 
 kcm_fonts_la_SOURCES = fonts.cpp
 kcm_fonts_la_LDFLAGS = $(KDE_RPATH) $(LIBFONTCONFIG_RPATH) -module -avoid-version $(all_libraries) -no-undefined
-kcm_fonts_la_LIBADD = libkxftconfig.la $(top_builddir)/kcontrol/krdb/libkrdb.la $(LIB_KDEUI) $(LIBFONTCONFIG_LIBS)
+kcm_fonts_la_LIBADD = $(LIBFONTCONFIG_LIBS) libkxftconfig.la $(top_builddir)/kcontrol/krdb/libkrdb.la $(LIB_KDEUI)
 METASOURCES = AUTO
 
 noinst_HEADERS = fonts.h kxftconfig.h
--- kdebase-3.5.0/kcontrol/fonts/configure.in.in	Sat Sep 10 04:25:04 2005
+++ kdebase-3.5.0-patched/kcontrol/fonts/configure.in.in	Mon Dec 12 17:51:56 2005
@@ -1,8 +1,6 @@
-KDE_FIND_PATH(fontconfig-config, FONTCONFIG_CONFIG, [${prefix}/bin ${exec_prefix}/bin /usr/bin /usr/local/bin /opt/local/bin], [
         KDE_FIND_PATH(pkg-config, PKGCONFIG, [${prefix}/bin ${exec_prefix}/bin /usr/bin /usr/local/bin /opt/local/bin], [
             AC_MSG_WARN([Could not find neither pkg-config nor fontconfig-config, check http://www.fontconfig.org/ ])
         ])
-])
 
 if test -n "$PKGCONFIG"; then
   vers=`$PKGCONFIG fontconfig --modversion 2>/dev/null | sed -e 's/libfontconfig //' | awk 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
--- kdebase-3.5.0/kcontrol/kfontinst/configure.in.in	Sat Sep 10 04:25:09 2005
+++ kdebase-3.5.0-patched/kcontrol/kfontinst/configure.in.in	Mon Dec 12 17:52:09 2005
@@ -36,11 +36,9 @@
 
     KFI_FOUND_FONTCONFIG=0
     # check for fontconfig...
-    KDE_FIND_PATH(fontconfig-config, FONTCONFIG_CONFIG, [${prefix}/bin ${exec_prefix}/bin /usr/bin /usr/local/bin /opt/local/bin], [
             KDE_FIND_PATH(pkg-config, PKGCONFIG, [${prefix}/bin ${exec_prefix}/bin /usr/bin /usr/local/bin /opt/local/bin], [
                 AC_MSG_WARN([Could not find neither pkg-config nor fontconfig-config, check http://www.fontconfig.org/ ])
             ])
-    ])
 
     if test -n "$PKGCONFIG"; then
         vers=`$PKGCONFIG fontconfig --modversion 2>/dev/null | sed -e 's/libfontconfig //' | awk 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
--- kdebase-3.5.0/kcontrol/kfontinst/kcmfontinst/Makefile.am	Sat Sep 10 04:25:09 2005
+++ kdebase-3.5.0-patched/kcontrol/kfontinst/kcmfontinst/Makefile.am	Mon Dec 12 21:03:23 2005
@@ -4,10 +4,10 @@
 endif
 
 kde_module_LTLIBRARIES = kcm_fontinst.la
-kcm_fontinst_la_LIBADD  = $(LIB_KIO) $(FONTINST_PRINT_LIB) $(LIBFREETYPE_LIBS) $(LIBFONTCONFIG_LIBS) ../lib/libkfontinst.la
+kcm_fontinst_la_LIBADD  = $(LIBFREETYPE_LIBS) $(LIBFONTCONFIG_LIBS) $(LIB_KIO) $(FONTINST_PRINT_LIB) ../lib/libkfontinst.la
 METASOURCES = AUTO
 kcm_fontinst_la_LDFLAGS = $(KDE_PLUGIN) $(all_libraries) $(KDE_RPATH) -module -avoid-version -no-undefined
-AM_CPPFLAGS = -I$(srcdir)/../lib $(FONTINST_PRINT_INC) -I$(srcdir)/../../fonts $(all_includes) $(LIBFREETYPE_CFLAGS) $(LIBFONTCONFIG_CFLAGS)
+AM_CPPFLAGS = -I$(srcdir)/../lib $(FONTINST_PRINT_INC) -I$(srcdir)/../../fonts $(LIBFREETYPE_CFLAGS) $(LIBFONTCONFIG_CFLAGS) $(all_includes)
  
 xdg_apps_DATA = kcmfontinst.desktop
  
--- kdebase-3.5.0/kcontrol/kfontinst/kfile-plugin/Makefile.am	Sat Sep 10 04:25:09 2005
+++ kdebase-3.5.0-patched/kcontrol/kfontinst/kfile-plugin/Makefile.am	Mon Dec 12 21:03:53 2005
@@ -1,13 +1,13 @@
 kde_module_LTLIBRARIES = kfile_font.la
 
 kfile_font_la_SOURCES = KFileFont.cpp
-kfile_font_la_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIBFREETYPE_RPATH) -module $(KDE_PLUGIN)
-kfile_font_la_LIBADD = $(LIB_KIO) $(LIBFREETYPE_LIBS) ../lib/libkfontinst.la
+kfile_font_la_LDFLAGS = $(LIBFREETYPE_RPATH) $(all_libraries) $(KDE_RPATH) -module $(KDE_PLUGIN)
+kfile_font_la_LIBADD = $(LIBFREETYPE_LIBS) $(LIB_KIO) ../lib/libkfontinst.la
 
 kdelnkdir = $(kde_servicesdir)
 kde_services_DATA = kfile_font.desktop
 
-AM_CPPFLAGS = -I$(srcdir)/../lib -I$(srcdir)/../../fonts $(all_includes) $(LIBFREETYPE_CFLAGS)
+AM_CPPFLAGS = -I$(srcdir)/../lib -I$(srcdir)/../../fonts $(LIBFREETYPE_CFLAGS) $(all_includes)
 
 METASOURCES = AUTO
 noinst_HEADERS = KFileFont.h
--- kdebase-3.5.0/kcontrol/kfontinst/kfontinst/Makefile.am	Sat Sep 10 04:25:09 2005
+++ kdebase-3.5.0-patched/kcontrol/kfontinst/kfontinst/Makefile.am	Mon Dec 12 21:04:33 2005
@@ -1,5 +1,8 @@
-bin_PROGRAMS = kfontinst
-kfontinst_SOURCES = \
+bin_PROGRAMS = 
+lib_LTLIBRARIES =
+kdeinit_LTLIBRARIES = kfontinst.la
+
+kfontinst_la_SOURCES = \
 CompressedFile.cpp \
 Main.cpp \
 Encodings.cpp \
@@ -15,6 +18,6 @@
 Fontmap.h \
 XConfig.h
 
-kfontinst_LDADD = ../../fonts/libkxftconfig.la $(LIBFONTCONFIG_LIBS) $(LIBFREETYPE_LIBS) $(LIB_FONT_ENC) $(LIBZ) $(LIB_KIO) ../lib/libkfontinst.la
-kfontinst_LDFLAGS = $(all_libraries) $(LIBFONTCONFIG_RPATH) $(LIBFREETYPE_RPATH) $(KDE_RPATH)
-AM_CPPFLAGS= -DOS_$(UNAME) -I$(srcdir)/../lib -I$(srcdir)/../../fonts $(all_includes) $(LIBFREETYPE_CFLAGS) $(LIBFONTCONFIG_CFLAGS)
+kfontinst_la_LIBADD = $(LIBFONTCONFIG_LIBS) $(LIBFREETYPE_LIBS) $(LIB_FONT_ENC) ../../fonts/libkxftconfig.la $(LIBZ) $(LIB_KIO) ../lib/libkfontinst.la
+kfontinst_la_LDFLAGS = $(LIBFONTCONFIG_RPATH) $(LIBFREETYPE_RPATH) $(all_libraries) $(KDE_PLUGIN) -module
+AM_CPPFLAGS= -DOS_$(UNAME) -I$(srcdir)/../lib -I$(srcdir)/../../fonts $(LIBFREETYPE_CFLAGS) $(LIBFONTCONFIG_CFLAGS) $(all_includes)
--- kdebase-3.5.0/kcontrol/kfontinst/kio/Makefile.am	Sat Sep 10 04:25:09 2005
+++ kdebase-3.5.0-patched/kcontrol/kfontinst/kio/Makefile.am	Mon Dec 12 21:05:15 2005
@@ -2,9 +2,9 @@
 kio_fonts_la_SOURCES = \
 KioFonts.cpp
 
-kio_fonts_la_LIBADD = ../../fonts/libkxftconfig.la $(LIBFONTCONFIG_LIBS) $(LIBFREETYPE_LIBS) $(LIB_KIO) -lkdesu ../lib/libkfontinst.la
-kio_fonts_la_LDFLAGS = $(KDE_PLUGIN) $(all_libraries) $(KDE_RPATH) $(LIBFONTCONFIG_RPATH) $(LIBFREETYPE_RPATH) -module -avoid-version -no-undefined
-AM_CPPFLAGS= -I$(srcdir)/../lib -I$(srcdir)/../../fonts $(all_includes) $(LIBFREETYPE_CFLAGS) $(LIBFONTCONFIG_CFLAGS) -D_LARGEFILE64_SOURCE
+kio_fonts_la_LIBADD = $(LIBFONTCONFIG_LIBS) $(LIBFREETYPE_LIBS) ../../fonts/libkxftconfig.la $(LIB_KIO) -lkdesu ../lib/libkfontinst.la
+kio_fonts_la_LDFLAGS = $(LIBFONTCONFIG_RPATH) $(LIBFREETYPE_RPATH) $(KDE_PLUGIN) $(all_libraries) $(KDE_RPATH) -module -avoid-version -no-undefined
+AM_CPPFLAGS= -I$(srcdir)/../lib -I$(srcdir)/../../fonts $(LIBFREETYPE_CFLAGS) $(LIBFONTCONFIG_CFLAGS) -D_LARGEFILE64_SOURCE $(all_includes)
 
 # The kxftconfig stuf really belongs to kdebase/kcontrol/fonts - here only so that can distribute this as an archive.
 noinst_HEADERS = \
--- kdebase-3.5.0/kcontrol/kfontinst/lib/Makefile.am	Sat Sep 10 04:25:09 2005
+++ kdebase-3.5.0-patched/kcontrol/kfontinst/lib/Makefile.am	Mon Dec 12 21:06:00 2005
@@ -9,6 +9,6 @@
 FcEngine.h \
 KfiConstants.h
 
-libkfontinst_la_LIBADD = $(LIB_KDECORE) $(LIBFONTCONFIG_LIBS) $(LIBFREETYPE_LIBS) $(LIB_KIO) $(LIBXFT_LIB)
-libkfontinst_la_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIBFONTCONFIG_RPATH) $(LIBFREETYPE_RPATH) -no-undefined
-AM_CPPFLAGS= $(all_includes) $(LIBFREETYPE_CFLAGS) $(LIBFONTCONFIG_CFLAGS) -D_LARGEFILE64_SOURCE
+libkfontinst_la_LIBADD = $(LIBFONTCONFIG_LIBS) $(LIBFREETYPE_LIBS) $(LIB_KDECORE) $(LIB_KIO) $(LIBXFT_LIB)
+libkfontinst_la_LDFLAGS = $(LIBFONTCONFIG_RPATH) $(LIBFREETYPE_RPATH) $(all_libraries) $(KDE_RPATH) -no-undefined
+AM_CPPFLAGS= $(LIBFREETYPE_CFLAGS) $(LIBFONTCONFIG_CFLAGS) -D_LARGEFILE64_SOURCE $(all_includes)
--- kdebase-3.5.0/kcontrol/kfontinst/thumbnail/Makefile.am	Sat Sep 10 04:25:09 2005
+++ kdebase-3.5.0-patched/kcontrol/kfontinst/thumbnail/Makefile.am	Mon Dec 12 21:06:21 2005
@@ -2,7 +2,7 @@
 
 fontthumbnail_la_SOURCES = FontThumbnail.cpp
 fontthumbnail_la_LIBADD = $(LIBFREETYPE_LIBS) $(LIB_KDECORE) $(LIB_KIO) ../lib/libkfontinst.la
-fontthumbnail_la_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIBFREETYPE_RPATH) -module $(KDE_PLUGIN)
+fontthumbnail_la_LDFLAGS = $(KDE_RPATH) $(LIBFREETYPE_RPATH) -module $(KDE_PLUGIN) $(all_libraries)
 METASOURCES = AUTO
 
 noinst_HEADERS = FontThumbnail.h
@@ -11,4 +11,4 @@
 
 kde_services_DATA = fontthumbnail.desktop
 
-AM_CPPFLAGS= -I$(srcdir)/../lib -I$(srcdir)/../../fonts $(all_includes) $(LIBFREETYPE_CFLAGS)
+AM_CPPFLAGS= -I$(srcdir)/../lib -I$(srcdir)/../../fonts $(LIBFREETYPE_CFLAGS) $(all_includes)
--- kdebase-3.5.0/kcontrol/kfontinst/viewpart/Makefile.am	Sat Sep 10 04:25:09 2005
+++ kdebase-3.5.0-patched/kcontrol/kfontinst/viewpart/Makefile.am	Mon Dec 12 21:06:44 2005
@@ -13,18 +13,21 @@
 
 kde_services_DATA = kfontviewpart.desktop
 
-AM_CPPFLAGS = -I$(srcdir)/../lib -I$(srcdir)/../../fonts $(all_includes) $(LIBFREETYPE_CFLAGS) $(LIBFONTCONFIG_CFLAGS)
+AM_CPPFLAGS = -I$(srcdir)/../lib -I$(srcdir)/../../fonts $(LIBFREETYPE_CFLAGS) $(LIBFONTCONFIG_CFLAGS) $(all_includes)
 METASOURCES = AUTO
 
-kfontview_LDADD = $(LIB_KPARTS)
-kfontview_LDFLAGS = $(all_libraries) $(KDE_RPATH)
+kfontview_la_LIBADD = $(LIB_KPARTS)
+kfontview_la_LDFLAGS = $(KDE_PLUGIN) -module $(all_libraries)
+
+bin_PROGRAMS = 
+lib_LTLIBRARIES =
+kdeinit_LTLIBRARIES = kfontview.la
 
-bin_PROGRAMS = kfontview
 xdg_apps_DATA = kfontview.desktop
 
 appdata_DATA = kfontviewpart.rc kfontviewui.rc
 appdatadir = $(kde_datadir)/kfontview
 
-kfontview_SOURCES = FontViewerApp.cpp
+kfontview_la_SOURCES = FontViewerApp.cpp
 
 
--- kdebase-3.5.1/kcontrol/kfontinst/viewpart/FontViewerApp.cpp.orig	2006-01-25 20:53:38.000000000 -0500
+++ kdebase-3.5.1/kcontrol/kfontinst/viewpart/FontViewerApp.cpp	2006-01-25 20:52:35.000000000 -0500
@@ -116,7 +116,7 @@
                             KAboutData::License_GPL,
                             I18N_NOOP("(c) Craig Drummond, 2004"));
 
-int main(int argc, char **argv)
+extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
 {
     KCmdLineArgs::init(argc, argv, &aboutData);
     KCmdLineArgs::addCmdLineOptions(options);
--- kdebase-3.5.1/kcontrol/kfontinst/lib/FcEngine.h.orig	2006-01-25 23:03:27.000000000 -0500
+++ kdebase-3.5.1/kcontrol/kfontinst/lib/FcEngine.h	2006-01-25 23:01:15.000000000 -0500
@@ -5,6 +5,8 @@
 #include "config.h"
 #endif
 
+#define KFI_FC_NO_WIDTHS 1
+
 #include <qstring.h>
 #include <qvaluevector.h>
 #include <qfont.h>
--- kdebase-3.5.1/kcontrol/kfontinst/kfontinst/Main.cpp.orig	2006-01-25 23:04:25.000000000 -0500
+++ kdebase-3.5.1/kcontrol/kfontinst/kfontinst/Main.cpp	2006-01-25 23:03:41.000000000 -0500
@@ -190,7 +190,7 @@
         KFI::CXConfig::refreshPaths(true);
 }
 
-int main(int argc, char *argv[])
+extern "C" KDE_EXPORT int kdemain(int argc, char *argv[])
 {
 #ifdef HAVE_GETOPT_H
     static struct option options[]=
--- kdebase-3.5.1/kxkb/rules.cpp.orig	2006-02-03 09:56:15.000000000 -0500
+++ kdebase-3.5.1/kxkb/rules.cpp	2006-02-03 09:56:40.000000000 -0500
@@ -300,7 +300,7 @@
  */
 const QString KeyRules::getLayout(const QString &layvar) const
 {
-  static const char* LAYOUT_PATTERN = "[a-z0-9_-]*";
+  static const char* LAYOUT_PATTERN = "[a-zA-Z0-9_-]*";
   QString varLine = layvar.stripWhiteSpace();
   QRegExp rx(LAYOUT_PATTERN);
   int pos = rx.search(varLine, 0);
@@ -318,7 +318,7 @@
  */
 const QString KeyRules::getVariant(const QString &layvar) const
 {
-  static const char* VARIANT_PATTERN = "\\([a-z0-9_-]*\\)";
+  static const char* VARIANT_PATTERN = "\\([a-zA-Z0-9_-]*\\)";
   QString varLine = layvar.stripWhiteSpace();
   QRegExp rx(VARIANT_PATTERN);
   int pos = rx.search(varLine, 0);
--- kdebase-3.5.1/kdesktop/krootwm.cc	2005-10-10 11:04:11.000000000 -0400
+++ kdebase-3.5.1-new/kdesktop/krootwm.cc	2006-02-28 21:07:46.000000000 -0500
@@ -52,6 +52,7 @@
 #include <kuser.h>
 #include <qfile.h>
 
+#include <kprocess.h>
 #include "krootwm.h"
 #include "kdiconview.h"
 #include "desktop.h"
@@ -82,6 +83,9 @@
   m_configDialog = 0;
 
 
+  new KAction(i18n("Konsole..." ), "openterm", 0, this, SLOT( slotOpenTerminal() ),
+               m_actionCollection, "open_terminal" );
+
   // Creates the new menu
   menuBar = 0; // no menubar yet
   menuNew = 0;
@@ -135,6 +139,7 @@
   {
      new KAction(i18n("Run Command..."), "run", 0, m_pDesktop, SLOT( slotExecuteCommand() ), m_actionCollection, "exec" );
   }
+
   if (!KGlobal::config()->isImmutable())
   {
      new KAction(i18n("Configure Desktop..."), "configure", 0, this, SLOT( slotConfigureDesktop() ),
@@ -378,6 +383,13 @@
     desktopMenu->disconnect( this );
     bool needSeparator = false;
 
+    action = m_actionCollection->action("open_terminal");
+    if (action)
+    {
+       action->plug( desktopMenu );
+       needSeparator = true;
+    }
+
     if (menuNew)
     {
        menuNew->plug( desktopMenu );
@@ -724,6 +736,13 @@
   return args;
 }
 
+void KRootWm::slotOpenTerminal()
+{
+  KProcess proc;
+  proc << locate("exe", "konsole");
+  proc.start(KProcess::DontCare);
+}
+
 void KRootWm::slotConfigureDesktop() {
   if (!m_configDialog)
   {
--- kdebase-3.5.1/kdesktop/krootwm.h	2005-10-10 11:04:11.000000000 -0400
+++ kdebase-3.5.1-new/kdesktop/krootwm.h	2006-02-28 21:07:46.000000000 -0500
@@ -119,6 +119,7 @@
   void slotSessionActivated( int );
   void slotNewSession();
   void slotLockNNewSession();
+  void slotOpenTerminal();
 
 private:
   KDesktop* m_pDesktop;
--- kdebase-3.5.1/konsole/konsole/TEWidget.cpp	2005-09-10 04:26:08.000000000 -0400
+++ kdebase-3.5.1-new/konsole/konsole/TEWidget.cpp	2006-02-28 21:06:55.000000000 -0500
@@ -393,6 +393,8 @@
   qApp->installEventFilter( this ); //FIXME: see below
   KCursor::setAutoHideCursor( this, true );
 
+  setInputMethodEnabled( true );
+
   // Init DnD ////////////////////////////////////////////////////////////////
   setAcceptDrops(true); // attempt
   dragInfo.state = diNone;
--- kdebase-3.5.1/konsole/konsole/TEmuVt102.cpp	2005-09-10 04:26:07.000000000 -0400
+++ kdebase-3.5.1-new/konsole/konsole/TEmuVt102.cpp	2006-02-28 21:06:23.000000000 -0500
@@ -952,7 +952,10 @@
     scr->setHistCursor(scr->getHistLines());
 
   if (cmd==CMD_send) {
-    if ((ev->state() & AltButton) && !metaspecified ) sendString("\033");
+    if ( (ev->state() & AltButton) && 
+      !metaspecified &&
+      !(len && txt[0]==27) )
+      sendString("\033");
     emit sndBlock(txt,len);
     return;
   }
--- kdebase-3.5.1/kwin/events.cpp	2006-01-19 12:01:07.000000000 -0500
+++ kdebase-3.5.1-new/kwin/events.cpp	2006-02-28 21:09:11.000000000 -0500
@@ -323,17 +323,7 @@
             return ( e->xunmap.event != e->xunmap.window ); // hide wm typical event from Qt
             }
         case MapNotify:
-            {
-#if KDE_IS_VERSION( 3, 9, 90 )
-#warning Consider dumping this workaround.
-#endif
-            // See bug #100177, especially comments #6 and #14. This workaround shouldn't be
-            // necessary when X.org with that fix becomes available and it's an unnecessary
-            // X roundtrip for an experimental unstable feature.
-            if( addSystemTrayWin( e->xmap.window ))
-                return true;
             return ( e->xmap.event != e->xmap.window ); // hide wm typical event from Qt
-            }
         case ReparentNotify:
             {
         //do not confuse Qt with these events. After all, _we_ are the
