From fae0848a3f14c1aa8f6095a585d50a8201049d63 Mon Sep 17 00:00:00 2001
From: Dan Horak <dan@danny.cz>
Date: Wed, 13 May 2009 10:21:19 +0200
Subject: [PATCH 01/19] add check for tinyxml into configure

---
 configure.in |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/configure.in b/configure.in
index 6f914bd..0a546ca 100644
--- a/configure.in
+++ b/configure.in
@@ -54,9 +54,18 @@ AC_SEARCH_LIBS(gzopen, z, [HAVE_ZLIB=yes], [HAVE_ZLIB=no])
 LIBS=$save_LIBS
 AC_SEARCH_LIBS(BZ2_bzopen, bz2, [HAVE_BZIP2=yes], [HAVE_BZIP2=no])
 LIBS=$save_LIBS
+save_CC=$CC
+save_CPP=$CPP
+CC=$CXX
+CPP=$CXXCPP
+AC_CHECK_HEADER(tinyxml.h, [HAVE_TINYXML=yes], [HAVE_TINYXML=no])
+CC=$save_CC
+CPP=$save_CPP
+
 
 AM_CONDITIONAL([HAVE_ZLIB], [test "$HAVE_ZLIB" = yes])
 AM_CONDITIONAL([HAVE_BZIP2], [test "$HAVE_BZIP2" = yes])
+AM_CONDITIONAL([HAVE_TINYXML], [test "$HAVE_TINYXML" = yes])
 
 dnl versioning info for libtool
 dnl Note this is the ABI version which is not the same as our actual library version
-- 
1.6.3.3

From 017c9d90b734a65dce3720fa690c12ee5b8b17a7 Mon Sep 17 00:00:00 2001
From: Dan Horak <dan@danny.cz>
Date: Wed, 13 May 2009 16:53:29 +0200
Subject: [PATCH 02/19] move tinywxuni.h header from tinyxml into sdk

---
 src/include/Makefile.am                            |    1 +
 src/include/tinywxuni.h                            |   15 +++++++++++++++
 src/include/tinyxml/Makefile.am                    |    2 +-
 src/include/tinyxml/tinywxuni.h                    |   15 ---------------
 .../contrib/BrowseTracker/BrowseTrackerLayout.cpp  |    2 +-
 .../contrib/lib_finder/librarydetectionmanager.cpp |    2 +-
 .../contrib/wxSmith/wxsversionconverter.cpp        |    2 +-
 .../contrib/wxSmith/wxwidgets/wxsitemresdata.cpp   |    2 +-
 .../wxSmith/wxwidgets/wxwidgetsresfactory.cpp      |    2 +-
 src/sdk/configmanager.cpp                          |    2 +-
 src/sdk/globals.cpp                                |    2 +-
 src/sdk/projectlayoutloader.cpp                    |    2 +-
 src/sdk/projectloader.cpp                          |    2 +-
 src/sdk/workspaceloader.cpp                        |    2 +-
 src/tools/cb_share_config/mainframe.cpp            |    2 +-
 15 files changed, 28 insertions(+), 27 deletions(-)
 create mode 100644 src/include/tinywxuni.h
 delete mode 100644 src/include/tinyxml/tinywxuni.h

diff --git a/src/include/Makefile.am b/src/include/Makefile.am
index 8d0d931..9138ffd 100644
--- a/src/include/Makefile.am
+++ b/src/include/Makefile.am
@@ -119,6 +119,7 @@ ALLHEADERS = annoyingdialog.h \
 				selecttargetdlg.h \
 				settings.h \
 				templatemanager.h \
+				tinywxuni.h \
 				toolsmanager.h \
 				uservarmanager.h \
 				virtualbuildtargetsdlg.h \
diff --git a/src/include/tinywxuni.h b/src/include/tinywxuni.h
new file mode 100644
index 0000000..9ebf3a5
--- /dev/null
+++ b/src/include/tinywxuni.h
@@ -0,0 +1,15 @@
+#ifndef TINYWXUNI_H
+#define TINYWXUNI_H
+
+class wxString;
+class TiXmlDocument;
+
+namespace TinyXML
+{
+    bool LoadDocument(const wxString& filename, TiXmlDocument *doc);
+    TiXmlDocument* LoadDocument(const wxString& filename);
+
+    bool SaveDocument(const wxString& filename, TiXmlDocument* doc);
+}
+
+#endif
diff --git a/src/include/tinyxml/Makefile.am b/src/include/tinyxml/Makefile.am
index fdfa2c5..c22e938 100644
--- a/src/include/tinyxml/Makefile.am
+++ b/src/include/tinyxml/Makefile.am
@@ -1,3 +1,3 @@
 sdkdir=$(includedir)/codeblocks/tinyxml
 
-sdk_HEADERS = tinystr.h tinyxml.h tinywxuni.h
+sdk_HEADERS = tinystr.h tinyxml.h
diff --git a/src/include/tinyxml/tinywxuni.h b/src/include/tinyxml/tinywxuni.h
deleted file mode 100644
index 9ebf3a5..0000000
--- a/src/include/tinyxml/tinywxuni.h
+++ /dev/null
@@ -1,15 +0,0 @@
-#ifndef TINYWXUNI_H
-#define TINYWXUNI_H
-
-class wxString;
-class TiXmlDocument;
-
-namespace TinyXML
-{
-    bool LoadDocument(const wxString& filename, TiXmlDocument *doc);
-    TiXmlDocument* LoadDocument(const wxString& filename);
-
-    bool SaveDocument(const wxString& filename, TiXmlDocument* doc);
-}
-
-#endif
diff --git a/src/plugins/contrib/BrowseTracker/BrowseTrackerLayout.cpp b/src/plugins/contrib/BrowseTracker/BrowseTrackerLayout.cpp
index 7eeb514..30f38d4 100644
--- a/src/plugins/contrib/BrowseTracker/BrowseTrackerLayout.cpp
+++ b/src/plugins/contrib/BrowseTracker/BrowseTrackerLayout.cpp
@@ -47,7 +47,7 @@
 
 #include <wx/tokenzr.h>
 #include "tinyxml/tinyxml.h"
-#include "tinyxml/tinywxuni.h"
+#include "tinywxuni.h"
 
 #include "BrowseTrackerLayout.h"
 #include "BrowseMarks.h"
diff --git a/src/plugins/contrib/lib_finder/librarydetectionmanager.cpp b/src/plugins/contrib/lib_finder/librarydetectionmanager.cpp
index db01cf2..b61adf8 100644
--- a/src/plugins/contrib/lib_finder/librarydetectionmanager.cpp
+++ b/src/plugins/contrib/lib_finder/librarydetectionmanager.cpp
@@ -22,7 +22,7 @@
 */
 
 #include <tinyxml/tinyxml.h>
-#include <tinyxml/tinywxuni.h>
+#include <tinywxuni.h>
 
 #include <wx/arrstr.h>
 #include <wx/dir.h>
diff --git a/src/plugins/contrib/wxSmith/wxsversionconverter.cpp b/src/plugins/contrib/wxSmith/wxsversionconverter.cpp
index b03ceaa..8c2ca85 100644
--- a/src/plugins/contrib/wxSmith/wxsversionconverter.cpp
+++ b/src/plugins/contrib/wxSmith/wxsversionconverter.cpp
@@ -26,7 +26,7 @@
 
 #include <globals.h>
 #include <wx/string.h>
-#include <tinyxml/tinywxuni.h>
+#include <tinywxuni.h>
 
 // TODO: This is same as in wxsproject.h, make one set instead of two
 namespace
diff --git a/src/plugins/contrib/wxSmith/wxwidgets/wxsitemresdata.cpp b/src/plugins/contrib/wxSmith/wxwidgets/wxsitemresdata.cpp
index 77b4e69..d241a5c 100644
--- a/src/plugins/contrib/wxSmith/wxwidgets/wxsitemresdata.cpp
+++ b/src/plugins/contrib/wxSmith/wxwidgets/wxsitemresdata.cpp
@@ -31,7 +31,7 @@
 #include <globals.h>
 #include <logmanager.h>
 #include <wx/clipbrd.h>
-#include <tinyxml/tinywxuni.h>
+#include <tinywxuni.h>
 
 #if defined(__WXMSW__) && defined(LoadImage)
     // Fix Windows winuser.h Header define of LoadImage.
diff --git a/src/plugins/contrib/wxSmith/wxwidgets/wxwidgetsresfactory.cpp b/src/plugins/contrib/wxSmith/wxwidgets/wxwidgetsresfactory.cpp
index e2d9b11..0eef346 100644
--- a/src/plugins/contrib/wxSmith/wxwidgets/wxwidgetsresfactory.cpp
+++ b/src/plugins/contrib/wxSmith/wxwidgets/wxwidgetsresfactory.cpp
@@ -30,7 +30,7 @@
 #include "../wxsmith.h"
 
 #include <wx/choicdlg.h>
-#include <tinyxml/tinywxuni.h>
+#include <tinywxuni.h>
 #include <sqplus.h>
 #include <sc_base_types.h>
 
diff --git a/src/sdk/configmanager.cpp b/src/sdk/configmanager.cpp
index 2a2c7a8..cd444cc 100644
--- a/src/sdk/configmanager.cpp
+++ b/src/sdk/configmanager.cpp
@@ -43,7 +43,7 @@
 #include <CoreFoundation/CFURL.h>
 #endif
 
