--- a/tests/gimarshallingtests.c
+++ b/tests/gimarshallingtests.c
@@ -2,7 +2,10 @@
  *vim: tabstop=4 shiftwidth=4 expandtab
  */
 
+/* This file gets installed, so we can't assume config.h is available */
+#ifdef HAVE_CONFIG_H
 #include "config.h"
+#endif
 
 #include "gimarshallingtests.h"
 
