Commits

Ondřej Surý committed b4b3e60

Define BGDWIN32 on MinGW when using autotools

  • Participants
  • Parent commits 302d124

Comments (0)

Files changed (2)

File configure.ac

 
 AX_PTHREAD()
 
+MINGW_AC_WIN32_NATIVE_HOST()
+
+if test "$ac_cv_mingw_cv_win32_host" = yes; then
+AC_DEFINE([BGDWIN32], [], [Define is you are building for Win32 API])
+fi
+
 dnl report configuration
 AC_MSG_RESULT([
 ** Configuration summary for $PACKAGE $VERSION:
+# MINGW_AC_WIN32_NATIVE_HOST
+# --------------------------
+# Check if the runtime platform is a native Win32 host.
+#
+AC_DEFUN([MINGW_AC_WIN32_NATIVE_HOST],
+[AC_CACHE_CHECK([whether we are building for a Win32 host], [mingw_cv_win32_host],
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+#ifdef _WIN32
+ choke me
+#endif]])], [mingw_cv_win32_host=no], [mingw_cv_win32_host=yes]))dnl
+])# MINGW_AC_WIN32_NATIVE_HOST