diff --git a/ChangeLog b/ChangeLog
index 8ff70be..a9883bb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-06-19  Mathias Hasselmann  <mathias.hasselmann@gmx.de>
+
+	* ChangeLog, configure.in, tests/Makefile.am, 
+	tests/testkeywords.cxx: Create test for finding 
+	C++ keywords in public header files (#449016).
+
 2007-06-18  Matthias Clasen <mclasen@redhat.com>
 
 	* gtk/gtkcellrendererspin.c: Fix some issues with refcounting
diff --git a/configure.in b/configure.in
index 1233c2f..ccd0ce7 100644
--- a/configure.in
+++ b/configure.in
@@ -135,6 +135,17 @@ dnl Initialize libtool
 AC_PROG_CC
 AM_DISABLE_STATIC
 
+dnl 
+dnl Check for a working C++ compiler, but do not bail out, if none is found.
+dnl We use this for an automated test for C++ header correctness.
+dnl 
+AC_CHECK_PROGS(CXX, [$CCC c++ g++ gcc CC cxx cc++ cl], gcc)
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+AC_TRY_COMPILE(,[class a { int b; } c;], ,CXX=)
+AM_CONDITIONAL(HAVE_CXX, test "$CXX" != "")
+AC_LANG_RESTORE
+
 if test "$os_win32" = "yes"; then
   if test x$enable_static = xyes -o x$enable_static = x; then
     AC_MSG_WARN([Disabling static library build, must build as DLL on Windows.])
diff --git a/tests/Makefile.am b/tests/Makefile.am
index eed4026..a9216be 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -26,6 +26,10 @@ endif
 
 TESTS = floatingtest buildertest
 
+if HAVE_CXX
+TESTS += testkeywords
+endif
+
 noinst_PROGRAMS =			\
 	autotestfilechooser		\
 	floatingtest			\
@@ -89,6 +93,8 @@ noinst_PROGRAMS =			\
 	testtooltips			\
 	testvolumebutton
 
+testkeywords_SOURCES = testkeywords.cxx
+
 autotestfilechooser_DEPENDENCIES = $(TEST_DEPS)
 simple_DEPENDENCIES = $(TEST_DEPS)
 floatingtest_DEPENDENCIES = $(TEST_DEPS)
diff --git a/tests/testkeywords.cxx b/tests/testkeywords.cxx
new file mode 100644
index 0000000..c6bac9d
--- /dev/null
+++ b/tests/testkeywords.cxx
@@ -0,0 +1,2 @@
+#include <gtk/gtk.h>
+int main() { return 0; }
