Mercurial > hg > octave-nkf
comparison m4/acinclude.m4 @ 13957:c510048901cc
set cross compile defaults for AC_RUN_IFELSE
* acinclude.m4 (OCTAVE_CHECK_FORTRAN_INTEGER_SIZE): If cross
compiling, assume integer size is OK.
(OCTAVE_IEEE754_DATA_FORMAT): If cross compiling, assume we have
IEEE 754 data format.
(OCTAVE_UMFPACK_SEPERATE_SPLIT): If cross compiling, assume we have
modern UMFPACK.
(OCTAVE_CHECK_QHULL_OK): If cross compiling, assume Qhull library
works.
(OCTAVE_FAST_INT_OPS): If cross compiling, assume fast int ops are
possible. Use AC_CACHE_CHECK.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 29 Nov 2011 03:35:40 -0500 |
parents | 47f803279384 |
children | f913363318e0 |
comparison
equal
deleted
inserted
replaced
13956:5fe75fb673ff | 13957:c510048901cc |
---|---|
368 in[0] = 42; | 368 in[0] = 42; |
369 F77_FUNC(foo,FOO) (&n, &in, &out); | 369 F77_FUNC(foo,FOO) (&n, &in, &out); |
370 assert (in[0] == out[0] && in[1] == out[1]); | 370 assert (in[0] == out[0] && in[1] == out[1]); |
371 ]])], | 371 ]])], |
372 [octave_cv_fortran_integer_size=yes], | 372 [octave_cv_fortran_integer_size=yes], |
373 [octave_cv_fortran_integer_size=no]) | 373 [octave_cv_fortran_integer_size=no], |
374 [octave_cv_fortran_integer_size=yes]) | |
374 AC_LANG_POP(C)dnl | 375 AC_LANG_POP(C)dnl |
375 LIBS="$octave_fintsize_save_LIBS" | 376 LIBS="$octave_fintsize_save_LIBS" |
376 rm -f conftest.$ac_objext fintsize.$ac_objext | 377 rm -f conftest.$ac_objext fintsize.$ac_objext |
377 ], [ | 378 ], [ |
378 rm -f conftest.$ac_objext | 379 rm -f conftest.$ac_objext |
816 | 817 |
817 return l.d != 1234567891234567.0 && b.d != 1234567891234567.0; | 818 return l.d != 1234567891234567.0 && b.d != 1234567891234567.0; |
818 }]])], | 819 }]])], |
819 octave_cv_ieee754_data_format=yes, | 820 octave_cv_ieee754_data_format=yes, |
820 octave_cv_ieee754_data_format=no, | 821 octave_cv_ieee754_data_format=no, |
821 octave_cv_ieee754_data_format=no)]) | 822 octave_cv_ieee754_data_format=yes)]) |
822 if test "$cross_compiling" = yes; then | 823 if test "$cross_compiling" = yes; then |
823 AC_MSG_RESULT([$octave_cv_ieee754_data_format assumed for cross compilation]) | 824 AC_MSG_RESULT([$octave_cv_ieee754_data_format assumed for cross compilation]) |
824 else | 825 else |
825 AC_MSG_RESULT([$octave_cv_ieee754_data_format]) | 826 AC_MSG_RESULT([$octave_cv_ieee754_data_format]) |
826 fi | 827 fi |
879 return (0) ; | 880 return (0) ; |
880 } | 881 } |
881 ]])], | 882 ]])], |
882 octave_cv_umfpack_seperate_split=yes, | 883 octave_cv_umfpack_seperate_split=yes, |
883 octave_cv_umfpack_seperate_split=no, | 884 octave_cv_umfpack_seperate_split=no, |
884 octave_cv_umfpack_seperate_split=no)]) | 885 octave_cv_umfpack_seperate_split=yes)]) |
885 if test "$cross_compiling" = yes; then | 886 if test "$cross_compiling" = yes; then |
886 AC_MSG_RESULT([$octave_cv_umfpack_seperate_split assumed for cross compilation]) | 887 AC_MSG_RESULT([$octave_cv_umfpack_seperate_split assumed for cross compilation]) |
887 else | 888 else |
888 AC_MSG_RESULT([$octave_cv_umfpack_seperate_split]) | 889 AC_MSG_RESULT([$octave_cv_umfpack_seperate_split]) |
889 fi | 890 fi |
960 int dim = 2; | 961 int dim = 2; |
961 int n = 4; | 962 int n = 4; |
962 coordT points[8] = { -0.5, -0.5, -0.5, 0.5, 0.5, -0.5, 0.5, 0.5 }; | 963 coordT points[8] = { -0.5, -0.5, -0.5, 0.5, 0.5, -0.5, 0.5, 0.5 }; |
963 boolT ismalloc = 0; | 964 boolT ismalloc = 0; |
964 return qh_new_qhull (dim, n, points, ismalloc, "qhull ", 0, stderr); | 965 return qh_new_qhull (dim, n, points, ismalloc, "qhull ", 0, stderr); |
965 ]])], [octave_cv_lib_qhull_ok=yes], [octave_cv_lib_qhull_ok=no])]) | 966 ]])], |
967 [octave_cv_lib_qhull_ok=yes], | |
968 [octave_cv_lib_qhull_ok=no], | |
969 [octave_cv_lib_qhull_ok=yes])]) | |
966 if test "$octave_cv_lib_qhull_ok" = "yes"; then | 970 if test "$octave_cv_lib_qhull_ok" = "yes"; then |
967 $1 | 971 $1 |
968 else | 972 else |
969 $2 | 973 $2 |
970 fi | 974 fi |
1335 dnl (We use casts to prevent optimization interference, so there is no | 1339 dnl (We use casts to prevent optimization interference, so there is no |
1336 dnl need for things like -ftrapv). | 1340 dnl need for things like -ftrapv). |
1337 dnl 4. Bit operations on signed integers work like on unsigned integers, | 1341 dnl 4. Bit operations on signed integers work like on unsigned integers, |
1338 dnl except for the shifts. Shifts are arithmetic. | 1342 dnl except for the shifts. Shifts are arithmetic. |
1339 dnl | 1343 dnl |
1340 AC_DEFUN([OCTAVE_FAST_INT_OPS],[ | 1344 AC_DEFUN([OCTAVE_FAST_INT_OPS], |
1341 AC_MSG_CHECKING([whether fast integer arithmetics is usable]) | 1345 [AC_CACHE_CHECK([whether fast integer arithmetics is usable], |
1342 AC_LANG_PUSH(C++) | 1346 octave_cv_fast_int_ops, |
1347 [AC_LANG_PUSH(C++) | |
1343 AC_RUN_IFELSE([AC_LANG_PROGRAM([[ | 1348 AC_RUN_IFELSE([AC_LANG_PROGRAM([[ |
1344 #include <limits> | 1349 #include <limits> |
1345 template<class UT, class ST> | 1350 template<class UT, class ST> |
1346 static bool | 1351 static bool |
1347 do_test (UT, ST) | 1352 do_test (UT, ST) |
1381 DO_TEST(long) | 1386 DO_TEST(long) |
1382 #if (defined(HAVE_LONG_LONG_INT) && defined(HAVE_UNSIGNED_LONG_LONG_INT)) | 1387 #if (defined(HAVE_LONG_LONG_INT) && defined(HAVE_UNSIGNED_LONG_LONG_INT)) |
1383 DO_TEST(long long) | 1388 DO_TEST(long long) |
1384 #endif | 1389 #endif |
1385 ]])], | 1390 ]])], |
1386 [AC_MSG_RESULT([yes]) | 1391 [octave_cv_fast_int_ops=yes], |
1387 AC_DEFINE(HAVE_FAST_INT_OPS,1,[Define if signed integers use two's complement])], | 1392 [octave_cv_fast_int_ops=no], |
1388 [AC_MSG_RESULT([no])]) | 1393 [octave_cv_fast_int_ops=yes]) |
1389 AC_LANG_POP(C++)]) | 1394 AC_LANG_POP(C++)]) |
1395 if test $octave_cv_fast_int_ops = yes; then | |
1396 AC_DEFINE(HAVE_FAST_INT_OPS, 1, | |
1397 [Define if signed integers use two's complement]) | |
1398 fi | |
1399 ]) | |
1390 dnl | 1400 dnl |
1391 dnl Check to see if the compiler and the linker can handle the flags | 1401 dnl Check to see if the compiler and the linker can handle the flags |
1392 dnl "-framework $1" for the given prologue $2 and the given body $3 of | 1402 dnl "-framework $1" for the given prologue $2 and the given body $3 of |
1393 dnl a source file. Arguments 2 and 3 optionally can also be empty. | 1403 dnl a source file. Arguments 2 and 3 optionally can also be empty. |
1394 dnl Add options (lower case letters $1) "--with-framework-$1" and | 1404 dnl Add options (lower case letters $1) "--with-framework-$1" and |