diff -Nurd kdevelop-3.5.4/buildtools/lib/parsers/qmake/Makefile.am kdevelop-3.5.4-new/buildtools/lib/parsers/qmake/Makefile.am
--- kdevelop-3.5.4/buildtools/lib/parsers/qmake/Makefile.am	2007-11-30 17:34:34.000000000 -0500
+++ kdevelop-3.5.4-new/buildtools/lib/parsers/qmake/Makefile.am	2010-07-27 13:41:57.000000000 -0400
@@ -9,7 +9,7 @@
         $(all_includes)
 METASOURCES = AUTO
 lib_LTLIBRARIES = libkdevqmakeparser.la
-libkdevqmakeparser_la_LDFLAGS = -no-undefined $(all_libraries) $(LIB_KIO)
+libkdevqmakeparser_la_LDFLAGS = -no-undefined $(all_libraries) $(LIB_KIO) $(LIB_QT)
 libkdevqmakeparser_la_SOURCES = qmake_lex.cpp qmake_yacc.cpp qmakeast.cpp \
 	qmakeastvisitor.cpp qmakedriver.cpp
 
diff -Nurd kdevelop-3.5.4/buildtools/lib/widgets/environmentdisplaydialog.cpp kdevelop-3.5.4-new/buildtools/lib/widgets/environmentdisplaydialog.cpp
--- kdevelop-3.5.4/buildtools/lib/widgets/environmentdisplaydialog.cpp	2007-11-30 17:34:35.000000000 -0500
+++ kdevelop-3.5.4-new/buildtools/lib/widgets/environmentdisplaydialog.cpp	2009-04-29 11:55:27.000000000 -0400
@@ -23,13 +23,21 @@
 
 #include "environmentdisplaydialog.h"
 
+#ifdef __APPLE__
+#include <crt_externs.h>
+#else
 extern char **environ;
