-#elif defined(__MOTIF__)
-#include "wx/xt/filedlg.h"
-#elif defined(__GTK__)
-#include "wx/gtk/filedlg.h"
+#elif defined(__WXMOTIF__)
+#include "wx/motif/filedlg.h"
+#elif defined(__WXGTK__)
+#include "wx/generic/filedlgg.h"
+#elif defined(__WXQT__)
+#include "wx/qt/filedlg.h"
+#elif defined(__WXMAC__)
+#ifdef __WXMAC_X__
+#include "wx/generic/filedlgg.h"
+#else
+#include "wx/mac/filedlg.h"