
--- arts/kde/mcop-dcop/Makefile.am	10 Jul 2002 04:41:04 -0000	1.1.1.2
+++ arts/kde/mcop-dcop/Makefile.am	26 May 2003 05:17:35 -0000
@@ -1,16 +1,23 @@
 
 INCLUDES= -I$(includedir)/arts -I$(top_srcdir)/arts/kde $(all_includes)
 
+lib_LTLIBRARIES = libkmcop_main.la kmcop.la
 bin_PROGRAMS = kmcop
-lib_LTLIBRARIES = kmcop.la
 
-kmcop_la_SOURCES = mcopdcopobject.cpp kmcop.cpp kmcop.skel
-kmcop_la_LIBADD	= ../libartskde.la
+libkmcop_main_la_SOURCES = mcopdcopobject.cpp kmcop.cpp kmcop.skel
+libkmcop_main_la_LIBADD  = ../libartskde.la
+libkmcop_main_la_LDFLAGS = $(all_libraries) -version-info 1:0 -no-undefined
+
+kmcop_la_SOURCES = kmcop_la_main.cpp
+kmcop_la_LIBADD	= ../libartskde.la libkmcop_main.la
 kmcop_la_LDFLAGS = $(all_libraries) -module -avoid-version
 kmcop_la_METASOURCES = AUTO
 
-kmcop_SOURCES = dummy.cpp
-kmcop_LDADD = kmcop.la
+kmcop_la_main.cpp: kmcop_main.cpp
+	cat kmcop_main.cpp > kmcop_la_main.cpp
+
+kmcop_SOURCES = kmcop_main.cpp
+kmcop_LDADD = libkmcop_main.la
 kmcop_LDFLAGS = $(all_libraries) $(KDE_RPATH)
 
 noinst_HEADERS = kmcop.h
@@ -20,6 +27,3 @@
 
 messages:
 	$(XGETTEXT) kmcop.cpp -o $(podir)/kmcop.pot
-
-dummy.cpp:
-	echo > dummy.cpp
--- arts/kde/mcop-dcop/kmcop.cpp	25 Jun 2002 02:46:53 -0000	1.1.1.1
+++ arts/kde/mcop-dcop/kmcop.cpp	26 Nov 2002 21:00:48 -0000	1.2
@@ -46,7 +46,9 @@
 	QPtrList<MCOPDCOPObject> list;
 };
 
