#if wxUSE_POPUPWIN
-#include "wx/log.h"
-
#include "wx/popupwin.h"
-#include "wx/app.h"
-#include "wx/settings.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/log.h"
+ #include "wx/app.h"
+ #include "wx/settings.h"
+#endif
#include "wx/x11/private.h"
#include "X11/Xatom.h"