+#endif
 
 EnvironmentDisplayDialog::EnvironmentDisplayDialog(QWidget* parent, const char* name, bool modal, WFlags fl)
 : EnvironmentDisplayDialogBase(parent,name, modal,fl)
 {
 	QStringList environment;
+#ifdef __APPLE__
+	char ** e = *_NSGetEnviron();
+#else
 	char ** e = ::environ;
+#endif
 	
 	while ( *e ) 
 	{
diff -Nurd kdevelop-3.5.4/kdevdesigner/designer/Makefile.am kdevelop-3.5.4-new/kdevdesigner/designer/Makefile.am
--- kdevelop-3.5.4/kdevdesigner/designer/Makefile.am	2007-11-30 17:37:24.000000000 -0500
+++ kdevelop-3.5.4-new/kdevdesigner/designer/Makefile.am	2010-07-27 13:36:35.000000000 -0400
@@ -9,7 +9,7 @@
 libkdevdesignerpart_la_LDFLAGS = $(KDE_PLUGIN) $(all_libraries)
 libkdevdesignerpart_la_LIBADD = \
 	$(top_builddir)/kdevdesigner/uilib/libkdevqui.la $(top_builddir)/kdevdesigner/shared/libshared.la \
-	$(top_builddir)/lib/interfaces/external/libkinterfacedesigner.la -lqassistantclient $(LIB_KFILE) $(LIB_KPARTS)
+	$(top_builddir)/lib/interfaces/external/libkinterfacedesigner.la -lqassistantclient $(LIB_KFILE) $(LIB_KPARTS) $(LIB_KDECORE)
 libkdevdesignerpart_la_SOURCES = kdevdesigner_part.cpp actiondnd.cpp actioneditorimpl.cpp actionlistview.cpp asciivalidator.cpp command.cpp connectionitems.cpp connectiontable.cpp customwidgeteditorimpl.cpp database.cpp dbconnectionimpl.cpp dbconnectionsimpl.cpp defs.cpp designerapp.cpp designerappiface.cpp editfunctionsimpl.cpp filechooser.cpp formfile.cpp formsettingsimpl.cpp formwindow.cpp hierarchyview.cpp iconvieweditorimpl.cpp layout.cpp listboxdnd.cpp listboxeditorimpl.cpp listboxrename.cpp listdnd.cpp listviewdnd.cpp listvieweditorimpl.cpp mainwindow.cpp mainwindowactions.cpp menubareditor.cpp metadatabase.cpp multilineeditorimpl.cpp newformimpl.cpp orderindicator.cpp outputwindow.cpp paletteeditoradvancedimpl.cpp paletteeditorimpl.cpp pixmapchooser.cpp pixmapcollection.cpp popupmenueditor.cpp previewframe.cpp previewwidgetimpl.cpp project.cpp projectsettingsimpl.cpp propertyeditor.cpp propertyobject.cpp qcompletionedit.cpp resource.cpp sizehandle.cpp sourceeditor.cpp sourcefile.cpp startdialogimpl.cpp styledbutton.cpp syntaxhighlighter_html.cpp tableeditorimpl.cpp timestamp.cpp variabledialogimpl.cpp widgetaction.cpp widgetfactory.cpp wizardeditorimpl.cpp workspace.cpp about.ui dbconnection.ui gotolinedialog.ui newform.ui previewwidget.ui variabledialog.ui actioneditor.ui dbconnectioneditor.ui iconvieweditor.ui paletteeditor.ui projectsettings.ui wizardeditor.ui configtoolboxdialog.ui dbconnections.ui listboxeditor.ui paletteeditoradvanced.ui replacedialog.ui connectiondialog.ui editfunctions.ui listeditor.ui pixmapcollectioneditor.ui richtextfontdialog.ui createtemplate.ui finddialog.ui listvieweditor.ui pixmapfunction.ui startdialog.ui customwidgeteditor.ui formsettings.ui multilineeditor.ui preferences.ui tableeditor.ui designeraction.cpp myiconloader.cpp
 partrcdir = $(kde_datadir)/kdevdesignerpart
 partdesktopdir = $(kde_servicesdir)
diff -Nurd kdevelop-3.5.4/kdevdesigner/src/Makefile.am kdevelop-3.5.4-new/kdevdesigner/src/Makefile.am
--- kdevelop-3.5.4/kdevdesigner/src/Makefile.am	2007-11-30 17:37:27.000000000 -0500
+++ kdevelop-3.5.4-new/kdevdesigner/src/Makefile.am	2010-07-27 13:37:57.000000000 -0400
@@ -22,7 +22,7 @@
 # the application source, library search path, and link libraries
 kdevdesigner_SOURCES = main.cpp kdevdesigner.cpp
 kdevdesigner_LDFLAGS = $(KDE_RPATH) $(all_libraries)
-kdevdesigner_LDADD   = $(LIB_KPARTS)
+kdevdesigner_LDADD   = $(LIB_KPARTS) $(LIB_QT) $(LIB_KDEUI) $(LIB_KDECORE) $(LIB_KFILE)
 
 # this is where the desktop file will go 
 #shelldesktopdir = $(kde_appsdir)/Development
diff -Nurd kdevelop-3.5.4/languages/csharp/Makefile.am kdevelop-3.5.4-new/languages/csharp/Makefile.am
--- kdevelop-3.5.4/languages/csharp/Makefile.am	2007-11-30 17:37:41.000000000 -0500
+++ kdevelop-3.5.4-new/languages/csharp/Makefile.am	2010-07-27 13:02:11.000000000 -0400
@@ -13,7 +13,7 @@
 libkdevcsharpsupport_la_SOURCES = csharpsupportpart.cpp csharpconfigwidget.cpp csharpconfigwidgetbase.ui
 
 kio_csharpdoc_la_SOURCES = csharpdoc.cpp
-kio_csharpdoc_la_LIBADD = $(LIB_KIO)
+kio_csharpdoc_la_LIBADD = $(LIB_KIO) $(LIB_QT) $(LIB_KDECORE)
 kio_csharpdoc_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN)
 
 METASOURCES = AUTO
diff -Nurd kdevelop-3.5.4/languages/perl/Makefile.am kdevelop-3.5.4-new/languages/perl/Makefile.am
--- kdevelop-3.5.4/languages/perl/Makefile.am	2007-11-30 17:38:56.000000000 -0500
+++ kdevelop-3.5.4-new/languages/perl/Makefile.am	2010-07-27 13:11:18.000000000 -0400
@@ -13,7 +13,7 @@
 libkdevperlsupport_la_SOURCES = perlparser.cpp perlsupportpart.cpp perlconfigwidget.cpp perlconfigwidgetbase.ui
 
 kio_perldoc_la_SOURCES = perldoc.cpp
-kio_perldoc_la_LIBADD = $(LIB_KIO)
+kio_perldoc_la_LIBADD = $(LIB_KIO) $(LIB_QT) $(LIB_KDECORE)
 kio_perldoc_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN)
 
 METASOURCES = AUTO
