-#if defined(__WXMSW__)
- #include "wx/msw/stdpaths.h"
-// We want CoreFoundation paths on both CarbonLib and Darwin (for all ports)
-#elif defined(__WXMAC__) || defined(__DARWIN__)
- #include "wx/mac/corefoundation/stdpaths.h"
-#elif defined(__OS2__)
- #include "wx/os2/stdpaths.h"
-#elif defined(__UNIX__)
- #include "wx/unix/stdpaths.h"
-#elif defined(__PALMOS__)
- #include "wx/palmos/stdpaths.h"
-#else
+#if wxUSE_STDPATHS
+ #if defined(__WXMSW__)
+ #include "wx/msw/stdpaths.h"
+ #define wxHAS_NATIVE_STDPATHS
+ // We want CoreFoundation paths on both CarbonLib and Darwin (for all ports)
+ #elif defined(__WXMAC__) || defined(__DARWIN__)
+ #include "wx/mac/corefoundation/stdpaths.h"
+ #define wxHAS_NATIVE_STDPATHS
+ #elif defined(__OS2__)
+ #include "wx/os2/stdpaths.h"
+ #define wxHAS_NATIVE_STDPATHS
+ #elif defined(__UNIX__)
+ #include "wx/unix/stdpaths.h"
+ #define wxHAS_NATIVE_STDPATHS
+ #elif defined(__PALMOS__)
+ #include "wx/palmos/stdpaths.h"
+ #define wxHAS_NATIVE_STDPATHS
+ #endif
+#endif