WX_ARG_ENABLE(no_deps, [ --enable-no_deps create code without dependency information], wxUSE_NO_DEPS)
WX_ARG_ENABLE(compat20, [ --enable-compat20 enable wxWindows 2.0 compatibility], WXWIN_COMPATIBILITY_2)
-WX_ARG_ENABLE(compat22, [ --disable-compat22 disable wxWindows 2.2 compatibility], WXWIN_COMPATIBILITY_2_2)
+WX_ARG_ENABLE(compat22, [ --disable-compat22 disable wxWindows 2.2 compatibility], WXWIN_COMPATIBILITY_2_2, disable)
AC_ARG_ENABLE(rpath, [ --enable-rpath=DIR output the rpath flag from wx-config], [wxRPATH_DIR="$enableval"])
if test "$wxUSE_UNICODE" = yes; then
dnl also look if we have wide char IO functions
AC_CHECK_FUNCS(fputwc wprintf vswprintf)
+ dnl MinGW has a vswprintf with a different prototype, and
+ dnl a _vsnwprintf with the correct prototype, but AC_CHECK_FUNCS
+ dnl finds it even if it is not declared in some versions...
+ AC_MSG_CHECKING([for _vsnwprintf])
+ AC_TRY_COMPILE([#include <wchar.h>],
+ [&_vsnwprintf;],
+ [AC_MSG_RESULT([yes])
+ AC_DEFINE(HAVE__VSNWPRINTF)],
+ [AC_MSG_RESULT([no])]);
fi
AC_LANG_RESTORE