diff -Nurd kdevelop-3.5.4/languages/python/Makefile.am kdevelop-3.5.4-new/languages/python/Makefile.am
--- kdevelop-3.5.4/languages/python/Makefile.am	2007-11-30 17:37:48.000000000 -0500
+++ kdevelop-3.5.4-new/languages/python/Makefile.am	2010-07-27 13:12:40.000000000 -0400
@@ -16,7 +16,7 @@
 	pythonimplementationwidget.cpp qtdesignerpythonintegration.cpp
 
 kio_pydoc_la_SOURCES = pydoc.cpp
-kio_pydoc_la_LIBADD = $(LIB_KIO)
+kio_pydoc_la_LIBADD = $(LIB_KIO) $(LIB_QT) $(LIB_KDECORE)
 kio_pydoc_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN)
 
 METASOURCES = AUTO
diff -Nurd kdevelop-3.5.4/lib/cppparser/cachemanager.h kdevelop-3.5.4-new/lib/cppparser/cachemanager.h
--- kdevelop-3.5.4/lib/cppparser/cachemanager.h	2007-11-30 17:36:47.000000000 -0500
+++ kdevelop-3.5.4-new/lib/cppparser/cachemanager.h	2009-04-29 11:55:27.000000000 -0400
@@ -18,6 +18,7 @@
 #include <cstdlib>
 #include <set>
 #include <limits>
+#include <sys/types.h>
 
 class CacheManager;
 
diff -Nurd kdevelop-3.5.4/lib/interfaces/Makefile.am kdevelop-3.5.4-new/lib/interfaces/Makefile.am
--- kdevelop-3.5.4/lib/interfaces/Makefile.am	2008-06-30 10:28:40.000000000 -0400
+++ kdevelop-3.5.4-new/lib/interfaces/Makefile.am	2010-07-27 12:25:26.000000000 -0400
@@ -14,7 +14,7 @@
 libkdevinterfaces_la_LDFLAGS = -no-undefined $(all_libraries)
 libkdevinterfaces_la_LIBADD = $(top_builddir)/lib/interfaces/external/libkinterfacedesigner.la \
 	$(top_builddir)/lib/util/libkdevutil.la \
-	$(LIB_KDEUI) $(LIB_KHTML) $(LIB_KPARTS) -lktexteditor -lkscript -lDCOP
+	$(LIB_KDEUI) $(LIB_KHTML) $(LIB_KPARTS) -lktexteditor -lkscript -lDCOP $(LIB_KDECORE)
 
 kdevelopincludedir = $(includedir)/kdevelop/interfaces
 kdevelopinclude_HEADERS = kdevlanguagesupport.h kdevmainwindow.h \
diff -Nurd kdevelop-3.5.4/lib/widgets/Makefile.am kdevelop-3.5.4-new/lib/widgets/Makefile.am
--- kdevelop-3.5.4/lib/widgets/Makefile.am	2007-11-30 17:37:00.000000000 -0500
+++ kdevelop-3.5.4-new/lib/widgets/Makefile.am	2010-07-27 12:26:58.000000000 -0400
@@ -18,7 +18,7 @@
 
 SUBDIRS = propeditor
 
-libkdevwidgets_la_LIBADD = $(top_builddir)/lib/interfaces/libkdevinterfaces.la
+libkdevwidgets_la_LIBADD = $(top_builddir)/lib/interfaces/libkdevinterfaces.la $(LIB_KIO)
 libkdevwidgets_la_LDFLAGS = -no-undefined $(all_libraries)
 rcdir = $(kde_datadir)/kdevelop
 
diff -Nurd kdevelop-3.5.4/lib/widgets/propeditor/Makefile.am kdevelop-3.5.4-new/lib/widgets/propeditor/Makefile.am
--- kdevelop-3.5.4/lib/widgets/propeditor/Makefile.am	2007-11-30 17:36:59.000000000 -0500
+++ kdevelop-3.5.4-new/lib/widgets/propeditor/Makefile.am	2010-07-27 12:22:19.000000000 -0400
@@ -2,7 +2,7 @@
 METASOURCES = AUTO
 
 lib_LTLIBRARIES =  libkdevpropertyeditor.la
