comparison configure.in @ 9596:f26229391ea1

configure.in, aclocal.m4: check fortran integer size
author John W. Eaton <jwe@octave.org>
date Tue, 01 Sep 2009 14:36:16 -0400
parents 8dc1531e2149
children 8bea4e89326f
comparison
equal deleted inserted replaced
9595:dbd0c0f82480 9596:f26229391ea1
410 AC_ARG_VAR(BUILD_CXXFLAGS, [build system C++ compiler flags (used if cross compiling)]) 410 AC_ARG_VAR(BUILD_CXXFLAGS, [build system C++ compiler flags (used if cross compiling)])
411 AC_ARG_VAR(BUILD_LDFLAGS, [build system C++ compiler link flags (used if cross compiling)]) 411 AC_ARG_VAR(BUILD_LDFLAGS, [build system C++ compiler link flags (used if cross compiling)])
412 AC_ARG_VAR(BUILD_EXEEXT, [build system executable extension (used if cross compiling)]) 412 AC_ARG_VAR(BUILD_EXEEXT, [build system executable extension (used if cross compiling)])
413 413
414 dnl This is bogus. We shouldn't have to explicitly add libc too! 414 dnl This is bogus. We shouldn't have to explicitly add libc too!
415 dnl Keep this check before the check for the Fortran compiler,
416 dnl in case -lm is needed to compile Fortran programs.
415 417
416 ### Look for math library. If found, this will add -lm to LIBS. 418 ### Look for math library. If found, this will add -lm to LIBS.
417 419
418 case "$canonical_host_type" in 420 case "$canonical_host_type" in
419 *-*-nextstep*) 421 *-*-nextstep*)
423 ;; 425 ;;
424 *) 426 *)
425 AC_CHECK_LIB(m, sin) 427 AC_CHECK_LIB(m, sin)
426 ;; 428 ;;
427 esac 429 esac
430
431 ## Default FFLAGS is -O.
432 if test "x$FFLAGS" = x; then
433 FFLAGS="-O"
434 fi
435
436 ## the F77 variable, if set, overrides AC_PROG_F77 automatically
437 AC_PROG_F77
438 AC_F77_LIBRARY_LDFLAGS
439 AC_F77_DUMMY_MAIN
440 AC_F77_WRAPPERS
441
442 F77_TOLOWER=true
443 F77_APPEND_UNDERSCORE=true
444 F77_APPEND_EXTRA_UNDERSCORE=true
445
446 case "$ac_cv_f77_mangling" in
447 "upper case") F77_TOLOWER=false ;;
448 esac
449 case "$ac_cv_f77_mangling" in
450 "no underscore") F77_APPEND_UNDERSCORE=false ;;
451 esac
452 case "$ac_cv_f77_mangling" in
453 "no extra underscore") F77_APPEND_EXTRA_UNDERSCORE=false ;;
454 esac
455
456 case "$canonical_host_type" in
457 i[[3456789]]86-*-*)
458 if test "$ac_cv_f77_compiler_gnu" = yes; then
459 OCTAVE_F77_FLAG(-mieee-fp)
460 ### OCTAVE_F77_FLAG(-ffloat-store)
461 fi
462 ;;
463 alpha*-*-*)
464 if test "$ac_cv_f77_compiler_gnu" = yes; then
465 OCTAVE_F77_FLAG(-mieee)
466 else
467 OCTAVE_F77_FLAG(-ieee)
468 OCTAVE_F77_FLAG(-fpe1)
469 fi
470 ;;
471 powerpc-apple-machten*)
472 FFLAGS=
473 ;;
474 esac
475
476 if test -n "$FFLAGS"; then
477 AC_MSG_NOTICE([defining FFLAGS to be $FFLAGS])
478 fi
479
480 AC_SUBST(F77_TOLOWER)
481 AC_SUBST(F77_APPEND_UNDERSCORE)
482 AC_SUBST(F77_APPEND_EXTRA_UNDERSCORE)
483
484 if test -z "$F77"; then
485 AC_MSG_ERROR([in order to build octave, you must have a compatible Fortran compiler or wrapper script for f2c that functions as a Fortran compiler installed and in your path. See the file INSTALL for more information.])
486 fi
487
488 OCTAVE_CHECK_FORTRAN_INTEGER_SIZE
489 if test "x$octave_cv_fortran_integer_size" = xno; then
490 if $USE_64_BIT_IDX_T; then
491 case "$F77" in
492 gfortran)
493 case "$FFLAGS" in
494 *-fdefault-integer-8*)
495 ;;
496 *)
497 AC_MSG_NOTICE([adding -fdefault-integer-8 to FFLAGS])
498 FFLAGS="-fdefault-integer-8 $FFLAGS"
499 ## Invalidate the cache and try again.
500 $as_unset octave_cv_fortran_integer_size
501 ;;
502 esac
503 ;;
504 esac
505 if test -z "$octave_cv_fortran_integer_size"; then
506 OCTAVE_CHECK_FORTRAN_INTEGER_SIZE
507 fi
508 if test "x$octave_cv_fortran_integer_size" = xno; then
509 AC_MSG_ERROR([in order to build octave with 64-bit indexing support your Fortran compiler must have a default integer size of 8 bytes. See the file INSTALL for more information.])
510 fi
511 else
512 AC_MSG_ERROR([your Fortran compiler must have default integers that are the same size as octave_idx_type ($OCTAVE_IDX_TYPE). See the file INSTALL for more information.])
513 fi
514 fi
515
516 FC=$F77
517 AC_SUBST(FC)
518
519 OCTAVE_F77_FLAG(-ffloat-store, [
520 AC_MSG_RESULT([setting F77_FLOAT_STORE_FLAG to -ffloat-store])
521 F77_FLOAT_STORE_FLAG=-ffloat-store
522 AC_SUBST(F77_FLOAT_STORE_FLAG)
523 ])
524
525 OCTAVE_IEEE754_DATA_FORMAT
428 526
429 ### Check for the QHull library 527 ### Check for the QHull library
430 528
431 OCTAVE_CHECK_LIBRARY(qhull, QHull, 529 OCTAVE_CHECK_LIBRARY(qhull, QHull,
432 [Qhull library not found -- this will result in loss of functionality of some geometry functions.], 530 [Qhull library not found -- this will result in loss of functionality of some geometry functions.],
751 fi 849 fi
752 850
753 AC_SUBST(GRAPHICS_CFLAGS) 851 AC_SUBST(GRAPHICS_CFLAGS)
754 AC_SUBST(GRAPHICS_LIBS) 852 AC_SUBST(GRAPHICS_LIBS)
755 853
756 OCTAVE_IEEE754_DATA_FORMAT
757
758 # ---------------------------------------------------------------------- 854 # ----------------------------------------------------------------------
759 855
760 OCTAVE_PROG_AR 856 OCTAVE_PROG_AR
761 857
762 AC_PROG_RANLIB 858 AC_PROG_RANLIB
763
764 ## Default FFLAGS is -O.
765 if test "x$FFLAGS" = x; then
766 FFLAGS="-O"
767 fi
768
769 ## the F77 variable, if set, overrides AC_PROG_F77 automatically
770 AC_PROG_F77
771 AC_F77_LIBRARY_LDFLAGS
772 AC_F77_DUMMY_MAIN
773 AC_F77_WRAPPERS
774
775 F77_TOLOWER=true
776 F77_APPEND_UNDERSCORE=true
777 F77_APPEND_EXTRA_UNDERSCORE=true
778
779 case "$ac_cv_f77_mangling" in
780 "upper case") F77_TOLOWER=false ;;
781 esac
782 case "$ac_cv_f77_mangling" in
783 "no underscore") F77_APPEND_UNDERSCORE=false ;;
784 esac
785 case "$ac_cv_f77_mangling" in
786 "no extra underscore") F77_APPEND_EXTRA_UNDERSCORE=false ;;
787 esac
788
789 case "$canonical_host_type" in
790 i[[3456789]]86-*-*)
791 if test "$ac_cv_f77_compiler_gnu" = yes; then
792 OCTAVE_F77_FLAG(-mieee-fp)
793 ### OCTAVE_F77_FLAG(-ffloat-store)
794 fi
795 ;;
796 alpha*-*-*)
797 if test "$ac_cv_f77_compiler_gnu" = yes; then
798 OCTAVE_F77_FLAG(-mieee)
799 else
800 OCTAVE_F77_FLAG(-ieee)
801 OCTAVE_F77_FLAG(-fpe1)
802 fi
803 ;;
804 powerpc-apple-machten*)
805 FFLAGS=
806 ;;
807 esac
808
809 if test -n "$FFLAGS"; then
810 AC_MSG_NOTICE([defining FFLAGS to be $FFLAGS])
811 fi
812
813 AC_SUBST(F77_TOLOWER)
814 AC_SUBST(F77_APPEND_UNDERSCORE)
815 AC_SUBST(F77_APPEND_EXTRA_UNDERSCORE)
816
817 if test -z "$F77"; then
818 AC_MSG_WARN([in order to build octave, you must have a compatible])
819 AC_MSG_WARN([Fortran compiler or wrapper script for f2c that functions])
820 AC_MSG_WARN([as a Fortran compiler installed and in your path.])
821 AC_MSG_ERROR([See the file INSTALL for more information.])
822 fi
823 859
824 XTRA_CRUFT_SH_LDFLAGS= 860 XTRA_CRUFT_SH_LDFLAGS=
825 case "$canonical_host_type" in 861 case "$canonical_host_type" in
826 *-*-msdosmsvc) 862 *-*-msdosmsvc)
827 FLIBS="$FLIBS -lkernel32" 863 FLIBS="$FLIBS -lkernel32"
828 XTRA_CRUFT_SH_LDFLAGS="-Wl,-def:cruft.def" 864 XTRA_CRUFT_SH_LDFLAGS="-Wl,-def:cruft.def"
829 ;; 865 ;;
830 esac 866 esac
831 AC_SUBST(XTRA_CRUFT_SH_LDFLAGS) 867 AC_SUBST(XTRA_CRUFT_SH_LDFLAGS)
832
833 FC=$F77
834 AC_SUBST(FC)
835
836 OCTAVE_F77_FLAG(-ffloat-store, [
837 AC_MSG_RESULT([setting F77_FLOAT_STORE_FLAG to -ffloat-store])
838 F77_FLOAT_STORE_FLAG=-ffloat-store
839 AC_SUBST(F77_FLOAT_STORE_FLAG)
840 ])
841 868
842 ### Checks for BLAS and LAPACK libraries: 869 ### Checks for BLAS and LAPACK libraries:
843 # (Build subdirectories of libcruft if they aren't found on the system.) 870 # (Build subdirectories of libcruft if they aren't found on the system.)
844 sinclude(acx_blas.m4) 871 sinclude(acx_blas.m4)
845 sinclude(acx_blas_f77_func.m4) 872 sinclude(acx_blas_f77_func.m4)