diff -Nurd kdesdk-3.5.10/cervisia/Makefile.am kdesdk-3.5.10-new/cervisia/Makefile.am
--- kdesdk-3.5.10/cervisia/Makefile.am	2008-08-19 14:13:58.000000000 -0400
+++ kdesdk-3.5.10-new/cervisia/Makefile.am	2010-07-21 20:10:58.000000000 -0400
@@ -26,12 +26,12 @@
 		   globalignorelist.cpp editwithmenu.cpp logmessageedit.cpp
 libcervisiapart_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries)
 libcervisiapart_la_LIBADD = $(LIB_KFILE) $(LIB_KPARTS) $(LIB_KUTILS) \
-		   cvsservice/libcvsservice.la libcervisia.la
+		   cvsservice/libcvsservice.la libcervisia.la $(LIB_KDEUI)
 libcervisiapart_la_COMPILE_FIRST = cvsservice/cvsservice_stub.h cervisiasettings.h
 
 cervisia_la_SOURCES = main.cpp cervisiashell.cpp
 cervisia_la_LDFLAGS = $(all_libraries) $(KDE_RPATH) -module $(KDE_PLUGIN)
-cervisia_la_LIBADD = $(LIB_KPARTS) $(LIB_KUTILS) cvsservice/libcvsservice.la libcervisia.la
+cervisia_la_LIBADD = $(LIB_KPARTS) $(LIB_KUTILS) cvsservice/libcvsservice.la libcervisia.la $(LIB_KDEUI) $(LIB_KIO)
 cervisia_la_COMPILE_FIRST = cvsservice/cvsservice_stub.h cervisiasettings.h
 
 man_MANS = cervisia.1
diff -Nurd kdesdk-3.5.10/cervisia/cvsservice/Makefile.am kdesdk-3.5.10-new/cervisia/cvsservice/Makefile.am
--- kdesdk-3.5.10/cervisia/cvsservice/Makefile.am	2005-11-08 17:28:42.000000000 -0500
+++ kdesdk-3.5.10-new/cervisia/cvsservice/Makefile.am	2010-07-21 20:07:54.000000000 -0400
@@ -12,14 +12,14 @@
 kdeinit_LTLIBRARIES = cvsservice.la cvsaskpass.la
 
 cvsservice_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module
-cvsservice_la_LIBADD = $(LIB_KIO)
+cvsservice_la_LIBADD = $(LIB_KIO) $(LIB_QT) $(LIB_KDECORE) -lDCOP -lkdesu $(LIB_KDEUI)
 cvsservice_la_SOURCES = main.cpp cvsservice.cpp cvsjob.cpp \
 	cvsservice.skel cvsservice.stub cvsjob.skel cvsjob.stub \
 	repository.cpp repository.skel repository.stub sshagent.cpp \
 	cvsserviceutils.cpp cvsloginjob.cpp cvsloginjob.skel cvsloginjob.stub
 
 cvsaskpass_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module
-cvsaskpass_la_LIBADD = $(LIB_KDEUI)
+cvsaskpass_la_LIBADD = $(LIB_KDEUI) $(LIB_QT) $(LIB_KDECORE)
 cvsaskpass_la_SOURCES = cvsaskpass.cpp
 
 include_HEADERS = cvsservice_stub.h cvsjob_stub.h repository_stub.h
@@ -30,7 +30,7 @@
 lib_LTLIBRARIES = libcvsservice.la
 
 libcvsservice_la_LDFLAGS = $(all_libraries) -no-undefined -version-info 0:1
-libcvsservice_la_LIBADD = $(LIB_KDECORE)
+libcvsservice_la_LIBADD = $(LIB_KDECORE) -lDCOP $(LIB_QT)
 libcvsservice_la_SOURCES = cvsservice.stub cvsjob.stub repository.stub dummy.cpp
 
 dummy.cpp:
diff -Nurd kdesdk-3.5.9/kapptemplate/kapp/app-Makefile.am kdesdk-3.5.9-new/kapptemplate/kapp/app-Makefile.am
--- kdesdk-3.5.9/kapptemplate/kapp/app-Makefile.am	2005-09-10 04:20:59.000000000 -0400
+++ kdesdk-3.5.9-new/kapptemplate/kapp/app-Makefile.am	2008-02-13 22:01:07.000000000 -0500
@@ -8,28 +8,30 @@
 
 # this is the program that gets installed.  it's name is used for all
 # of the other Makefile.am variables
-bin_PROGRAMS = $APP_NAME_LC ${APP_NAME_LC}_client
+bin_PROGRAMS =
+lib_LTLIBRARIES =
+kdeinit_LTLIBRARIES = ${APP_NAME_LC}.la ${APP_NAME_LC}_client.la
 
 # set the include path for X, qt and KDE
 INCLUDES         = \$(all_includes)
 
 # the library search path. 
-${APP_NAME_LC}_LDFLAGS = \$(KDE_RPATH) \$(all_libraries)
+${APP_NAME_LC}_la_LDFLAGS = \$(KDE_PLUGIN) -module \$(all_libraries)
 
 # the libraries to link against.
-${APP_NAME_LC}_LDADD   = \$(LIB_KFILE) -lkdeprint
+${APP_NAME_LC}_la_LIBADD   = \$(LIB_KFILE) -lkdeprint
 
 # which sources should be compiled for $APP_NAME_LC
-${APP_NAME_LC}_SOURCES =	main.cpp ${APP_NAME_LC}.cpp ${APP_NAME_LC}view.cpp \\
+${APP_NAME_LC}_la_SOURCES =	main.cpp ${APP_NAME_LC}.cpp ${APP_NAME_LC}view.cpp \\
 					${APP_NAME_LC}pref.cpp ${APP_NAME_LC}iface.skel
 
 # these are the headers for your project
 noinst_HEADERS   = ${APP_NAME_LC}.h ${APP_NAME_LC}view.h ${APP_NAME_LC}pref.h
 
 # client stuff
-${APP_NAME_LC}_client_LDFLAGS = \$(KDE_RPATH) \$(all_libraries)
-${APP_NAME_LC}_client_LDADD   = \$(LIB_KDECORE)
-${APP_NAME_LC}_client_SOURCES = ${APP_NAME_LC}_client.cpp
+${APP_NAME_LC}_client_la_LDFLAGS = \$(KDE_PLUGIN) -module \$(all_libraries)
+${APP_NAME_LC}_client_la_LIBADD  = \$(LIB_KDECORE)
+${APP_NAME_LC}_client_la_SOURCES = ${APP_NAME_LC}_client.cpp
 
 # let automoc handle all of the meta source files (moc)
 METASOURCES = AUTO
diff -Nurd kdesdk-3.5.9/kapptemplate/kapp/app_client.cpp kdesdk-3.5.9-new/kapptemplate/kapp/app_client.cpp
--- kdesdk-3.5.9/kapptemplate/kapp/app_client.cpp	2005-09-10 04:20:59.000000000 -0400
+++ kdesdk-3.5.9-new/kapptemplate/kapp/app_client.cpp	2008-02-13 22:01:07.000000000 -0500
@@ -5,7 +5,7 @@
 #include <qdatastream.h>
 #include <qstring.h>
 
-int main(int argc, char **argv)
+extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
 {
     KApplication app(argc, argv, "${APP_NAME_LC}_client", false);
 
diff -Nurd kdesdk-3.5.9/kapptemplate/kapp/main.cpp kdesdk-3.5.9-new/kapptemplate/kapp/main.cpp
--- kdesdk-3.5.9/kapptemplate/kapp/main.cpp	2005-09-10 04:20:59.000000000 -0400
+++ kdesdk-3.5.9-new/kapptemplate/kapp/main.cpp	2008-02-13 22:01:07.000000000 -0500
@@ -18,7 +18,7 @@
     KCmdLineLastOption
 };
 