-#include "tinyxml/tinywxuni.h"
+#include "tinywxuni.h"
 #include <stdlib.h>
 
 template<> CfgMgrBldr* Mgr<CfgMgrBldr>::instance = 0;
diff --git a/src/sdk/globals.cpp b/src/sdk/globals.cpp
index 182ab05..bf34ed7 100644
--- a/src/sdk/globals.cpp
+++ b/src/sdk/globals.cpp
@@ -32,7 +32,7 @@
 #include <algorithm>
 #include <string>
 #include "filefilters.h"
-#include "tinyxml/tinywxuni.h"
+#include "tinywxuni.h"
 #include "filegroupsandmasks.h"
 
 #ifndef __WXMSW__
diff --git a/src/sdk/projectlayoutloader.cpp b/src/sdk/projectlayoutloader.cpp
index 227842c..5ebb191 100644
--- a/src/sdk/projectlayoutloader.cpp
+++ b/src/sdk/projectlayoutloader.cpp
@@ -23,7 +23,7 @@
 
 #include "projectlayoutloader.h"
 #include "tinyxml/tinyxml.h"
-#include "tinyxml/tinywxuni.h"
+#include "tinywxuni.h"
 
 ProjectLayoutLoader::ProjectLayoutLoader(cbProject* project)
     : m_pProject(project),
diff --git a/src/sdk/projectloader.cpp b/src/sdk/projectloader.cpp
index bf89f25..aa4f54f 100644
--- a/src/sdk/projectloader.cpp
+++ b/src/sdk/projectloader.cpp
@@ -31,7 +31,7 @@
 #include "projectloader_hooks.h"
 #include "annoyingdialog.h"
 #include "configmanager.h"
-#include "tinyxml/tinywxuni.h"
+#include "tinywxuni.h"
 
 ProjectLoader::ProjectLoader(cbProject* project)
     : m_pProject(project),
diff --git a/src/sdk/workspaceloader.cpp b/src/sdk/workspaceloader.cpp
index e6e76f9..dbcb1fa 100644
--- a/src/sdk/workspaceloader.cpp
+++ b/src/sdk/workspaceloader.cpp
@@ -26,7 +26,7 @@
 
 
 #include "tinyxml/tinyxml.h"
