--- a/configure.ac
+++ b/configure.ac
@@ -70,9 +70,11 @@
 AC_SUBST([cb_plugin_datadir])
 AC_SUBST([cb_plugin_libdir])
 
-CPPFLAGS="$CPPFLAGS $CODEBLOCKS_CFLAGS -ansi "
+PKG_CHECK_MODULES([TINYXML], [tinyxml])
+
+CPPFLAGS="$CPPFLAGS $CODEBLOCKS_CFLAGS $TINYXML_CFLAGS -ansi "
 CXXFLAGS="$CXXFLAGS -std=c++11"
-LIBS="$LIBS $CODEBLOCKS_LIBS"
+LIBS="$LIBS $CODEBLOCKS_LIBS $TINYXML_LIBS"
 
 
 # Checks for header files.
--- a/nativeparserf.cpp
+++ b/nativeparserf.cpp
@@ -27,7 +27,7 @@
     #include <cbproject.h>
     #include <cbexception.h>
     #include <projectloader_hooks.h>
-    #include <tinyxml/tinyxml.h>
+    #include <tinyxml.h>
 #endif
 #include <cctype>
 #include <vector>
