changeset 6090:ee50f74d1dd7

[project @ 2006-10-25 21:08:53 by jwe]
author jwe
date Wed, 25 Oct 2006 21:10:56 +0000
parents 9f9313969599
children 96a11041f52b
files ChangeLog configure.in octMakefile.in
diffstat 3 files changed, 24 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed Oct 25 21:00:07 2006 +0000
+++ b/ChangeLog	Wed Oct 25 21:10:56 2006 +0000
@@ -20,6 +20,11 @@
 	Add "-MD" to CFLAGS.  Add "-MD" to CONFLIB_ARG when checking for
 	libf2c.
 
+	* configure.in (*-*-msdosmsvc): Generate replacement unistd.h.
+	* octMakefile.in (maintainer-clean, distclean): Also remove unistd.h.
+
+	* configure.in (*-*-msdosmsvc): Default sepchar is ';'.
+
 2006-10-25  John W. Eaton  <jwe@octave.org>
 
 	* mkoctfile.in (OCTAVE_VERSION): No need to quote replacement here.
--- a/configure.in	Wed Oct 25 21:00:07 2006 +0000
+++ b/configure.in	Wed Oct 25 21:10:56 2006 +0000
@@ -29,7 +29,7 @@
 EXTERN_CXXFLAGS="$CXXFLAGS"
 
 AC_INIT
-AC_REVISION($Revision: 1.530 $)
+AC_REVISION($Revision: 1.532 $)
 AC_PREREQ(2.57)
 AC_CONFIG_SRCDIR([src/octave.cc])
 AC_CONFIG_HEADER(config.h)
@@ -38,6 +38,22 @@
 
 AC_DEFINE(OCTAVE_SOURCE, 1, [Define if this is Octave.])
   
+dnl FIXME -- we should probably only generate this file if it is missing.
+### Produce unistd.h for MSVC target, this simplifies changes in
+### Octave source tree and avoid problems with lex-generated code.
+case "$canonical_host_type" in
+  *-*-msdosmsvc)
+    AC_MSG_NOTICE([Generating replacement for <unistd.h> for MSVC])
+    cat << \EOF > unistd.h
+/* File generated by configure script. */
+#include <direct.h>
+#include <io.h>
+#include <process.h>
+EOF
+    CPPFLAGS="-I. $CPPFLAGS"
+    ;;
+esac
+
 AC_GNU_SOURCE
 
 AC_AIX
@@ -52,7 +68,7 @@
 case $with_sepchar in
   yes | "")
     case "$canonical_host_type" in
-      *-*-mingw*)
+      *-*-mingw* | *-*-msdosmsvc)
 	sepchar=';'
         ;;
       esac
--- a/octMakefile.in	Wed Oct 25 21:00:07 2006 +0000
+++ b/octMakefile.in	Wed Oct 25 21:10:56 2006 +0000
@@ -146,6 +146,7 @@
 	rm -f config.cache config.h config.log config.status
 	rm -rf autom4te.cache
 	rm -f $(SHELL_SCRIPTS) .gdbinit
+	rm -f unistd.h
 
 maintainer-clean::
 	rm -f configure config.h.in BUGS INSTALL.OCTAVE