Index: src/sdk/wxFlatNotebook/Makefile.am
===================================================================
--- src/sdk/wxFlatNotebook/Makefile.am	(Revision 2541)
+++ src/sdk/wxFlatNotebook/Makefile.am	(Arbeitskopie)
@@ -1,8 +1,14 @@
 INCLUDES = $(WX_CXXFLAGS)
 
+sdkdir=$(includedir)/codeblocks/wxFlatNotebook
+
 noinst_LTLIBRARIES = libwxflatnotebook.la
 
 libwxflatnotebook_la_SOURCES = wxFlatNotebook.cpp
+if INSTALL_SDK
+sdk_HEADERS = wxFNBDropTarget.h wxFlatNotebook.h
+else
 noinst_HEADERS = wxFNBDropTarget.h wxFlatNotebook.h
+endif
 noinst_DATA = AUTHORS README README.patch cb_wxfn.patch
 EXTRADIST = AUTHORS README README.patch cb_wxfn.patch
Index: src/sdk/wxscintilla/Makefile.am
===================================================================
--- src/sdk/wxscintilla/Makefile.am	(Revision 2541)
+++ src/sdk/wxscintilla/Makefile.am	(Arbeitskopie)
@@ -3,6 +3,8 @@
 			-I$(srcdir)/src/scintilla/include \
 			-I$(srcdir)/src/scintilla/src
 
+sdkdir=$(includedir)/codeblocks/wxscintilla/include/wx
+
 AM_CPPFLAGS = -DSCI_LEXER -DLINK_LEXERS -DGTK
 
 lib_LTLIBRARIES = libwxscintilla.la
@@ -89,8 +91,7 @@
 src/scintilla/src/WindowAccessor.cxx \
 src/scintilla/src/XPM.cxx
 
-noinst_HEADERS = include/wx/wxscintilla.h \
-src/scintilla/include/Accessor.h \
+noinst_HEADERS = src/scintilla/include/Accessor.h \
 src/scintilla/include/KeyWords.h \
 src/scintilla/include/Platform.h \
 src/scintilla/include/PropSet.h \
@@ -120,6 +121,11 @@
 src/scintilla/src/XPM.h \
 src/PlatWX.h \
 src/ScintillaWX.h
+if INSTALL_SDK
+sdk_HEADERS = include/wx/wxscintilla.h
+else
+noinst_HEADERS += include/wx/wxscintilla.h 
+endif
 
 EXTRA_DIST = $(srcdir)/Readme \
 	$(srcdir)/build/BuildInfo.txt \
Index: src/sdk/Makefile.am
===================================================================
--- src/sdk/Makefile.am	(Revision 2541)
+++ src/sdk/Makefile.am	(Arbeitskopie)
@@ -6,6 +6,8 @@
 BUILT_SOURCES = 
 endif
 
+sdkdir=$(includedir)/codeblocks
+
 INCLUDES = $(WX_CXXFLAGS) \
 			-I$(top_srcdir)/src/sdk/wxscintilla/include \
 			-I$(top_srcdir)/src/sdk/tinyxml \
@@ -112,6 +114,106 @@
 						xtra_classes.cpp \
 						xtra_res.cpp
 