-int main(int argc, char **argv)
+extern "C" int kdemain(int, char**);
+
+int kdemain(int argc, char **argv)
 {
     KAboutData aboutdata("kmcop", I18N_NOOP("KMCOP"),
                          "0.1", I18N_NOOP("KDE MCOP-DCOP Bridge"),
RCS file: arts/kde/mcop-dcop/kmcop_main.cpp
diff -N arts/kde/mcop-dcop/kmcop_main.cpp
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ arts/kde/mcop-dcop/kmcop_main.cpp	26 Nov 2002 21:00:48 -0000	1.1
@@ -0,0 +1,27 @@
+/*
+ *
+ * Copyright (c) 2001 Nick Hudson <skrll@netbsd.org>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+ * AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+extern "C" int kdemain(int, char* []);
+
+int main( int argc, char* argv[] )
+{
+        return kdemain(argc, argv);
+}
--- arts/knotify/Makefile.am	10 Jul 2002 04:41:09 -0000	1.1.1.2
+++ arts/knotify/Makefile.am	26 May 2003 05:17:35 -0000
@@ -3,18 +3,29 @@
 
 ####### Files
 
+lib_LTLIBRARIES = libknotify_main.la knotify.la
 bin_PROGRAMS	= knotify
-lib_LTLIBRARIES = knotify.la
 
-knotify_la_SOURCES	= knotify.cpp knotify.skel
-knotify_la_LIBADD	= -lsoundserver_idl -lqtmcop $(LIB_KDEUI)
+libknotify_main_la_SOURCES     = knotify.cpp knotify.skel
+libknotify_main_la_LIBADD      = -lsoundserver_idl -lqtmcop $(LIB_KDEUI) $(LIB_KDECORE) -lmcop -lkmedia2_idl -lartsflow_idl
+libknotify_main_la_LDFLAGS     = $(all_libraries) -avoid-version -no-undefined
+libknotify_main_la_METASOURCES = AUTO
+
+knotify_la_SOURCES     = knotify_la_main.cpp
+knotify_la_LIBADD      = libknotify_main.la
 knotify_la_LDFLAGS = $(all_libraries) -module -avoid-version
 knotify_la_METASOURCES = AUTO
 
-knotify_SOURCES = dummy.cpp
-knotify_LDADD = knotify.la
+knotify_la_main.cpp: stub_main.cpp
+	cat stub_main.cpp > knotify_la_main.cpp
+
+knotify_SOURCES = knotify_main.cpp
+knotify_LDADD = libknotify_main.la
 knotify_LDFLAGS  = $(all_libraries) $(KDE_RPATH)
 
+knotify_main.cpp: stub_main.cpp
+	cat stub_main.cpp > knotify_main.cpp
+
 check_PROGRAMS		= knotifytest
 knotifytest_SOURCES	= knotifytest.cpp
 knotifytest_LDADD	= $(LIB_KDECORE)
@@ -28,5 +39,3 @@
 messages:
 	$(XGETTEXT) knotify.cpp -o $(podir)/knotify.pot
 
-dummy.cpp:
-	echo > dummy.cpp
--- arts/knotify/knotify.cpp	3 Mar 2003 01:16:06 -0000	1.1.1.6
+++ arts/knotify/knotify.cpp	3 Mar 2003 01:31:51 -0000	1.3
@@ -81,7 +81,9 @@
 };
 
 
-int main(int argc, char **argv)
+extern "C" int kdemain(int, char**);
+
+int kdemain(int argc, char **argv)
 {
     KAboutData aboutdata("knotify", I18N_NOOP("KNotify"),
                          "3.0", I18N_NOOP("KDE Notification Server"),
RCS file: arts/knotify/stub_main.cpp
diff -N arts/knotify/stub_main.cpp
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ arts/knotify/stub_main.cpp	26 Nov 2002 21:00:48 -0000	1.1
@@ -0,0 +1,27 @@
+/*
+ *
+ * Copyright (c) 2001 Nick Hudson <skrll@netbsd.org>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+ * AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+extern "C" int kdemain(int, char* []);
+
+int main( int argc, char* argv[] )
+{
+	return kdemain(argc, argv);
+}
--- dcop/Makefile.am	1 Oct 2002 03:04:42 -0000	1.1.1.4
+++ dcop/Makefile.am	26 May 2003 05:17:35 -0000
@@ -26,10 +26,10 @@
 
 INCLUDES=  $(all_includes)
 
+lib_LTLIBRARIES  = libDCOP.la libdcopserver_main.la dcopserver.la
 bin_PROGRAMS = dcopserver dcopserver_shutdown
 check_PROGRAMS = testdcop testdcopc
 
-lib_LTLIBRARIES  = libDCOP.la dcopserver.la
 libDCOP_la_LIBADD = KDE-ICE/libkICE.la $(LIB_QT)
 libDCOP_la_LDFLAGS = $(KDE_RPATH) -version-info 5:0:1 -no-undefined $(all_libraries)
 
@@ -45,13 +45,20 @@
 # dcopstub needs to go first for --enable-final to work
 libDCOP_la_SOURCES = dcopstub.cpp dcopref.cpp dcopobject.cpp dcopclient.cpp
 
-dcopserver_la_LDFLAGS = -module -avoid-version $(all_libraries)
-dcopserver_la_SOURCES = dcopserver.cpp dcopsignals.cpp
-dcopserver_la_LIBADD   = libDCOP.la
-
-dcopserver_LDFLAGS = $(KDE_RPATH) $(all_libraries)
-dcopserver_SOURCES = dummy.cpp
-dcopserver_LDADD   = dcopserver.la
+libdcopserver_main_la_LDFLAGS = -no-undefined -avoid-version $(all_libraries)
+libdcopserver_main_la_SOURCES = dcopserver.cpp dcopsignals.cpp
+libdcopserver_main_la_LIBADD  = libDCOP.la
+
+dcopserver_la_LDFLAGS = -avoid-version $(all_libraries) -module
+dcopserver_la_SOURCES = dcopserver_la_main.cpp
+dcopserver_la_LIBADD  = libdcopserver_main.la
+
+dcopserver_la_main.cpp: dcopserver_main.cpp
+	cat dcopserver_main.cpp > dcopserver_la_main.cpp
+
+dcopserver_LDFLAGS = $(KDE_RPATH) $(all_libraries) -module
+dcopserver_SOURCES = dcopserver_main.cpp
+dcopserver_LDADD   = libdcopserver_main.la
 
 dcopserver_shutdown_SOURCES = dcopserver_shutdown.c
 
@@ -64,9 +71,6 @@
 testdcopc_LDADD =  KDE-ICE/libkICE.la $(LIBSM)
 
 EXTRA_DIST = HOWTO ICE
-
-dummy.cpp:
-	echo > dummy.cpp
 
 DOXYGEN_REFERENCES = kdecore
 DOXYGEN_EXCLUDE = KDE-ICE/*
--- dcop/dcopserver.cpp	6 May 2003 17:19:41 -0000	1.1.1.5
+++ dcop/dcopserver.cpp	29 Mar 2003 02:42:16 -0000	1.4
@@ -1548,7 +1548,9 @@
 "Copyright (C) 1999-2001, The KDE Developers <http://www.kde.org>\n"
 ;
 
-int main( int argc, char* argv[] )
+extern "C" int kdemain(int, char**);
+
+int kdemain( int argc, char* argv[] )
 {
     bool serverid = false;
     bool nofork = false;
RCS file: dcop/dcopserver_main.cpp
diff -N dcop/dcopserver_main.cpp
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ dcop/dcopserver_main.cpp	26 Nov 2002 21:00:48 -0000	1.1
@@ -0,0 +1,27 @@
+/*
+ *
+ * Copyright (c) 2001 Nick Hudson <skrll@netbsd.org>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+ * AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+extern "C" int kdemain(int, char* []);
+
+int main( int argc, char* argv[] )
+{
+	return kdemain(argc, argv);
+}
--- interfaces/kmediaplayer/Makefile.am	10 Jul 2002 04:41:58 -0000	1.1.1.1
+++ interfaces/kmediaplayer/Makefile.am	24 Nov 2002 07:11:20 -0000	1.2
@@ -3,7 +3,7 @@
 lib_LTLIBRARIES = libkmediaplayer.la
 
 libkmediaplayer_la_SOURCES = player.cpp playerdcopobject.skel view.cpp
-libkmediaplayer_la_LDFLAGS = $(all_libraries) $(KDE_RPATH) -no-undefined
+libkmediaplayer_la_LDFLAGS = $(all_libraries) $(KDE_RPATH) -no-undefined -avoid-version
 libkmediaplayer_la_LIBADD = $(LIB_KPARTS)
 libkmediaplayer_la_METASOURCES = AUTO
 
--- interfaces/kscript/Makefile.am	10 Jul 2002 04:41:59 -0000	1.1.1.2
+++ interfaces/kscript/Makefile.am	24 Nov 2002 07:11:20 -0000	1.2
@@ -9,7 +9,7 @@
 #libkscriptloader_la_LIBADD = $(LIB_KPARTS)
 
 libkscript_la_SOURCES = scriptmanager.cpp
-libkscript_la_LDFLAGS = $(all_libraries) $(KDE_RPATH) -no-undefined
+libkscript_la_LDFLAGS = $(all_libraries) $(KDE_RPATH) -no-undefined -avoid-version
 libkscript_la_LIBADD = $(LIB_KIO)
 
 kscriptinclude_HEADERS = scriptinterface.h scriptclientinterface.h scriptmanager.h
--- interfaces/kscript/sample/Makefile.am	25 Jun 2002 02:46:54 -0000	1.1.1.1
+++ interfaces/kscript/sample/Makefile.am	24 Nov 2002 07:11:20 -0000	1.2
@@ -3,7 +3,7 @@
 lib_LTLIBRARIES = libshellscript.la
 
 libshellscript_la_SOURCES = shellscript.cpp
-libshellscript_la_LDFLAGS = $(all_libraries) $(KDE_RPATH) -no-undefined
+libshellscript_la_LDFLAGS = $(all_libraries) $(KDE_RPATH) -no-undefined -avoid-version
 libshellscript_la_LIBADD = ../libkscript.la
 
 
--- interfaces/ktexteditor/Makefile.am	14 Aug 2002 14:00:12 -0000	1.1.1.3
+++ interfaces/ktexteditor/Makefile.am	26 May 2003 05:17:35 -0000
@@ -21,7 +21,7 @@
     viewstatusmsgdcopinterface.skel selectioninterfaceext.cpp selectionextdcopinterface.skel
     
     
-libktexteditor_la_LDFLAGS = $(all_libraries) $(KDE_RPATH)
+libktexteditor_la_LDFLAGS = $(all_libraries) $(KDE_RPATH) -avoid-version -no-undefined
 libktexteditor_la_LIBADD = $(LIB_KPARTS) $(top_builddir)/dcop/libDCOP.la
 
 ktexteditorinclude_HEADERS = document.h view.h editor.h plugin.h editinterface.h undointerface.h \
--- kab/Makefile.am	14 Aug 2002 13:59:39 -0000	1.1.1.3
+++ kab/Makefile.am	3 Mar 2003 01:39:59 -0000	1.3
@@ -9,7 +9,7 @@
 	addressbook.cc \
 	qconfigDB.cc 
 
-libkab_la_LDFLAGS = $(KDE_MT_LDFLAGS) -version-info 5:0:1 -no-undefined
-libkab_la_LIBADD = ../kdeui/libkdeui.la
+libkab_la_LDFLAGS = $(KDE_MT_LDFLAGS) -version-info 5:0:1 -no-undefined $(all_libraries)
+libkab_la_LIBADD = $(LIB_KDEUI)
 
 libkab_la_METASOURCES = AUTO
--- kabc/Makefile.am	6 May 2003 17:19:47 -0000	1.1.1.7
+++ kabc/Makefile.am	6 May 2003 17:34:15 -0000	1.8
@@ -4,8 +4,8 @@
   -I$(top_srcdir)/kabc -I$(top_srcdir)/kab $(all_includes)
 
 lib_LTLIBRARIES   = libkabc.la
-libkabc_la_LDFLAGS = $(all_libraries) -no-undefined -version-info 2:0:1 -module
-libkabc_la_LIBADD  = vcard/libvcard.la ../kdeui/libkdeui.la ../kio/libkio.la
+libkabc_la_LDFLAGS = $(all_libraries) -no-undefined -version-info 2:0:1
+libkabc_la_LIBADD  = $(top_builddir)/kabc/vcard/libvcard.la $(top_builddir)/kdeui/libkdeui.la $(top_builddir)/kio/libkio.la
 
 libkabc_la_SOURCES = \
   address.cpp addressbook.cpp addressee.cpp addresseedialog.cpp agent.cpp \
--- kabc/plugins/ldap/configure.in.in	14 Jan 2003 19:45:52 -0000	1.1.1.3
+++ kabc/plugins/ldap/configure.in.in	21 Feb 2003 21:42:06 -0000	1.9
@@ -19,7 +19,7 @@
   fi
   if test $with_ldap = FOUND ; then
     with_ldap=NOTFOUND
-    for ext in la so sl a ; do
+    for ext in la so sl a dylib; do
       AC_FIND_FILE(libldap.$ext, $kde_libraries /usr/lib /usr/local/lib,
         ldap_libdir)
       if test -r $ldap_libdir/libldap.$ext ; then
@@ -38,6 +38,12 @@
 case "$with_ldap" in
 no) AC_MSG_RESULT(no) ;;
 NOTFOUND) AC_MSG_RESULT(searched but not found) ;;
+framework)
+  LDAP_LIBS="-Xlinker -framework -Xlinker LDAP"
+  AC_DEFINE_UNQUOTED(HAVE_LIBLDAP, 1, [Define if you have LDAP libraries])
+  LDAP_SUBDIR="ldap"
+  AC_MSG_RESULT(Apple framework)
+  ;;
 *)
   if test "x$with_ldap" = "xFOUND" ; then
     msg="incs=$ldap_incdir libs=$ldap_libdir"
--- kabc/vcard/Makefile.am	10 Jul 2002 04:42:34 -0000	1.1.1.2
+++ kabc/vcard/Makefile.am	26 May 2003 05:17:35 -0000
@@ -7,6 +7,7 @@
 
 libvcard_la_SOURCES = vCard-all.cpp
 libvcard_la_LIBADD = $(LIB_KDECORE)
+libvcard_la_LDFLAGS = $(all_libraries) $(KDE_RPATH) -avoid-version -no-undefined
 
 check_PROGRAMS = testwrite testread
 
--- kate/interfaces/Makefile.am	10 Jul 2002 04:42:56 -0000	1.1.1.2
+++ kate/interfaces/Makefile.am	24 Nov 2002 07:11:21 -0000	1.2
@@ -4,7 +4,7 @@
 
 libkatepartinterfaces_la_SOURCES = interfaces.cpp
 libkatepartinterfaces_la_LIBADD   = $(top_builddir)/interfaces/ktexteditor/libktexteditor.la
-libkatepartinterfaces_la_LDFLAGS = $(all_libraries) $(KDE_RPATH) -no-undefined
+libkatepartinterfaces_la_LDFLAGS = $(all_libraries) $(KDE_RPATH) -no-undefined -avoid-version
 
 kateinclude_HEADERS = document.h view.h
 kateincludedir = $(includedir)/kate
--- kcert/Makefile.am	4 Jan 2003 04:28:18 -0000	1.1.1.4
+++ kcert/Makefile.am	8 Mar 2003 23:48:52 -0000	1.2
@@ -1,4 +1,4 @@
-INCLUDES= $(SSL_INCLUDES) -I$(top_srcdir)/kio/kssl -I$(top_builddir)/kio/kssl -I$(top_srcdir) $(all_includes)
+INCLUDES= -I$(top_srcdir)/kio/kssl -I$(top_builddir)/kio/kssl -I$(top_srcdir) $(all_includes) $(SSL_INCLUDES)
 
 lib_LTLIBRARIES = libkcertpart.la
 KCERTPARTVERSION=	2.2.0
--- kconf_update/Makefile.am	25 Jun 2002 02:46:55 -0000	1.1.1.1
+++ kconf_update/Makefile.am	26 May 2003 05:17:35 -0000
@@ -18,22 +18,26 @@
 
 INCLUDES= $(all_includes)
 
-lib_LTLIBRARIES = kconf_update.la
-
+lib_LTLIBRARIES = libkconf_update_main.la kconf_update.la
 bin_PROGRAMS = kconf_update
-kconf_update_SOURCES = dummy.cpp
-kconf_update_LDADD = kconf_update.la
-kconf_update_LDFLAGS = $(KDE_RPATH) $(all_libraries)
 
-kconf_update_la_SOURCES = kconf_update.cpp
-kconf_update_la_LIBADD = ../kdecore/libkdecore.la
-kconf_update_la_LDFLAGS = $(all_libraries) -module -avoid-version
+libkconf_update_main_la_SOURCES = kconf_update.cpp
+libkconf_update_main_la_LIBADD = ../kdecore/libkdecore.la
+libkconf_update_main_la_LDFLAGS = $(all_libraries) -avoid-version -no-undefined
+
+kconf_update_la_SOURCES = kconf_update_la_main.cpp
+kconf_update_la_LIBADD = libkconf_update_main.la
+kconf_update_la_LDFLAGS = $(all_libraries) -avoid-version -module
+
+kconf_update_la_main.cpp: kconf_update_main.cpp
+	cat kconf_update_main.cpp > kconf_update_la_main.cpp
+
+kconf_update_SOURCES = kconf_update_main.cpp
+kconf_update_LDADD = libkconf_update_main.la
+kconf_update_LDFLAGS = $(KDE_RPATH) $(all_libraries)
 
 METASOURCES = AUTO
 
 # Internal
 # noinst_HEADERS = kconf_update.h
-
-dummy.cpp: 
-	echo > dummy.cpp
 
--- kconf_update/kconf_update.cpp	12 Nov 2002 03:56:45 -0000	1.1.1.3
+++ kconf_update/kconf_update.cpp	26 Nov 2002 21:00:48 -0000	1.2
@@ -779,7 +779,9 @@
 }
 
 
-int main(int argc, char **argv)
+extern "C" int kdemain(int, char**);
+
+int kdemain(int argc, char **argv)
 {
    KAboutData aboutData("kconf_update", I18N_NOOP("KConf Update"),
                         "1.0.2",
RCS file: kconf_update/kconf_update_main.cpp
diff -N kconf_update/kconf_update_main.cpp
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ kconf_update/kconf_update_main.cpp	26 Nov 2002 21:00:48 -0000	1.1
@@ -0,0 +1,27 @@
+/*
+ *
+ * Copyright (c) 2001 Nick Hudson <skrll@netbsd.org>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+ * AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+extern "C" int kdemain(int, char* []);
+
+int main( int argc, char* argv[] )
+{
+        return kdemain(argc, argv);
+}
--- kdecore/Makefile.am	20 Nov 2002 00:54:24 -0000	1.1.1.6
+++ kdecore/Makefile.am	26 May 2003 05:17:35 -0000
@@ -1,6 +1,6 @@
 #    This file is part of the KDE libraries
 #
-#    $Id: Makefile.am,v 1.303 2002/11/14 08:46:24 hausmann Exp $
+#    $Id: Makefile.am,v 1.302 2002/10/26 14:32:21 gallium Exp $
 #
 #    Copyright (C) 1996-1997 Matthias Kalle Dalheimer (kalle@kde.org)
 #			  (C) 1997 Stephan Kulow (coolo@kde.org)
@@ -54,7 +54,7 @@
 	ksortablevaluelist.h kdebugclasses.h kclipboard.h
 
 libkdefakes_la_SOURCES = fakes.c vsnprintf.c
-libkdefakes_la_LDFLAGS = -version-info 5:0:1
+libkdefakes_la_LDFLAGS = -no-undefined -version-info 5:0:1 $(all_libraries)
 libkdefakes_la_LIBADD  = $(LIBSOCKET)
 
 noinst_HEADERS = kaccelaction.h kaccelbase.h kaccelprivate.h kckey.h \
@@ -89,7 +89,7 @@
 	kappdcopiface.skel kclipboard.cpp kcheckaccelerators.cpp \
 	kdeversion.cpp
 
-libkdecore_la_LDFLAGS = $(QT_LDFLAGS) $(KDE_RPATH) $(KDE_MT_LDFLAGS) $(X_LDFLAGS) $(USER_LDFLAGS) -version-info 5:0:1 -no-undefined
+libkdecore_la_LDFLAGS = $(all_libraries) $(QT_LDFLAGS) $(KDE_RPATH) $(KDE_MT_LDFLAGS) $(X_LDFLAGS) $(USER_LDFLAGS) -version-info 5:0:1 -no-undefined
 libkdecore_la_LIBADD = malloc/libklmalloc.la $(SVGICON_LIB) ../dcop/libDCOP.la ../libltdl/libltdlc.la $(LIB_XEXT) $(LIBRESOLV) $(LIBXINERAMA) $(LIB_DMALLOC) $(LIBART_LIBS) ../kdefx/libkdefx.la
 
 libkdecore_la_METASOURCES = AUTO
--- kdecore/kiconloader.cpp	14 Jan 2003 19:46:12 -0000	1.1.1.10
+++ kdecore/kiconloader.cpp	14 Jan 2003 20:04:30 -0000	1.6
@@ -457,7 +457,7 @@
     return icon;
 }
 
-inline QString KIconLoader::unknownIconPath( int size ) const
+QString KIconLoader::unknownIconPath( int size ) const
 {
     static const QString &str_unknown = KGlobal::staticQString("unknown");
 
--- kdecore/kstandarddirs.cpp	14 Jan 2003 19:46:15 -0000	1.1.1.7
+++ kdecore/kstandarddirs.cpp	15 Mar 2003 15:49:39 -0000	1.2
@@ -798,7 +798,7 @@
     if (!strcmp(type, "data"))
 	return "share/apps/";
     if (!strcmp(type, "html"))
-	return "share/doc/HTML/";
+	return "share/doc/kde/";
     if (!strcmp(type, "icon"))
 	return "share/icons/";
     if (!strcmp(type, "config"))
--- kdecore/svgicons/Makefile.am	1 Oct 2002 03:05:25 -0000	1.1.1.3
+++ kdecore/svgicons/Makefile.am	25 Mar 2003 18:16:37 -0000	1.2
@@ -3,3 +3,4 @@
 noinst_LTLIBRARIES = libkdesvgicons.la
 
 libkdesvgicons_la_SOURCES = ksvgiconengine.cpp ksvgiconpainter.cpp
+libkdesvgicons_la_LIBADD  = $(LIBZ)
--- kded/Makefile.am	10 Jul 2002 04:44:10 -0000	1.1.1.2
+++ kded/Makefile.am	26 May 2003 05:17:35 -0000
@@ -19,32 +19,46 @@
 
 INCLUDES= -I$(srcdir)/.. -I$(top_srcdir) $(all_includes)
 
-lib_LTLIBRARIES = kded.la kbuildsycoca.la
+lib_LTLIBRARIES = libkded_main.la kded.la libkbuildsycoca_main.la kbuildsycoca.la
 
-kded_la_LDFLAGS = $(all_libraries) -module -avoid-version
-kded_la_LIBADD = $(LIB_KIO)
-kded_la_SOURCES = kded.cpp kbuildservicetypefactory.cpp \
+libkded_main_la_LDFLAGS = $(all_libraries) -no-undefined -avoid-version
+libkded_main_la_LIBADD = $(LIB_KIO)
+libkded_main_la_SOURCES = kded.cpp kbuildservicetypefactory.cpp \
 			kbuildservicefactory.cpp \
 			kbuildservicegroupfactory.cpp kdedmodule.cpp
 
-kbuildsycoca_la_LDFLAGS = $(all_libraries) -module -avoid-version
-kbuildsycoca_la_LIBADD = $(LIB_KIO)
-kbuildsycoca_la_SOURCES = kbuildsycoca.cpp kbuildservicetypefactory.cpp \
+kded_la_LDFLAGS = $(all_libraries) -module -avoid-version
+kded_la_LIBADD  = libkded_main.la
+kded_la_SOURCES = kded_la_main.cpp
+
+kded_la_main.cpp: kded_main.cpp
+	cat kded_main.cpp > kded_la_main.cpp
+
+libkbuildsycoca_main_la_LDFLAGS = $(all_libraries) -no-undefined -avoid-version
+libkbuildsycoca_main_la_LIBADD = $(LIB_KIO)
+libkbuildsycoca_main_la_SOURCES = kbuildsycoca.cpp kbuildservicetypefactory.cpp \
 				kbuildservicefactory.cpp \
 				kbuildservicegroupfactory.cpp \
 				kbuildimageiofactory.cpp \
 				kbuildprotocolinfofactory.cpp \
 				kctimefactory.cpp
 
+kbuildsycoca_la_LDFLAGS = $(all_libraries) -module -avoid-version
+kbuildsycoca_la_LIBADD  = libkbuildsycoca_main.la
+kbuildsycoca_la_SOURCES = kbuildsycoca_la_main.cpp
+
+kbuildsycoca_la_main.cpp: kbuildsycoca_main.cpp
+	cat kbuildsycoca_main.cpp > kbuildsycoca_la_main.cpp
+
 bin_PROGRAMS = kded kbuildsycoca kdontchangethehostname
 
 kded_LDFLAGS = $(all_libraries) $(KDE_RPATH)
-kded_LDADD = kded.la
-kded_SOURCES = dummy.cpp
+kded_LDADD   = libkded_main.la
+kded_SOURCES = kded_main.cpp
 
 kbuildsycoca_LDFLAGS = $(all_libraries) $(KDE_RPATH)
-kbuildsycoca_LDADD = kbuildsycoca.la
-kbuildsycoca_SOURCES = dummy.cpp
+kbuildsycoca_LDADD = libkbuildsycoca_main.la
+kbuildsycoca_SOURCES = kbuildsycoca_main.cpp
 
 kdontchangethehostname_LDFLAGS = $(all_libraries) $(KDE_RPATH)
 kdontchangethehostname_LDADD = $(LIB_KDECORE) 
@@ -64,6 +78,3 @@
 
 update_DATA = kded.upd
 updatedir = $(kde_datadir)/kconf_update
-
-dummy.cpp:
-	echo > dummy.cpp
--- kded/kbuildsycoca.cpp	6 May 2003 17:20:06 -0000	1.1.1.6
+++ kded/kbuildsycoca.cpp	6 May 2003 17:34:16 -0000	1.4
@@ -509,7 +509,9 @@
    ~WaitForSignal() { kapp->eventLoop()->exitLoop(); }
 };
 
-int main(int argc, char **argv)
+extern "C" int kdemain(int, char**);
+
+int kdemain(int argc, char **argv)
 {
    KLocale::setMainCatalogue("kdelibs");
    KAboutData d(appName, I18N_NOOP("KBuildSycoca"), appVersion,
RCS file: kded/kbuildsycoca_main.cpp
diff -N kded/kbuildsycoca_main.cpp
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ kded/kbuildsycoca_main.cpp	26 Nov 2002 21:00:49 -0000	1.1
@@ -0,0 +1,27 @@
+/*
+ *
+ * Copyright (c) 2001 Nick Hudson <skrll@netbsd.org>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+ * AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+extern "C" int kdemain(int, char* []);
+
+int main( int argc, char* argv[] )
+{
+        return kdemain(argc, argv);
+}
--- kded/kded.cpp	6 May 2003 17:20:05 -0000	1.1.1.4
+++ kded/kded.cpp	6 May 2003 17:34:16 -0000	1.4
@@ -653,7 +653,9 @@
   bool startup;
 };
 
-int main(int argc, char *argv[])
+extern "C" int kdemain(int, char**);
+
+int kdemain(int argc, char **argv)
 {
      KAboutData aboutData( "kded", I18N_NOOP("KDE Daemon"),
         "$Id: kded.cpp,v 1.75.2.1 2003/03/14 22:36:21 waba Exp $",
RCS file: kded/kded_main.cpp
diff -N kded/kded_main.cpp
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ kded/kded_main.cpp	26 Nov 2002 21:00:49 -0000	1.1
@@ -0,0 +1,27 @@
+/*
+ *
+ * Copyright (c) 2001 Nick Hudson <skrll@netbsd.org>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+ * AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+extern "C" int kdemain(int, char* []);
+
+int main( int argc, char* argv[] )
+{
+        return kdemain(argc, argv);
+}
--- kdeprint/cups/cupsdconf2/Makefile.am	1 Oct 2002 03:05:37 -0000	1.1.1.3
+++ kdeprint/cups/cupsdconf2/Makefile.am	26 May 2003 05:17:36 -0000
@@ -3,22 +3,32 @@
 INCLUDES= -I$(top_srcdir) -I$(top_srcdir)/kio -I$(top_srcdir)/kfile $(all_includes)
 
 bin_PROGRAMS = cupsdconf
-cupsdconf_SOURCES = main.cpp
 
-cupsdconf_LDADD   =  libcupsdconf.la
+cupsdconf_SOURCES = cupsdconf_main.cpp
+cupsdconf_LDADD   = libcupsdconf_main.la
 cupsdconf_LDFLAGS = $(all_libraries) $(KDE_RPATH)
 
+cupsdconf_main.cpp: stub_main.cpp
+	cat stub_main.cpp > cupsdconf_main.cpp
+
 # library creation
-lib_LTLIBRARIES = libcupsdconf.la
-libcupsdconf_la_SOURCES = cupsdconf.cpp cupsddialog.cpp cupsdpage.cpp cupsdcomment.cpp cupsdsplash.cpp \
+lib_LTLIBRARIES = libcupsdconf_main.la cupsdconf.la
+libcupsdconf_main_la_SOURCES = cupsdconf.cpp cupsddialog.cpp cupsdpage.cpp cupsdcomment.cpp cupsdsplash.cpp \
 			  cupsdserverpage.cpp cupsdlogpage.cpp cupsdjobspage.cpp cupsdfilterpage.cpp \
 			  qdirlineedit.cpp cupsddirpage.cpp portdialog.cpp cupsdnetworkpage.cpp \
 			  editlist.cpp cupsdbrowsingpage.cpp browsedialog.cpp cupsdsecuritypage.cpp \
 			  locationdialog.cpp addressdialog.cpp cups-util.c \
-			  qdirmultilineedit.cpp sizewidget.cpp
-libcupsdconf_la_METASOURCES = AUTO
-libcupsdconf_la_LDFLAGS = $(all_libraries) -module -avoid-version -no-undefined
-libcupsdconf_la_LIBADD = $(LIB_KIO) $(LIB_CUPS)
+			  qdirmultilineedit.cpp sizewidget.cpp main.cpp
+libcupsdconf_main_la_METASOURCES = AUTO
+libcupsdconf_main_la_LDFLAGS = $(all_libraries) -avoid-version -no-undefined
+libcupsdconf_main_la_LIBADD = $(LIB_KIO) $(LIB_CUPS)
+
+cupsdconf_la_SOURCES = cupsdconf_la_main.cpp
+cupsdconf_la_LDFLAGS = $(all_libraries) -avoid-version -module $(KDE_RPATH)
+cupsdconf_la_LIBADD  = libcupsdconf_main.la
+
+cupsdconf_la_main.cpp: stub_main.cpp
+	cat stub_main.cpp > cupsdconf_la_main.cpp
 
 noinst_HEADERS = cupsdconf.h cupsdpage.h cupsddialog.h cupsdcomment.h cupsdsplash.h \
 		 cupsdserverpage.h cupsdlogpage.h cupsdjobspage.h cupsdfilterpage.h \
--- kdeprint/cups/cupsdconf2/main.cpp	25 Jun 2002 02:46:57 -0000	1.1.1.1
+++ kdeprint/cups/cupsdconf2/main.cpp	26 Nov 2002 21:00:49 -0000	1.2
@@ -30,7 +30,9 @@
 	{ 0, 0, 0}
 };
 
-int main(int argc, char *argv[])
+extern "C" int kdemain(int, char**);
+
+int kdemain(int argc, char **argv)
 {
 	KCmdLineArgs::init(argc,argv,"cupsdconf",I18N_NOOP("A CUPS configuration tool"),"0.0.1");
 	KCmdLineArgs::addCmdLineOptions(options);
RCS file: kdeprint/cups/cupsdconf2/stub_main.cpp
diff -N kdeprint/cups/cupsdconf2/stub_main.cpp
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ kdeprint/cups/cupsdconf2/stub_main.cpp	26 Nov 2002 21:00:49 -0000	1.1
@@ -0,0 +1,28 @@
+/*
+ *
+ * Copyright (c) 2001 Nick Hudson <skrll@netbsd.org>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+ * AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+extern "C" int kdemain(int, char* []);
+
+int main( int argc, char* argv[] )
+{
+        return kdemain(argc, argv);
+}
+
--- kdeprint/management/Makefile.am	14 Aug 2002 14:04:14 -0000	1.1.1.3
+++ kdeprint/management/Makefile.am	21 Feb 2003 21:10:10 -0000	1.5
@@ -3,10 +3,13 @@
 lib_LTLIBRARIES = libkdeprint_management.la kaddprinterwizard.la
 bin_PROGRAMS = kaddprinterwizard
 
-kaddprinterwizard_SOURCES = dummy.cpp
-kaddprinterwizard_LDADD = kaddprinterwizard.la
+kaddprinterwizard_SOURCES = kaddprinterwizard_main.cpp
+kaddprinterwizard_LDADD = libkdeprint_management.la
 kaddprinterwizard_LDFLAGS = $(all_libraries) $(KDE_RPATH)
 
+kaddprinterwizard_main.cpp: kaddprinterwizard.cpp
+	cat kaddprinterwizard.cpp > kaddprinterwizard_main.cpp
+
 kaddprinterwizard_la_SOURCES = kaddprinterwizard.cpp
 kaddprinterwizard_la_LIBADD = libkdeprint_management.la
 kaddprinterwizard_la_LDFLAGS = -module -avoid-version $(all_libraries) $(KDE_RPATH)
@@ -45,7 +48,4 @@
 
 dataicon_DATA = tileup.png tiledown.png side.png
 dataicondir = $(kde_datadir)/kdeprint
-
-dummy.cpp:
-	echo > dummy.cpp
 
--- kdeui/Makefile.am	3 Mar 2003 01:17:24 -0000	1.1.1.5
+++ kdeui/Makefile.am	3 Mar 2003 01:39:59 -0000	1.4
@@ -23,7 +23,7 @@
 INCLUDES= -I$(top_srcdir)/kdefx -I$(top_srcdir)/interfaces $(all_includes)
 
 lib_LTLIBRARIES = libkdeui.la
-libkdeui_la_LDFLAGS = $(KDE_MT_LDFLAGS) -no-undefined -version-info 5:0:1
+libkdeui_la_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(KDE_MT_LDFLAGS) -no-undefined -version-info 5:0:1
 # we should get this to work when libtool 1.3 is released
 libkdeui_la_LIBADD = ../kdecore/libkdecore.la
 
--- kdeui/kedittoolbar.cpp	10 Dec 2002 16:19:22 -0000	1.1.1.6
+++ kdeui/kedittoolbar.cpp	10 Dec 2002 16:37:43 -0000	1.7
@@ -142,13 +142,13 @@
    */
   ToolbarList findToolbars(QDomElement elem)
   {
-    static const QString &tagToolbar = KGlobal::staticQString( "ToolBar" );
-    static const QString &attrNoEdit = KGlobal::staticQString( "noEdit" );
+    // static const QString &tagToolbar = KGlobal::staticQString( "ToolBar" );
+    // static const QString &attrNoEdit = KGlobal::staticQString( "noEdit" );
     ToolbarList list;
 
     for( ; !elem.isNull(); elem = elem.nextSibling().toElement() )
     {
-      if (elem.tagName() == tagToolbar && elem.attribute( attrNoEdit ) != "true" )
+      if (elem.tagName() == KGlobal::staticQString( "ToolBar" ) && elem.attribute( KGlobal::staticQString( "noEdit" ) ) != "true" )
         list.append(elem);
 
       QDomElement child = elem.firstChild().toElement();
--- kdeui/kxmlguifactory.cpp	1 Oct 2002 03:06:00 -0000	1.1.1.3
+++ kdeui/kxmlguifactory.cpp	1 Oct 2002 03:59:10 -0000	1.5
@@ -49,14 +49,10 @@
 public:
     KXMLGUIFactoryPrivate()
     {
-        static const QString &defaultMergingName = KGlobal::staticQString( "<default>" );
-        static const QString &actionList = KGlobal::staticQString( "actionlist" );
-        static const QString &name = KGlobal::staticQString( "name" );
-
         m_rootNode = new ContainerNode( 0L, QString::null, 0L );
-        m_defaultMergingName = defaultMergingName;
-        tagActionList = actionList;
-        attrName = name;
+        m_defaultMergingName = KGlobal::staticQString( "<default>" );
+        tagActionList = KGlobal::staticQString( "actionlist" );
+        attrName = KGlobal::staticQString( "name" );
     }
     ~KXMLGUIFactoryPrivate()
     {
--- kdoctools/Makefile.am	6 May 2003 17:24:32 -0000	1.1.1.3
+++ kdoctools/Makefile.am	26 May 2003 05:17:39 -0000
@@ -7,7 +7,7 @@
 
 libkbzipfilter_dummy_la_SOURCES = kbzip2filter.cpp
 libkbzipfilter_dummy_la_LIBADD = $(LIB_KIO) $(LIBBZ2)
-libkbzipfilter_dummy_la_LDFLAGS = $(KDE_RPATH) $(LIBXML_RPATH) $(LIBXSLT_RPATH) $(all_libraries)
+libkbzipfilter_dummy_la_LDFLAGS = $(KDE_RPATH) $(LIBXML_RPATH) $(LIBXSLT_RPATH) $(all_libraries) -no-undefined
 
 ####### Files
 
--- khtml/Makefile.am	4 Jan 2003 04:30:33 -0000	1.1.1.5
+++ khtml/Makefile.am	26 May 2003 05:17:39 -0000
@@ -26,7 +26,7 @@
 
 SUBDIRS = misc dom css xml html rendering pics $(JAVA_SUBDIR) . ecma kmultipart
 
-lib_LTLIBRARIES = libkhtml.la
+lib_LTLIBRARIES = libkhtml.la khtml.la libkhtmlimagepart_main.la
 kde_module_LTLIBRARIES = khtmlimagepart.la
 
 libkhtml_la_SOURCES = khtmlview.cpp khtml_part.cpp khtml_run.cpp khtml_factory.cpp khtml_settings.cc \
@@ -40,7 +40,7 @@
 noinst_HEADERS = design.h testkhtml.h testrender.h test_regression.h khtml_ext.h \
 		 khtml_pagecache.h khtmlimage.h khtmlpart_p.h khtml_printsettings.h
 
-libkhtml_la_LDFLAGS = -version-info 5:0:1 -module -no-undefined $(all_libraries)
+libkhtml_la_LDFLAGS = -version-info 5:0:1 -no-undefined $(all_libraries)
 libkhtml_la_LIBADD = ./xml/libkhtmlxml.la ./html/libkhtmlhtml.la \
 	./rendering/libkhtmlrender.la ./css/libkhtmlcss.la \
 	./misc/libkhtmlmisc.la ./dom/libkhtmldom.la $(LIBKJAVA) \
@@ -49,9 +49,23 @@
 	$(top_builddir)/kdeprint/libkdeprint.la  \
 	$(top_builddir)/kutils/libkutils.la 
 
-khtmlimagepart_la_SOURCES = khtmlimage.cpp
+khtml_la_LDFLAGS = -avoid-version -no-undefined $(all_libraries) -module
+khtml_la_LIBADD  = libkhtml.la
+khtml_la_SOURCES = dummy.cpp
+
+dummy.cpp:
+	echo > dummy.cpp
+
+libkhtmlimagepart_main_la_SOURCES = khtmlimage.cpp
+libkhtmlimagepart_main_la_LDFLAGS = $(KDE_RPATH) $(all_libraries) -avoid-version -no-undefined
+libkhtmlimagepart_main_la_LIBADD  = $(LIB_QT) $(LIB_KDEUI) $(LIB_KDECORE) $(LIB_KPARTS) libkhtml.la
+
+khtmlimagepart_la_SOURCES = khtmlimagepart_dummy.cpp
 khtmlimagepart_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries)
-khtmlimagepart_la_LIBADD = libkhtml.la
+khtmlimagepart_la_LIBADD  = $(LIB_QT) $(LIB_KDEUI) $(LIB_KDECORE) $(LIB_KPARTS) libkhtml.la
+
+khtmlimagepart_dummy.cpp:
+	echo > khtmlimagepart_dummy.cpp
 
 INCLUDES = -I$(top_srcdir)/kjs -I$(top_srcdir)/kimgio \
 	-I$(srcdir)/java -I$(top_srcdir)/dcop -I$(srcdir)/misc \
--- khtml/java/dummy/Makefile.am	29 Oct 2002 02:38:07 -0000	1.1.1.1
+++ khtml/java/dummy/Makefile.am	26 May 2003 05:17:39 -0000
@@ -5,5 +5,5 @@
 dummy.cpp:
 	echo > $@
 
-libkjava_la_LDFLAGS = -version-info 1:0
+libkjava_la_LDFLAGS = -version-info 1:0 -no-undefined
 
--- kimgio/Makefile.am	4 Jan 2003 04:31:10 -0000	1.1.1.5
+++ kimgio/Makefile.am	4 Jan 2003 04:43:31 -0000	1.8
@@ -7,7 +7,7 @@
 kde_module_LTLIBRARIES= kimg_eps.la kimg_xview.la kimg_krl.la \
 	         $(KIMGIO_TIFF_MODULES) kimg_ico.la
 
-KIMGIO_PLUGIN = -avoid-version -export-symbols-regex 'kimgio_.*_(read|write)'
+KIMGIO_PLUGIN = -avoid-version -export-symbols-regex 'kimgio_.*_(read|write)' $(all_libraries) $(LIB_KDECORE) $(LIB_QT)
 
 kimg_tiff_la_SOURCES = tiffr.cpp
 kimg_tiff_la_LDFLAGS = -module $(KIMGIO_PLUGIN) -no-undefined $(all_libraries)
--- kinit/Makefile.am	10 Jul 2002 04:49:13 -0000	1.1.1.2
+++ kinit/Makefile.am	26 May 2003 05:17:39 -0000
@@ -20,7 +20,7 @@
 SUBDIRS = . tests
 
 bin_PROGRAMS = kdeinit kdeinit_wrapper kshell kdeinit_shutdown lnusertemp kwrapper klauncher kioslave
-lib_LTLIBRARIES = klauncher.la
+lib_LTLIBRARIES = klauncher.la libklauncher_main.la
 
 kdeinit_SOURCES = kinit.cpp setproctitle.cpp
 
@@ -49,13 +49,20 @@
 kwrapper_SOURCES = kwrapper.c
 kwrapper_LDADD = $(LIBSOCKET)
 
-klauncher_la_LDFLAGS = $(all_libraries) -module -avoid-version
-klauncher_la_LIBADD = $(LIB_KIO)
-klauncher_la_SOURCES = klauncher.cpp klauncher_main.cpp autostart.cpp
+libklauncher_main_la_LDFLAGS = $(all_libraries) -avoid-version -no-undefined
+libklauncher_main_la_LIBADD = $(LIB_KIO)
+libklauncher_main_la_SOURCES = klauncher.cpp autostart.cpp
+
+klauncher_la_LDFLAGS = $(all_libraries) -avoid-version -module
+klauncher_la_LIBADD = $(LIB_KIO) libklauncher_main.la
+klauncher_la_SOURCES = klauncher_la_main.cpp
+
+klauncher_la_main.cpp: klauncher_main.cpp
+	cat klauncher_main.cpp > klauncher_la_main.cpp
 
 klauncher_LDFLAGS =  $(all_libraries) $(KDE_RPATH)
-klauncher_LDADD = klauncher.la
-klauncher_SOURCES = dummy.cpp
+klauncher_LDADD = libklauncher_main.la
+klauncher_SOURCES = klauncher_main.cpp
 
 METASOURCES = AUTO
 
@@ -64,6 +71,3 @@
 kwrapper.o: wrapper.c
 
 shell.o: wrapper.c
-
-dummy.cpp:
-	echo > dummy.cpp
--- kinit/kinit.cpp	13 Mar 2003 02:18:42 -0000	1.1.1.6
+++ kinit/kinit.cpp	13 Mar 2003 02:52:40 -0000	1.8
@@ -81,11 +81,6 @@
 # endif
 #endif
 
-#if defined(HAVE_NSGETENVIRON) && defined(HAVE_CRT_EXTERNS_H)
-# include <crt_externs.h>
-# define environ (*_NSGetEnviron())
-#endif
-
 extern char **environ;
 
 extern int lt_dlopen_flag;
@@ -1437,6 +1432,7 @@
    kdeinit_setproctitle("Starting up...");
    kdeinit_library_path();
    unsetenv("LD_BIND_NOW");
+   unsetenv("DYLD_BIND_AT_LAUNCH");
    KApplication::loadedByKdeinit = true;
 
    d.maxname = strlen(argv[0]);
--- kinit/setproctitle.cpp	4 Jan 2003 04:31:11 -0000	1.1.1.3
+++ kinit/setproctitle.cpp	27 Feb 2003 00:39:08 -0000	1.5
@@ -30,12 +30,6 @@
 #include <string.h>
 #include <unistd.h>
 
-#if defined(HAVE_NSGETENVIRON) && defined(HAVE_CRT_EXTERNS_H)
-# include <sys/time.h>
-# include <crt_externs.h>
-# define environ (*_NSGetEnviron())
-#endif
-
 /* _PATH_KMEM should be defined in <paths.h> */
 #ifndef _PATH_KMEM
 # define _PATH_KMEM	"/dev/kmem"
--- kinit/wrapper.c	4 Jan 2003 04:31:12 -0000	1.1.1.3
+++ kinit/wrapper.c	27 Feb 2003 00:39:08 -0000	1.5
@@ -40,11 +40,6 @@
 #include <signal.h>
 #include <limits.h>
 
-#if  defined(HAVE_NSGETENVIRON) && defined(HAVE_CRT_EXTERNS_H)
-# include <crt_externs.h>
-# define environ (*_NSGetEnviron())
-#endif
-
 extern char **environ;
 
 static char *getDisplay()
--- kio/kio/kurlcompletion.cpp	6 May 2003 17:18:59 -0000	1.1.1.5
+++ kio/kio/kurlcompletion.cpp	6 May 2003 17:34:18 -0000	1.7
@@ -54,11 +54,6 @@
 
 #include "kurlcompletion.h"
 
-#if defined(HAVE_NSGETENVIRON) && defined(HAVE_CRT_EXTERNS_H)
-# include <crt_externs.h>
-# define environ (*_NSGetEnviron())
-#endif
-
 static bool expandTilde(QString &);
 static bool expandEnv(QString &);
 
--- kio/kio/kurlcompletion.h	10 Jul 2002 04:49:47 -0000	1.1.1.2
+++ kio/kio/kurlcompletion.h	10 Jul 2002 05:12:46 -0000	1.3
@@ -23,6 +23,10 @@
 #ifndef KURLCOMPLETION_H
 #define KURLCOMPLETION_H
 
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
 #include <kcompletion.h>
 #include <kio/jobclasses.h>
 #include <qstring.h>
--- kio/kio/lex.c	10 Jul 2002 04:49:48 -0000	1.1.1.2
+++ kio/kio/lex.c	21 Mar 2003 14:49:01 -0000	1.2
@@ -16,6 +16,7 @@
 #define yytext kiotradertext
 #define yywrap kiotraderwrap
 
+
 #line 20 "lex.c"
 /* A lexical scanner generated by flex */
 
--- kio/kssl/kopenssl.cc	6 May 2003 17:19:18 -0000	1.1.1.7
+++ kio/kssl/kopenssl.cc	6 May 2003 17:34:18 -0000	1.9
@@ -256,6 +256,9 @@
             #ifdef _AIX
             << "/opt/freeware/lib/"
 	    #endif
+	    #ifdef __APPLE__
+	    << "@PREFIX@/lib/"
+	    #endif
 	    << "/usr/lib/"
 	    << "/usr/ssl/lib/"
             << "/usr/local/lib/"
--- kio/misc/Makefile.am	4 Jan 2003 04:31:49 -0000	1.1.1.4
+++ kio/misc/Makefile.am	26 May 2003 05:17:39 -0000
@@ -22,25 +22,29 @@
 
 SUBDIRS = . ksendbugmail kpac kdesasl kssld kfile
 
-lib_LTLIBRARIES = kio_uiserver.la
+lib_LTLIBRARIES = kio_uiserver.la libkio_uiserver_main.la
 bin_PROGRAMS = kio_uiserver kmailservice ktelnetservice
 
-kio_uiserver_SOURCES = dummy.cpp
-kio_uiserver_LDADD = kio_uiserver.la
-kio_uiserver_LDFLAGS = $(KDE_RPATH) $(all_libraries)
+libkio_uiserver_main_la_SOURCES = uiserver.cpp uiserver.skel observer.stub
+libkio_uiserver_main_la_LIBADD = $(LIB_KIO)
+libkio_uiserver_main_la_LDFLAGS = $(all_libraries) -avoid-version -no-undefined
+
+kio_uiserver_la_SOURCES = kio_uiserver_la_main.cpp
+kio_uiserver_la_LIBADD = libkio_uiserver_main.la
+kio_uiserver_la_LDFLAGS = $(all_libraries) -avoid-version -module
+
+kio_uiserver_la_main.cpp: kio_uiserver_main.cpp
+	cat kio_uiserver_main.cpp > kio_uiserver_la_main.cpp
 
-kio_uiserver_la_SOURCES = uiserver.cpp uiserver.skel observer.stub
-kio_uiserver_la_LIBADD = $(LIB_KIO)
-kio_uiserver_la_LDFLAGS = $(all_libraries) -module -avoid-version
+kio_uiserver_SOURCES = kio_uiserver_main.cpp
+kio_uiserver_LDADD = libkio_uiserver_main.la
+kio_uiserver_LDFLAGS = $(KDE_RPATH) $(all_libraries)
 
 observer_DIR = $(top_srcdir)/kio/kio
 
 METASOURCES = AUTO
 
 kde_services_DATA = kio_uiserver.desktop
-
-dummy.cpp: uiserver.kidl
-	echo > dummy.cpp
 
 kmailservice_SOURCES = kmailservice.cpp
 kmailservice_LDADD = $(LIB_KDECORE)
RCS file: kio/misc/kio_uiserver_main.cpp
diff -N kio/misc/kio_uiserver_main.cpp
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ kio/misc/kio_uiserver_main.cpp	26 Nov 2002 21:00:50 -0000	1.1
@@ -0,0 +1,27 @@
+/*
+ *
+ * Copyright (c) 2001 Nick Hudson <skrll@netbsd.org>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+ * AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+extern "C" int kdemain(int, char* []);
+
+int main( int argc, char* argv[] )
+{
+        return kdemain(argc, argv);
+}
--- kio/misc/uiserver.cpp	1 Dec 2002 16:29:16 -0000	1.1.1.4
+++ kio/misc/uiserver.cpp	1 Dec 2002 16:52:51 -0000	1.3
@@ -1013,7 +1013,9 @@
 
 //------------------------------------------------------------
 
-int main(int argc, char **argv)
+extern "C" int kdemain(int, char**);
+
+int kdemain(int argc, char **argv)
 {
     KLocale::setMainCatalogue("kdelibs");
     //  GS 5/2001 - I changed the name to "KDE" to make it look better
--- kio/misc/kpac/kpac_dhcp_helper.c	10 Jul 2002 04:50:04 -0000	1.1.1.2
+++ kio/misc/kpac/kpac_dhcp_helper.c	29 Oct 2002 14:19:18 -0000	1.2
@@ -19,6 +19,7 @@
 /* $Id: kpac_dhcp_helper.c,v 1.8 2002/04/20 13:42:02 hausmann Exp $ */
 
 #include <config.h>
+#include <sys/types.h>
 #include <grp.h>
 
 #include <unistd.h>
--- kioslave/file/Makefile.am	25 Jun 2002 02:47:04 -0000	1.1.1.1
+++ kioslave/file/Makefile.am	26 Feb 2003 18:53:19 -0000	1.2
@@ -10,7 +10,7 @@
 
 kio_file_la_SOURCES = file.cc
 kio_file_la_LIBADD = $(LIB_KIO)
-kio_file_la_LDFLAGS = -module $(KDE_PLUGIN)
+kio_file_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN)
 noinst_HEADERS = file.h
 
 fileinclude_HEADERS = file.h
--- kioslave/ftp/Makefile.am	10 Jul 2002 04:50:12 -0000	1.1.1.2
+++ kioslave/ftp/Makefile.am	26 Feb 2003 18:53:21 -0000	1.2
@@ -6,7 +6,7 @@
 
 kio_ftp_la_SOURCES = ftp.cc
 kio_ftp_la_LIBADD  = $(LIB_KIO)
-kio_ftp_la_LDFLAGS = -module $(KDE_PLUGIN)
+kio_ftp_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN)
 
 noinst_HEADERS = ftp.h
 
--- kioslave/http/Makefile.am	6 May 2003 17:24:55 -0000	1.1.1.5
+++ kioslave/http/Makefile.am	26 May 2003 05:17:39 -0000
@@ -8,7 +8,7 @@
 ####### Files
 
 bin_PROGRAMS = kio_http_cache_cleaner
-lib_LTLIBRARIES = kio_http_cache_cleaner.la
+lib_LTLIBRARIES = kio_http_cache_cleaner.la libkio_http_cache_cleaner_main.la
 kde_module_LTLIBRARIES = kio_http.la
 
 kio_http_la_SOURCES = http.cc httpfilter.cc
@@ -16,19 +16,26 @@
 kio_http_la_LIBADD = $(LIB_KIO) $(LIBZ)
 kio_http_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN)
 
-kio_http_cache_cleaner_SOURCES = dummy.cpp
-kio_http_cache_cleaner_LDADD   = kio_http_cache_cleaner.la
+kio_http_cache_cleaner_SOURCES = http_cache_cleaner_main.cpp
+kio_http_cache_cleaner_LDADD = libkio_http_cache_cleaner_main.la
 kio_http_cache_cleaner_LDFLAGS = $(KDE_RPATH) $(all_libraries)
 
-kio_http_cache_cleaner_la_SOURCES = http_cache_cleaner.cpp
-kio_http_cache_cleaner_la_LIBADD  = $(LIB_KIO)
-kio_http_cache_cleaner_la_LDFLAGS = -module -avoid-version $(all_libraries)
+http_cache_cleaner_main.cpp: stub_main.cpp
+	cat stub_main.cpp > http_cache_cleaner_main.cpp
+
+kio_http_cache_cleaner_la_SOURCES = http_cache_cleaner_la_main.cpp
+kio_http_cache_cleaner_la_LIBADD  = libkio_http_cache_cleaner_main.la
+kio_http_cache_cleaner_la_LDFLAGS = -avoid-version -module $(all_libraries)
+
+http_cache_cleaner_la_main.cpp: stub_main.cpp
+	cat stub_main.cpp > http_cache_cleaner_la_main.cpp
+
+libkio_http_cache_cleaner_main_la_SOURCES = http_cache_cleaner.cpp
+libkio_http_cache_cleaner_main_la_LIBADD  = $(LIB_KIO)
+libkio_http_cache_cleaner_main_la_LDFLAGS = -avoid-version $(all_libraries) -no-undefined
 
 noinst_HEADERS = http.h
 
 kdelnkdir = $(kde_servicesdir)
 kdelnk_DATA = http_cache_cleaner.desktop http.protocol https.protocol \
               webdav.protocol webdavs.protocol
-
-dummy.cpp:
-	echo > dummy.cpp
--- kioslave/http/http.cc	7 May 2003 20:59:33 -0000	1.1.1.15
+++ kioslave/http/http.cc	7 May 2003 21:30:27 -0000	1.15
@@ -34,9 +34,9 @@
 #include <netinet/in.h>  // Required for AIX
 #include <netinet/tcp.h>
 
+#include <unistd.h>
 /*
 #include <netdb.h>
-#include <unistd.h>
 #include <sys/time.h>
 #include <sys/wait.h>
 */
--- kioslave/http/http_cache_cleaner.cpp	25 Jun 2002 02:47:04 -0000	1.1.1.1
+++ kioslave/http/http_cache_cleaner.cpp	26 Nov 2002 21:00:50 -0000	1.2
@@ -187,7 +187,9 @@
    }
 }
 
