diff -Nurd kdegraphics-3.5.9/kcoloredit/Makefile.am kdegraphics-3.5.9-new/kcoloredit/Makefile.am
--- kdegraphics-3.5.9/kcoloredit/Makefile.am	2006-07-22 04:10:29.000000000 -0400
+++ kdegraphics-3.5.9-new/kcoloredit/Makefile.am	2008-02-13 21:58:38.000000000 -0500
@@ -1,21 +1,24 @@
 INCLUDES = $(all_includes)
 
-kcoloredit_SOURCES = kzcolorselector.cpp imageselection.cpp \
+kcoloredit_la_SOURCES = kzcolorselector.cpp imageselection.cpp \
 	texteditselection.cpp gradientselection.cpp colorselector.cpp \
 	kxycolorselector.cpp paletteview.cpp paletteviewscrolledarea.cpp \
 	editablestreamhistory.cpp color.cpp palette.cpp loadpalettedlg.cpp \
 	kcoloreditview.cpp kcoloreditdoc.cpp kcoloredit.cpp main.cpp
-kcoloredit_METASOURCES = AUTO
-kcoloredit_LDADD = $(LIB_KDEUI) $(LIB_KFILE)
-kcoloredit_LDFLAGS = $(all_libraries) $(KDE_RPATH)
+kcoloredit_la_METASOURCES = AUTO
+kcoloredit_la_LIBADD = $(LIB_KDEUI) $(LIB_KFILE)
+kcoloredit_la_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(KDE_PLUGIN)
 
 rcdir = $(kde_datadir)/kcoloredit
 rc_DATA = kcoloreditui.rc
 
-bin_PROGRAMS = kcoloredit kcolorchooser
-kcolorchooser_SOURCES = kcolorchooser.cpp
-kcolorchooser_LDADD = $(LIB_KDEUI)
-kcolorchooser_LDFLAGS = $(all_libraries) $(KDE_RPATH)
+bin_PROGRAMS = 
+lib_LTLIBRARIES = 
+kdeinit_LTLIBRARIES = kcoloredit.la kcolorchooser.la
+
+kcolorchooser_la_SOURCES = kcolorchooser.cpp
+kcolorchooser_la_LIBADD = $(LIB_KDEUI)
+kcolorchooser_la_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(KDE_PLUGIN)
 
 noinst_HEADERS = color.h colorselector.h editablestreamhistory.h \
 	gradientselection.h imageselection.h kcoloredit.h kcoloreditdoc.h \
diff -Nurd kdegraphics-3.5.9/kcoloredit/kcolorchooser.cpp kdegraphics-3.5.9-new/kcoloredit/kcolorchooser.cpp
--- kdegraphics-3.5.9/kcoloredit/kcolorchooser.cpp	2005-09-10 04:18:59.000000000 -0400
+++ kdegraphics-3.5.9-new/kcoloredit/kcolorchooser.cpp	2008-02-13 21:58:38.000000000 -0500
@@ -41,7 +41,7 @@
    KCmdLineLastOption
 };
 	