+if INSTALL_SDK
+sdk_HEADERS = annoyingdialog.h \
+				autodetectcompilers.h \
+				base64.h \
+				blockallocated.h \
+				cbeditor.h \
+				cbeditorprintout.h \
+				cbexception.h \
+				cbplugin.h \
+				cbproject.h \
+				cbthreadedtask.h \
+				cbthreadpool.h \
+				cbworkspace.h \
+				compileoptionsbase.h \
+				compiler.h \
+				compilercommandgenerator.h \
+				compilerfactory.h \
+				compileroptions.h \
+				compiletargetbase.h \
+				configmanager.h \
+				configurationpanel.h \
+				configuretoolsdlg.h \
+				confirmreplacedlg.h \
+				crc32.h \
+				devcpploader.h \
+				editarrayfiledlg.h \
+				editarrayorderdlg.h \
+				editarraystringdlg.h \
+				editkeywordsdlg.h \
+				editorbase.h \
+				editorcolourset.h \
+				editorconfigurationdlg.h \
+				editorlexerloader.h \
+				editormanager.h \
+				editor_hooks.h \
+				editpairdlg.h \
+				editpathdlg.h \
+				edittooldlg.h \
+				encodingdetector.h \
+				externaldepsdlg.h \
+				filefilters.h \
+				filegroupsandmasks.h \
+				finddlg.h \
+				findreplacebase.h \
+				globals.h \
+				ibaseloader.h \
+				ibaseworkspaceloader.h \
+				importers_globals.h \
+				incrementalselectlistdlg.h \
+				licenses.h \
+				macrosmanager.h \
+				managedthread.h \
+				manager.h \
+				managerproxy.h \
+				menuitemsmanager.h \
+				messagelog.h \
+				messagemanager.h \
+				msvc7loader.h \
+				msvc7workspaceloader.h \
+				msvcloader.h \
+				msvcworkspacebase.h \
+				msvcworkspaceloader.h \
+				multiselectdlg.h \
+				newfromtemplatedlg.h \
+				openfilestree.h \
+				personalitymanager.h \
+				pipedprocess.h \
+				pluginmanager.h \
+				pluginsconfigurationdlg.h \
+				printing_types.h \
+				projectbuildtarget.h \
+				projectdepsdlg.h \
+				projectfile.h \
+				projectfileoptionsdlg.h \
+				projectlayoutloader.h \
+				projectloader.h \
+				projectloader_hooks.h \
+				projectmanager.h \
+				projectoptionsdlg.h \
+				projectsfilemasksdlg.h \
+				projecttemplateloader.h \
+				replacedlg.h \
+				scriptingcall.h \
+				scriptingmanager.h \
+				sdk.h \
+				sdk_common.h \
+				sdk_precomp.h \
+				sdk_events.h \
+				searchresultslog.h \
+				selecttargetdlg.h \
+				settings.h \
+				simplelistlog.h \
+				simpletextlog.h \
+				templatemanager.h \
+				toolsmanager.h \
+				uservarmanager.h \
+				workspaceloader.h \
+				xtra_classes.h \
+				xtra_res.h
+else  
 noinst_HEADERS = annoyingdialog.h \
 				autodetectcompilers.h \
 				base64.h \
@@ -209,6 +311,7 @@
 				workspaceloader.h \
 				xtra_classes.h \
 				xtra_res.h
+endif
 
 $(srcdir)/sdk.h.gch: $(srcdir)/sdk.h
 	-rm -f $(srcdir)/sdk.h.gch
Index: src/sdk/propgrid/Makefile.am
===================================================================
--- src/sdk/propgrid/Makefile.am	(Revision 2541)
+++ src/sdk/propgrid/Makefile.am	(Arbeitskopie)
@@ -1,6 +1,8 @@
 INCLUDES = $(WX_CXXFLAGS) \
 		-I$(top_srcdir)/src/sdk/propgrid/include
 
+sdkdir=$(includedir)/codeblocks/propgrid/include/wx/propgrid
+
 noinst_LTLIBRARIES = libpropgrid.la
 
 libpropgrid_la_LDFLAGS = -module -version-info 0:1:0 -shared -no-undefined -avoid-version
@@ -10,7 +12,15 @@
 			./src/propgrid/manager.cpp \
 			./src/propgrid/odcombo.cpp \
 			./src/propgrid/propgrid.cpp
-
+if INSTALL_SDK
+sdk_HEADERS = ./include/wx/propgrid/advprops.h \
+			./include/wx/propgrid/custctrl.h \
+			./include/wx/propgrid/manager.h \
+			./include/wx/propgrid/odcombo.h \
+			./include/wx/propgrid/pg_dox_mainpage.h \
+			./include/wx/propgrid/propdev.h \
+			./include/wx/propgrid/propgrid.h
+else     
 noinst_HEADERS = ./include/wx/propgrid/advprops.h \
 			./include/wx/propgrid/custctrl.h \
 			./include/wx/propgrid/manager.h \
@@ -18,6 +28,7 @@
 			./include/wx/propgrid/pg_dox_mainpage.h \
 			./include/wx/propgrid/propdev.h \
 			./include/wx/propgrid/propgrid.h
+endif
 
 EXTRA_DIST = readme-propgrid.txt \
 			CHANGES-propgrid.txt
Index: src/sdk/tinyxml/Makefile.am
===================================================================
--- src/sdk/tinyxml/Makefile.am	(Revision 2541)
+++ src/sdk/tinyxml/Makefile.am	(Arbeitskopie)
@@ -1,6 +1,13 @@
 INCLUDES = $(WX_CXXFLAGS)
 
+sdkdir=$(includedir)/codeblocks/tinyxml
+
 noinst_LTLIBRARIES = libtinyxml.la
 
 libtinyxml_la_SOURCES = tinystr.cpp tinyxml.cpp tinyxmlerror.cpp tinyxmlparser.cpp
+
+if INSTALL_SDK
+sdk_HEADERS = tinystr.h tinyxml.h
+else
 noinst_HEADERS = tinystr.h tinyxml.h