-libkdevpropertyeditor_la_LIBADD = $(LIB_KIO)
+libkdevpropertyeditor_la_LIBADD = $(LIB_KIO) $(LIB_QT) $(LIB_KDEUI) $(LIB_KDECORE)
 libkdevpropertyeditor_la_LDFLAGS = -no-undefined $(all_libraries)
 libkdevpropertyeditor_la_SOURCES = childproperty.cpp  pcombobox.cpp        pdummywidget.cpp  ppointedit.cpp      propertymachinefactory.cpp  pstringlistedit.cpp\
 multiproperty.cpp  pcursoredit.cpp      pfontbutton.cpp   prectedit.cpp       propertywidget.cpp          psymbolcombo.cpp\
diff -Nurd kdevelop-3.5.4/parts/documentation/protocols/chm/Makefile.am kdevelop-3.5.4-new/parts/documentation/protocols/chm/Makefile.am
--- kdevelop-3.5.4/parts/documentation/protocols/chm/Makefile.am	2007-11-30 17:35:17.000000000 -0500
+++ kdevelop-3.5.4-new/parts/documentation/protocols/chm/Makefile.am	2010-07-27 12:42:21.000000000 -0400
@@ -5,7 +5,7 @@
 kde_module_LTLIBRARIES = kio_chm.la libkchmpart.la
 
 kio_chm_la_SOURCES = decompress.cpp chmfile.cpp chm.cpp
-kio_chm_la_LIBADD = $(LIB_KIO)
+kio_chm_la_LIBADD = $(LIB_KIO) $(LIB_KDECORE) $(LIB_QT)
 kio_chm_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN)
 
 libkchmpart_la_SOURCES = kchmpart.cpp
diff -Nurd kdevelop-3.5.4/parts/documentation/tools/htdig/Makefile.am kdevelop-3.5.4-new/parts/documentation/tools/htdig/Makefile.am
--- kdevelop-3.5.4/parts/documentation/tools/htdig/Makefile.am	2007-11-30 17:35:18.000000000 -0500
+++ kdevelop-3.5.4-new/parts/documentation/tools/htdig/Makefile.am	2010-07-27 12:40:50.000000000 -0400
@@ -1,6 +1,6 @@
 INCLUDES = -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/lib/util $(all_includes)
 METASOURCES = AUTO
 bin_PROGRAMS =  kdevelop-htdig
-kdevelop_htdig_LDFLAGS = $(all_libraries) $(LIB_KIO) $(LIB_KDEUI)
+kdevelop_htdig_LDFLAGS = $(all_libraries) $(LIB_KIO) $(LIB_KDEUI) $(LIB_QT) $(LIB_KDECORE)
 kdevelop_htdig_SOURCES = htdigindex.cpp
 noinst_HEADERS =  htdigindex.h
diff -Nurd kdevelop-3.5.4/vcs/clearcase/integrator/Makefile.am kdevelop-3.5.4-new/vcs/clearcase/integrator/Makefile.am
--- kdevelop-3.5.4/vcs/clearcase/integrator/Makefile.am	2007-11-30 17:37:31.000000000 -0500
+++ kdevelop-3.5.4-new/vcs/clearcase/integrator/Makefile.am	2009-04-29 11:55:44.000000000 -0400
@@ -3,7 +3,7 @@
 	$(all_includes)
 METASOURCES = AUTO
 kde_module_LTLIBRARIES = libclearcaseintegrator.la
-libclearcaseintegrator_la_LDFLAGS = -avoid-version -no-undefined $(all_libraries)
+libclearcaseintegrator_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN)
 libclearcaseintegrator_la_LIBADD =\
 	$(top_builddir)/lib/interfaces/extras/libkdevextras.la\
 	$(top_builddir)/lib/libkdevelop.la
