-#if defined(__WXMSW__)
-#include "wx/msw/fontdlg.h"
-#elif defined(__WXMOTIF__)
-#include "wx/generic/fontdlgg.h"
+#if wxUSE_FONTDLG
+
+#if defined(__WXUNIVERSAL__) || defined(__WXMOTIF__) || defined(__WXMAC__)
+# include "wx/generic/fontdlgg.h"
+# define wxFontDialog wxGenericFontDialog
+# define sm_classwxFontDialog sm_classwxGenericFontDialog
+#elif defined(__WXMSW__)
+# include "wx/msw/fontdlg.h"