-int main(int argc, char *argv[])
+extern "C" KDE_EXPORT int kdemain(int argc, char *argv[])
 {
   KLocale::setMainCatalogue("kdelibs"); 
   KAboutData aboutData( "kcolorchooser", I18N_NOOP("KColorChooser"),
diff -Nurd kdegraphics-3.5.9/kcoloredit/main.cpp kdegraphics-3.5.9-new/kcoloredit/main.cpp
--- kdegraphics-3.5.9/kcoloredit/main.cpp	2005-09-10 04:18:59.000000000 -0400
+++ kdegraphics-3.5.9-new/kcoloredit/main.cpp	2008-02-13 21:58:38.000000000 -0500
@@ -34,7 +34,7 @@
   // INSERT YOUR COMMANDLINE OPTIONS HERE
 };
 
-int main(int argc, char *argv[])
+extern "C" KDE_EXPORT int kdemain(int argc, char *argv[])
 {
 
 	KAboutData aboutData( "kcoloredit", I18N_NOOP("KColorEdit"),
diff -Nurd kdegraphics-3.5.9/kdvi/Makefile.am kdegraphics-3.5.9-new/kdvi/Makefile.am
--- kdegraphics-3.5.9/kdvi/Makefile.am	2005-09-10 04:18:58.000000000 -0400
+++ kdegraphics-3.5.9-new/kdvi/Makefile.am	2008-02-13 21:58:38.000000000 -0500
@@ -1,11 +1,13 @@
 # set the include path for X, qt and KDE
 INCLUDES= -I$(top_srcdir)/kviewshell \
 	-I$(top_builddir)/kviewshell \
-	$(all_includes) $(LIBFREETYPE_CFLAGS)
+	$(LIBFREETYPE_CFLAGS) $(all_includes)
 # claim, which subdirectories you want to install
 SUBDIRS = . pix
 
-bin_PROGRAMS = kdvi
+bin_PROGRAMS = 
+lib_LTLIBRARIES =
+kdeinit_LTLIBRARIES = kdvi.la
 
 # you can add here more. This one gets installed
 kde_module_LTLIBRARIES= kdvipart.la
@@ -38,9 +40,9 @@
 
 KDE_OPTIONS = nofinal
 
-kdvi_SOURCES = main.cpp 
-kdvi_LDFLAGS = $(all_libraries) $(KDE_RPATH)
-kdvi_LDADD = ../kviewshell/libifaces.la ../kviewshell/libkviewshell.la -lkparts
+kdvi_la_SOURCES = main.cpp 
+kdvi_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module
+kdvi_la_LIBADD = ../kviewshell/libifaces.la ../kviewshell/libkviewshell.la -lkparts
 
 ## this option you can leave out. Just, if you use "make dist", you need it
 noinst_HEADERS = dvi.h dviRenderer.h xdvi.h
diff -Nurd kdegraphics-3.5.9/kdvi/main.cpp kdegraphics-3.5.9-new/kdvi/main.cpp
--- kdegraphics-3.5.9/kdvi/main.cpp	2005-11-08 17:25:52.000000000 -0500
+++ kdegraphics-3.5.9-new/kdvi/main.cpp	2008-02-13 21:58:38.000000000 -0500
@@ -29,7 +29,7 @@
 static const char description[] = I18N_NOOP("A previewer for Device Independent files (DVI files) produced by the TeX typesetting system.");
 
 
-int main(int argc, char** argv)
+extern "C" KDE_EXPORT int kdemain(int argc, char** argv)
 {
   KAboutData about ("kdvi", I18N_NOOP("KDVI"), "1.4",
                     description, KAboutData::License_GPL,
diff -Nurd kdegraphics-3.5.9/kfax/Makefile.am kdegraphics-3.5.9-new/kfax/Makefile.am
--- kdegraphics-3.5.9/kfax/Makefile.am	2005-10-10 10:56:54.000000000 -0400
+++ kdegraphics-3.5.9-new/kfax/Makefile.am	2008-02-13 21:58:38.000000000 -0500
@@ -1,16 +1,18 @@
-AM_LDFLAGS = $(all_libraries) $(KDE_RPATH)
-LDADD      = $(LIB_KFILE) $(LIB_KDEPRINT) -lm
 INCLUDES   = $(all_includes)
 
 ####### Files
 noinst_HEADERS = kfax.h faxexpand.h options.h
 
-kfax_SOURCES   = options.cpp kfax.cpp faxexpand.cpp faxinit.cpp faxinput.cpp \
+kfax_la_SOURCES   = options.cpp kfax.cpp faxexpand.cpp faxinit.cpp faxinput.cpp \
 		 viewfax.cpp kfax_printsettings.cpp
+kfax_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module
+kfax_la_LIBADD  = $(LIB_KFILE) $(LIB_KDEPRINT) -lm
 
 METASOURCES    = AUTO
 
-bin_PROGRAMS   = kfax
+bin_PROGRAMS   = 
+lib_LTLIBRARIES =
+kdeinit_LTLIBRARIES = kfax.la
 
 xdg_apps_DATA = kfax.desktop
 
diff -Nurd kdegraphics-3.5.9/kfax/kfax.cpp kdegraphics-3.5.9-new/kfax/kfax.cpp
--- kdegraphics-3.5.9/kfax/kfax.cpp	2007-01-15 06:22:09.000000000 -0500
+++ kdegraphics-3.5.9-new/kfax/kfax.cpp	2008-02-13 21:58:38.000000000 -0500
@@ -1646,7 +1646,7 @@
    KCmdLineLastOption
 };
 
-int main (int argc, char **argv)
+extern "C" KDE_EXPORT int kdemain (int argc, char **argv)
 {
   KAboutData aboutData( "kfax", I18N_NOOP("KFax"),
       KFAXVERSION, description, KAboutData::License_GPL,
diff -Nurd kdegraphics-3.5.9/kfaxview/libkfaximage/Makefile.am kdegraphics-3.5.9-new/kfaxview/libkfaximage/Makefile.am
--- kdegraphics-3.5.9/kfaxview/libkfaximage/Makefile.am	2005-09-10 04:18:44.000000000 -0400
+++ kdegraphics-3.5.9-new/kfaxview/libkfaximage/Makefile.am	2008-02-13 21:58:38.000000000 -0500
@@ -1,7 +1,7 @@
 INCLUDES = -I$(top_srcdir) $(all_includes)
 
 lib_LTLIBRARIES = libkfaximage.la
-libkfaximage_la_LDFLAGS = $(all_libraries) -no-undefined -avoid-version
+libkfaximage_la_LDFLAGS = $(all_libraries) -no-undefined
 libkfaximage_la_LIBADD  = $(LIB_KDECORE)
 libkfaximage_la_SOURCES = kfaximage.cpp faxexpand.cpp faxinit.cpp
 
diff -Nurd kdegraphics-3.5.9/kfile-plugins/png/Makefile.am kdegraphics-3.5.9-new/kfile-plugins/png/Makefile.am
--- kdegraphics-3.5.9/kfile-plugins/png/Makefile.am	2005-09-10 04:19:24.000000000 -0400
+++ kdegraphics-3.5.9-new/kfile-plugins/png/Makefile.am	2008-02-13 21:58:38.000000000 -0500
@@ -10,7 +10,7 @@
 
 kfile_png_la_SOURCES = kfile_png.cpp
 kfile_png_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN)
-kfile_png_la_LIBADD = $(LIB_KIO)
+kfile_png_la_LIBADD = $(LIB_KIO) $(LIBPNG)
 
 # let automoc handle all of the meta source files (moc)
 METASOURCES = AUTO
diff -Nurd kdegraphics-3.5.9/kghostview/Makefile.am kdegraphics-3.5.9-new/kghostview/Makefile.am
--- kdegraphics-3.5.9/kghostview/Makefile.am	2006-05-22 14:05:40.000000000 -0400
+++ kdegraphics-3.5.9-new/kghostview/Makefile.am	2008-02-13 21:58:38.000000000 -0500
@@ -4,7 +4,8 @@
 
 ####### Files
 
-bin_PROGRAMS = 	kghostview
+kdeinit_LTLIBRARIES = kghostview.la
+bin_PROGRAMS = 	
 lib_LTLIBRARIES = libkghostviewlib.la
 kde_module_LTLIBRARIES = libkghostviewpart.la
 noinst_LTLIBRARIES = libdscparse.la
@@ -27,9 +28,9 @@
 
 libkghostviewpart_la_SOURCES = part_init.cpp
 
-kghostview_SOURCES = main.cpp
-kghostview_LDFLAGS = $(all_libraries) $(KDE_RPATH)
-kghostview_LDADD = libkghostviewlib.la
+kghostview_la_SOURCES = main.cpp
+kghostview_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module
+kghostview_la_LIBADD = libkghostviewlib.la
 
 libdscparse_la_LDFLAGS = $(all_libraries) -no-undefined
 libdscparse_la_LIBADD = $(LIB_QT)
diff -Nurd kdegraphics-3.5.9/kghostview/main.cpp kdegraphics-3.5.9-new/kghostview/main.cpp
--- kdegraphics-3.5.9/kghostview/main.cpp	2007-10-08 05:48:41.000000000 -0400
+++ kdegraphics-3.5.9-new/kghostview/main.cpp	2008-02-13 21:58:38.000000000 -0500
@@ -43,7 +43,7 @@
     KCmdLineLastOption
 };
 
-int main( int argc, char** argv )
+extern "C" KDE_EXPORT int kdemain( int argc, char** argv )
 {
     KCmdLineArgs::init( argc, argv, KGVPart::createAboutData() );
     KCmdLineArgs::addCmdLineOptions( options );
diff -Nurd kdegraphics-3.5.9/kiconedit/Makefile.am kdegraphics-3.5.9-new/kiconedit/Makefile.am
--- kdegraphics-3.5.9/kiconedit/Makefile.am	2006-03-17 05:11:23.000000000 -0500
+++ kdegraphics-3.5.9-new/kiconedit/Makefile.am	2008-02-13 21:58:38.000000000 -0500
@@ -1,18 +1,20 @@
 INCLUDES = $(all_includes)
 SUBDIRS = pics
 
-bin_PROGRAMS = kiconedit
+bin_PROGRAMS = 
+lib_LTLIBRARIES =
+kdeinit_LTLIBRARIES = kiconedit.la
 
-kiconedit_SOURCES = utils.cpp main.cpp kiconedit.cpp kicongrid.cpp \
+kiconedit_la_SOURCES = utils.cpp main.cpp kiconedit.cpp kicongrid.cpp \
     kiconcolors.cpp kcolorgrid.cpp palettetoolbar.cpp\
     kicon.cpp kresize.cpp knew.cpp properties.cpp \
     kiconeditslots.cpp kiconconfig.cpp 
 
-kiconedit_METASOURCES = AUTO
+kiconedit_la_METASOURCES = AUTO
 
 # the library search path. 
-kiconedit_LDFLAGS = $(all_libraries) $(KDE_RPATH)
-kiconedit_LDADD = $(LIB_KFILE) -lkdeprint
+kiconedit_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module
+kiconedit_la_LIBADD = $(LIB_KFILE) -lkdeprint
 
 DISTCLEANFILES = *~ .deps/* .libs/*
 
diff -Nurd kdegraphics-3.5.9/kiconedit/main.cpp kdegraphics-3.5.9-new/kiconedit/main.cpp
--- kdegraphics-3.5.9/kiconedit/main.cpp	2005-10-10 10:56:55.000000000 -0400
+++ kdegraphics-3.5.9-new/kiconedit/main.cpp	2008-02-13 21:58:38.000000000 -0500
@@ -40,7 +40,7 @@
   KCmdLineLastOption
 };
 
-int main(int argc, char **argv)
+extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
 {
   KAboutData aboutData( "kiconedit", I18N_NOOP("KIconEdit"),
     VERSION, description, KAboutData::License_GPL,
diff -Nurd kdegraphics-3.5.9/kooka/Makefile.am kdegraphics-3.5.9-new/kooka/Makefile.am
--- kdegraphics-3.5.9/kooka/Makefile.am	2005-09-10 04:19:00.000000000 -0400
+++ kdegraphics-3.5.9-new/kooka/Makefile.am	2008-02-13 21:58:38.000000000 -0500
@@ -2,10 +2,13 @@
 
 SUBDIRS = pics
 
-bin_PROGRAMS = kooka
+bin_PROGRAMS =
+lib_LTLIBRARIES =
+kdeinit_LTLIBRARIES = kooka.la
+
 METASOURCES = AUTO
 
-kooka_SOURCES =	main.cpp kooka.cpp kookaview.cpp kookapref.cpp 		\
+kooka_la_SOURCES =	main.cpp kooka.cpp kookaview.cpp kookapref.cpp 		\
 		img_saver.cpp ksaneocr.cpp \
 		kookaimage.cpp kookaimagemeta.cpp scanpackager.cpp 	\
 		imgnamecombo.cpp imageselectline.cpp      \
@@ -16,8 +19,8 @@
 		kocrocrad.cpp
 # 		pagesetup.cpp 
 
-kooka_LDADD   = $(LIB_KFILE) -lkdeprint -lktexteditor $(LIBTIFF) $(top_builddir)/libkscan/libkscan.la $(KADMOS_LIB) $(LIB_KSPELL)
-kooka_LDFLAGS = $(KDE_RPATH) $(all_libraries)
+kooka_la_LIBADD   = $(LIB_KFILE) -lkdeprint -lktexteditor $(LIBTIFF) $(top_builddir)/libkscan/libkscan.la $(KADMOS_LIB) $(LIB_KSPELL)
+kooka_la_LDFLAGS = $(KDE_PLUGIN) $(all_libraries) -module
 
 INCLUDES         = -I$(top_srcdir)/libkscan $(all_includes) $(LIBSANE_INCLUDES) $(KADMOS_INC)
 
diff -Nurd kdegraphics-3.5.9/kooka/main.cpp kdegraphics-3.5.9-new/kooka/main.cpp
--- kdegraphics-3.5.9/kooka/main.cpp	2007-10-08 05:48:39.000000000 -0400
+++ kdegraphics-3.5.9-new/kooka/main.cpp	2008-02-13 21:58:38.000000000 -0500
@@ -71,7 +71,7 @@
 
 
 
-int main( int argc, char *argv[] )
+extern "C" KDE_EXPORT int kdemain( int argc, char *argv[] )
 {
    KAboutData about("kooka", I18N_NOOP("Kooka"), KOOKA_VERSION, I18N_NOOP(description),
 		    KAboutData::License_GPL_V2, "(C) 2000 Klaas Freitag", 0,
diff -Nurd kdegraphics-3.5.9/kpdf/Makefile.am kdegraphics-3.5.9-new/kpdf/Makefile.am
--- kdegraphics-3.5.9/kpdf/Makefile.am	2005-09-10 04:18:43.000000000 -0400
+++ kdegraphics-3.5.9-new/kpdf/Makefile.am	2008-02-13 21:58:38.000000000 -0500
@@ -1,6 +1,6 @@
 SUBDIRS = xpdf conf core ui shell
 
-INCLUDES = -I$(srcdir)/xpdf -I$(srcdir)/xpdf/goo -I$(top_builddir)/kpdf $(all_includes) $(FREETYPE_CFLAGS)
+INCLUDES = -I$(srcdir)/xpdf -I$(srcdir)/xpdf/goo -I$(top_builddir)/kpdf $(FREETYPE_CFLAGS) $(FONTCONFIG_CFLAGS) $(all_includes)
 
 METASOURCES = AUTO
 
diff -Nurd kdegraphics-3.5.9/kpdf/shell/Makefile.am kdegraphics-3.5.9-new/kpdf/shell/Makefile.am
--- kdegraphics-3.5.9/kpdf/shell/Makefile.am	2005-09-10 04:18:43.000000000 -0400
+++ kdegraphics-3.5.9-new/kpdf/shell/Makefile.am	2008-02-13 21:58:38.000000000 -0500
@@ -1,12 +1,15 @@
-INCLUDES = -I$(srcdir)/xpdf -I$(srcdir)/xpdf/goo -I$(top_builddir)/kpdf $(all_includes) $(FREETYPE_CFLAGS)
+INCLUDES = -I$(srcdir)/xpdf -I$(srcdir)/xpdf/goo -I$(top_builddir)/kpdf $(FREETYPE_CFLAGS) $(FONTCONFIG_CFLAGS) $(all_includes)
+LDFLAGS  = $(FREETYPE_LDFLAGS) $(FONTCONFIG_LDFLAGS)
 
 METASOURCES = AUTO
 
-bin_PROGRAMS = kpdf
+bin_PROGRAMS = 
+lib_LTLIBRARIES =
+kdeinit_LTLIBRARIES = kpdf.la
 
-kpdf_SOURCES = main.cpp shell.cpp
-kpdf_LDFLAGS = $(KDE_RPATH) $(all_libraries)
-kpdf_LDADD   = $(LIB_KPARTS)
+kpdf_la_SOURCES = main.cpp shell.cpp
+kpdf_la_LDFLAGS = $(KDE_PLUGIN) $(all_libraries) -module
+kpdf_la_LIBADD  = $(LIB_KPARTS)
 
 EXTRA_DIST = kpdf.desktop
 xdg_apps_DATA = kpdf.desktop
diff -Nurd kdegraphics-3.5.9/kpdf/shell/main.cpp kdegraphics-3.5.9-new/kpdf/shell/main.cpp
--- kdegraphics-3.5.9/kpdf/shell/main.cpp	2008-02-13 04:37:05.000000000 -0500
+++ kdegraphics-3.5.9-new/kpdf/shell/main.cpp	2008-02-13 21:58:38.000000000 -0500
@@ -29,7 +29,7 @@
     KCmdLineLastOption
 };
 
-int main(int argc, char** argv)
+extern "C" KDE_EXPORT int kdemain(int argc, char** argv)
 {
     KAboutData about(
         "kpdf",
diff -Nurd kdegraphics-3.5.9/kpdf/xpdf/xpdf/GlobalParams.cc kdegraphics-3.5.9-new/kpdf/xpdf/xpdf/GlobalParams.cc
--- kdegraphics-3.5.9/kpdf/xpdf/xpdf/GlobalParams.cc	2007-05-14 03:39:30.000000000 -0400
+++ kdegraphics-3.5.9-new/kpdf/xpdf/xpdf/GlobalParams.cc	2008-02-13 21:58:38.000000000 -0500
@@ -2066,7 +2066,7 @@
   if (type.contains("Italic")) slant=FC_SLANT_ITALIC;
   if (type.contains("Bold")) weight=FC_WEIGHT_BOLD;
   if (type.contains("Light")) weight=FC_WEIGHT_LIGHT;
-  if (type.contains("Condensed")) width=FC_WIDTH_CONDENSED;
+  // if (type.contains("Condensed")) width=FC_WIDTH_CONDENSED;
 }
 
 DisplayFontParam *GlobalParams::getDisplayFont(GString *fontName) {
@@ -2080,13 +2080,14 @@
   dfp = (DisplayFontParam *)displayFonts->lookup(fontName);
   // KPDF: try to find font using Xft
   if (!dfp) {
-  	int weight=FC_WEIGHT_MEDIUM, slant=FC_SLANT_ROMAN, width=FC_WIDTH_NORMAL;
+  	int weight=FC_WEIGHT_MEDIUM, slant=FC_SLANT_ROMAN, width=0;
 	QString name(fontName->getCString());
 	
 	parseStyle(name,weight,slant,width);
 	p = FcPatternBuild(0,FC_FAMILY,FcTypeString, name.ascii(), 
 		FC_SLANT, FcTypeInteger, slant, FC_WEIGHT, FcTypeInteger, weight,
-		FC_WIDTH, FcTypeInteger, width, FC_LANG, FcTypeString, "xx", (char*)0);
+		// FC_WIDTH, FcTypeInteger, width, FC_LANG, FcTypeString, "xx", (char*)0);
+		FC_LANG, FcTypeString, "xx", (char*)0);
 	if (!p) goto fin;
 	m = XftFontMatch(qt_xdisplay(),qt_xscreen(),p,&res);
 	if (!m) goto fin;
diff -Nurd kdegraphics-3.5.9/kpdf/xpdf/xpdf/Makefile.am kdegraphics-3.5.9-new/kpdf/xpdf/xpdf/Makefile.am
--- kdegraphics-3.5.9/kpdf/xpdf/xpdf/Makefile.am	2007-05-14 03:39:30.000000000 -0400
+++ kdegraphics-3.5.9-new/kpdf/xpdf/xpdf/Makefile.am	2008-02-13 21:58:38.000000000 -0500
@@ -1,7 +1,7 @@
 INCLUDES = -I$(srcdir)/.. -I$(srcdir)/../fofi -I$(srcdir)/../splash -I$(srcdir)/../goo $(LIBFREETYPE_CFLAGS) $(XFT_CFLAGS) $(all_includes)
 
 libxpdf_la_LDFLAGS = $(all_libraries)
-libxpdf_la_LIBADD = $(LIB_X11) $(LIBFREETYPE_LIBS) $(LIBPAPER_LIBS) $(XFT_LIBS) $(LIBJPEG) ../goo/libgoo.la ../fofi/libfofi.la ../splash/libsplash.la 
+libxpdf_la_LIBADD = $(LIBFREETYPE_LIBS) $(XFT_LIBS) $(LIB_X11) $(LIBPAPER_LIBS) $(LIBJPEG) ../goo/libgoo.la ../fofi/libfofi.la ../splash/libsplash.la 
 libxpdf_la_SOURCES = Annot.cc Array.cc BuiltinFont.cc BuiltinFontTables.cc \
      Catalog.cc CharCodeToUnicode.cc CMap.cc Decrypt.cc Dict.cc \
      FontEncodingTables.cc Function.cc Gfx.cc \
diff -Nurd kdegraphics-3.5.9/kpovmodeler/Makefile.am kdegraphics-3.5.9-new/kpovmodeler/Makefile.am
--- kdegraphics-3.5.9/kpovmodeler/Makefile.am	2005-09-10 04:18:54.000000000 -0400
+++ kdegraphics-3.5.9-new/kpovmodeler/Makefile.am	2008-02-13 21:58:38.000000000 -0500
@@ -224,11 +224,12 @@
 ####
 # the executable
 
-bin_PROGRAMS = kpovmodeler
+bin_PROGRAMS = 
+kdeinit_LTLIBRARIES = kpovmodeler.la
 
-kpovmodeler_SOURCES = main.cpp
-kpovmodeler_LDFLAGS = $(all_libraries) $(KDE_RPATH)
-kpovmodeler_LDADD = libkpovmodeler.la
+kpovmodeler_la_SOURCES = main.cpp
+kpovmodeler_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module
+kpovmodeler_la_LIBADD  = libkpovmodeler.la
 
 dummy.cpp:
 	echo > dummy.cpp
diff -Nurd kdegraphics-3.5.9/kpovmodeler/main.cpp kdegraphics-3.5.9-new/kpovmodeler/main.cpp
--- kdegraphics-3.5.9/kpovmodeler/main.cpp	2007-10-08 05:48:38.000000000 -0400
+++ kdegraphics-3.5.9-new/kpovmodeler/main.cpp	2008-02-13 21:58:38.000000000 -0500
@@ -35,7 +35,7 @@
   KCmdLineLastOption
 };
 
-int main( int argc, char* argv[] )
+extern "C" KDE_EXPORT int kdemain( int argc, char* argv[] )
 {
    PMShell* shell = 0;
 
diff -Nurd kdegraphics-3.5.9/kruler/Makefile.am kdegraphics-3.5.9-new/kruler/Makefile.am
--- kdegraphics-3.5.9/kruler/Makefile.am	2005-09-10 04:19:23.000000000 -0400
+++ kdegraphics-3.5.9-new/kruler/Makefile.am	2008-02-13 21:58:38.000000000 -0500
@@ -2,11 +2,14 @@
 
 INCLUDES= $(all_includes)
 
-bin_PROGRAMS = kruler
-kruler_METASOURCES = AUTO
-kruler_LDFLAGS = $(all_libraries) $(KDE_RPATH)
-kruler_LDADD   = $(LIB_KDEUI)
-kruler_SOURCES = klineal.cpp main.cpp 
+bin_PROGRAMS = 
+lib_LTLIBRARIES =
+kdeinit_LTLIBRARIES = kruler.la
+
+kruler_la_METASOURCES = AUTO
+kruler_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module
+kruler_la_LIBADD  = $(LIB_KDEUI)
+kruler_la_SOURCES = klineal.cpp main.cpp 
 
 xdg_apps_DATA = kruler.desktop
 
diff -Nurd kdegraphics-3.5.9/kruler/main.cpp kdegraphics-3.5.9-new/kruler/main.cpp
--- kdegraphics-3.5.9/kruler/main.cpp	2005-09-10 04:19:23.000000000 -0400
+++ kdegraphics-3.5.9-new/kruler/main.cpp	2008-02-13 21:58:38.000000000 -0500
@@ -22,7 +22,7 @@
   // INSERT YOUR COMMANDLINE OPTIONS HERE
 };
 
-int main(int argc, char *argv[])
+extern "C" KDE_EXPORT int kdemain(int argc, char *argv[])
 {
 
 
diff -Nurd kdegraphics-3.5.9/ksnapshot/Makefile.am kdegraphics-3.5.9-new/ksnapshot/Makefile.am
--- kdegraphics-3.5.9/ksnapshot/Makefile.am	2005-09-10 04:19:19.000000000 -0400
+++ kdegraphics-3.5.9-new/ksnapshot/Makefile.am	2008-02-13 21:58:38.000000000 -0500
@@ -1,14 +1,16 @@
-bin_PROGRAMS= ksnapshot
+bin_PROGRAMS= 
+lib_LTLIBRARIES =
+kdeinit_LTLIBRARIES = ksnapshot.la
 
 INCLUDES = -DKSNAPVERSION="\"0.7\"" $(all_includes)
 
-ksnapshot_LDFLAGS = $(all_libraries) $(KDE_RPATH)
-ksnapshot_LDADD = $(LIB_KDEPRINT)
+ksnapshot_la_LDFLAGS = $(all_libraries) $(KDE_RPATH) -module
+ksnapshot_la_LIBADD = $(LIB_KDEPRINT)
 
-ksnapshot_SOURCES = ksnapshotiface.skel main.cpp ksnapshot.cpp \
+ksnapshot_la_SOURCES = ksnapshotiface.skel main.cpp ksnapshot.cpp \
     regiongrabber.cpp windowgrabber.cpp ksnapshotwidget.ui
 
-ksnapshot_METASOURCES = AUTO
+ksnapshot_la_METASOURCES = AUTO
 
 xdg_apps_DATA = ksnapshot.desktop
 
diff -Nurd kdegraphics-3.5.9/ksnapshot/main.cpp kdegraphics-3.5.9-new/ksnapshot/main.cpp
--- kdegraphics-3.5.9/ksnapshot/main.cpp	2007-10-08 05:48:40.000000000 -0400
+++ kdegraphics-3.5.9-new/ksnapshot/main.cpp	2008-02-13 21:58:38.000000000 -0500
@@ -40,7 +40,7 @@
     { 0, 0, 0 }
 };
 
-int main(int argc, char **argv)
+extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
 {
   KAboutData aboutData( "ksnapshot", I18N_NOOP("KSnapshot"),
     KSNAPVERSION, description, KAboutData::License_GPL,
diff -Nurd kdegraphics-3.5.9/ksvg/Makefile.am kdegraphics-3.5.9-new/ksvg/Makefile.am
--- kdegraphics-3.5.9/ksvg/Makefile.am	2005-09-10 04:19:19.000000000 -0400
+++ kdegraphics-3.5.9-new/ksvg/Makefile.am	2008-02-13 21:58:38.000000000 -0500
@@ -4,9 +4,9 @@
 libksvg_la_SOURCES = dummy.cc
 libksvg_la_METASOURCES = AUTO
 libksvg_la_LDFLAGS = -version-info 0:1:0 -no-undefined $(all_libraries)
-libksvg_la_LIBADD  = dom/libksvgdom.la impl/libksvgdomimpl.la core/libksvgcore.la ecma/libksvgecma.la \
+libksvg_la_LIBADD  = $(FREETYPE_LIBS) $(FONTCONFIG_LIBS) dom/libksvgdom.la impl/libksvgdomimpl.la core/libksvgcore.la ecma/libksvgecma.la \
 		     $(LCMS_LIBS) impl/libs/xrgbrender/libksvgxrgbrender.la impl/libs/libtext2path/src/libtext2path.la \
-			 impl/libs/art_support/libksvgart.la -lkjs $(LIB_KHTML) $(LIBART_LIBS) $(FREETYPE_LIBS) $(FONTCONFIG_LIBS)
+			 impl/libs/art_support/libksvgart.la -lkjs $(LIB_KHTML)
 
 INCLUDES = -I$(top_srcdir)/ksvg/dom -I$(top_srcdir)/ksvg/impl $(all_includes)
 
diff -Nurd kdegraphics-3.5.9/ksvg/impl/libs/libtext2path/src/Makefile.am kdegraphics-3.5.9-new/ksvg/impl/libs/libtext2path/src/Makefile.am
--- kdegraphics-3.5.9/ksvg/impl/libs/libtext2path/src/Makefile.am	2005-09-10 04:19:14.000000000 -0400
+++ kdegraphics-3.5.9-new/ksvg/impl/libs/libtext2path/src/Makefile.am	2008-02-13 21:58:38.000000000 -0500
@@ -1,10 +1,10 @@
 lib_LTLIBRARIES = libtext2path.la
 
 KDE_CXXFLAGS = $(USE_EXCEPTIONS)
-INCLUDES = $(FRIBIDI_CFLAGS) $(FREETYPE_CFLAGS) $(FONTCONFIG_CFLAGS) $(all_includes)
+INCLUDES = $(FREETYPE_CFLAGS) $(FRIBIDI_CFLAGS) $(FONTCONFIG_CFLAGS) $(all_includes)
 
 libtext2path_includedir=$(includedir)/libtext2path-0.1
 libtext2path_include_HEADERS = BezierPath.h Glyph.h GlyphTracer.h
 
 libtext2path_la_SOURCES = Affine.cpp Rectangle.cpp Font.cpp Glyph.cpp GlyphTracer.cpp Converter.cpp QtUnicode.cpp
-libtext2path_la_LDFLAGS = $(FRIBIDI_LIBS) $(FONTCONFIG_LIBS)
+libtext2path_la_LDFLAGS = $(FREETYPE_LIBS) $(FONTCONFIG_LIBS) $(FRIBIDI_LIBS)
diff -Nurd kdegraphics-3.5.9/ksvg/plugin/backends/agg/Makefile.am kdegraphics-3.5.9-new/ksvg/plugin/backends/agg/Makefile.am
--- kdegraphics-3.5.9/ksvg/plugin/backends/agg/Makefile.am	2005-09-10 04:19:12.000000000 -0400
+++ kdegraphics-3.5.9-new/ksvg/plugin/backends/agg/Makefile.am	2008-02-13 21:58:38.000000000 -0500
@@ -12,4 +12,4 @@
 kde_services_DATA = ksvgaggcanvas.desktop
 
 KDE_CXXFLAGS = $(USE_EXCEPTIONS)
-INCLUDES = $(KDE_INCLUDES) $(AGG_CFLAGS) $(FREETYPE_CFLAGS) $(FONTCONFIG_CFLAGS) -I$(top_srcdir)/ksvg/dom -I$(top_srcdir)/ksvg/impl -I$(top_srcdir)/ksvg/ecma -I$(top_srcdir)/ksvg/core -I$(top_srcdir)/ksvg/impl/libs/art_support -I$(top_srcdir)/ksvg/impl/libs/libtext2path/src $(all_includes)
+INCLUDES = $(FREETYPE_CFLAGS) $(FONTCONFIG_CFLAGS) $(KDE_INCLUDES) $(AGG_CFLAGS) -I$(top_srcdir)/ksvg/dom -I$(top_srcdir)/ksvg/impl -I$(top_srcdir)/ksvg/ecma -I$(top_srcdir)/ksvg/core -I$(top_srcdir)/ksvg/impl/libs/art_support -I$(top_srcdir)/ksvg/impl/libs/libtext2path/src $(all_includes)
diff -Nurd kdegraphics-3.5.9/ksvg/plugin/backends/libart/Makefile.am kdegraphics-3.5.9-new/ksvg/plugin/backends/libart/Makefile.am
--- kdegraphics-3.5.9/ksvg/plugin/backends/libart/Makefile.am	2005-09-10 04:19:11.000000000 -0400
+++ kdegraphics-3.5.9-new/ksvg/plugin/backends/libart/Makefile.am	2008-02-13 21:58:38.000000000 -0500
@@ -8,4 +8,4 @@
 kde_services_DATA = ksvglibartcanvas.desktop
 
 KDE_CXXFLAGS = $(USE_EXCEPTIONS)
-INCLUDES = $(LIBART_CFLAGS) $(FREETYPE_CFLAGS) $(FONTCONFIG_CFLAGS) -I$(top_srcdir)/ksvg/dom -I$(top_srcdir)/ksvg/impl -I$(top_srcdir)/ksvg/ecma -I$(top_srcdir)/ksvg/core -I$(top_srcdir)/ksvg/impl/libs/art_support -I$(top_srcdir)/ksvg/impl/libs/libtext2path/src $(KDE_INCLUDES) $(all_includes)
+INCLUDES = $(FREETYPE_CFLAGS) $(LIBART_CFLAGS) $(FONTCONFIG_CFLAGS) -I$(top_srcdir)/ksvg/dom -I$(top_srcdir)/ksvg/impl -I$(top_srcdir)/ksvg/ecma -I$(top_srcdir)/ksvg/core -I$(top_srcdir)/ksvg/impl/libs/art_support -I$(top_srcdir)/ksvg/impl/libs/libtext2path/src $(KDE_INCLUDES) $(all_includes)
diff -Nurd kdegraphics-3.5.9/ksvg/test/external/Makefile.am kdegraphics-3.5.9-new/ksvg/test/external/Makefile.am
--- kdegraphics-3.5.9/ksvg/test/external/Makefile.am	2005-09-10 04:19:09.000000000 -0400
+++ kdegraphics-3.5.9-new/ksvg/test/external/Makefile.am	2008-02-13 21:58:38.000000000 -0500
@@ -1,13 +1,16 @@
 INCLUDES = $(FREETYPE_CFLAGS) -I$(top_srcdir)/ksvg -I$(top_srcdir)/ksvg/dom -I$(top_srcdir)/ksvg/impl -I$(top_srcdir)/ksvg/ecma -I$(top_srcdir)/ksvg/core -I$(top_srcdir)/ksvg/impl/libs/libtext2path/src $(all_includes)
+LDFLAGS = $(FREETYPE_LDFLAGS)
 METASOURCES = AUTO
 KDE_CXXFLAGS = $(USE_EXCEPTIONS)
 
-bin_PROGRAMS = svgdisplay printnodetest
+bin_PROGRAMS = 
+lib_LTLIBRARIES =
+kdeinit_LTLIBRARIES = svgdisplay.la printnodetest.la
 
-svgdisplay_SOURCES = SVGTestWidget.cc svgdisplay.cc
-svgdisplay_LDADD =  $(LIB_KDECORE) ../../libksvg.la
-svgdisplay_LDFLAGS = $(KDE_RPATH) $(all_libraries)
+svgdisplay_la_SOURCES = SVGTestWidget.cc svgdisplay.cc
+svgdisplay_la_LIBADD =  $(LIB_KDECORE) ../../libksvg.la
+svgdisplay_la_LDFLAGS = $(KDE_PLUGIN) $(all_libraries) -module
 
-printnodetest_SOURCES = printnodetest.cpp
-printnodetest_LDADD =  $(LIB_KDECORE) ../../libksvg.la
-printnodetest_LDFLAGS = $(KDE_RPATH) $(all_libraries)
+printnodetest_la_SOURCES = printnodetest.cpp
+printnodetest_la_LIBADD =  $(LIB_KDECORE) ../../libksvg.la
+printnodetest_la_LDFLAGS = $(KDE_PLUGIN) $(all_libraries) -module
diff -Nurd kdegraphics-3.5.9/ksvg/test/external/printnodetest.cpp kdegraphics-3.5.9-new/ksvg/test/external/printnodetest.cpp
--- kdegraphics-3.5.9/ksvg/test/external/printnodetest.cpp	2005-10-10 10:56:46.000000000 -0400
+++ kdegraphics-3.5.9-new/ksvg/test/external/printnodetest.cpp	2008-02-13 21:58:38.000000000 -0500
@@ -44,7 +44,7 @@
 	exit(0);
 }
 
-int main(int argc, char **argv)
+extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
 {
 	KAboutData *about = new KAboutData("KSVG printNode test app", I18N_NOOP("KSVG test"), "0.1", I18N_NOOP("KSVG printNode test app"));
 	KCmdLineArgs::init(argc, argv, about);
diff -Nurd kdegraphics-3.5.9/ksvg/test/external/svgdisplay.cc kdegraphics-3.5.9-new/ksvg/test/external/svgdisplay.cc
--- kdegraphics-3.5.9/ksvg/test/external/svgdisplay.cc	2005-09-10 04:19:09.000000000 -0400
+++ kdegraphics-3.5.9-new/ksvg/test/external/svgdisplay.cc	2008-02-13 21:58:38.000000000 -0500
@@ -10,7 +10,7 @@
 	KCmdLineLastOption
 };
 
-int main(int argc, char **argv)
+extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
 {
 
 	KAboutData *about = new KAboutData( "KSVG test app", I18N_NOOP("KSVG test"), "0.1", I18N_NOOP("KSVG standalone test app") );
diff -Nurd kdegraphics-3.5.9/kviewshell/Makefile.am kdegraphics-3.5.9-new/kviewshell/Makefile.am
--- kdegraphics-3.5.9/kviewshell/Makefile.am	2005-09-10 04:19:21.000000000 -0400
+++ kdegraphics-3.5.9-new/kviewshell/Makefile.am	2008-02-13 21:58:38.000000000 -0500
@@ -5,8 +5,9 @@
 
 ####### Files
 
-bin_PROGRAMS = 	kviewshell
+bin_PROGRAMS = 	
 lib_LTLIBRARIES = libkmultipage.la
+kdeinit_LTLIBRARIES = kviewshell.la
 kde_module_LTLIBRARIES = kviewerpart.la emptymultipagepart.la
 noinst_LTLIBRARIES = libifaces.la libkviewshell.la
 
@@ -38,9 +39,9 @@
 
 libkviewshell_la_SOURCES = kviewshell.cpp
 
-kviewshell_SOURCES = main.cpp
-kviewshell_LDFLAGS = $(all_libraries) $(KDE_RPATH)
-kviewshell_LDADD = libkviewshell.la ./libifaces.la -lkparts
+kviewshell_la_SOURCES = main.cpp
+kviewshell_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module
+kviewshell_la_LIBADD = libkviewshell.la ./libifaces.la -lkparts
 
 kviewshellinclude_HEADERS = anchor.h bookmark.h pageView.h documentPageCache.h documentRenderer.h documentWidget.h \
 	history.h hyperlink.h kmultipage.h length.h pageNumber.h pageSize.h renderedDocumentPage.h renderedDocumentPagePixmap.h \
diff -Nurd kdegraphics-3.5.9/kviewshell/main.cpp kdegraphics-3.5.9-new/kviewshell/main.cpp
--- kdegraphics-3.5.9/kviewshell/main.cpp	2005-11-08 17:25:45.000000000 -0500
+++ kdegraphics-3.5.9-new/kviewshell/main.cpp	2008-02-13 21:58:38.000000000 -0500
@@ -32,7 +32,7 @@
 static const char description[] = I18N_NOOP("Generic framework for viewer applications");
 
 
-int main(int argc, char **argv)
+extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
 {
   KAboutData about ("kviewshell", I18N_NOOP("KViewShell"), "0.6",
 		    description, KAboutData::License_GPL,
diff -Nurd kdegraphics-3.5.9/kviewshell/plugins/djvu/libdjvu/Makefile.am kdegraphics-3.5.9-new/kviewshell/plugins/djvu/libdjvu/Makefile.am
--- kdegraphics-3.5.9/kviewshell/plugins/djvu/libdjvu/Makefile.am	2005-11-08 17:25:45.000000000 -0500
+++ kdegraphics-3.5.9-new/kviewshell/plugins/djvu/libdjvu/Makefile.am	2008-02-13 21:58:38.000000000 -0500
@@ -1,7 +1,7 @@
 INCLUDES = -I$(top_srcdir) $(all_includes)
 
-kde_module_LTLIBRARIES = libdjvu.la
-libdjvu_la_LDFLAGS = -avoid-version $(all_libraries)
+lib_LTLIBRARIES = libdjvu.la
+libdjvu_la_LDFLAGS = $(all_libraries)
 libdjvu_la_LIBADD = $(LIBJPEG)
 libdjvu_la_SOURCES = Arrays.cpp DjVuDocEditor.cpp DjVuMessageLite.cpp GOS.cpp IW44Image.cpp \
 	BSByteStream.cpp DjVuDocument.cpp DjVuNavDir.cpp GPixmap.cpp JB2EncodeCodec.cpp \
diff -Nurd kdegraphics-3.5.9/libkscan/img_canvas.cpp kdegraphics-3.5.9-new/libkscan/img_canvas.cpp
--- kdegraphics-3.5.9/libkscan/img_canvas.cpp	2006-05-22 14:05:37.000000000 -0400
+++ kdegraphics-3.5.9-new/libkscan/img_canvas.cpp	2008-02-13 21:58:38.000000000 -0500
@@ -701,7 +701,7 @@
                            double(image->width());
             kdDebug(29000) << "FIT WIDTH scrollbar to substract: " << sbWidth << endl;
         }
-        scale_factor = 100*used_xscaler;
+        scale_factor = (int)(100*used_xscaler);
         break;
     case FIT_HEIGHT:
         used_yscaler = used_xscaler = double(noSBSize.height())/double(image->height());
@@ -716,12 +716,12 @@
             kdDebug(29000) << "FIT HEIGHT scrollbar to substract: " << sbWidth << endl;
             // scale = int(100.0*(noSBSize.height() -sbWidth) / image->height());
         }
-        scale_factor = 100*used_xscaler;
+        scale_factor = (int)(100*used_xscaler);
 
         break;
     case ZOOM:
         used_xscaler = used_yscaler = double(getScaleFactor())/100.0;
-        scale_factor = 100*used_xscaler;
+        scale_factor = (int)(100*used_xscaler);
         break;
     default:
         break;
