comparison m4/acinclude.m4 @ 22986:21707d6a02c7

make --enable-64 the default * m4/octave_blas_f77_func.m4: Rename from ax_blas_f77_func.m4. Determine integer size used by BLAS library instead of checking to see whether it matches the default Fortran integer size. * m4/module.mk: Update. * acinclude.m4 (OCTAVE_CHECK_SIZEOF_FORTRAN_INTEGER): Determine size of Fortran INTEGER instead of checking to see whether it matches what we expect. * configure.ac: Make --enable-64 the default, but change it to mean setting the size of Octave's index type. Check for the size of the BLAS library integer type and ensure the Fortran compiler uses the same size for integers. * NEWS: Note change in --enable-64 default. * doc/interpreter/install.txi: Update.
author John W. Eaton <jwe@octave.org>
date Fri, 30 Dec 2016 13:45:10 -0500
parents 31bd8a50d44c
children 06c248729e6f
comparison
equal deleted inserted replaced
22985:a8e83b0144fe 22986:21707d6a02c7
1643 AM_CONDITIONAL([AMCOND_HAVE_QSCINTILLA], [test $use_qscintilla = yes]) 1643 AM_CONDITIONAL([AMCOND_HAVE_QSCINTILLA], [test $use_qscintilla = yes])
1644 AM_CONDITIONAL([WIN32_TERMINAL], [test $win32_terminal = yes]) 1644 AM_CONDITIONAL([WIN32_TERMINAL], [test $win32_terminal = yes])
1645 ]) 1645 ])
1646 dnl 1646 dnl
1647 dnl Check if the default Fortran INTEGER is 64 bits wide. 1647 dnl Check if the default Fortran INTEGER is 64 bits wide.
1648 dnl If cross-compiling, assume 4 bytes unless the cache value
1649 dnl is already set.
1648 dnl 1650 dnl
1649 AC_DEFUN([OCTAVE_CHECK_SIZEOF_FORTRAN_INTEGER], [ 1651 AC_DEFUN([OCTAVE_CHECK_SIZEOF_FORTRAN_INTEGER], [
1650 AC_CACHE_CHECK([whether $F77 generates correct size integers], 1652 AC_CACHE_CHECK([default size of Fortran INTEGER],
1651 [octave_cv_sizeof_fortran_integer], 1653 [octave_cv_sizeof_fortran_integer],
1652 [ac_octave_save_FFLAGS="$FFLAGS" 1654 [ac_octave_save_FFLAGS="$FFLAGS"
1653 FFLAGS="$FFLAGS $F77_INTEGER_8_FLAG" 1655 FFLAGS="$FFLAGS $F77_INTEGER_8_FLAG"
1654 AC_LANG_PUSH(Fortran 77) 1656 AC_LANG_PUSH(Fortran 77)
1655 AC_COMPILE_IFELSE([[ 1657 AC_RUN_IFELSE([AC_LANG_PROGRAM(,[[
1656 subroutine foo(n, in, out) 1658 integer*8 n8
1657 integer n, in(n), out(n) 1659 integer n
1658 integer i 1660 c Generate -2**33 + 1.
1659 do 10 i = 1, n 1661 n8 = 2
1660 out(i) = in(i) 1662 n8 = -4 * (n8 ** 30)
1661 10 continue 1663 n8 = n8 + 1
1662 return 1664 c Convert to default integer type. If the values are no longer equal,
1663 end 1665 c assume the default integer size is 32-bits.
1664 ]], 1666 n = n8
1665 [mv conftest.$ac_objext fintsize.$ac_objext 1667 if (n .ne. n8) stop 1
1666 ac_octave_save_LIBS="$LIBS" 1668 ]])],
1667 LIBS="fintsize.$ac_objext $[]_AC_LANG_PREFIX[]LIBS" 1669 octave_cv_sizeof_fortran_integer=8,
1668 AC_LANG_PUSH(C) 1670 octave_cv_sizeof_fortran_integer=4,
1669 AC_RUN_IFELSE([AC_LANG_PROGRAM([[ 1671 octave_cv_sizeof_fortran_integer=4)
1670 #include <assert.h> 1672 ])
1671 #include <stdint.h> 1673 AC_LANG_POP(Fortran 77)
1672 #if defined (OCTAVE_ENABLE_64) 1674 FFLAGS="$ac_octave_save_FFLAGS"
1673 typedef int64_t octave_idx_type;
1674 #else
1675 typedef int octave_idx_type;
1676 #endif
1677 void F77_FUNC(foo,FOO) (octave_idx_type*, octave_idx_type**, octave_idx_type**);
1678 ]], [[
1679 octave_idx_type n = 2;
1680 octave_idx_type in[2];
1681 octave_idx_type out[2];
1682 in[0] = 13;
1683 in[0] = 42;
1684 F77_FUNC(foo,FOO) (&n, &in, &out);
1685 assert (in[0] == out[0] && in[1] == out[1]);
1686 ]])],
1687 octave_cv_sizeof_fortran_integer=yes,
1688 octave_cv_sizeof_fortran_integer=no,
1689 octave_cv_sizeof_fortran_integer=yes)
1690 AC_LANG_POP(C)
1691 LIBS="$ac_octave_save_LIBS"
1692 rm -f conftest.$ac_objext fintsize.$ac_objext],
1693 [rm -f conftest.$ac_objext
1694 AC_MSG_FAILURE([cannot compile a simple Fortran program])
1695 octave_cv_sizeof_fortran_integer=no])
1696 AC_LANG_POP(Fortran 77)
1697 FFLAGS="$ac_octave_save_FFLAGS"
1698 ])
1699 ]) 1675 ])
1700 dnl 1676 dnl
1701 dnl Check whether sundials_ida library is configured with double precision realtype 1677 dnl Check whether sundials_ida library is configured with double precision realtype
1702 dnl 1678 dnl
1703 AC_DEFUN([OCTAVE_CHECK_SIZEOF_SUNDIALS_IDA_REALTYPE], [ 1679 AC_DEFUN([OCTAVE_CHECK_SIZEOF_SUNDIALS_IDA_REALTYPE], [