-int main(int argc, char **argv)
+extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
 {
     KAboutData about("${APP_NAME_LC}", I18N_NOOP("${APP_NAME}"), version, description, KAboutData::License_GPL, "(C) 2004 ${AUTHOR}", 0, 0, "${EMAIL}");
     about.addAuthor( "${AUTHOR}", 0, "${EMAIL}" );
diff -Nurd kdesdk-3.5.9/kapptemplate/kpartapp/main.cpp kdesdk-3.5.9-new/kapptemplate/kpartapp/main.cpp
--- kdesdk-3.5.9/kapptemplate/kpartapp/main.cpp	2005-09-10 04:20:59.000000000 -0400
+++ kdesdk-3.5.9-new/kapptemplate/kpartapp/main.cpp	2008-02-13 22:01:07.000000000 -0500
@@ -17,7 +17,7 @@
     KCmdLineLastOption
 };
 
-int main(int argc, char **argv)
+extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
 {
     KAboutData about("${APP_NAME_LC}", I18N_NOOP("${APP_NAME}"), version, description, KAboutData::License_GPL, "(C) 2004 ${AUTHOR}", 0, 0, "${EMAIL}");
     about.addAuthor( "${AUTHOR}", 0, "${EMAIL}" );
diff -Nurd kdesdk-3.5.10/kbabel/addons/preview/Makefile.am kdesdk-3.5.10-new/kbabel/addons/preview/Makefile.am
--- kdesdk-3.5.10/kbabel/addons/preview/Makefile.am	2005-09-10 04:20:54.000000000 -0400
+++ kdesdk-3.5.10-new/kbabel/addons/preview/Makefile.am	2010-07-22 01:03:16.000000000 -0400
@@ -5,7 +5,7 @@
 kde_module_LTLIBRARIES = pothumbnail.la
 
 pothumbnail_la_SOURCES = pothumbcreator.cpp
-pothumbnail_la_LIBADD = ../../common/libkbabelcommon.la 
+pothumbnail_la_LIBADD = ../../common/libkbabelcommon.la -lkdefx
 pothumbnail_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN)
 
 noinst_HEADERS = pothumbcreator.h 
diff -Nurd kdesdk-3.5.9/kbabel/catalogmanager/Makefile.am kdesdk-3.5.9-new/kbabel/catalogmanager/Makefile.am
--- kdesdk-3.5.9/kbabel/catalogmanager/Makefile.am	2006-10-01 13:27:34.000000000 -0400
+++ kdesdk-3.5.9-new/kbabel/catalogmanager/Makefile.am	2008-02-13 22:01:07.000000000 -0500
@@ -7,7 +7,11 @@
 # this is the program that gets installed. Its name is used for all
 # of the other Makefile.am variables
 noinst_LTLIBRARIES = libcatalogmanager.la
-bin_PROGRAMS = catalogmanager
+
+kdeinit_LTLIBRARIES = catalogmanager.la
+bin_PROGRAMS = 
+lib_LTLIBRARIES =
+
 
 # set the include path for X, qt and KDE. Let $(all_includes) be always last.
 INCLUDES         = -I$(srcdir)/../common -I../common -I$(srcdir)/../kbabeldict \
@@ -30,11 +34,11 @@
 libcatalogmanager_la_LDFLAGS = $(all_libraries) -no-undefined
 
 
-catalogmanager_SOURCES = main.cpp
+catalogmanager_la_SOURCES = main.cpp
 
 # the libraries to link against.
-catalogmanager_LDADD   = libcatalogmanager.la
-catalogmanager_LDFLAGS = $(all_libraries) $(KDE_RPATH)
+catalogmanager_la_LIBADD  = libcatalogmanager.la
+catalogmanager_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module
 
 # these are the headers for your project
 noinst_HEADERS   = catalogmanageriface.h catalogmanager.h \
diff -Nurd kdesdk-3.5.9/kbabel/catalogmanager/libsvn/svnhandler.h kdesdk-3.5.9-new/kbabel/catalogmanager/libsvn/svnhandler.h
--- kdesdk-3.5.9/kbabel/catalogmanager/libsvn/svnhandler.h	2007-05-14 03:40:26.000000000 -0400
+++ kdesdk-3.5.9-new/kbabel/catalogmanager/libsvn/svnhandler.h	2008-02-13 22:01:07.000000000 -0500
@@ -47,6 +47,9 @@
 
 class KSharedConfig;
 
