diff configure.ac @ 23014:7a9313d27cea

define macros for size of idx_type and f77_int_type * configure.ac (OCTAVE_SIZEOF_F77_INT_TYPE, OCTAVE_SIZEOF_IDX_TYPE): New macros. * mk-octave-config-h.sh: Copy them to octave-config.h.
author John W. Eaton <jwe@octave.org>
date Sat, 07 Jan 2017 13:14:50 -0500
parents 62eb83755336
children a2fc803e9556
line wrap: on
line diff
--- a/configure.ac	Thu Jan 05 09:55:28 2017 +0100
+++ b/configure.ac	Sat Jan 07 13:14:50 2017 -0500
@@ -364,10 +364,16 @@
 
 AC_SUBST(ENABLE_64)
 if test $ENABLE_64 = yes; then
+  octave_sizeof_octave_idx_type=8
   AC_DEFINE(OCTAVE_ENABLE_64, 1,
     [Define to 1 to use 64-bit integers for array dimensions and indexing.])
+else
+  octave_sizeof_octave_idx_type=4
 fi
 
+AC_DEFINE_UNQUOTED(OCTAVE_SIZEOF_IDX_TYPE, [$octave_sizeof_octave_idx_type],
+  [Define to the size of the octave_idx_type (8 or 4).])
+
 AC_SUBST(OCTAVE_IDX_TYPE)
 AC_DEFINE_UNQUOTED(OCTAVE_IDX_TYPE, [$OCTAVE_IDX_TYPE],
   [Define to the type of octave_idx_type (64 or 32 bit signed integer).])
@@ -1089,6 +1095,9 @@
 AC_SUBST(OCTAVE_F77_INT_TYPE)
 AC_DEFINE_UNQUOTED(OCTAVE_F77_INT_TYPE, [$OCTAVE_F77_INT_TYPE],
   [Define to the type of octave_f77_int_type (64 or 32 bit signed integer).])
+AC_DEFINE_UNQUOTED(OCTAVE_SIZEOF_F77_INT_TYPE,
+  [$octave_cv_sizeof_fortran_integer],
+  [Define to the size of the octave_f77_int_type (8 or 4).])
 
 OCTAVE_F77_FLAG([-ffloat-store], [
   AC_MSG_RESULT([setting F77_FLOAT_STORE_FLAG to -ffloat-store])