-int main(int argc, char **argv)
+extern "C" int kdemain(int, char**);
+
+int kdemain(int argc, char **argv)
 {
    KLocale::setMainCatalogue("kdelibs");
    KCmdLineArgs::init( argc, argv, appName, description, version, true);
RCS file: kioslave/http/stub_main.cpp
diff -N kioslave/http/stub_main.cpp
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ kioslave/http/stub_main.cpp	26 Nov 2002 21:00:50 -0000	1.1
@@ -0,0 +1,28 @@
+/*
+ *
+ * Copyright (c) 2001 Nick Hudson <skrll@netbsd.org>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+ * AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+extern "C" int kdemain(int, char* []);
+
+int main( int argc, char* argv[] )
+{
+        return kdemain(argc, argv);
+}
+
--- kioslave/http/kcookiejar/Makefile.am	1 Oct 2002 03:07:20 -0000	1.1.1.3
+++ kioslave/http/kcookiejar/Makefile.am	21 Feb 2003 20:44:06 -0000	1.8
@@ -9,8 +9,8 @@
 lib_LTLIBRARIES = kcookiejar.la
 kde_module_LTLIBRARIES = kded_kcookiejar.la
 
-kcookiejar_la_SOURCES = main.cpp
 METASOURCES = AUTO
+kcookiejar_la_SOURCES = main.cpp
 kcookiejar_la_LDFLAGS = $(all_libraries) -module -avoid-version
 kcookiejar_la_LIBADD = $(LIB_KDECORE)
 
@@ -19,15 +19,15 @@
 kded_kcookiejar_la_LDFLAGS = $(all_libraries) -module -avoid-version
 kded_kcookiejar_la_LIBADD = $(LIB_KIO)
 
-kcookiejar_SOURCES = dummy.cpp
-kcookiejar_LDADD = kcookiejar.la
+kcookiejar_SOURCES = kcookiejar_main.cpp
+kcookiejar_LDADD = $(LIB_KDECORE)
 kcookiejar_LDFLAGS = $(all_libraries) $(KDE_RPATH)
 
+kcookiejar_main.cpp: main.cpp
+	cat main.cpp > kcookiejar_main.cpp
+
 kded_DATA = kcookiejar.desktop
 kdeddir = $(kde_servicesdir)/kded
 
 update_DATA = kcookiescfg.upd
 updatedir = $(kde_datadir)/kconf_update
-
-dummy.cpp:
-	echo > dummy.cpp
--- kparts/Makefile.am	14 Aug 2002 14:04:18 -0000	1.1.1.3
+++ kparts/Makefile.am	21 Feb 2003 20:44:06 -0000	1.2
@@ -2,7 +2,7 @@
 
 INCLUDES= -I$(srcdir)/../ -I$(top_srcdir)/kio/ -I$(top_srcdir)/libltdl \
 	-I$(top_srcdir)/kfile $(all_includes)
-libkparts_la_LDFLAGS = $(KDE_MT_LDFLAGS) -version-info 3:0:1 -no-undefined
+libkparts_la_LDFLAGS = $(KDE_MT_LDFLAGS) -version-info 3:0:1 -no-undefined $(all_libraries)
 libkparts_la_LIBADD  = $(LIB_KIO)
 
 check-local:
--- kspell/Makefile.am	14 Aug 2002 14:04:19 -0000	1.1.1.3
+++ kspell/Makefile.am	26 Feb 2003 17:25:24 -0000	1.2
@@ -22,7 +22,7 @@
 INCLUDES= -I$(top_srcdir)/dcop $(all_includes)
 
 lib_LTLIBRARIES  = libkspell.la
-libkspell_la_LDFLAGS = $(KDE_MT_LDFLAGS) -version-info 5:0:1 -no-undefined
+libkspell_la_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(KDE_MT_LDFLAGS) -version-info 5:0:1 -no-undefined
 libkspell_la_LIBADD = ../kdeui/libkdeui.la
 
 include_HEADERS = kspell.h ksconfig.h kspelldlg.h
--- libkmid/Makefile.am	14 Aug 2002 14:03:19 -0000	1.1.1.3
+++ libkmid/Makefile.am	26 Feb 2003 17:25:24 -0000	1.2
@@ -13,7 +13,7 @@
 	fmout.cc gusout.cc alsaout.cc voiceman.cc mt32togm.cc notearray.cc \
 	libkmid.cc
 
-libkmid_la_LDFLAGS = $(KDE_MT_LDFLAGS) -version-info 0:95  -no-undefined
+libkmid_la_LDFLAGS = $(all_libraries) $(KDE_MT_LDFLAGS) -version-info 0:95  -no-undefined
 libkmid_la_LIBADD = $(LIBASOUND) ../kdecore/libkdecore.la
 
 DOXYGEN_REFERENCES = kdecore
--- libkscreensaver/Makefile.am	14 Aug 2002 14:04:21 -0000	1.1.1.3
+++ libkscreensaver/Makefile.am	23 Nov 2002 03:50:37 -0000	1.6
@@ -1,7 +1,7 @@
 lib_LTLIBRARIES = libkscreensaver.la
 libkscreensaver_la_SOURCES = main.cpp kscreensaver.cpp
 libkscreensaver_la_LIBADD  = $(LIB_KIO)
-libkscreensaver_la_LDFLAGS = $(all_libraries) $(KDE_RPATH) -version-info 5:0:1
+libkscreensaver_la_LDFLAGS = $(all_libraries) $(KDE_RPATH) -version-info 5:0:1 -undefined suppress -flat_namespace
 
 include_HEADERS = kscreensaver.h kscreensaver_vroot.h
 
--- libltdl/ltdl.c	10 Jul 2002 04:51:21 -0000	1.1.1.2
+++ libltdl/ltdl.c	26 Nov 2002 21:00:50 -0000	1.7
@@ -1544,11 +1544,14 @@
   /* try to open the old library first; if it was dlpreopened,
      we want the preopened version of it, even if a dlopenable
      module is available */
+/*	HACKALERT: Why? Mac OS/Darwin can't open static libs, it is
+	a waste to even try. Disabled for kde.	*/
+#if 0
   if (old_name && tryall_dlopen(handle, old_name) == 0)
     {
       return 0;
     }
-
+#endif
   /* try to open the dynamic library */
   if (dlname)
     {
--- libltdl/ltdl.m4	10 Jul 2002 04:51:21 -0000	1.1.1.2
+++ libltdl/ltdl.m4	22 Jan 2003 02:54:22 -0000	1.4
@@ -103,6 +103,9 @@
 	osf*)
 	  libltdl_cv_sys_dlopen_deplibs=yes
 	  ;;
+	darwin*)
+	  libltdl_cv_sys_dlopen_deplibs=yes
+	  ;;
 	esac
 ])
 if test "$libltdl_cv_sys_dlopen_deplibs" != yes; then
@@ -442,6 +445,8 @@
 if test x"$ac_cv_sys_symbol_underscore" = xyes; then
   if test x"$ac_cv_func_dlopen" = xyes ||
      test x"$ac_cv_lib_dl_dlopen" = xyes ; then
+        ac_save_LIBS="$LIBS"
+        LIBS="$LIBS $LIBADD_DL"
 	AC_CACHE_CHECK([whether we have to add an underscore for dlsym],
 		libltdl_cv_need_uscore, [dnl
 		AC_TRY_RUN([
@@ -495,6 +500,7 @@
 fi
 
 if test x"$libltdl_cv_need_uscore" = xyes; then
+  LIBS="$ac_save_LIBS"
   AC_DEFINE(NEED_USCORE, 1,
     [Define if dlsym() requires a leading underscode in symbol names. ])
 fi