+endif
Index: src/sdk/as/Makefile.am
===================================================================
--- src/sdk/as/Makefile.am	(Revision 2541)
+++ src/sdk/as/Makefile.am	(Arbeitskopie)
@@ -1,3 +1,7 @@
+asbinddir=$(includedir)/codeblocks/as/bindings
+asincldir=$(includedir)/codeblocks/as/include
+assrcdir=$(includedir)/codeblocks/as/source
+
 INCLUDES = $(WX_CXXFLAGS) \
 			-I$(top_srcdir)/src/sdk/wxscintilla/include \
 			-I$(top_srcdir)/src/sdk/tinyxml \
@@ -46,6 +50,52 @@
 							$(srcdir)/source/as_typeinfo.cpp \
 							$(srcdir)/source/as_variablescope.cpp
 
+if INSTALL_SDK
+asbind_HEADERS = $(srcdir)/bindings/const_bindings.h \
+							$(srcdir)/bindings/sc_io.h \
+							$(srcdir)/bindings/sc_wxarraystring.h \
+							$(srcdir)/bindings/sc_wxstring.h \
+							$(srcdir)/bindings/scriptbindings.h
+
+asincl_HEADERS = $(srcdir)/include/angelscript.h
+assrc_HEADERS = $(srcdir)/source/as_anyobject.h \
+							$(srcdir)/source/as_array.h \
+							$(srcdir)/source/as_arrayobject.h \
+							$(srcdir)/source/as_builder.h \
+							$(srcdir)/source/as_bytecode.h \
+							$(srcdir)/source/as_bytecodedef.h \
+							$(srcdir)/source/as_callfunc.h \
+							$(srcdir)/source/as_compiler.h \
+							$(srcdir)/source/as_config.h \
+							$(srcdir)/source/as_configgroup.h \
+							$(srcdir)/source/as_context.h \
+							$(srcdir)/source/as_datatype.h \
+							$(srcdir)/source/as_debug.h \
+							$(srcdir)/source/as_gcobject.h \
+							$(srcdir)/source/as_generic.h \
+							$(srcdir)/source/as_map.h \
+							$(srcdir)/source/as_module.h \
+							$(srcdir)/source/as_objecttype.h \
+							$(srcdir)/source/as_outputbuffer.h \
+							$(srcdir)/source/as_parser.h \
+							$(srcdir)/source/as_property.h \
+							$(srcdir)/source/as_restore.h \
+							$(srcdir)/source/as_scriptcode.h \
+							$(srcdir)/source/as_scriptengine.h \
+							$(srcdir)/source/as_scriptfunction.h \
+							$(srcdir)/source/as_scriptnode.h \
+							$(srcdir)/source/as_scriptstruct.h \
+							$(srcdir)/source/as_string.h \
+							$(srcdir)/source/as_string_util.h \
+							$(srcdir)/source/as_structs.h \
+							$(srcdir)/source/as_texts.h \
+							$(srcdir)/source/as_thread.h \
+							$(srcdir)/source/as_tokendef.h \
+							$(srcdir)/source/as_tokenizer.h \
+							$(srcdir)/source/as_typeinfo.h \
+							$(srcdir)/source/as_types.h \
+							$(srcdir)/source/as_variablescope.h
+else
 noinst_HEADERS = $(srcdir)/bindings/const_bindings.h \
 							$(srcdir)/bindings/sc_io.h \
 							$(srcdir)/bindings/sc_wxarraystring.h \
@@ -89,3 +139,4 @@
 							$(srcdir)/source/as_typeinfo.h \
 							$(srcdir)/source/as_types.h \
 							$(srcdir)/source/as_variablescope.h
+endif
Index: acinclude.m4
===================================================================
--- acinclude.m4	(Revision 2541)
+++ acinclude.m4	(Arbeitskopie)
@@ -214,6 +214,18 @@
 	AC_MSG_RESULT(no)
 fi
 
+AC_MSG_CHECKING(whether to install the sdk files)
+sdk_default="no"
+AC_ARG_ENABLE(sdk, [AC_HELP_STRING([--enable-sdk], [install the sdk files (default NO)])],,
+                       enable_sdk=$sdk_default)
+AM_CONDITIONAL([INSTALL_SDK], [test "x$enable_sdk" = "xyes"])
+if test "x$enable_sdk" = "xyes"; then
+        AC_MSG_RESULT(yes)
+else
+        AC_MSG_RESULT(no)
+fi
+
+
 GCC_PCH=0
 PCH_FLAGS=
 pch_default="yes"