+#undef stderr
+#undef stdout
+
 /**
  * This class is the backend for SVN support in Catalog Manager.
  *
diff -Nurd kdesdk-3.5.9/kbabel/catalogmanager/main.cpp kdesdk-3.5.9-new/kbabel/catalogmanager/main.cpp
--- kdesdk-3.5.9/kbabel/catalogmanager/main.cpp	2007-01-15 06:24:26.000000000 -0500
+++ kdesdk-3.5.9-new/kbabel/catalogmanager/main.cpp	2008-02-13 22:01:07.000000000 -0500
@@ -180,7 +180,7 @@
 };
 
 
-int main(int argc, char **argv)
+extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
 {
     KLocale::setMainCatalogue("kbabel");
     KAboutData about("catalogmanager",I18N_NOOP("KBabel - Catalog Manager"),VERSION,
diff -Nurd kdesdk-3.5.10/kbabel/common/Makefile.am kdesdk-3.5.10-new/kbabel/common/Makefile.am
--- kdesdk-3.5.10/kbabel/common/Makefile.am	2005-10-10 10:58:12.000000000 -0400
+++ kdesdk-3.5.10-new/kbabel/common/Makefile.am	2010-07-21 19:49:01.000000000 -0400
@@ -25,7 +25,7 @@
 	projectsettings.cpp	\
 	stringdistance.cpp
 
-libkbabelcommon_la_LIBADD =  $(LIB_KIO) libgettext/libgettext.la 
+libkbabelcommon_la_LIBADD =  $(LIB_KIO) libgettext/libgettext.la  $(LIB_QT) $(LIB_KDECORE) $(LIB_KDEUI)
 libkbabelcommon_la_LDFLAGS = $(all_libraries) -version-info 5:0:2 -no-undefined
 
 # these are the headers for your project
diff -Nurd kdesdk-3.5.10/kbabel/commonui/Makefile.am kdesdk-3.5.10-new/kbabel/commonui/Makefile.am
--- kdesdk-3.5.10/kbabel/commonui/Makefile.am	2006-10-01 13:27:34.000000000 -0400
+++ kdesdk-3.5.10-new/kbabel/commonui/Makefile.am	2010-08-26 11:24:52.000000000 -0400
@@ -2,7 +2,7 @@
 
 # this is the program that gets installed.  it's name is used for all
 # of the other Makefile.am variables
-noinst_LTLIBRARIES = libkbabelcommonui.la
+lib_LTLIBRARIES = libkbabelcommonui.la
 
 # set the include path for X, qt and KDE. Put local paths before all_includes.
 INCLUDES         = -I$(srcdir)/../common -I../common -I$(srcdir)/../kbabeldict -I../kbabeldict $(all_includes)
@@ -19,7 +19,7 @@
 			       cmdedit.cpp		\
 			       diffpreferences.ui
 
-libkbabelcommonui_la_LIBADD =  $(LIB_KIO) -lktexteditor ../common/libkbabelcommon.la ../kbabeldict/libkbabeldict.la
+libkbabelcommonui_la_LIBADD =  $(LIB_KIO) -lktexteditor ../common/libkbabelcommon.la ../kbabeldict/libkbabeldict.la $(LIB_KPARTS)
 
 libkbabelcommonui_la_LDFLAGS = $(all_libraries)
 
diff -Nurd kdesdk-3.5.9/kbabel/kbabel/Makefile.am kdesdk-3.5.9-new/kbabel/kbabel/Makefile.am
--- kdesdk-3.5.9/kbabel/kbabel/Makefile.am	2006-10-01 13:27:33.000000000 -0400
+++ kdesdk-3.5.9-new/kbabel/kbabel/Makefile.am	2008-02-13 22:01:07.000000000 -0500
@@ -5,7 +5,9 @@
 # this is the program that gets installed.  it's name is used for all
 # of the other Makefile.am variables
 noinst_LTLIBRARIES = libkbabel.la
-bin_PROGRAMS = kbabel
+kdeinit_LTLIBRARIES = kbabel.la
+bin_PROGRAMS = 
+lib_LTLIBRARIES =
 
 # set the include path for X, qt and KDE
 INCLUDES         = -I$(srcdir)/../common -I../common -I$(srcdir)/../commonui -I../commonui -I$(srcdir)/../kbabeldict -I../kbabeldict $(all_includes)
@@ -41,11 +43,11 @@
 libkbabel_la_LDFLAGS = $(all_libraries)
 
 
-kbabel_SOURCES = main.cpp
+kbabel_la_SOURCES = main.cpp
 
 # the libraries to link against.
-kbabel_LDADD   = libkbabel.la
-kbabel_LDFLAGS = $(all_libraries) $(KDE_RPATH)
+kbabel_la_LIBADD  = libkbabel.la
+kbabel_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module
 
 # these are the headers for your project
 noinst_HEADERS   = kbabel.h kbabelview.h \
diff -Nurd kdesdk-3.5.9/kbabel/kbabel/main.cpp kdesdk-3.5.9-new/kbabel/kbabel/main.cpp
--- kdesdk-3.5.9/kbabel/kbabel/main.cpp	2007-01-15 06:24:25.000000000 -0500
+++ kdesdk-3.5.9-new/kbabel/kbabel/main.cpp	2008-02-13 22:01:07.000000000 -0500
@@ -542,7 +542,7 @@
 };
 
 
-int main(int argc, char **argv)
+extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
 {
     KAboutData about("kbabel",I18N_NOOP("KBabel"),VERSION,
        I18N_NOOP("An advanced PO file editor"),KAboutData::License_GPL,
diff -Nurd kdesdk-3.5.10/kbabel/kbabeldict/Makefile.am kdesdk-3.5.10-new/kbabel/kbabeldict/Makefile.am
--- kdesdk-3.5.10/kbabel/kbabeldict/Makefile.am	2006-10-01 13:27:33.000000000 -0400
+++ kdesdk-3.5.10-new/kbabel/kbabeldict/Makefile.am	2010-08-27 05:05:57.000000000 -0400
@@ -6,33 +6,31 @@
 
 pkgincludedir = $(includedir)/kbabel
 
-# this is the program that gets installed.  it's name is used for all
-# of the other Makefile.am variables
-noinst_LTLIBRARIES = libkbabeldict.la
-bin_PROGRAMS = kbabeldict
+bin_PROGRAMS = 
+kdeinit_LTLIBRARIES = kbabeldict.la
 
 # set the include path for X, qt and KDE
 INCLUDES         = -I$(srcdir)/../common -I$(top_builddir)/kbabel/common $(all_includes)
 
 
 # library for babeldict plugins
-lib_LTLIBRARIES = libkbabeldictplugin.la
+lib_LTLIBRARIES = libkbabeldictplugin.la libkbabeldict.la
 libkbabeldictplugin_la_SOURCES = searchengine.cpp 
-libkbabeldictplugin_la_LIBADD =  $(LIB_KDECORE)
+libkbabeldictplugin_la_LIBADD =  $(LIB_KDECORE) $(LIB_QT)
 libkbabeldictplugin_la_LDFLAGS = -version-info 3:0:2 $(all_libraries)
 
 libkbabeldict_la_SOURCES = kbabeldictbox.cpp \
             kbabeldictiface.skel dictionarymenu.cpp dictchooser.cpp \
             aboutmoduledlg.cpp 
-libkbabeldict_la_LIBADD =  ../common/libkbabelcommon.la libkbabeldictplugin.la $(LIB_KDEUI)
+libkbabeldict_la_LIBADD =  ../common/libkbabelcommon.la libkbabeldictplugin.la $(LIB_KDEUI) -lDCOP
 libkbabeldict_la_LDFLAGS = $(all_libraries) -no-undefined
 
 
-kbabeldict_SOURCES = main.cpp kbabeldictview.cpp kbabeldict.cpp kbabelsplash.cpp
+kbabeldict_la_SOURCES = main.cpp kbabeldictview.cpp kbabeldict.cpp kbabelsplash.cpp
 
 # the libraries to link against.
-kbabeldict_LDADD   = libkbabeldict.la
-kbabeldict_LDFLAGS = $(all_libraries) $(KDE_RPATH)
+kbabeldict_la_LIBADD  = libkbabeldict.la
+kbabeldict_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module
 
 # these are the headers for your project
 noinst_HEADERS   =  kbabeldict.h kbabeldictview.h kbabelsplash.h aboutmoduledlg.h
diff -Nurd kdesdk-3.5.9/kbabel/kbabeldict/main.cpp kdesdk-3.5.9-new/kbabel/kbabeldict/main.cpp
--- kdesdk-3.5.9/kbabel/kbabeldict/main.cpp	2006-07-22 04:11:50.000000000 -0400
+++ kdesdk-3.5.9-new/kbabel/kbabeldict/main.cpp	2008-02-13 22:01:07.000000000 -0500
@@ -107,7 +107,7 @@
 };
 
 
-int main(int argc, char **argv)
+extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
 {
     KLocale::setMainCatalogue("kbabel");
     
diff -Nurd kdesdk-3.5.10/kbugbuster/Makefile.am kdesdk-3.5.10-new/kbugbuster/Makefile.am
--- kdesdk-3.5.10/kbugbuster/Makefile.am	2005-09-10 04:21:11.000000000 -0400
+++ kdesdk-3.5.10-new/kbugbuster/Makefile.am	2010-07-21 20:23:39.000000000 -0400
@@ -6,12 +6,14 @@
 
 SUBDIRS = backend gui pics $(KRESOURCES_SUBDIR)
 
-bin_PROGRAMS = kbugbuster
+kdeinit_LTLIBRARIES = kbugbuster.la
+bin_PROGRAMS = 
+lib_LTLIBRARIES =
 
-kbugbuster_SOURCES = main.cpp
-kbugbuster_LDADD   = -lkutils gui/libkbbmainwindow.la \
-                     backend/libkbbbackend.la $(LIB_KHTML) $(LIB_KIO) 
-kbugbuster_LDFLAGS = $(all_libraries) $(KDE_RPATH)
+kbugbuster_la_SOURCES = main.cpp
+kbugbuster_la_LIBADD  = -lkutils gui/libkbbmainwindow.la \
+                     backend/libkbbbackend.la $(LIB_KHTML) $(LIB_KIO) $(LIB_QT) $(LIB_KDEUI) $(LIB_KDECORE) -lkdefx -lDCOP
+kbugbuster_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module
 
 xdg_apps_DATA = kbugbuster.desktop
 
diff -Nurd kdesdk-3.5.9/kbugbuster/configure.in.in kdesdk-3.5.9-new/kbugbuster/configure.in.in
--- kdesdk-3.5.9/kbugbuster/configure.in.in	2005-09-10 04:21:11.000000000 -0400
+++ kdesdk-3.5.9-new/kbugbuster/configure.in.in	2008-02-13 22:01:07.000000000 -0500
@@ -2,6 +2,7 @@
 KDE_CHECK_HEADER(libkcal/resourcecalendar.h,HAVE_KCAL=1,
  AC_MSG_WARN([Unable to find libkcal. The Bugzilla todo list \
  resource for KOrganizer won't be compiled.]))
+HAVE_KCAL=0
 AM_CONDITIONAL(include_kcalresource, test "$HAVE_KCAL" = 1)
 ])
 
diff -Nurd kdesdk-3.5.9/kbugbuster/main.cpp kdesdk-3.5.9-new/kbugbuster/main.cpp
--- kdesdk-3.5.9/kbugbuster/main.cpp	2005-09-10 04:21:11.000000000 -0400
+++ kdesdk-3.5.9-new/kbugbuster/main.cpp	2008-02-13 22:01:07.000000000 -0500
@@ -42,7 +42,7 @@
   KCmdLineLastOption
 };
 
-int main(int argc, char *argv[])
+extern "C" KDE_EXPORT int kdemain(int argc, char *argv[])
 {
     KAboutData aboutData( "kbugbuster", I18N_NOOP( "KBugBuster" ),
         VERSION, description, KAboutData::License_GPL,
diff -Nurd kdesdk-3.5.10/kcachegrind/kcachegrind/Makefile.am kdesdk-3.5.10-new/kcachegrind/kcachegrind/Makefile.am
--- kdesdk-3.5.10/kcachegrind/kcachegrind/Makefile.am	2005-09-10 04:21:07.000000000 -0400
+++ kdesdk-3.5.10-new/kcachegrind/kcachegrind/Makefile.am	2010-07-22 01:06:20.000000000 -0400
@@ -1,6 +1,8 @@
-bin_PROGRAMS = kcachegrind
+kdeinit_LTLIBRARIES = kcachegrind.la
+bin_PROGRAMS = 
+lib_LTLIBRARIES =
 
-kcachegrind_SOURCES = \
+kcachegrind_la_SOURCES = \
  functionselectionbase.ui \
  stackselectionbase.ui \
  partselectionbase.ui \
@@ -19,9 +21,10 @@
  costlistitem.cpp partlistitem.cpp functionitem.cpp \
  instritem.cpp stackitem.cpp callgraphview.cpp
 
-kcachegrind_COMPILE_FIRST = ../version.h
+kcachegrind_la_COMPILE_FIRST = ../version.h
 
-kcachegrind_LDADD   =  $(LIB_KIO)
+kcachegrind_la_LIBADD  = $(LIB_KIO) $(LIB_QT) $(LIB_KDEUI) $(LIB_KDECORE) -lDCOP
+kcachegrind_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module
 
 KDE_ICON = AUTO
 
@@ -43,9 +46,6 @@
 
 METASOURCES = AUTO
 
-# the library search path. 
-kcachegrind_LDFLAGS = $(all_libraries) $(KDE_RPATH)
-
 rcdir = $(kde_datadir)/kcachegrind
 rc_DATA = kcachegrindui.rc
 
diff -Nurd kdesdk-3.5.9/kcachegrind/kcachegrind/main.cpp kdesdk-3.5.9-new/kcachegrind/kcachegrind/main.cpp
--- kdesdk-3.5.9/kcachegrind/kcachegrind/main.cpp	2005-09-10 04:21:07.000000000 -0400
+++ kdesdk-3.5.9-new/kcachegrind/kcachegrind/main.cpp	2008-02-13 22:01:07.000000000 -0500
@@ -40,7 +40,7 @@
   KCmdLineLastOption // End of options.
 };
 
-int main( int argc, char ** argv )
+extern "C" KDE_EXPORT int kdemain( int argc, char ** argv )
 {
   KAboutData aboutData("kcachegrind",
                        I18N_NOOP("KCachegrind"),
diff -Nurd kdesdk-3.5.9/kcachegrind/kcachegrind/sourceitem.h kdesdk-3.5.9-new/kcachegrind/kcachegrind/sourceitem.h
--- kdesdk-3.5.9/kcachegrind/kcachegrind/sourceitem.h	2005-09-10 04:21:07.000000000 -0400
+++ kdesdk-3.5.9-new/kcachegrind/kcachegrind/sourceitem.h	2008-02-13 22:01:07.000000000 -0500
@@ -25,6 +25,7 @@
 
 #include <qlistview.h>
 #include "tracedata.h"
+#undef fileno
 
 class SourceView;
 
diff -Nurd kdesdk-3.5.10/kdeaccounts-plugin/Makefile.am kdesdk-3.5.10-new/kdeaccounts-plugin/Makefile.am
--- kdesdk-3.5.10/kdeaccounts-plugin/Makefile.am	2005-09-10 04:21:05.000000000 -0400
+++ kdesdk-3.5.10-new/kdeaccounts-plugin/Makefile.am	2010-07-22 01:07:15.000000000 -0400
@@ -4,7 +4,7 @@
 kde_module_LTLIBRARIES = kabcformat_kdeaccounts.la
 kabcformat_kdeaccounts_la_SOURCES = kdeaccountsformat.cpp
 kabcformat_kdeaccounts_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN)
-kabcformat_kdeaccounts_la_LIBADD  = -lkabc
+kabcformat_kdeaccounts_la_LIBADD  = -lkabc $(LIB_QT)
 
 # let automoc handle all of the meta source files (moc)
 METASOURCES = AUTO
diff -Nurd kdesdk-3.5.10/kfile-plugins/c++/Makefile.am kdesdk-3.5.10-new/kfile-plugins/c++/Makefile.am
--- kdesdk-3.5.10/kfile-plugins/c++/Makefile.am	2005-09-10 04:21:10.000000000 -0400
+++ kdesdk-3.5.10-new/kfile-plugins/c++/Makefile.am	2010-07-22 01:10:12.000000000 -0400
@@ -10,7 +10,7 @@
 
 kfile_cpp_la_SOURCES = kfile_cpp.cpp
 kfile_cpp_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN)
-kfile_cpp_la_LIBADD = $(LIB_KIO)
+kfile_cpp_la_LIBADD = $(LIB_KIO) $(LIB_KDECORE) $(LIB_QT)
 
 # let automoc handle all of the meta source files (moc)
 METASOURCES = AUTO
diff -Nurd kdesdk-3.5.10/kfile-plugins/diff/Makefile.am kdesdk-3.5.10-new/kfile-plugins/diff/Makefile.am
--- kdesdk-3.5.10/kfile-plugins/diff/Makefile.am	2005-09-10 04:21:10.000000000 -0400
+++ kdesdk-3.5.10-new/kfile-plugins/diff/Makefile.am	2010-07-22 01:08:35.000000000 -0400
@@ -10,7 +10,7 @@
 
 kfile_diff_la_SOURCES = kfile_diff.cpp
 kfile_diff_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN)
-kfile_diff_la_LIBADD = $(LIB_KSYCOCA)
+kfile_diff_la_LIBADD = $(LIB_KSYCOCA) $(LIB_QT) $(LIB_KDECORE)
 
 # let automoc handle all of the meta source files (moc)
 METASOURCES = AUTO
diff -Nurd kdesdk-3.5.10/kfile-plugins/ts/Makefile.am kdesdk-3.5.10-new/kfile-plugins/ts/Makefile.am
--- kdesdk-3.5.10/kfile-plugins/ts/Makefile.am	2005-09-10 04:21:10.000000000 -0400
+++ kdesdk-3.5.10-new/kfile-plugins/ts/Makefile.am	2010-07-22 01:09:45.000000000 -0400
@@ -9,7 +9,7 @@
 
 kfile_ts_la_SOURCES = kfile_ts.cpp
 kfile_ts_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN)
-kfile_ts_la_LIBADD = $(LIB_KIO)
+kfile_ts_la_LIBADD = $(LIB_KIO) $(LIB_KDECORE) $(LIB_QT)
 
 # let automoc handle all of the meta source files (moc)
 METASOURCES = AUTO
diff -Nurd kdesdk-3.5.10/kioslave/svn/Makefile.am kdesdk-3.5.10-new/kioslave/svn/Makefile.am
--- kdesdk-3.5.10/kioslave/svn/Makefile.am	2005-09-10 04:21:11.000000000 -0400
+++ kdesdk-3.5.10-new/kioslave/svn/Makefile.am	2010-07-22 01:13:11.000000000 -0400
@@ -5,7 +5,7 @@
 kde_module_LTLIBRARIES = kio_svn.la
 
 kio_svn_la_SOURCES = svn.cpp
-kio_svn_la_LIBADD = -lkio
+kio_svn_la_LIBADD = -lkio $(LIB_QT) $(SOMETHING) -lDCOP $(LIB_KDECORE)
 kio_svn_la_LDFLAGS = -avoid-version -module $(all_libraries) $(KDE_PLUGIN) $(SVNLD) $(SVN_LIB)
 
 protocol_DATA = svn+http.protocol svn+https.protocol svn+file.protocol svn+ssh.protocol svn.protocol
diff -Nurd kdesdk-3.5.9/kioslave/svn/configure.in.in kdesdk-3.5.9-new/kioslave/svn/configure.in.in
--- kdesdk-3.5.9/kioslave/svn/configure.in.in	2008-02-13 04:38:00.000000000 -0500
+++ kdesdk-3.5.9-new/kioslave/svn/configure.in.in	2008-02-13 22:01:07.000000000 -0500
@@ -155,3 +155,5 @@
 AC_SUBST(SVN_CPPFLAGS)
 AC_SUBST(SVNLD)
 AM_CONDITIONAL(include_kioslave_svn, test -n "$SVN_SUBDIR")
+
+export DO_NOT_COMPILE="$DO_NOT_COMPILE kioslave"
diff -Nurd kdesdk-3.5.9/kmtrace/Makefile.am kdesdk-3.5.9-new/kmtrace/Makefile.am
--- kdesdk-3.5.9/kmtrace/Makefile.am	2005-09-10 04:20:58.000000000 -0400
+++ kdesdk-3.5.9-new/kmtrace/Makefile.am	2008-02-13 22:01:07.000000000 -0500
@@ -21,15 +21,16 @@
 LDADD = $(LIB_KDECORE) -liberty
 INCLUDES = $(all_includes)
 
-bin_PROGRAMS = kmtrace demangle kmmatch
-kmtrace_SOURCES = kmtrace.cpp
-kmtrace_LDFLAGS = $(all_libraries)
+kdeinit_LTLIBRARIES = kmtrace.la demangle.la kmmatch.la
+bin_PROGRAMS = 
+kmtrace_la_SOURCES = kmtrace.cpp
+kmtrace_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module
 
-demangle_SOURCES = demangle.cpp
-demangle_LDFLAGS = $(all_libraries)
+demangle_la_SOURCES = demangle.cpp
+demangle_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module
 
-kmmatch_SOURCES = match.cpp
-kmmatch_LDFLAGS = $(all_libraries)
+kmmatch_la_SOURCES = match.cpp
+kmmatch_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module
 
 bin_SCRIPTS = kminspector
 
diff -Nurd kdesdk-3.5.9/kmtrace/demangle.cpp kdesdk-3.5.9-new/kmtrace/demangle.cpp
--- kdesdk-3.5.9/kmtrace/demangle.cpp	2005-09-10 04:20:58.000000000 -0400
+++ kdesdk-3.5.9-new/kmtrace/demangle.cpp	2008-02-13 22:01:07.000000000 -0500
@@ -36,7 +36,7 @@
 }
 
 
-int main(int argc, char **argv)
+extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
 {
    char buf[1024];
 
diff -Nurd kdesdk-3.5.9/kmtrace/kmtrace.cpp kdesdk-3.5.9-new/kmtrace/kmtrace.cpp
--- kdesdk-3.5.9/kmtrace/kmtrace.cpp	2005-10-10 10:58:21.000000000 -0400
+++ kdesdk-3.5.9-new/kmtrace/kmtrace.cpp	2008-02-13 22:01:07.000000000 -0500
@@ -576,7 +576,7 @@
   KCmdLineLastOption
 };
 
-int main(int argc, char *argv[])
+extern "C" KDE_EXPORT int kdemain(int argc, char *argv[])
 {
   KInstance instance("kmtrace");
 
diff -Nurd kdesdk-3.5.9/kmtrace/match.cpp kdesdk-3.5.9-new/kmtrace/match.cpp
--- kdesdk-3.5.9/kmtrace/match.cpp	2005-09-10 04:20:58.000000000 -0400
+++ kdesdk-3.5.9-new/kmtrace/match.cpp	2008-02-13 22:01:07.000000000 -0500
@@ -13,7 +13,7 @@
 #include <kstandarddirs.h>
 #include <kcmdlineargs.h>
 
-int main(int argc, char **argv)
+extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
 {
    char buf[1024];
    if (argc != 3)
diff -Nurd kdesdk-3.5.10/kompare/Makefile.am kdesdk-3.5.10-new/kompare/Makefile.am
--- kdesdk-3.5.10/kompare/Makefile.am	2005-09-10 04:21:05.000000000 -0400
+++ kdesdk-3.5.10-new/kompare/Makefile.am	2010-07-21 20:27:40.000000000 -0400
@@ -22,15 +22,17 @@
 #########################################################################
 # this is the program that gets installed.  it's name is used for all
 # of the other Makefile.am variables
-bin_PROGRAMS = kompare
+kdeinit_LTLIBRARIES = kompare.la
+bin_PROGRAMS = 
+lib_LTLIBRARIES =
 
 # the application source, library search path, and link libraries
-kompare_SOURCES = main.cpp kompare_shell.cpp kompareurldialog.cpp
-kompare_LDFLAGS = $(all_libraries)
-kompare_LDADD   = $(LIB_KPARTS) \
+kompare_la_SOURCES = main.cpp kompare_shell.cpp kompareurldialog.cpp
+kompare_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module
+kompare_la_LIBADD  = $(LIB_KPARTS) \
 	$(top_builddir)/kompare/interfaces/libkompareinterface.la \
 	$(top_builddir)/kompare/libdialogpages/libdialogpages.la \
-	-lktexteditor
+	-lktexteditor $(LIB_KDECORE) $(LIB_KDEUI)
 
 # this is where the desktop file will go
 xdg_apps_DATA = kompare.desktop
diff -Nurd kdesdk-3.5.10/kompare/komparenavtreepart/Makefile.am kdesdk-3.5.10-new/kompare/komparenavtreepart/Makefile.am
--- kdesdk-3.5.10/kompare/komparenavtreepart/Makefile.am	2005-09-10 04:21:05.000000000 -0400
+++ kdesdk-3.5.10-new/kompare/komparenavtreepart/Makefile.am	2010-07-22 01:16:13.000000000 -0400
@@ -20,7 +20,7 @@
 	komparenavtreepart.cpp
 
 libkomparenavtreepart_la_LDFLAGS = $(KDE_PLUGIN) $(all_libraries)
-libkomparenavtreepart_la_LIBADD  = $(LIB_KPARTS) ../libdiff2/libdiff2.la
+libkomparenavtreepart_la_LIBADD  = $(LIB_KPARTS) ../libdiff2/libdiff2.la $(LIB_KDEUI)
 
 # this is where the desktop file will go
 partdesktopdir   = $(kde_servicesdir)
diff -Nurd kdesdk-3.5.10/kompare/komparepart/Makefile.am kdesdk-3.5.10-new/kompare/komparepart/Makefile.am
--- kdesdk-3.5.10/kompare/komparepart/Makefile.am	2005-09-10 04:21:04.000000000 -0400
+++ kdesdk-3.5.10-new/kompare/komparepart/Makefile.am	2010-07-22 01:17:09.000000000 -0400
@@ -34,7 +34,7 @@
 	komparesaveoptionswidget.cpp
 
 libkomparepart_la_LDFLAGS = $(KDE_PLUGIN) $(all_libraries)
-libkomparepart_la_LIBADD  = $(LIB_KPARTS) $(LIB_KFILE) \
+libkomparepart_la_LIBADD  = $(LIB_KPARTS) $(LIB_KFILE) $(LIB_KDEUI) \
 	../libdialogpages/libdialogpages.la \
 	../libdiff2/libdiff2.la \
 	../interfaces/libkompareinterface.la
diff -Nurd kdesdk-3.5.10/kompare/libdiff2/Makefile.am kdesdk-3.5.10-new/kompare/libdiff2/Makefile.am
--- kdesdk-3.5.10/kompare/libdiff2/Makefile.am	2005-09-10 04:21:04.000000000 -0400
+++ kdesdk-3.5.10-new/kompare/libdiff2/Makefile.am	2010-07-21 20:32:50.000000000 -0400
@@ -33,5 +33,5 @@
 	perforceparser.cpp
 
 libdiff2_la_LDFLAGS = $(all_libraries)
-libdiff2_la_LIBADD  = $(LIB_KFILE)
+libdiff2_la_LIBADD  = $(LIB_KFILE) $(LIB_QT) $(LIB_KDECORE)
 
diff -Nurd kdesdk-3.5.9/kompare/main.cpp kdesdk-3.5.9-new/kompare/main.cpp
--- kdesdk-3.5.9/kompare/main.cpp	2005-09-10 04:21:05.000000000 -0400
+++ kdesdk-3.5.9-new/kompare/main.cpp	2008-02-13 22:01:07.000000000 -0500
@@ -47,7 +47,7 @@
 	KCmdLineLastOption
 };
 
-int main(int argc, char *argv[])
+extern "C" KDE_EXPORT int kdemain(int argc, char *argv[])
 {
 	KAboutData aboutData( "kompare", I18N_NOOP("Kompare"), version, description,
 	                      KAboutData::License_GPL,
diff -Nurd kdesdk-3.5.9/kspy/main.cpp kdesdk-3.5.9-new/kspy/main.cpp
--- kdesdk-3.5.9/kspy/main.cpp	2005-09-10 04:20:58.000000000 -0400
+++ kdesdk-3.5.9-new/kspy/main.cpp	2008-02-13 22:01:07.000000000 -0500
@@ -32,7 +32,7 @@
   // INSERT YOUR COMMANDLINE OPTIONS HERE
 };
 
-int main(int argc, char *argv[])
+extern "C" KDE_EXPORT int kdemain(int argc, char *argv[])
 {
 
   KAboutData aboutData( "spy", I18N_NOOP("Spy"),
diff -Nurd kdesdk-3.5.10/kstartperf/Makefile.am kdesdk-3.5.10-new/kstartperf/Makefile.am
--- kdesdk-3.5.10/kstartperf/Makefile.am	2005-09-10 04:20:58.000000000 -0400
+++ kdesdk-3.5.10-new/kstartperf/Makefile.am	2010-07-22 01:20:48.000000000 -0400
@@ -2,13 +2,14 @@
 
 lib_LTLIBRARIES = libkstartperf.la
 libkstartperf_la_LDFLAGS = $(all_libraries) -version-info 1:0 -no-undefined
-# libkstartperf_la_LIBADD = ../libltdl/libltdlc.la
+libkstartperf_la_LIBADD = -lltdl
 libkstartperf_la_SOURCES = libkstartperf.c
 
-bin_PROGRAMS = kstartperf
-kstartperf_LDFLAGS = $(all_libraries)
-kstartperf_LDADD = $(LIB_KDECORE)
-kstartperf_SOURCES = kstartperf.cpp
+kdeinit_LTLIBRARIES = kstartperf.la
+bin_PROGRAMS = 
+kstartperf_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module
+kstartperf_la_LIBADD = $(LIB_KDECORE) $(LIB_QT)
+kstartperf_la_SOURCES = kstartperf.cpp
 
 messages:
 	$(XGETTEXT) $(kstartperf_SOURCES) -o $(podir)/kstartperf.pot
diff -Nurd kdesdk-3.5.9/kstartperf/kstartperf.cpp kdesdk-3.5.9-new/kstartperf/kstartperf.cpp
--- kdesdk-3.5.9/kstartperf/kstartperf.cpp	2005-09-10 04:20:58.000000000 -0400
+++ kdesdk-3.5.9-new/kstartperf/kstartperf.cpp	2008-02-13 22:01:07.000000000 -0500
@@ -69,7 +69,7 @@
 }
 
 
-int main(int argc, char **argv)
+extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
 {
     KAboutData aboutData("kstartperf", I18N_NOOP("KStartPerf"),
 	    "1.0", I18N_NOOP("Measures start up time of a KDE application"),
diff -Nurd kdesdk-3.5.10/kuiviewer/Makefile.am kdesdk-3.5.10-new/kuiviewer/Makefile.am
--- kdesdk-3.5.10/kuiviewer/Makefile.am	2005-09-10 04:21:10.000000000 -0400
+++ kdesdk-3.5.10-new/kuiviewer/Makefile.am	2010-07-21 20:47:42.000000000 -0400
@@ -21,12 +21,14 @@
 #########################################################################
 # this is the program that gets installed.  it's name is used for all
 # of the other Makefile.am variables
-bin_PROGRAMS = kuiviewer
+kdeinit_LTLIBRARIES = kuiviewer.la
+bin_PROGRAMS = 
+lib_LTLIBRARIES =
 
 # the application source, library search path, and link libraries
-kuiviewer_SOURCES = main.cpp kuiviewer.cpp
-kuiviewer_LDFLAGS = $(KDE_RPATH) $(all_libraries)
-kuiviewer_LDADD   = $(LIB_KPARTS)
+kuiviewer_la_SOURCES = main.cpp kuiviewer.cpp
+kuiviewer_la_LDFLAGS = $(KDE_PLUGIN) $(all_libraries) -module
+kuiviewer_la_LIBADD  = $(LIB_KPARTS) $(LIB_QT) $(LIB_KDEUI) $(LIB_KDECORE) $(LIB_KIO) $(LIB_QT)
 
 xdg_apps_DATA =kuiviewer.desktop
 
@@ -42,7 +44,7 @@
 # the Part's source, library search path, and link libraries
 libkuiviewerpart_la_SOURCES = kuiviewer_part.cpp
 libkuiviewerpart_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries)
-libkuiviewerpart_la_LIBADD  = $(LIB_KPARTS) $(LIB_KFILE) -lqui
+libkuiviewerpart_la_LIBADD  = $(LIB_KPARTS) $(LIB_KFILE) -lqui $(LIB_QT) $(LIB_KDECORE) $(LIB_KDEUI) -lkdefx
 
 # this is where the desktop file will go 
 partdesktopdir   = $(kde_servicesdir)
@@ -57,7 +59,7 @@
 # THUMBNAIL SECTION
 #########################################################################
 quithumbnail_la_SOURCES = quicreator.cpp
-quithumbnail_la_LIBADD = $(LIB_KDECORE) -lqui
+quithumbnail_la_LIBADD = $(LIB_KDECORE) -lqui $(LIB_QT)
 quithumbnail_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN)
 services_DATA = designerthumbnail.desktop
 servicesdir = $(kde_servicesdir)
diff -Nurd kdesdk-3.5.9/kuiviewer/main.cpp kdesdk-3.5.9-new/kuiviewer/main.cpp
--- kdesdk-3.5.9/kuiviewer/main.cpp	2005-09-10 04:21:10.000000000 -0400
+++ kdesdk-3.5.9-new/kuiviewer/main.cpp	2008-02-13 22:01:07.000000000 -0500
@@ -38,7 +38,7 @@
     KCmdLineLastOption
 };
 
-int main(int argc, char **argv)
+extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
 {
     KAboutData about("kuiviewer", I18N_NOOP("KUIViewer"), "0.1",
 		     I18N_NOOP("Displays Designer's UI files"),
diff -Nurd kdesdk-3.5.10/kunittest/Makefile.am kdesdk-3.5.10-new/kunittest/Makefile.am
--- kdesdk-3.5.10/kunittest/Makefile.am	2005-09-10 04:21:04.000000000 -0400
+++ kdesdk-3.5.10-new/kunittest/Makefile.am	2010-08-27 05:09:24.000000000 -0400
@@ -5,7 +5,7 @@
 lib_LTLIBRARIES = libkunittestgui.la
 libkunittestgui_la_SOURCES = testerwidget.ui runnergui.cpp dcopinterface.skel
 libkunittestgui_la_LDFLAGS = $(all_libraries) $(KDE_RPATH)
-libkunittestgui_la_LIBADD = -lkunittest $(LIB_KDECORE)
+libkunittestgui_la_LIBADD = -lkunittest $(LIB_KDECORE) $(LIB_QT) -lDCOP
 
 runnergui.lo : testerwidget.h
 
diff -Nurd kdesdk-3.5.9/poxml/Makefile.am kdesdk-3.5.9-new/poxml/Makefile.am
--- kdesdk-3.5.9/poxml/Makefile.am	2005-09-10 04:21:06.000000000 -0400
+++ kdesdk-3.5.9-new/poxml/Makefile.am	2008-02-13 22:01:07.000000000 -0500
@@ -1,30 +1,31 @@
-
-bin_PROGRAMS = split2po xml2pot po2xml swappo transxx
+lib_LTLIBRARIES =
+bin_PROGRAMS =
+kdeinit_LTLIBRARIES = split2po.la xml2pot.la po2xml.la swappo.la transxx.la
 
 INCLUDES = -I$(srcdir)/antlr $(all_includes)
 KDE_CXXFLAGS = $(USE_EXCEPTIONS) 
 
 SUBDIRS = antlr
 
-split2po_SOURCES = split.cpp parser.cpp
-split2po_LDFLAGS = $(all_libraries) $(KDE_RPATH)
-split2po_LDADD = $(LIB_QT)
+split2po_la_SOURCES = split.cpp parser.cpp
+split2po_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module
+split2po_la_LIBADD = $(LIB_QT)
 
-xml2pot_SOURCES = xml2pot.cpp parser.cpp
-xml2pot_LDFLAGS = $(all_libraries) $(KDE_RPATH)
-xml2pot_LDADD = $(LIB_QT)
+xml2pot_la_SOURCES = xml2pot.cpp parser.cpp
+xml2pot_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module
+xml2pot_la_LIBADD = $(LIB_QT)
 
-po2xml_SOURCES = GettextLexer.cpp GettextParser.cpp po2xml.cpp parser.cpp
-po2xml_LDFLAGS = $(all_libraries) $(KDE_RPATH)
-po2xml_LDADD = antlr/src/libantlr.la $(LIB_QT)
+po2xml_la_SOURCES = GettextLexer.cpp GettextParser.cpp po2xml.cpp parser.cpp
+po2xml_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module
+po2xml_la_LIBADD = antlr/src/libantlr.la $(LIB_QT)
 
-swappo_SOURCES = GettextLexer.cpp GettextParser.cpp swappo.cpp parser.cpp
-swappo_LDFLAGS = $(all_libraries) $(KDE_RPATH)
-swappo_LDADD = antlr/src/libantlr.la $(LIB_QT)
+swappo_la_SOURCES = GettextLexer.cpp GettextParser.cpp swappo.cpp parser.cpp
+swappo_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module
+swappo_la_LIBADD = antlr/src/libantlr.la $(LIB_QT)
 
-transxx_SOURCES = GettextLexer.cpp GettextParser.cpp transxx.cpp parser.cpp
-transxx_LDFLAGS = $(all_libraries) $(KDE_RPATH)
-transxx_LDADD = antlr/src/libantlr.la $(LIB_QT)
+transxx_la_SOURCES = GettextLexer.cpp GettextParser.cpp transxx.cpp parser.cpp
+transxx_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module
+transxx_la_LIBADD = antlr/src/libantlr.la $(LIB_QT)
 
 parser:
 	cd $(srcdir) &&	java antlr.Tool gettext.g
diff -Nurd kdesdk-3.5.9/poxml/po2xml.cpp kdesdk-3.5.9-new/poxml/po2xml.cpp
--- kdesdk-3.5.9/poxml/po2xml.cpp	2005-09-10 04:21:06.000000000 -0400
+++ kdesdk-3.5.9-new/poxml/po2xml.cpp	2008-02-13 22:01:07.000000000 -0500
@@ -12,6 +12,8 @@
 #include "antlr/AST.hpp"
 #include "antlr/CommonAST.hpp"
 
+#include <kdemacros.h>
+
 using namespace std;
 
 QString translate(QString xml, QString orig, QString translation)
@@ -38,7 +40,7 @@
     return prefix + xml;
 }
 
-int main( int argc, char **argv )
+extern "C" KDE_EXPORT int kdemain( int argc, char **argv )
 {
     if (argc != 3) {
         qWarning("usage: %s english-XML translated-PO", argv[0]);
diff -Nurd kdesdk-3.5.9/poxml/split.cpp kdesdk-3.5.9-new/poxml/split.cpp
--- kdesdk-3.5.9/poxml/split.cpp	2005-11-19 05:24:05.000000000 -0500
+++ kdesdk-3.5.9-new/poxml/split.cpp	2008-02-13 22:01:07.000000000 -0500
@@ -1,10 +1,11 @@
 #include "parser.h"
 #include <stdlib.h>
 #include <iostream>
+#include <kdemacros.h>
 
 using namespace std;
 
-int main( int argc, char **argv )
+extern "C" KDE_EXPORT int kdemain( int argc, char **argv )
 {
     bool report_mismatches = qstrcmp(getenv("REPORT_MISMATCHES"), "no");
 
diff -Nurd kdesdk-3.5.9/poxml/swappo.cpp kdesdk-3.5.9-new/poxml/swappo.cpp
--- kdesdk-3.5.9/poxml/swappo.cpp	2005-09-10 04:21:06.000000000 -0400
+++ kdesdk-3.5.9-new/poxml/swappo.cpp	2008-02-13 22:01:07.000000000 -0500
@@ -3,8 +3,9 @@
 #include "GettextParser.hpp"
 #include <fstream>
 #include "GettextLexer.hpp"
+#include <kdemacros.h>
 
-int main(int argc, char **argv)
+extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
 {
     if ( argc != 2 ) {
         qWarning( "usage: %s pofile", argv[0] );
diff -Nurd kdesdk-3.5.9/poxml/transxx.cpp kdesdk-3.5.9-new/poxml/transxx.cpp
--- kdesdk-3.5.9/poxml/transxx.cpp	2005-10-10 10:58:21.000000000 -0400
+++ kdesdk-3.5.9-new/poxml/transxx.cpp	2008-02-13 22:01:07.000000000 -0500
@@ -8,7 +8,9 @@
 #include <qdatetime.h>
 #include <qfileinfo.h>
 
-int main(int argc, char **argv)
+#include <kdemacros.h>
+
+extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
 {
     if ( argc != 2 && argc != 4 ) {
         qWarning( "usage: %s [--text translation] potfile", argv[0] );
diff -Nurd kdesdk-3.5.9/poxml/xml2pot.cpp kdesdk-3.5.9-new/poxml/xml2pot.cpp
--- kdesdk-3.5.9/poxml/xml2pot.cpp	2005-09-10 04:21:06.000000000 -0400
+++ kdesdk-3.5.9-new/poxml/xml2pot.cpp	2008-02-13 22:01:07.000000000 -0500
@@ -3,10 +3,11 @@
 #include <iostream>
 #include <qfileinfo.h>
 #include <qdatetime.h>
+#include <kdemacros.h>
 
 using namespace std;
 
-int main( int argc, char **argv )
+extern "C" KDE_EXPORT int kdemain( int argc, char **argv )
 {
     if (argc != 2) {
         qWarning("usage: %s english-XML", argv[0]);
diff -Nurd kdesdk-3.5.10/scheck/Makefile.am kdesdk-3.5.10-new/scheck/Makefile.am
--- kdesdk-3.5.10/scheck/Makefile.am	2005-09-10 04:21:06.000000000 -0400
+++ kdesdk-3.5.10-new/scheck/Makefile.am	2010-07-22 01:24:02.000000000 -0400
@@ -23,7 +23,7 @@
 noinst_HEADERS = scheck.h bitmaps.h
 kde_style_LTLIBRARIES = scheck.la
 scheck_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module
-scheck_la_LIBADD = $(LIB_KDEUI)
+scheck_la_LIBADD = $(LIB_KDEUI) $(LIB_QT) -lkdefx $(LIB_KDECORE)
 scheck_la_SOURCES = scheck.cpp
 scheck_la_METASOURCES = AUTO
 
diff -Nurd kdesdk-3.5.10/umbrello/umbrello/Makefile.am kdesdk-3.5.10-new/umbrello/umbrello/Makefile.am
--- kdesdk-3.5.10/umbrello/umbrello/Makefile.am	2007-01-15 06:24:47.000000000 -0500
+++ kdesdk-3.5.10-new/umbrello/umbrello/Makefile.am	2010-07-21 21:02:48.000000000 -0400
@@ -1,7 +1,9 @@
-bin_PROGRAMS = umbrello
+bin_PROGRAMS = 
+lib_LTLIBRARIES =
+kdeinit_LTLIBRARIES = umbrello.la
 
-umbrello_COMPILE_FIRST = version.h
-umbrello_SOURCES = activitywidget.cpp \
+umbrello_la_COMPILE_FIRST = version.h
+umbrello_la_SOURCES = activitywidget.cpp \
 actor.cpp \
 actorwidget.cpp \
 aligntoolbar.cpp \
@@ -114,7 +116,7 @@
 worktoolbar.cpp
 
 #umbrello_LDADD   = ./refactoring/librefactoring.la ./codeimport/libcodeimport.la ./codeimport/kdevcppparser/libkdevcppparser.la ./clipboard/libclipboard.la ./dialogs/libdialogs.la ./codegenerators/libcodegenerator.la $(AUTOLAYOUT_LIBS) $(LIB_KDEPRINT) $(LIB_KIO)
-umbrello_LDADD = ./refactoring/librefactoring.la ./codeimport/libcodeimport.la ./codeimport/kdevcppparser/libkdevcppparser.la ./clipboard/libclipboard.la ./dialogs/libdialogs.la ./codegenerators/libcodegenerator.la ./docgenerators/libdocgenerators.la $(LIB_KDEPRINT) $(LIB_KIO)
+umbrello_la_LIBADD = ./refactoring/librefactoring.la ./codeimport/libcodeimport.la ./codeimport/kdevcppparser/libkdevcppparser.la ./clipboard/libclipboard.la ./dialogs/libdialogs.la ./codegenerators/libcodegenerator.la ./docgenerators/libdocgenerators.la $(LIB_KDEPRINT) $(LIB_KIO) $(LIB_QT) $(LIB_KDEUI)
 
 ## See section "dnl Not GPL compatible" in ../configure.in.in
 # SUBDIRS = $(AUTOLAYOUT_DIR) codeimport dialogs clipboard pics codegenerators headings refactoring
@@ -135,7 +137,7 @@
 
 METASOURCES = AUTO
 
-umbrello_LDFLAGS = $(all_libraries) $(KDE_RPATH) -export-dynamic
+umbrello_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module -export-dynamic
 
 messages: rc.cpp
 	$(PREPARETIPS) > tips.cpp
diff -Nurd kdesdk-3.5.10/umbrello/umbrello/docgenerators/Makefile.am kdesdk-3.5.10-new/umbrello/umbrello/docgenerators/Makefile.am
--- kdesdk-3.5.10/umbrello/umbrello/docgenerators/Makefile.am	2006-10-01 13:27:42.000000000 -0400
+++ kdesdk-3.5.10-new/umbrello/umbrello/docgenerators/Makefile.am	2010-07-21 21:04:41.000000000 -0400
@@ -5,7 +5,7 @@
 AM_LDFLAGS = $(all_libraries)
 umbodoc_COMPILE_FIRST = version.h
 umbodoc_SOURCES = main.cpp
-umbodoc_LDADD = $(LIB_KDECORE) $(LIBXSLT_LIBS) $(LIBXML_LIBS)
+umbodoc_LDADD = $(LIB_KDECORE) $(LIBXSLT_LIBS) $(LIBXML_LIBS) $(LIB_QT)
 noinst_LTLIBRARIES = libdocgenerators.la
 noinst_HEADERS = docbookgenerator.h version.h
 libdocgenerators_la_SOURCES = docbookgenerator.h docbookgenerator.cpp xhtmlgenerator.cpp
diff -Nurd kdesdk-3.5.9/umbrello/umbrello/main.cpp kdesdk-3.5.9-new/umbrello/umbrello/main.cpp
--- kdesdk-3.5.9/umbrello/umbrello/main.cpp	2007-01-15 06:24:47.000000000 -0500
+++ kdesdk-3.5.9-new/umbrello/umbrello/main.cpp	2008-02-13 22:01:07.000000000 -0500
@@ -89,7 +89,7 @@
     return 0;
 }
 
-int main(int argc, char *argv[]) {
+extern "C" KDE_EXPORT int kdemain(int argc, char *argv[]) {
     KAboutData aboutData( "umbrello", I18N_NOOP("Umbrello UML Modeller"),
                           UMBRELLO_VERSION, description, KAboutData::License_GPL,
                           I18N_NOOP("(c) 2001 Paul Hensgen, (c) 2002-2006 Umbrello UML Modeller Authors"), 0,