diff -Nurd kdevelop-3.5.4/vcs/cvsservice/integrator/Makefile.am kdevelop-3.5.4-new/vcs/cvsservice/integrator/Makefile.am
--- kdevelop-3.5.4/vcs/cvsservice/integrator/Makefile.am	2007-11-30 17:37:36.000000000 -0500
+++ kdevelop-3.5.4-new/vcs/cvsservice/integrator/Makefile.am	2009-04-29 11:55:52.000000000 -0400
@@ -3,7 +3,7 @@
 	$(all_includes)
 METASOURCES = AUTO
 kde_module_LTLIBRARIES = libcvsserviceintegrator.la
-libcvsserviceintegrator_la_LDFLAGS = -avoid-version -no-undefined $(all_libraries)
+libcvsserviceintegrator_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN)
 libcvsserviceintegrator_la_LIBADD = \
 	$(top_builddir)/lib/interfaces/extras/libkdevextras.la $(top_builddir)/lib/libkdevelop.la -lcvsservice
 noinst_HEADERS = cvsserviceintegrator.h integratordlg.h
diff -Nurd kdevelop-3.5.4/vcs/perforce/integrator/Makefile.am kdevelop-3.5.4-new/vcs/perforce/integrator/Makefile.am
--- kdevelop-3.5.4/vcs/perforce/integrator/Makefile.am	2007-11-30 17:37:33.000000000 -0500
+++ kdevelop-3.5.4-new/vcs/perforce/integrator/Makefile.am	2009-04-29 11:55:58.000000000 -0400
@@ -3,7 +3,7 @@
 	$(all_includes)
 METASOURCES = AUTO
 kde_module_LTLIBRARIES = libperforceintegrator.la
-libperforceintegrator_la_LDFLAGS = -avoid-version -no-undefined $(all_libraries)
+libperforceintegrator_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN)
 libperforceintegrator_la_LIBADD =\
 	$(top_builddir)/lib/interfaces/extras/libkdevextras.la\
 	$(top_builddir)/lib/libkdevelop.la
diff -Nurd kdevelop-3.5.4/vcs/subversion/Makefile.am kdevelop-3.5.4-new/vcs/subversion/Makefile.am
--- kdevelop-3.5.4/vcs/subversion/Makefile.am	2007-11-30 17:37:30.000000000 -0500
+++ kdevelop-3.5.4-new/vcs/subversion/Makefile.am	2010-07-27 12:50:41.000000000 -0400
@@ -15,12 +15,12 @@
 
 	
 kio_kdevsvn_la_SOURCES = svn_kio.cpp
-kio_kdevsvn_la_LIBADD = $(LIB_KIO)
+kio_kdevsvn_la_LIBADD = $(LIB_KIO) $(LIB_QT) $(LIB_KDECORE) -lDCOP
 kio_kdevsvn_la_LDFLAGS = -module $(all_libraries) $(KDE_PLUGIN) $(SVN_LIB)
 
 kded_kdevsvnd_la_SOURCES = commitdlg.cpp commitdlgbase.ui kdevsvnd.cpp \
 	kdevsvnd.skel kdevsvnd_widgets.cpp svnssltrustpromptbase.ui
-kded_kdevsvnd_la_LIBADD = $(LIB_KIO) -lkdeinit_kded
+kded_kdevsvnd_la_LIBADD = $(LIB_KIO) -lkdeinit_kded $(LIB_QT) $(LIB_KDEUI) $(LIB_KDECORE) -lDCOP
 kded_kdevsvnd_la_LDFLAGS = -module $(all_libraries) $(KDE_PLUGIN)
 
 kdeddir = $(kde_servicesdir)/kded
diff -Nurd kdevelop-3.5.4/vcs/subversion/integrator/Makefile.am kdevelop-3.5.4-new/vcs/subversion/integrator/Makefile.am
--- kdevelop-3.5.4/vcs/subversion/integrator/Makefile.am	2007-11-30 17:37:29.000000000 -0500
+++ kdevelop-3.5.4-new/vcs/subversion/integrator/Makefile.am	2009-04-29 11:56:05.000000000 -0400
@@ -4,7 +4,7 @@
 METASOURCES = AUTO
 
 kde_module_LTLIBRARIES = libsubversionintegrator.la
-libsubversionintegrator_la_LDFLAGS = -avoid-version -no-undefined $(all_libraries)
+libsubversionintegrator_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN)
 libsubversionintegrator_la_LIBADD =\
 	$(top_builddir)/lib/interfaces/extras/libkdevextras.la\
 	$(top_builddir)/lib/libkdevelop.la
