diff configure.in @ 6103:a2fdc87184cf

[project @ 2006-10-26 21:32:17 by jwe]
author jwe
date Thu, 26 Oct 2006 21:32:17 +0000
parents ef9569e10d8b
children 8e5edd73e504
line wrap: on
line diff
--- a/configure.in	Thu Oct 26 20:50:04 2006 +0000
+++ b/configure.in	Thu Oct 26 21:32:17 2006 +0000
@@ -29,7 +29,7 @@
 EXTERN_CXXFLAGS="$CXXFLAGS"
 
 AC_INIT
-AC_REVISION($Revision: 1.537 $)
+AC_REVISION($Revision: 1.538 $)
 AC_PREREQ(2.57)
 AC_CONFIG_SRCDIR([src/octave.cc])
 AC_CONFIG_HEADER(config.h)
@@ -1363,6 +1363,26 @@
 
 OCTAVE_SMART_PUTENV
 
+case "$canonical_host_type" in
+  *-*-msdosmsvc)
+    AC_MSG_CHECKING([for required _WIN32_WINNT])
+    AC_COMPILE_IFELSE(AC_LANG_PROGRAM([[
+#include <windows.h>
+#if _WIN32_WINNT < 0x0403
+#error "Wrong version"
+#endif]], []),
+      AC_MSG_RESULT([none]), [
+	AC_DEFINE(_WIN32_WINNT, 0x0403, [Define to 0x0403 to access InitializeCriticalSectionAndSpinCount])
+	AC_MSG_RESULT([0x0403])])
+    AC_MSG_CHECKING([whether _USE_MATH_DEFINES needs to be defined])
+    AC_COMPILE_IFELSE(AC_LANG_PROGRAM([[#include <math.h>]],
+[[int x = M_LN2;]]),
+      AC_MSG_RESULT([no]), [
+	AC_DEFINE(_USE_MATH_DEFINES, 1, [Define if your system needs it to define math constants like M_LN2])
+	AC_MSG_RESULT([yes])])
+  ;;
+esac
+
 ### Dynamic linking is now enabled only if we are building shared
 ### libs and some API for dynamic linking is detected.