diff configure.in @ 5275:23b37da9fd5b

[project @ 2005-04-08 16:07:35 by jwe]
author jwe
date Fri, 08 Apr 2005 16:07:37 +0000
parents a313e928afb1
children b86a6fcc1721
line wrap: on
line diff
--- a/configure.in	Thu Apr 07 21:51:37 2005 +0000
+++ b/configure.in	Fri Apr 08 16:07:37 2005 +0000
@@ -29,7 +29,7 @@
 EXTERN_CXXFLAGS="$CXXFLAGS"
 
 AC_INIT
-AC_REVISION($Revision: 1.470 $)
+AC_REVISION($Revision: 1.471 $)
 AC_PREREQ(2.57)
 AC_CONFIG_SRCDIR([src/octave.cc])
 AC_CONFIG_HEADER(config.h)
@@ -144,6 +144,38 @@
   AC_DEFINE(BOUNDS_CHECKING, 1, [Define to use internal bounds checking.])
 fi
 
+### If possible, use a 64-bit integer type for array dimensions and indexing.
+
+USE_64_BIT_IDX_T=false
+OCTAVE_IDX_TYPE=int
+AC_ARG_ENABLE(64,
+  [  --enable-64             use 64-bit integer for array dimensions and indexing],
+  [if test "$enableval" = yes; then USE_64_BIT_IDX_T=true; fi], [])
+if $USE_64_BIT_IDX_T; then
+  AC_CHECK_SIZEOF(void *)
+  AC_CHECK_SIZEOF(int)
+  AC_CHECK_SIZEOF(long)
+  if test $ac_cv_sizeof_void_p -eq 8; then
+    if test $ac_cv_sizeof_int -eq 8; then
+      OCTAVE_IDX_TYPE=int
+    elif test $ac_cv_sizeof_long -eq 8; then
+      OCTAVE_IDX_TYPE=long
+    else
+      AC_MSG_WARN([no suitable type found for octave_idx_type so disabling 64-bit features])    
+      USE_64_BIT_IDX_T=false
+    fi
+  else
+    warn_64_bit="pointers are not 64-bits wide so disabling 64-bit features"
+    AC_MSG_WARN($warn_64_bit)
+    USE_64_BIT_IDX_T=false
+  fi
+fi
+AC_SUBST(OCTAVE_IDX_TYPE)
+if $USE_64_BIT_IDX_T; then
+  AC_DEFINE(USE_64_BIT_IDX_T, 1, [Define if using 64-bit integers for array dimensions and indexing])
+fi
+AC_SUBST(USE_64_BIT_IDX_T)
+
 ### It seems that there are some broken inline assembly functions in
 ### the GNU libc.  Since I'm not sure how to test whether we are using
 ### GNU libc, just disable them for all platforms.
@@ -670,7 +702,7 @@
 AC_SUBST(UMFPACK_LIBS)
 
 AC_ARG_WITH(umfpack,
-  [  --without-umfpack          don't use UMFPACK, disable some sparse functionality],
+  [  --without-umfpack       don't use UMFPACK, disable some sparse functionality],
   with_umfpack=$withval, with_umfpack=yes)
 
 if test "$with_umfpack" = "yes"; then
@@ -1538,6 +1570,8 @@
 #if 0
 #define F77_USES_VISUAL_FORTRAN_CALLING_CONVENTION
 #endif
+
+#include "oct-types.h"
 ])
 
 ### Do the substitutions in all the Makefiles.
@@ -1546,13 +1580,13 @@
   test/Makefile dlfcn/Makefile \
   doc/Makefile doc/faq/Makefile doc/interpreter/Makefile \
   doc/liboctave/Makefile doc/refcard/Makefile emacs/Makefile \
-  examples/Makefile liboctave/Makefile src/Makefile \
-  libcruft/Makefile libcruft/Makerules libcruft/amos/Makefile \
-  libcruft/blas/Makefile libcruft/daspk/Makefile \
-  libcruft/dasrt/Makefile libcruft/dassl/Makefile \
-  libcruft/fftpack/Makefile libcruft/lapack/Makefile \
-  libcruft/minpack/Makefile libcruft/misc/Makefile \
-  libcruft/odepack/Makefile \
+  examples/Makefile liboctave/Makefile liboctave/oct-types.h \
+  src/Makefile libcruft/Makefile libcruft/Makerules \
+  libcruft/amos/Makefile libcruft/blas/Makefile \
+  libcruft/daspk/Makefile libcruft/dasrt/Makefile 
+  libcruft/dassl/Makefile libcruft/fftpack/Makefile \
+  libcruft/lapack/Makefile libcruft/minpack/Makefile \
+  libcruft/misc/Makefile libcruft/odepack/Makefile \
   libcruft/ordered-qz/Makefile libcruft/quadpack/Makefile \
   libcruft/ranlib/Makefile libcruft/slatec-fn/Makefile \
   libcruft/slatec-err/Makefile libcruft/villad/Makefile \
@@ -1594,6 +1628,7 @@
   Build shared libraries:             $SHARED_LIBS
   Dynamic Linking:                    $ENABLE_DYNAMIC_LINKING $DL_API_MSG
   Include support for GNU readline:   $USE_READLINE
+  64-bit array dims and indexing:     $USE_64_BIT_IDX_T
 ])
 
 warn_msg_printed=false
@@ -1683,6 +1718,11 @@
   warn_msg_printed=true
 fi
 
+if test -n "$warn_64_bit"; then
+  AC_MSG_WARN($warn_64_bit)
+  warn_msg_printed=true
+fi
+
 if test -n "$warn_gnuplot"; then
 
   ## If you change this text, be sure to also change the corresponding