-AS_IF([test "x$enable_shared" = "xyes"],
- [AC_DEFINE([HAVE_SHARED_ENABLED],[1],[Enable code which requires shared library support. Like backtrace().])])
+AC_DEFUN([__ENABLE_SHARED],
+ [AC_REQUIRE([AX_PLATFORM])
+ AS_IF([test "x${TARGET_WINDOWS}" = "xtrue"],[enable_shared=no])
+ AS_IF([test "x$enable_shared" = "xyes"],
+ [AC_DEFINE([HAVE_SHARED_ENABLED],[1],[Enable code which requires shared library support. Like backtrace().])])])