-#include "tinyxml/tinywxuni.h"
+#include "tinywxuni.h"
 
 WorkspaceLoader::WorkspaceLoader()
 {
diff --git a/src/tools/cb_share_config/mainframe.cpp b/src/tools/cb_share_config/mainframe.cpp
index 99a9c40..55a184e 100644
--- a/src/tools/cb_share_config/mainframe.cpp
+++ b/src/tools/cb_share_config/mainframe.cpp
@@ -24,7 +24,7 @@
   #include <shlobj.h>
 #endif
 
-#include "tinyxml/tinywxuni.h"
+#include "tinywxuni.h"
 
 //***********************************************************************
 
-- 
1.6.3.3

From 19351b0b62d661e055089c981085b64784da12f4 Mon Sep 17 00:00:00 2001
From: Dan Horak <dan@danny.cz>
Date: Thu, 14 May 2009 09:42:37 +0200
Subject: [PATCH 03/19] move tinywxuni.cpp implementation from tinyxml into sdk

---
 src/base/tinyxml/Makefile.am   |    2 +-
 src/base/tinyxml/tinywxuni.cpp |   62 ----------------------------------------
 src/sdk/Makefile.am            |    1 +
 src/sdk/tinywxuni.cpp          |   62 ++++++++++++++++++++++++++++++++++++++++
 4 files changed, 64 insertions(+), 63 deletions(-)
 delete mode 100644 src/base/tinyxml/tinywxuni.cpp
 create mode 100644 src/sdk/tinywxuni.cpp

diff --git a/src/base/tinyxml/Makefile.am b/src/base/tinyxml/Makefile.am
index 71fee92..048baf6 100644
--- a/src/base/tinyxml/Makefile.am
+++ b/src/base/tinyxml/Makefile.am
@@ -5,4 +5,4 @@ INCLUDES = $(WX_CXXFLAGS) \
 
 noinst_LTLIBRARIES = libtinyxml.la
 
-libtinyxml_la_SOURCES = tinystr.cpp tinyxml.cpp tinyxmlerror.cpp tinyxmlparser.cpp tinywxuni.cpp
+libtinyxml_la_SOURCES = tinystr.cpp tinyxml.cpp tinyxmlerror.cpp tinyxmlparser.cpp
diff --git a/src/base/tinyxml/tinywxuni.cpp b/src/base/tinyxml/tinywxuni.cpp
deleted file mode 100644
index 5cfc5ee..0000000
--- a/src/base/tinyxml/tinywxuni.cpp
+++ /dev/null
@@ -1,62 +0,0 @@
-#include "sdk_precomp.h"
-
-#ifndef CB_PRECOMP
-#include <wx/file.h>
-#include <wx/string.h>
-#include "filemanager.h"
-#include "manager.h"
-#endif
-#include "tinywxuni.h"
-#include "tinyxml.h"
-
-bool TinyXML::LoadDocument(const wxString& filename, TiXmlDocument *doc)
-{
-
-    if(!doc || !wxFile::Access(filename, wxFile::read))
-        return false;
-
-    wxFile file(filename);
-    size_t len = file.Length();
-
-    char *input = new char[len+1];
-    input[len] = '\0';
-    file.Read(input, len);
-
-    doc->Parse(input);
-    delete[] input;
-    return true;
-}
-
-TiXmlDocument* TinyXML::LoadDocument(const wxString& filename)
-{
-    TiXmlDocument* doc = new TiXmlDocument();
-
-    if(TinyXML::LoadDocument(filename, doc))
-    {
-        return doc;
-    }
-    else
-    {
-        delete doc;
-        return 0;
-    }
-}
-
-bool TinyXML::SaveDocument(const wxString& filename, TiXmlDocument* doc)
-{
-    if (!doc)
-        return false;
-
-    TiXmlPrinter printer;
-    printer.SetIndent("\t");
-    doc->Accept(&printer);
-
-    return Manager::Get()->GetFileManager()->Save(filename, printer.CStr(), printer.Size());
-
-//    wxTempFile file(filename);
-//    if(file.IsOpened())
-//        if(file.Write(Printer.CStr(), Printer.Size()) && file.Commit())
-//            return true;
-//    return false;
-}
-
diff --git a/src/sdk/Makefile.am b/src/sdk/Makefile.am
index 0fa86b0..91bb90d 100644
--- a/src/sdk/Makefile.am
+++ b/src/sdk/Makefile.am
@@ -99,6 +99,7 @@ libcodeblocks_la_SOURCES = annoyingdialog.cpp \
 						searchresultslog.cpp \
 						selecttargetdlg.cpp \
 						templatemanager.cpp \
+						tinywxuni.cpp \
 						toolsmanager.cpp \
 						uservarmanager.cpp \
 						virtualbuildtargetsdlg.cpp \
diff --git a/src/sdk/tinywxuni.cpp b/src/sdk/tinywxuni.cpp
new file mode 100644
index 0000000..5cfc5ee
--- /dev/null
+++ b/src/sdk/tinywxuni.cpp
@@ -0,0 +1,62 @@
+#include "sdk_precomp.h"
+
+#ifndef CB_PRECOMP
+#include <wx/file.h>
+#include <wx/string.h>
+#include "filemanager.h"
+#include "manager.h"
+#endif
+#include "tinywxuni.h"
+#include "tinyxml.h"
+
+bool TinyXML::LoadDocument(const wxString& filename, TiXmlDocument *doc)
+{
+
+    if(!doc || !wxFile::Access(filename, wxFile::read))
+        return false;
+
+    wxFile file(filename);
+    size_t len = file.Length();
+
+    char *input = new char[len+1];
+    input[len] = '\0';
+    file.Read(input, len);
+
+    doc->Parse(input);
+    delete[] input;
+    return true;
+}
+
+TiXmlDocument* TinyXML::LoadDocument(const wxString& filename)
+{
+    TiXmlDocument* doc = new TiXmlDocument();
+
+    if(TinyXML::LoadDocument(filename, doc))
+    {
+        return doc;
+    }
+    else
+    {
+        delete doc;
+        return 0;
+    }
+}
+
+bool TinyXML::SaveDocument(const wxString& filename, TiXmlDocument* doc)
+{
+    if (!doc)
+        return false;
+
+    TiXmlPrinter printer;
+    printer.SetIndent("\t");
+    doc->Accept(&printer);
+
+    return Manager::Get()->GetFileManager()->Save(filename, printer.CStr(), printer.Size());
+
+//    wxTempFile file(filename);
+//    if(file.IsOpened())
+//        if(file.Write(Printer.CStr(), Printer.Size()) && file.Commit())
+//            return true;
+//    return false;
+}
+
-- 
1.6.3.3

From a4a65dc3747880daa1ed1f9379e00253ca96d507 Mon Sep 17 00:00:00 2001
From: Dan Horak <dan@danny.cz>
Date: Thu, 14 May 2009 10:04:35 +0200
Subject: [PATCH 04/19] update C::B projects with new locations of tinywxuni

---
 src/CodeBlocks-unix.cbp |    4 ++--
 src/CodeBlocks.cbp      |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/CodeBlocks-unix.cbp b/src/CodeBlocks-unix.cbp
index 7d0ab92..5d0b02f 100644
--- a/src/CodeBlocks-unix.cbp
+++ b/src/CodeBlocks-unix.cbp
@@ -400,7 +400,7 @@
 		<Unit filename="base/tinyxml/tinystr.cpp">
 			<Option target="tinyXML" />
 		</Unit>
-		<Unit filename="base/tinyxml/tinywxuni.cpp">
+		<Unit filename="sdk/tinywxuni.cpp">
 			<Option target="sdk" />
 		</Unit>
 		<Unit filename="base/tinyxml/tinyxml.cpp">
@@ -890,7 +890,7 @@
 		<Unit filename="include/tinyxml/tinystr.h">
 			<Option target="sdk" />
 		</Unit>
-		<Unit filename="include/tinyxml/tinywxuni.h">
+		<Unit filename="include/tinywxuni.h">
 			<Option target="sdk" />
 		</Unit>
 		<Unit filename="include/tinyxml/tinyxml.h">
diff --git a/src/CodeBlocks.cbp b/src/CodeBlocks.cbp
index 2f202eb..ac5aa76 100644
--- a/src/CodeBlocks.cbp
+++ b/src/CodeBlocks.cbp
@@ -483,7 +483,7 @@
 		<Unit filename="base\tinyxml\tinystr.cpp">
 			<Option target="tinyXML" />
 		</Unit>
-		<Unit filename="base\tinyxml\tinywxuni.cpp">
+		<Unit filename="sdk\tinywxuni.cpp">
 			<Option target="sdk" />
 		</Unit>
 		<Unit filename="base\tinyxml\tinyxml.cpp">
@@ -970,7 +970,7 @@
 		<Unit filename="include\tinyxml\tinystr.h">
 			<Option target="tinyXML" />
 		</Unit>
-		<Unit filename="include\tinyxml\tinywxuni.h">
+		<Unit filename="include\tinywxuni.h">
 			<Option target="sdk" />
 		</Unit>
 		<Unit filename="include\tinyxml\tinyxml.h">
-- 
1.6.3.3

From 4e8ba949fdaab8ee68caad4d9b774e118ec91c48 Mon Sep 17 00:00:00 2001
From: Dan Horak <dan@danny.cz>
Date: Thu, 14 May 2009 10:05:42 +0200
Subject: [PATCH 05/19] convert autorevision to new tinyxml handling

---
 src/build_tools/autorevision/Makefile.am      |    5 ++++-
 src/build_tools/autorevision/autorevision.cpp |    3 +--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/build_tools/autorevision/Makefile.am b/src/build_tools/autorevision/Makefile.am
index f0b09b7..7de8ca4 100644
--- a/src/build_tools/autorevision/Makefile.am
+++ b/src/build_tools/autorevision/Makefile.am
@@ -1,9 +1,12 @@
 noinst_PROGRAMS = auto_revision
 auto_revision_SOURCES = autorevision.cpp
 
+if ! HAVE_TINYXML
 INCLUDES = -I$(top_srcdir)/src/include
-
 auto_revision_LDADD = ../../base/tinyxml/libtinyxml.la
+else
+auto_revision_LDADD = -ltinyxml
+endif
 
 all-local: auto_revision
 	./auto_revision +int +wx +t $(top_srcdir) $(top_srcdir)/src/include/autorevision.h
diff --git a/src/build_tools/autorevision/autorevision.cpp b/src/build_tools/autorevision/autorevision.cpp
index cb6dd76..2b3de6f 100644
--- a/src/build_tools/autorevision/autorevision.cpp
+++ b/src/build_tools/autorevision/autorevision.cpp
@@ -11,8 +11,7 @@
 #include <string>
 #include <fstream>
 
-#include "tinyxml/tinystr.h"
-#include "tinyxml/tinyxml.h"
+#include <tinyxml.h>
 
 using namespace std;
 
-- 
1.6.3.3

From c71434a8fe78393d35428c8f3b3a7990151ede96 Mon Sep 17 00:00:00 2001
From: Dan Horak <dan@danny.cz>
Date: Thu, 14 May 2009 17:33:02 +0200
Subject: [PATCH 06/19] convert sdk to new tinyxml handling

---
 src/include/configmanager.h         |    3 +--
 src/include/ibaseloader.h           |    2 +-
 src/include/projecttemplateloader.h |    2 +-
 src/sdk/Makefile.am                 |    9 +++++++--
 src/sdk/globals.cpp                 |    2 +-
 src/sdk/pluginmanager.cpp           |    2 +-
 src/sdk/projectlayoutloader.cpp     |    2 +-
 src/sdk/tinywxuni.cpp               |    2 +-
 src/sdk/workspaceloader.cpp         |    2 +-
 9 files changed, 15 insertions(+), 11 deletions(-)

diff --git a/src/include/configmanager.h b/src/include/configmanager.h
index 951dd5d..9d9de79 100644
--- a/src/include/configmanager.h
+++ b/src/include/configmanager.h
@@ -12,8 +12,7 @@
 #include "settings.h"
 #include "globals.h"
 
-#include "tinyxml/tinystr.h"
-#include "tinyxml/tinyxml.h"
+#include <tinyxml.h>
 #include "manager.h"
 #include "base64.h"
 
diff --git a/src/include/ibaseloader.h b/src/include/ibaseloader.h
index 95b3892..c0b98fb 100644
--- a/src/include/ibaseloader.h
+++ b/src/include/ibaseloader.h
@@ -8,7 +8,7 @@
 
 #include <wx/string.h>
 #include "settings.h"
-#include "tinyxml/tinyxml.h"
+#include <tinyxml.h>
 
 /** Base interface for project loaders. */
 class DLLIMPORT IBaseLoader
diff --git a/src/include/projecttemplateloader.h b/src/include/projecttemplateloader.h
index 82b5c68..9add87c 100644
--- a/src/include/projecttemplateloader.h
+++ b/src/include/projecttemplateloader.h
@@ -6,7 +6,7 @@
 #ifndef PROJECTTEMPLATELOADER_H
 #define PROJECTTEMPLATELOADER_H
 
-#include "tinyxml/tinyxml.h"
+#include <tinyxml.h>
 #include "settings.h"
 
 struct FileSetFile
diff --git a/src/sdk/Makefile.am b/src/sdk/Makefile.am
index 91bb90d..d2316c9 100644
--- a/src/sdk/Makefile.am
+++ b/src/sdk/Makefile.am
@@ -3,7 +3,6 @@ SUBDIRS = scripting wxscintilla resources
 INCLUDES = $(WX_CXXFLAGS) \
 			-I$(top_srcdir)/src/include \
 			-I$(top_srcdir)/src/include/wxscintilla/include \
-			-I$(top_srcdir)/src/include/tinyxml \
 			-I$(top_srcdir)/src/include/scripting/include \
  			-I$(top_srcdir)/src/include/scripting/sqplus \
 			-I$(top_srcdir)/src/include/mozilla_chardet
@@ -17,9 +16,15 @@ libcodeblocks_la_LIBADD =  $(WX_LIBS) \
 			scripting/sqplus/libsqplus.la \
 			scripting/sqstdlib/libsqstdlib.la \
 			scripting/squirrel/libsquirrel.la \
-			../base/tinyxml/libtinyxml.la \
 			wxscintilla/libwxscintilla.la
 
+if ! HAVE_TINYXML
+INCLUDES +=		-I$(top_srcdir)/src/include/tinyxml
+libcodeblocks_la_LIBADD += ../base/tinyxml/libtinyxml.la
+else
+libcodeblocks_la_LIBADD += -ltinyxml
+endif
+
 libcodeblocks_la_SOURCES = annoyingdialog.cpp \
 						autodetectcompilers.cpp \
 						base64.cpp \
diff --git a/src/sdk/globals.cpp b/src/sdk/globals.cpp
index bf34ed7..7511cd4 100644
--- a/src/sdk/globals.cpp
+++ b/src/sdk/globals.cpp
@@ -23,7 +23,7 @@
     #include "projectmanager.h"
 #endif
 
-#include "tinyxml/tinyxml.h"
+#include <tinyxml.h>
 #include <wx/filefn.h>
 #include <wx/tokenzr.h>
 #include <wx/dirdlg.h>
diff --git a/src/sdk/pluginmanager.cpp b/src/sdk/pluginmanager.cpp
index 772d857..3ad183a 100644
--- a/src/sdk/pluginmanager.cpp
+++ b/src/sdk/pluginmanager.cpp
@@ -42,7 +42,7 @@
 #include <wx/txtstrm.h>
 
 #include "filefilters.h"
-#include "tinyxml/tinyxml.h"
+#include <tinyxml.h>
 
 #include "annoyingdialog.h"
 #include "pluginsconfigurationdlg.h"
diff --git a/src/sdk/projectlayoutloader.cpp b/src/sdk/projectlayoutloader.cpp
index 5ebb191..5b0bdd5 100644
--- a/src/sdk/projectlayoutloader.cpp
+++ b/src/sdk/projectlayoutloader.cpp
@@ -22,7 +22,7 @@
 #endif
 
 #include "projectlayoutloader.h"
-#include "tinyxml/tinyxml.h"
+#include <tinyxml.h>
 #include "tinywxuni.h"
 
 ProjectLayoutLoader::ProjectLayoutLoader(cbProject* project)
diff --git a/src/sdk/tinywxuni.cpp b/src/sdk/tinywxuni.cpp
index 5cfc5ee..1e33cd6 100644
--- a/src/sdk/tinywxuni.cpp
+++ b/src/sdk/tinywxuni.cpp
@@ -7,7 +7,7 @@
 #include "manager.h"
 #endif
 #include "tinywxuni.h"
-#include "tinyxml.h"
+#include <tinyxml.h>
 
 bool TinyXML::LoadDocument(const wxString& filename, TiXmlDocument *doc)
 {
diff --git a/src/sdk/workspaceloader.cpp b/src/sdk/workspaceloader.cpp
index dbcb1fa..0219c35 100644
--- a/src/sdk/workspaceloader.cpp
+++ b/src/sdk/workspaceloader.cpp
@@ -25,7 +25,7 @@
 
 
 
-#include "tinyxml/tinyxml.h"
+#include <tinyxml.h>
 #include "tinywxuni.h"
 
 WorkspaceLoader::WorkspaceLoader()
-- 
1.6.3.3

From bb31eaf1f8c329c466b24f5b41485a618dea67c1 Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
Date: Sat, 16 May 2009 12:36:33 +0200
Subject: [PATCH 07/19] update codecompletion plugin

---
 src/plugins/codecompletion/Makefile.am      |    4 ++++
 src/plugins/codecompletion/nativeparser.cpp |    2 +-
 2 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/src/plugins/codecompletion/Makefile.am b/src/plugins/codecompletion/Makefile.am
index 84d1a58..342a3e6 100644
--- a/src/plugins/codecompletion/Makefile.am
+++ b/src/plugins/codecompletion/Makefile.am
@@ -4,6 +4,10 @@ INCLUDES = $(WX_CXXFLAGS) \
 		-I$(top_srcdir)/src/include \
 		-I$(top_srcdir)/src/include/wxscintilla/include
 
+if ! HAVE_TINYXML
+INCLUDES += -I$(top_srcdir)/src/include/tinyxml
+endif
+
 pluginlibdir = $(pkglibdir)/plugins
 
 pluginlib_LTLIBRARIES = libcodecompletion.la
diff --git a/src/plugins/codecompletion/nativeparser.cpp b/src/plugins/codecompletion/nativeparser.cpp
index 5907c2c..cc97e2f 100644
--- a/src/plugins/codecompletion/nativeparser.cpp
+++ b/src/plugins/codecompletion/nativeparser.cpp
@@ -25,7 +25,7 @@
 #include <projectloader_hooks.h>
 #include <wx/regex.h>
 #include <wx/log.h> // for wxSafeShowMessage()
-#include <tinyxml/tinyxml.h>
+#include <tinyxml.h>
 #include <wx/aui/auibook.h>
 #include "cbstyledtextctrl.h"
 
-- 
1.6.3.3

From b406305ac92236ba67d3ffa95a851310ef0e1603 Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
Date: Sat, 16 May 2009 12:38:01 +0200
Subject: [PATCH 08/19] update codesnippets plugin

---
 src/plugins/contrib/codesnippets/Makefile.am       |    4 ++++
 .../contrib/codesnippets/codesnippetstreectrl.cpp  |    1 -
 .../contrib/codesnippets/codesnippetstreectrl.h    |    2 +-
 .../contrib/codesnippets/codesnippetswindow.cpp    |    2 +-
 4 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/plugins/contrib/codesnippets/Makefile.am b/src/plugins/contrib/codesnippets/Makefile.am
index ee6f92b..2a0d281 100644
--- a/src/plugins/contrib/codesnippets/Makefile.am
+++ b/src/plugins/contrib/codesnippets/Makefile.am
@@ -9,6 +9,10 @@ INCLUDES = $(WX_CXXFLAGS) \
  		-I$(top_srcdir)/src/plugins/contrib/codesnippets/editor \
 		-I$(top_srcdir)/src/include/mozilla_chardet
 
+if ! HAVE_TINYXML
+INCLUDES += -I$(top_srcdir)/src/include/tinyxml
+endif
+
 pluginlibdir = $(pkglibdir)/plugins
 
 pluginlib_LTLIBRARIES = libcodesnippets.la
diff --git a/src/plugins/contrib/codesnippets/codesnippetstreectrl.cpp b/src/plugins/contrib/codesnippets/codesnippetstreectrl.cpp
index b87cfcc..ca37379 100644
--- a/src/plugins/contrib/codesnippets/codesnippetstreectrl.cpp
+++ b/src/plugins/contrib/codesnippets/codesnippetstreectrl.cpp
@@ -41,7 +41,6 @@
 //-#else
 //-#endif
 
-#include <tinyxml/tinyxml.h>
 #include "snippetitemdata.h"
 #include "codesnippetstreectrl.h"
 #include "codesnippetswindow.h"
diff --git a/src/plugins/contrib/codesnippets/codesnippetstreectrl.h b/src/plugins/contrib/codesnippets/codesnippetstreectrl.h
index 6d316fd..32829a4 100644
--- a/src/plugins/contrib/codesnippets/codesnippetstreectrl.h
+++ b/src/plugins/contrib/codesnippets/codesnippetstreectrl.h
@@ -30,7 +30,7 @@ class TiXmlElement;
 #include "wx/mimetype.h"
 
 #include "snippetitemdata.h"
-#include <tinyxml/tinyxml.h>
+#include <tinyxml.h>
 #include "snippetproperty.h"
 #include "codesnippetsevent.h"
 #include "snippetsconfig.h"
diff --git a/src/plugins/contrib/codesnippets/codesnippetswindow.cpp b/src/plugins/contrib/codesnippets/codesnippetswindow.cpp
index 2b7a161..d3bc36c 100644
--- a/src/plugins/contrib/codesnippets/codesnippetswindow.cpp
+++ b/src/plugins/contrib/codesnippets/codesnippetswindow.cpp
@@ -62,7 +62,7 @@
 #include "version.h"
 #include "codesnippetswindow.h"
 #include "snippetitemdata.h"
-#include <tinyxml/tinyxml.h>
+#include <tinyxml.h>
 #include "snippetsconfig.h"
 #include "snippetsimages.h"
 #include "codesnippetstreectrl.h"
-- 
1.6.3.3

From ae5106fd2f896b735f9cf88ab2dbb705258e5ddf Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
Date: Sat, 16 May 2009 12:39:05 +0200
Subject: [PATCH 09/19] update envvars plugin

---
 src/plugins/contrib/envvars/Makefile.am |    5 +++++
 src/plugins/contrib/envvars/envvars.cpp |    2 +-
 2 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/src/plugins/contrib/envvars/Makefile.am b/src/plugins/contrib/envvars/Makefile.am
index 89f6ee3..8132e13 100644
--- a/src/plugins/contrib/envvars/Makefile.am
+++ b/src/plugins/contrib/envvars/Makefile.am
@@ -1,6 +1,11 @@
 INCLUDES = $(WX_CXXFLAGS) \
 		-I$(top_srcdir)/src/include \
 		-I$(top_srcdir)/src/include/wxscintilla/include
+
+if ! HAVE_TINYXML
+INCLUDES += -I$(top_srcdir)/src/include/tinyxml
+endif
+
 
 pluginlibdir = $(pkglibdir)/plugins
 pkgdata_DATA = envvars.zip
diff --git a/src/plugins/contrib/envvars/envvars.cpp b/src/plugins/contrib/envvars/envvars.cpp
index 5a9e0ba..8c3e920 100644
--- a/src/plugins/contrib/envvars/envvars.cpp
+++ b/src/plugins/contrib/envvars/envvars.cpp
@@ -15,7 +15,7 @@
   #include <wx/menu.h>
   #include <wx/toolbar.h>
 
-  #include <tinyxml/tinyxml.h>
+  #include <tinyxml.h>
 
   #include "cbproject.h"
   #include "globals.h"
-- 
1.6.3.3

From 96332c53c2063d44b9b88dc652463c110fed909f Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
Date: Sat, 16 May 2009 12:40:11 +0200
Subject: [PATCH 10/19] update BrowseTracker plugin

---
 .../contrib/BrowseTracker/BrowseTrackerLayout.cpp  |    2 +-
 src/plugins/contrib/BrowseTracker/Makefile.am      |    4 ++++
 2 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/src/plugins/contrib/BrowseTracker/BrowseTrackerLayout.cpp b/src/plugins/contrib/BrowseTracker/BrowseTrackerLayout.cpp
index 30f38d4..189eaf7 100644
--- a/src/plugins/contrib/BrowseTracker/BrowseTrackerLayout.cpp
+++ b/src/plugins/contrib/BrowseTracker/BrowseTrackerLayout.cpp
@@ -46,7 +46,7 @@
 #endif
 
 #include <wx/tokenzr.h>
-#include "tinyxml/tinyxml.h"
+#include <tinyxml.h>
 #include "tinywxuni.h"
 
 #include "BrowseTrackerLayout.h"
diff --git a/src/plugins/contrib/BrowseTracker/Makefile.am b/src/plugins/contrib/BrowseTracker/Makefile.am
index c3eff39..b7556cb 100644
--- a/src/plugins/contrib/BrowseTracker/Makefile.am
+++ b/src/plugins/contrib/BrowseTracker/Makefile.am
@@ -2,6 +2,10 @@ INCLUDES = $(WX_CXXFLAGS) \
 		-I$(top_srcdir)/src/include \
 		-I$(top_srcdir)/src/include/wxscintilla/include
 
+if ! HAVE_TINYXML
+INCLUDES += -I$(top_srcdir)/src/include/tinyxml
+endif
+
 pluginlibdir = $(pkglibdir)/plugins
 
 pluginlib_LTLIBRARIES = libBrowseTracker.la
-- 
1.6.3.3

From fbb5088d7dde88aa8965113fba20869178021510 Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
Date: Sat, 16 May 2009 12:41:03 +0200
Subject: [PATCH 11/19] update Valgrind plugin

---
 src/plugins/contrib/Valgrind/Makefile.am  |    4 ++++
 src/plugins/contrib/Valgrind/Valgrind.cpp |    2 +-
 2 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/src/plugins/contrib/Valgrind/Makefile.am b/src/plugins/contrib/Valgrind/Makefile.am
index bd93e1c..3c8525b 100644
--- a/src/plugins/contrib/Valgrind/Makefile.am
+++ b/src/plugins/contrib/Valgrind/Makefile.am
@@ -4,6 +4,10 @@ INCLUDES = $(WX_CXXFLAGS) \
 		-I$(top_srcdir)/src/include \
 		-I$(top_srcdir)/src/include/wxscintilla/include
 
+if ! HAVE_TINYXML
+INCLUDES += -I$(top_srcdir)/src/include/tinyxml
+endif
+
 pluginlibdir = $(pkglibdir)/plugins
 
 pluginlib_LTLIBRARIES = libValgrind.la
diff --git a/src/plugins/contrib/Valgrind/Valgrind.cpp b/src/plugins/contrib/Valgrind/Valgrind.cpp
index 6a5e3df..924bb84 100644
--- a/src/plugins/contrib/Valgrind/Valgrind.cpp
+++ b/src/plugins/contrib/Valgrind/Valgrind.cpp
@@ -21,7 +21,7 @@
 #include "projectmanager.h"
 #endif
 #include <wx/filefn.h>
-#include "tinyxml/tinyxml.h"
+#include <tinyxml.h>
 #include "loggers.h"
 #include "Valgrind.h"
 #include "ValgrindListLog.h"
-- 
1.6.3.3

From 88ddc19601d4728e038e36d1298b60ba12bbd254 Mon Sep 17 00:00:00 2001
From: Dan Horak <dan@danny.cz>
Date: Sat, 16 May 2009 12:04:35 +0200
Subject: [PATCH 12/19] convert AutoVersioning plugin

---
 .../contrib/AutoVersioning/AutoVersioning.cpp      |    2 +-
 src/plugins/contrib/AutoVersioning/Makefile.am     |    5 +++++
 .../contrib/AutoVersioning/avSvnRevision.cpp       |    2 +-
 3 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/plugins/contrib/AutoVersioning/AutoVersioning.cpp b/src/plugins/contrib/AutoVersioning/AutoVersioning.cpp
index ec405db..07f4ba4 100644
--- a/src/plugins/contrib/AutoVersioning/AutoVersioning.cpp
+++ b/src/plugins/contrib/AutoVersioning/AutoVersioning.cpp
@@ -17,7 +17,7 @@
 #include <manager.h>
 #include <projectbuildtarget.h>
 #include <projectmanager.h>
-#include <tinyxml/tinyxml.h>
+#include <tinyxml.h>
 #endif
 
 #include "projectloader_hooks.h"
diff --git a/src/plugins/contrib/AutoVersioning/Makefile.am b/src/plugins/contrib/AutoVersioning/Makefile.am
index 281add3..d366c5f 100644
--- a/src/plugins/contrib/AutoVersioning/Makefile.am
+++ b/src/plugins/contrib/AutoVersioning/Makefile.am
@@ -1,6 +1,11 @@
 INCLUDES = $(WX_CXXFLAGS) \
 		-I$(top_srcdir)/src/include \
 		-I$(top_srcdir)/src/include/wxscintilla/include
+
+if ! HAVE_TINYXML
+INCLUDES += -I$(top_srcdir)/src/include/tinyxml
+endif
+
 
 pluginlibdir = $(pkglibdir)/plugins
 
diff --git a/src/plugins/contrib/AutoVersioning/avSvnRevision.cpp b/src/plugins/contrib/AutoVersioning/avSvnRevision.cpp
index 17335ad..f549150 100644
--- a/src/plugins/contrib/AutoVersioning/avSvnRevision.cpp
+++ b/src/plugins/contrib/AutoVersioning/avSvnRevision.cpp
@@ -3,7 +3,7 @@
 #include <wx/utils.h>
 #include <wx/string.h>
 #include <wx/arrstr.h>
-#include <tinyxml/tinyxml.h>
+#include <tinyxml.h>
 #include <globals.h>
 
 bool QuerySvn(const wxString& workingDir, wxString& revision, wxString& date)
-- 
1.6.3.3

From 981b940c091a28339b6be4f94e8ff9dd9377ef2b Mon Sep 17 00:00:00 2001
From: Dan Horak <dan@danny.cz>
Date: Sat, 16 May 2009 12:10:45 +0200
Subject: [PATCH 13/19] convert lib_finder plugin

---
 src/plugins/contrib/lib_finder/Makefile.am         |    4 ++++
 src/plugins/contrib/lib_finder/lib_finder.h        |    2 +-
 .../contrib/lib_finder/librarydetectionmanager.cpp |    2 +-
 .../contrib/lib_finder/projectconfiguration.h      |    2 +-
 4 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/plugins/contrib/lib_finder/Makefile.am b/src/plugins/contrib/lib_finder/Makefile.am
index 19e3cb2..7a4f515 100644
--- a/src/plugins/contrib/lib_finder/Makefile.am
+++ b/src/plugins/contrib/lib_finder/Makefile.am
@@ -10,6 +10,10 @@ INCLUDES = $(WX_CXXFLAGS) \
 		-I$(top_srcdir)/src/include/scripting/bindings \
 		-I$(top_srcdir)/src/include/mozilla_chardet
 
+if ! HAVE_TINYXML
+INCLUDES += -I$(top_srcdir)/src/include/tinyxml
+endif
+
 pluginlibdir = $(pkglibdir)/plugins
 
 pluginlib_LTLIBRARIES = liblib_finder.la
diff --git a/src/plugins/contrib/lib_finder/lib_finder.h b/src/plugins/contrib/lib_finder/lib_finder.h
index 4ee49e8..8aaa51a 100644
--- a/src/plugins/contrib/lib_finder/lib_finder.h
+++ b/src/plugins/contrib/lib_finder/lib_finder.h
@@ -27,7 +27,7 @@
 #include <cbplugin.h>
 #include <settings.h>
 #include <sdk_events.h>
-#include <tinyxml/tinyxml.h>
+#include <tinyxml.h>
 
 #include "librarydetectionmanager.h"
 #include "resultmap.h"
diff --git a/src/plugins/contrib/lib_finder/librarydetectionmanager.cpp b/src/plugins/contrib/lib_finder/librarydetectionmanager.cpp
index b61adf8..594d960 100644
--- a/src/plugins/contrib/lib_finder/librarydetectionmanager.cpp
+++ b/src/plugins/contrib/lib_finder/librarydetectionmanager.cpp
@@ -21,7 +21,7 @@
 * $HeadURL: svn+ssh://byo@svn.berlios.de/svnroot/repos/codeblocks/trunk/src/plugins/contrib/wxSmith/plugin/wxsmithpluginregistrants.cpp $
 */
 
-#include <tinyxml/tinyxml.h>
+#include <tinyxml.h>
 #include <tinywxuni.h>
 
 #include <wx/arrstr.h>
diff --git a/src/plugins/contrib/lib_finder/projectconfiguration.h b/src/plugins/contrib/lib_finder/projectconfiguration.h
index 3172492..2eaf313 100644
--- a/src/plugins/contrib/lib_finder/projectconfiguration.h
+++ b/src/plugins/contrib/lib_finder/projectconfiguration.h
@@ -27,7 +27,7 @@
 #include <wx/arrstr.h>
 #include <wx/string.h>
 #include <wx/hashmap.h>
-#include <tinyxml/tinyxml.h>
+#include <tinyxml.h>
 #include <cbproject.h>
 
 /** \brief Configuration of one project */
-- 
1.6.3.3

From 31ff0cf769cfd834de127b1cb3ecbcf7866a2e26 Mon Sep 17 00:00:00 2001
From: Dan Horak <dan@danny.cz>
Date: Sat, 16 May 2009 12:20:55 +0200
Subject: [PATCH 14/19] convert wxSmith plugin

---
 src/plugins/contrib/wxSmith/Makefile.am            |    4 ++++
 src/plugins/contrib/wxSmith/properties/Makefile.am |    4 ++++
 .../contrib/wxSmith/properties/wxsproperty.h       |    2 +-
 src/plugins/contrib/wxSmith/wxsgui.h               |    2 +-
 src/plugins/contrib/wxSmith/wxsmith.h              |    2 +-
 src/plugins/contrib/wxSmith/wxsproject.h           |    2 +-
 src/plugins/contrib/wxSmith/wxsversionconverter.h  |    2 +-
 src/plugins/contrib/wxSmith/wxwidgets/Makefile.am  |    4 ++++
 src/plugins/contrib/wxSmith/wxwidgets/wxsevents.h  |    2 +-
 .../wxSmith/wxwidgets/wxsitemresdataobject.h       |    2 +-
 10 files changed, 19 insertions(+), 7 deletions(-)

diff --git a/src/plugins/contrib/wxSmith/Makefile.am b/src/plugins/contrib/wxSmith/Makefile.am
index 64b9870..3766ac9 100644
--- a/src/plugins/contrib/wxSmith/Makefile.am
+++ b/src/plugins/contrib/wxSmith/Makefile.am
@@ -12,6 +12,10 @@ INCLUDES = $(WX_CXXFLAGS) \
 		-I$(top_srcdir)/src/plugins/contrib/wxSmith/propgrid/contrib/include \
 		-I$(top_srcdir)/src/include/mozilla_chardet
 
+if ! HAVE_TINYXML
+INCLUDES += -I$(top_srcdir)/src/include/tinyxml
+endif
+
 lib_LTLIBRARIES = libwxsmithlib.la
 
 libwxsmithlib_la_LDFLAGS = -version-info 0:1:0 -shared
diff --git a/src/plugins/contrib/wxSmith/properties/Makefile.am b/src/plugins/contrib/wxSmith/properties/Makefile.am
index 72e1b28..36bfeeb 100644
--- a/src/plugins/contrib/wxSmith/properties/Makefile.am
+++ b/src/plugins/contrib/wxSmith/properties/Makefile.am
@@ -5,6 +5,10 @@ INCLUDES = $(WX_CXXFLAGS) \
 		-I$(top_srcdir)/src/include/wxscintilla/include \
 		-I$(top_srcdir)/src/plugins/contrib/wxSmith/propgrid/contrib/include
 
+if ! HAVE_TINYXML
+INCLUDES += -I$(top_srcdir)/src/include/tinyxml
+endif
+
 noinst_LTLIBRARIES = libwxsmith_properties.la
 
 libwxsmith_properties_la_LDFLAGS = -module -version-info 0:1:0 -shared -no-undefined -avoid-version
diff --git a/src/plugins/contrib/wxSmith/properties/wxsproperty.h b/src/plugins/contrib/wxSmith/properties/wxsproperty.h
index 1e2d321..de36cee 100644
--- a/src/plugins/contrib/wxSmith/properties/wxsproperty.h
+++ b/src/plugins/contrib/wxSmith/properties/wxsproperty.h
@@ -34,7 +34,7 @@
 #include <wx/propgrid/propgrid.h>
 #include <wx/propgrid/manager.h>
 
-#include <tinyxml/tinyxml.h>
+#include <tinyxml.h>
 #include "wxspropertystream.h"
 
 class wxsPropertyContainer;
diff --git a/src/plugins/contrib/wxSmith/wxsgui.h b/src/plugins/contrib/wxSmith/wxsgui.h
index 7694750..48a06e3 100644
--- a/src/plugins/contrib/wxSmith/wxsgui.h
+++ b/src/plugins/contrib/wxSmith/wxsgui.h
@@ -24,7 +24,7 @@
 #define WXSGUI_H
 
 #include <configurationpanel.h>
-#include <tinyxml/tinyxml.h>
+#include <tinyxml.h>
 #include "wxsguifactory.h"
 #include "wxsproject.h"
 
diff --git a/src/plugins/contrib/wxSmith/wxsmith.h b/src/plugins/contrib/wxSmith/wxsmith.h
index ff311c9..2a442b5 100644
--- a/src/plugins/contrib/wxSmith/wxsmith.h
+++ b/src/plugins/contrib/wxSmith/wxsmith.h
@@ -29,7 +29,7 @@
 #include <cbplugin.h>
 #include <settings.h>
 #include <sdk_events.h>
-#include <tinyxml/tinyxml.h>
+#include <tinyxml.h>
 
 #include "wxsstoringsplitterwindow.h"
 #include "wxsresourcetree.h"
diff --git a/src/plugins/contrib/wxSmith/wxsproject.h b/src/plugins/contrib/wxSmith/wxsproject.h
index 4ffcab1..de0336a 100644
--- a/src/plugins/contrib/wxSmith/wxsproject.h
+++ b/src/plugins/contrib/wxSmith/wxsproject.h
@@ -24,7 +24,7 @@
 #define WXSPROJECT_H
 
 #include <cbproject.h>
-#include <tinyxml/tinyxml.h>
+#include <tinyxml.h>
 #include "wxsresourcetree.h"
 
 class wxSmith;
diff --git a/src/plugins/contrib/wxSmith/wxsversionconverter.h b/src/plugins/contrib/wxSmith/wxsversionconverter.h
index ac2b79c..0673bb5 100644
--- a/src/plugins/contrib/wxSmith/wxsversionconverter.h
+++ b/src/plugins/contrib/wxSmith/wxsversionconverter.h
@@ -23,7 +23,7 @@
 #ifndef WXSVERSIONCONVERTER_H
 #define WXSVERSIONCONVERTER_H
 
-#include <tinyxml/tinyxml.h>
+#include <tinyxml.h>
 #include <wx/string.h>
 
 class wxsProject;
diff --git a/src/plugins/contrib/wxSmith/wxwidgets/Makefile.am b/src/plugins/contrib/wxSmith/wxwidgets/Makefile.am
index b01b1b8..171e632 100644
--- a/src/plugins/contrib/wxSmith/wxwidgets/Makefile.am
+++ b/src/plugins/contrib/wxSmith/wxwidgets/Makefile.am
@@ -11,6 +11,10 @@ INCLUDES = $(WX_CXXFLAGS) \
 		-I$(top_srcdir)/src/include/scripting/bindings \
 		-I$(top_srcdir)/src/plugins/contrib/wxSmith/propgrid/contrib/include
 
+if ! HAVE_TINYXML
+INCLUDES += -I$(top_srcdir)/src/include/tinyxml
+endif
+
 noinst_LTLIBRARIES = libwxsmith_wxwidgets.la
 
 libwxsmith_wxwidgets_la_LDFLAGS = -module -version-info 0:1:0 -shared -no-undefined -avoid-version
diff --git a/src/plugins/contrib/wxSmith/wxwidgets/wxsevents.h b/src/plugins/contrib/wxSmith/wxwidgets/wxsevents.h
index 4e5d044..18571a4 100644
--- a/src/plugins/contrib/wxSmith/wxwidgets/wxsevents.h
+++ b/src/plugins/contrib/wxSmith/wxwidgets/wxsevents.h
@@ -24,7 +24,7 @@
 #define WXSEVENTS_H
 
 #include <wx/arrstr.h>
-#include <tinyxml/tinyxml.h>
+#include <tinyxml.h>
 #include <wx/arrstr.h>
 
 #include "wxscodercontext.h"
diff --git a/src/plugins/contrib/wxSmith/wxwidgets/wxsitemresdataobject.h b/src/plugins/contrib/wxSmith/wxwidgets/wxsitemresdataobject.h
index 142d6dd..e17f529 100644
--- a/src/plugins/contrib/wxSmith/wxwidgets/wxsitemresdataobject.h
+++ b/src/plugins/contrib/wxSmith/wxwidgets/wxsitemresdataobject.h
@@ -24,7 +24,7 @@
 #define WXSITEMRESDATAOBJECT_H
 
 #include <wx/dataobj.h>
-#include <tinyxml/tinyxml.h>
+#include <tinyxml.h>
 
 #define wxsDF_WIDGET   _T("wxSmith XML")
 
-- 
1.6.3.3

From d38966a82f9d5da218d344cf5ee7ba74ffad7c26 Mon Sep 17 00:00:00 2001
From: Dan Horak <dan@danny.cz>
Date: Sat, 16 May 2009 12:23:54 +0200
Subject: [PATCH 15/19] convert cb_share_config tool

---
 src/tools/cb_share_config/Makefile.am |    9 +++++++--
 src/tools/cb_share_config/mainframe.h |    3 +--
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/tools/cb_share_config/Makefile.am b/src/tools/cb_share_config/Makefile.am
index fa88563..3eb9e5c 100644
--- a/src/tools/cb_share_config/Makefile.am
+++ b/src/tools/cb_share_config/Makefile.am
@@ -1,13 +1,18 @@
 bin_PROGRAMS = cb_share_config
 
 INCLUDES = $(WX_CXXFLAGS) \
-			-I$(top_srcdir)/src/include \
-			-I$(top_srcdir)/src/include/tinyxml
+			-I$(top_srcdir)/src/include
 
 cb_share_config_LDFLAGS = 
 
+if ! HAVE_TINYXML
+INCLUDES += -I$(top_srcdir)/src/include/tinyxml
 cb_share_config_LDADD =  -L../../base/tinyxml -ltinyxml \
 			$(WX_LIBS)
+else
+cb_share_config_LDADD = -ltinyxml $(WX_LIBS)
+endif
+
 
 cb_share_config_SOURCES = app.cpp \
 			mainframe.cpp
diff --git a/src/tools/cb_share_config/mainframe.h b/src/tools/cb_share_config/mainframe.h
index c49e790..b658bad 100644
--- a/src/tools/cb_share_config/mainframe.h
+++ b/src/tools/cb_share_config/mainframe.h
@@ -20,8 +20,7 @@
 #include <wx/arrstr.h>
 #include <vector>
 
-#include "tinyxml/tinystr.h"
-#include "tinyxml/tinyxml.h"
+#include <tinyxml.h>
 
 class MainFrame: public wxFrame
 {
-- 
1.6.3.3

From 54da27bb61fb3829a88811b34462f47367b6c0a7 Mon Sep 17 00:00:00 2001
From: Dan Horak <dan@danny.cz>
Date: Sat, 16 May 2009 12:26:31 +0200
Subject: [PATCH 16/19] build local copy of tinyxml library only when no system tinyxml library exists

---
 src/base/Makefile.am |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/base/Makefile.am b/src/base/Makefile.am
index 62a6da1..8f8347f 100644
--- a/src/base/Makefile.am
+++ b/src/base/Makefile.am
@@ -1 +1,3 @@
+if ! HAVE_TINYXML
 SUBDIRS = tinyxml
+endif
-- 
1.6.3.3

From 9b66af2e1fbd74c7847e7832d01f9e8e1fedd023 Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
Date: Sat, 16 May 2009 13:07:12 +0200
Subject: [PATCH 17/19] fix include dirs for the main app when system tinyxml is not present

---
 src/plugins/autosave/Makefile.am                   |    4 ++++
 src/plugins/contrib/HexEditor/Makefile.am          |    4 ++++
 src/plugins/contrib/ThreadSearch/Makefile.am       |    4 ++++
 src/plugins/contrib/byogames/Makefile.am           |    4 ++++
 .../contrib/codesnippets/resources/Makefile.am     |    4 ++++
 src/plugins/contrib/dragscroll/Makefile.am         |    4 ++++
 src/plugins/contrib/headerfixup/Makefile.am        |    4 ++++
 src/plugins/contrib/keybinder/Makefile.am          |    4 ++++
 src/plugins/contrib/wxSmith/plugin/Makefile.am     |    4 ++++
 .../contrib/wxSmith/wxwidgets/defitems/Makefile.am |    4 ++++
 .../wxSmith/wxwidgets/properties/Makefile.am       |    4 ++++
 .../contrib/wxSmithContribItems/Makefile.am        |    4 ++++
 src/plugins/openfileslist/Makefile.am              |    4 ++++
 src/plugins/projectsimporter/Makefile.am           |    4 ++++
 src/plugins/scriptedwizard/Makefile.am             |    4 ++++
 src/src/Makefile.am                                |    4 ++++
 16 files changed, 64 insertions(+), 0 deletions(-)

diff --git a/src/plugins/autosave/Makefile.am b/src/plugins/autosave/Makefile.am
index b8aea57..0eba2d6 100644
--- a/src/plugins/autosave/Makefile.am
+++ b/src/plugins/autosave/Makefile.am
@@ -1,6 +1,10 @@
 INCLUDES = $(WX_CXXFLAGS) \
 		-I$(top_srcdir)/src/include \
 		-I$(top_srcdir)/src/include/wxscintilla/include
+
+if ! HAVE_TINYXML
+INCLUDES += -I$(top_srcdir)/src/include/tinyxml
+endif
 
 pluginlibdir = $(pkglibdir)/plugins
 
diff --git a/src/plugins/contrib/HexEditor/Makefile.am b/src/plugins/contrib/HexEditor/Makefile.am
index 24efe5a..850f43b 100644
--- a/src/plugins/contrib/HexEditor/Makefile.am
+++ b/src/plugins/contrib/HexEditor/Makefile.am
@@ -2,6 +2,10 @@ INCLUDES = $(WX_CXXFLAGS) \
 		-I$(top_srcdir)/src/include \
 		-I$(top_srcdir)/src/include/wxscintilla/include
 
+if ! HAVE_TINYXML
+INCLUDES += -I$(top_srcdir)/src/include/tinyxml
+endif
+
 pluginlibdir = $(pkglibdir)/plugins
 
 pluginlib_LTLIBRARIES = libHexEditor.la
diff --git a/src/plugins/contrib/ThreadSearch/Makefile.am b/src/plugins/contrib/ThreadSearch/Makefile.am
index abf90ca..b4f601f 100644
--- a/src/plugins/contrib/ThreadSearch/Makefile.am
+++ b/src/plugins/contrib/ThreadSearch/Makefile.am
@@ -5,6 +5,10 @@ INCLUDES = $(WX_CXXFLAGS) \
 		-I$(top_srcdir)/src/include/wxscintilla/include \
 		-I$(top_srcdir)/src/include/mozilla_chardet
 
+if ! HAVE_TINYXML
+INCLUDES += -I$(top_srcdir)/src/include/tinyxml
+endif
+
 pluginlibdir = $(pkglibdir)/plugins
 
 pluginlib_LTLIBRARIES = libThreadSearch.la
diff --git a/src/plugins/contrib/byogames/Makefile.am b/src/plugins/contrib/byogames/Makefile.am
index 0ca1515..4efab7a 100644
--- a/src/plugins/contrib/byogames/Makefile.am
+++ b/src/plugins/contrib/byogames/Makefile.am
@@ -1,6 +1,10 @@
 INCLUDES = $(WX_CXXFLAGS) \
 		-I$(top_srcdir)/src/include \
 		-I$(top_srcdir)/src/include/wxscintilla/include
+
+if ! HAVE_TINYXML
+INCLUDES += -I$(top_srcdir)/src/include/tinyxml
+endif
 
 pluginlibdir = $(pkglibdir)/plugins
 
diff --git a/src/plugins/contrib/codesnippets/resources/Makefile.am b/src/plugins/contrib/codesnippets/resources/Makefile.am
index 354f165..c43f21c 100644
--- a/src/plugins/contrib/codesnippets/resources/Makefile.am
+++ b/src/plugins/contrib/codesnippets/resources/Makefile.am
@@ -7,6 +7,10 @@ INCLUDES = $(WX_CXXFLAGS) \
  		-I$(top_srcdir)/src/plugins/contrib/codesnippets/editor \
 		-I$(top_srcdir)/src/include/mozilla_chardet
 
+if ! HAVE_TINYXML
+INCLUDES += -I$(top_srcdir)/src/include/tinyxml
+endif
+
 pluginlibdir = $(pkglibdir)/plugins
 
 ##pluginlib_LTLIBRARIES = codesnippets
diff --git a/src/plugins/contrib/dragscroll/Makefile.am b/src/plugins/contrib/dragscroll/Makefile.am
index 82a2599..44775cd 100644
--- a/src/plugins/contrib/dragscroll/Makefile.am
+++ b/src/plugins/contrib/dragscroll/Makefile.am
@@ -3,6 +3,10 @@ INCLUDES = $(WX_CXXFLAGS) \
 		-I$(top_srcdir)/src/src \
 		-I$(top_srcdir)/src/include/wxscintilla/include
 
+if ! HAVE_TINYXML
+INCLUDES += -I$(top_srcdir)/src/include/tinyxml
+endif
+
 pluginlibdir = $(pkglibdir)/plugins
 
 pluginlib_LTLIBRARIES = libdragscroll.la
diff --git a/src/plugins/contrib/headerfixup/Makefile.am b/src/plugins/contrib/headerfixup/Makefile.am
index b23a280..7005f35 100644
--- a/src/plugins/contrib/headerfixup/Makefile.am
+++ b/src/plugins/contrib/headerfixup/Makefile.am
@@ -2,6 +2,10 @@ INCLUDES = $(WX_CXXFLAGS) \
            -I$(top_srcdir)/src/include \
            -I$(top_srcdir)/src/include/wxscintilla/include
 
+if ! HAVE_TINYXML
+INCLUDES += -I$(top_srcdir)/src/include/tinyxml
+endif
+
 CXXFLAGS = @CXXFLAGS@  -O0
 
 pluginlibdir = $(pkglibdir)/plugins
diff --git a/src/plugins/contrib/keybinder/Makefile.am b/src/plugins/contrib/keybinder/Makefile.am
index 2de1dcd..868aef3 100644
--- a/src/plugins/contrib/keybinder/Makefile.am
+++ b/src/plugins/contrib/keybinder/Makefile.am
@@ -2,6 +2,10 @@ INCLUDES = $(WX_CXXFLAGS) \
 		-I$(top_srcdir)/src/include \
 		-I$(top_srcdir)/src/include/wxscintilla/include
 
+if ! HAVE_TINYXML
+INCLUDES += -I$(top_srcdir)/src/include/tinyxml
+endif
+
 pluginlibdir = $(pkglibdir)/plugins
 
 pluginlib_LTLIBRARIES = libkeybinder.la
diff --git a/src/plugins/contrib/wxSmith/plugin/Makefile.am b/src/plugins/contrib/wxSmith/plugin/Makefile.am
index 9d1ee48..7a15ed7 100644
--- a/src/plugins/contrib/wxSmith/plugin/Makefile.am
+++ b/src/plugins/contrib/wxSmith/plugin/Makefile.am
@@ -5,6 +5,10 @@ INCLUDES = $(WX_CXXFLAGS) \
 		-I$(top_srcdir)/src/include/wxscintilla/include \
 		-I$(top_srcdir)/src/plugins/contrib/propgrid/include
 
+if ! HAVE_TINYXML
+INCLUDES += -I$(top_srcdir)/src/include/tinyxml
+endif
+
 pluginlib_LTLIBRARIES = libwxsmith.la
 
 pluginlibdir = $(pkglibdir)/plugins
diff --git a/src/plugins/contrib/wxSmith/wxwidgets/defitems/Makefile.am b/src/plugins/contrib/wxSmith/wxwidgets/defitems/Makefile.am
index 520d90e..b1d71f6 100644
--- a/src/plugins/contrib/wxSmith/wxwidgets/defitems/Makefile.am
+++ b/src/plugins/contrib/wxSmith/wxwidgets/defitems/Makefile.am
@@ -5,6 +5,10 @@ INCLUDES = $(WX_CXXFLAGS) \
 		-I$(top_srcdir)/src/include/wxscintilla/include \
 		-I$(top_srcdir)/src/plugins/contrib/wxSmith/propgrid/contrib/include
 
+if ! HAVE_TINYXML
+INCLUDES += -I$(top_srcdir)/src/include/tinyxml
+endif
+
 noinst_LTLIBRARIES = libwxsmith_wxwidgets_defitems.la
 
 libwxsmith_wxwidgets_defitems_la_LDFLAGS = -module -version-info 0:1:0 -shared -no-undefined -avoid-version
diff --git a/src/plugins/contrib/wxSmith/wxwidgets/properties/Makefile.am b/src/plugins/contrib/wxSmith/wxwidgets/properties/Makefile.am
index b587e6c..10bea0f 100644
--- a/src/plugins/contrib/wxSmith/wxwidgets/properties/Makefile.am
+++ b/src/plugins/contrib/wxSmith/wxwidgets/properties/Makefile.am
@@ -5,6 +5,10 @@ INCLUDES = $(WX_CXXFLAGS) \
 		-I$(top_srcdir)/src/include/wxscintilla/include \
 		-I$(top_srcdir)/src/plugins/contrib/wxSmith/propgrid/contrib/include
 
+if ! HAVE_TINYXML
+INCLUDES += -I$(top_srcdir)/src/include/tinyxml
+endif
+
 noinst_LTLIBRARIES = libwxsmith_wxwidgets_properties.la
 
 libwxsmith_wxwidgets_properties_la_LDFLAGS = -module -version-info 0:1:0 -shared -no-undefined -avoid-version
diff --git a/src/plugins/contrib/wxSmithContribItems/Makefile.am b/src/plugins/contrib/wxSmithContribItems/Makefile.am
index c949871..fc19f45 100644
--- a/src/plugins/contrib/wxSmithContribItems/Makefile.am
+++ b/src/plugins/contrib/wxSmithContribItems/Makefile.am
@@ -11,6 +11,10 @@ INCLUDES = $(WX_CXXFLAGS) \
 		-I$(srcdir)/wxflatnotebook/wxFlatNotebook/include \
 		-I$(srcdir)/wxthings/wxthings/include
 
+if ! HAVE_TINYXML
+INCLUDES += -I$(top_srcdir)/src/include/tinyxml
+endif
+
 pluginlibdir = $(pkglibdir)/plugins
 
 pluginlib_LTLIBRARIES = libwxsmithcontribitems.la
diff --git a/src/plugins/openfileslist/Makefile.am b/src/plugins/openfileslist/Makefile.am
index 6779282..48ec842 100644
--- a/src/plugins/openfileslist/Makefile.am
+++ b/src/plugins/openfileslist/Makefile.am
@@ -2,6 +2,10 @@ INCLUDES = $(WX_CXXFLAGS) \
 		-I$(top_srcdir)/src/include \
 		-I$(top_srcdir)/src/include/wxscintilla/include
 
+if ! HAVE_TINYXML
+INCLUDES += -I$(top_srcdir)/src/include/tinyxml
+endif
+
 pluginlibdir = $(pkglibdir)/plugins
 
 pluginlib_LTLIBRARIES = libopenfileslist.la
diff --git a/src/plugins/projectsimporter/Makefile.am b/src/plugins/projectsimporter/Makefile.am
index 3952b07..29374fc 100644
--- a/src/plugins/projectsimporter/Makefile.am
+++ b/src/plugins/projectsimporter/Makefile.am
@@ -5,6 +5,10 @@ INCLUDES = $(WX_CXXFLAGS) \
 		-I$(top_srcdir)/src/include/wxscintilla/include \
 		-I$(top_srcdir)/src/include/mozilla_chardet
 
+if ! HAVE_TINYXML
+INCLUDES += -I$(top_srcdir)/src/include/tinyxml
+endif
+
 
 pluginlibdir = $(pkglibdir)/plugins
 
diff --git a/src/plugins/scriptedwizard/Makefile.am b/src/plugins/scriptedwizard/Makefile.am
index 26b7ff3..d3cbe58 100644
--- a/src/plugins/scriptedwizard/Makefile.am
+++ b/src/plugins/scriptedwizard/Makefile.am
@@ -5,6 +5,10 @@ INCLUDES = $(WX_CXXFLAGS) \
 		-I$(top_srcdir)/src/include/wxscintilla/include \
 		-I$(top_srcdir)/src/include/scripting/include \
 		-I$(top_srcdir)/src/include/scripting/sqplus
+
+if ! HAVE_TINYXML
+INCLUDES += -I$(top_srcdir)/src/include/tinyxml
+endif
 
 pluginlibdir = $(pkglibdir)/plugins
 
diff --git a/src/src/Makefile.am b/src/src/Makefile.am
index 4cf101d..03c1f62 100644
--- a/src/src/Makefile.am
+++ b/src/src/Makefile.am
@@ -7,6 +7,10 @@ INCLUDES = $(WX_CXXFLAGS) \
 			-I$(top_srcdir)/src/include/scripting/sqplus \
 			-I$(top_srcdir)/src/include\mozilla_chardet
 
+if ! HAVE_TINYXML
+INCLUDES += -I$(top_srcdir)/src/include/tinyxml
+endif
+
 if CODEBLOCKS_LINUX
 AM_CPPFLAGS = -DENABLE_BINRELOC -DAPP_PREFIX="\"@prefix@\""
 endif
-- 
1.6.3.3

From 8926e31bbf771bf332ef350e68f113edc720fae8 Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
Date: Tue, 18 Aug 2009 13:21:38 +0200
Subject: [PATCH 18/19] use/install local timyxml headers only when a system-wide instance doesn't exist

---
 src/include/Makefile.am |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/include/Makefile.am b/src/include/Makefile.am
index 9138ffd..538184d 100644
--- a/src/include/Makefile.am
+++ b/src/include/Makefile.am
@@ -1,4 +1,4 @@
-SUBDIRS = scripting tinyxml wxscintilla
+SUBDIRS = scripting wxscintilla
 
 if PRECOMPILE_HEADERS
 BUILT_SOURCES = $(top_srcdir)/src/include/sdk.h.gch \
@@ -10,11 +10,15 @@ endif
 INCLUDES = $(WX_CXXFLAGS) \
 			-I$(top_srcdir)/src/include \
 			-I$(top_srcdir)/src/include/wxscintilla/include \
-			-I$(top_srcdir)/src/include/tinyxml \
 			-I$(top_srcdir)/src/include/scripting/include \
  			-I$(top_srcdir)/src/include/scripting/sqplus \
 			-I$(top_srcdir)/src/include/mozilla_chardet
 
+if ! HAVE_TINYXML
+SUBDIRS += tinyxml
+INCLUDES += -I$(top_srcdir)/src/include/tinyxml
+endif
+
 # Because we are not generating any programs/libraries with this makefile,
 # $(CXXCOMPILE) is empty.
 # Create the basic one here:
-- 
1.6.3.3

From 32e9684aa6262532af64de87b444438f914aa014 Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
Date: Tue, 18 Aug 2009 13:56:15 +0200
Subject: [PATCH 19/19] fix linking with tinyxml in the codesnippets plugin

---
 .../contrib/codesnippets/resources/Makefile.am     |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/src/plugins/contrib/codesnippets/resources/Makefile.am b/src/plugins/contrib/codesnippets/resources/Makefile.am
index c43f21c..86058b7 100644
--- a/src/plugins/contrib/codesnippets/resources/Makefile.am
+++ b/src/plugins/contrib/codesnippets/resources/Makefile.am
@@ -7,10 +7,6 @@ INCLUDES = $(WX_CXXFLAGS) \
  		-I$(top_srcdir)/src/plugins/contrib/codesnippets/editor \
 		-I$(top_srcdir)/src/include/mozilla_chardet
 
-if ! HAVE_TINYXML
-INCLUDES += -I$(top_srcdir)/src/include/tinyxml
-endif
-
 pluginlibdir = $(pkglibdir)/plugins
 
 ##pluginlib_LTLIBRARIES = codesnippets
@@ -20,10 +16,15 @@ codesnippets_LDFLAGS = $(WX_GTK2_LIBS)
 
 ##codesnippets_LIBADD = $(PLUGIN_WX_LIBS) ../../../../sdk/libcodeblocks.la
 ##codesnippets_LDADD = $(PLUGIN_WX_LIBS) ../../../../sdk/libcodeblocks.la
-codesnippets_LDADD =  -L../../../../base/tinyxml -ltinyxml \
+codesnippets_LDADD = -ltinyxml \
             -L../../../../sdk ../../../../sdk/libcodeblocks.la \
 			$(PLUGIN_WX_LIBS) $(WX_LIBS)
 
+if ! HAVE_TINYXML
+INCLUDES += -I$(top_srcdir)/src/include/tinyxml
+codesnippets_LDADD += -L../../../../base/tinyxml
+endif
+
 codesnippets_SOURCES =	$(srcdir)/../version.cpp \
 		$(srcdir)/../Search/DirectoryParamsPanel.cpp \
 		$(srcdir)/../Search/InsertIndexManager.cpp \
-- 
1.6.3.3

