changeset 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 a334206512b9
files ChangeLog aclocal.m4 configure.in
diffstat 3 files changed, 29 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Thu Oct 26 20:50:04 2006 +0000
+++ b/ChangeLog	Thu Oct 26 21:32:17 2006 +0000
@@ -1,10 +1,15 @@
 2006-10-26  Michael Goffioul  <michael.goffioul@swing.be>
 
 	* configure.in (*-*-msdosmsvc): Set library_path_var.
+	Check for _WIN32_WINNT >= 0x0403.  Define _USE_MATH_DEFINES if it
+	is needed.
 	(XTRA_CRUFT_LINK_DEPS): New variable.  Substitute it.
-
+	
 2006-10-26  John W. Eaton  <jwe@octave.org>
 
+	* aclocal.m4 (OCTAVE_PROG_PAGER): Also check for more.com for
+	*-*-mingw* and *-*-msdosmsvc systems.
+
 	* configure.in (F77_TOLOWER, F77_APPEND_UNDERSCORE,
 	F77_APPEND_EXTRA_UNDERSCORE): New variables.  Substitute them.
 	* Makeconf.in (F77_TOLOWER, F77_APPEND_UNDERSCORE,
--- a/aclocal.m4	Thu Oct 26 20:50:04 2006 +0000
+++ b/aclocal.m4	Thu Oct 26 21:32:17 2006 +0000
@@ -461,7 +461,7 @@
 else
   octave_possible_pagers="less more page pg"
   case "$canonical_host_type" in
-    *-*-cygwin*)
+    *-*-cygwin* | *-*-mingw32* | *-*-msdosmsvc)
       octave_possible_pagers="$octave_possible_pagers more.com"
     ;;
   esac
@@ -478,7 +478,7 @@
 dnl
 AC_DEFUN(OCTAVE_PROG_GNUPLOT, [
 case "$canonical_host_type" in
-  *-*-cygwin* | *-*-mingw32* | *-*-msdos)
+  *-*-cygwin* | *-*-mingw32* | *-*-msdosmsvc)
     gp_names="pgnuplot pipe-gnuplot gnuplot"
     gp_default=pgnuplot
   ;;
--- 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.