Mercurial > octave
comparison configure.in @ 7054:1c5b2b5b58ba
[project @ 2007-10-23 23:22:16 by jwe]
author | jwe |
---|---|
date | Tue, 23 Oct 2007 23:22:17 +0000 |
parents | ee70ac66041f |
children | ad2aaf824128 |
comparison
equal
deleted
inserted
replaced
7053:570a382ce556 | 7054:1c5b2b5b58ba |
---|---|
27 | 27 |
28 EXTERN_CFLAGS="$CFLAGS" | 28 EXTERN_CFLAGS="$CFLAGS" |
29 EXTERN_CXXFLAGS="$CXXFLAGS" | 29 EXTERN_CXXFLAGS="$CXXFLAGS" |
30 | 30 |
31 AC_INIT | 31 AC_INIT |
32 AC_REVISION($Revision: 1.583 $) | 32 AC_REVISION($Revision: 1.584 $) |
33 AC_PREREQ(2.57) | 33 AC_PREREQ(2.57) |
34 AC_CONFIG_SRCDIR([src/octave.cc]) | 34 AC_CONFIG_SRCDIR([src/octave.cc]) |
35 AC_CONFIG_HEADER(config.h) | 35 AC_CONFIG_HEADER(config.h) |
36 | 36 |
37 OCTAVE_HOST_TYPE | 37 OCTAVE_HOST_TYPE |
793 case "$canonical_host_type" in | 793 case "$canonical_host_type" in |
794 *-*-msdosmsvc) | 794 *-*-msdosmsvc) |
795 CONFLIB_ARG="-MD" | 795 CONFLIB_ARG="-MD" |
796 ;; | 796 ;; |
797 esac | 797 esac |
798 AC_CHECK_LIB(f2c, f_open, FLIBS=-lf2c, FLIBS=, $CONFLIB_ARG) | 798 XLIBS="$LIBS" |
799 LIBS="-lf2c $LIBS $CONFLIB_ARG" | |
800 AC_LINK_IFELSE([AC_LANG_CALL([int MAIN__ () { return 1; }], [f_open])], | |
801 [F2CLIBS=-lf2c], [F2CLIBS=]) | |
802 LIBS="$XLIBS" | |
799 rm -f $oct_conflib | 803 rm -f $oct_conflib |
800 | 804 |
801 if test -z "$FLIBS"; then | 805 if test -z "$F2CLIBS"; then |
802 AC_CHECK_LIB(F77, d_sin, FLIBS=-lF77, FLIBS=) | 806 AC_CHECK_LIB(F77, d_sin, F2CLIBS=-lF77, FLIBS=) |
803 if test -n "$FLIBS"; then | 807 if test -n "$F2CLIBS"; then |
804 AC_CHECK_LIB(I77, f_rew, FLIBS="$FLIBS -lI77", FLIBS=, -lF77) | 808 AC_CHECK_LIB(I77, f_rew, F2CLIBS="$F2CLIBS -lI77", F2CLIBS=, -lF77) |
805 fi | 809 fi |
806 fi | 810 fi |
807 | 811 |
808 if test -z "$FLIBS"; then | 812 if test -z "$F2CLIBS"; then |
809 warn_f2c_no_lib="I found f2c but not libf2c.a, or libF77.a and libI77.a" | 813 warn_f2c_no_lib="I found f2c but not libf2c.a, or libF77.a and libI77.a" |
810 AC_MSG_WARN($warn_f2c_no_lib) | 814 AC_MSG_WARN($warn_f2c_no_lib) |
811 fi | 815 fi |
812 f77_rules_frag=Makefrag.f77 | 816 f77_rules_frag=Makefrag.f77 |
813 cat << \EOF > $f77_rules_frag | 817 cat << \EOF > $f77_rules_frag |
855 | 859 |
856 dnl I see no clean way to do the following check with autoconf macros, | 860 dnl I see no clean way to do the following check with autoconf macros, |
857 dnl hence the big mess. | 861 dnl hence the big mess. |
858 | 862 |
859 AC_MSG_CHECKING([BLAS library calling convention compatibility]) | 863 AC_MSG_CHECKING([BLAS library calling convention compatibility]) |
860 cat << EOF > conftest.$ac_fc_srcext | 864 cat << EOF > conftest.f |
861 program foo | 865 program foo |
862 double complex zdotu, tmp, zx(10), zy(10), retval | 866 double complex zdotu, zx(10), zy(10), retval |
863 integer n, incx, incy | 867 integer n, incx, incy |
864 n = 10 | 868 n = 10 |
865 incx = 1 | 869 incx = 1 |
866 incy = 1 | 870 incy = 1 |
867 do 10 i = 1, n | 871 do 10 i = 1, n |
868 zx(i) = dcmplx (i, 0); | 872 zx(i) = dcmplx (i, 0) |
869 zy(i) = dcmplx (0, i); | 873 zy(i) = dcmplx (0, i) |
870 10 continue | 874 10 continue |
871 retval = zdotu (n, zx, incx, zy, incy) | 875 retval = zdotu (n, zx, incx, zy, incy) |
872 if (retval .eq. dcmplx (0, 385)) then | 876 if (retval .eq. dcmplx (0, 385)) then |
873 print *, 'succeeded' | 877 print *, 'succeeded' |
874 else | 878 else |
876 print *, retval | 880 print *, retval |
877 endif | 881 endif |
878 end | 882 end |
879 EOF | 883 EOF |
880 XLIBS="$LIBS" | 884 XLIBS="$LIBS" |
881 LIBS="$BLAS_LIBS $LIBS $FLIBS" | |
882 if $have_fortran_compiler; then | 885 if $have_fortran_compiler; then |
886 LIBS="$BLAS_LIBS $FLIBS $LIBS" | |
883 AC_LANG_PUSH(Fortran 77) | 887 AC_LANG_PUSH(Fortran 77) |
884 $ac_compile | 888 (eval "$ac_compile"; eval "$ac_link") 2>conftest.er1 |
885 $ac_link | |
886 AC_LANG_POP(Fortran 77) | 889 AC_LANG_POP(Fortran 77) |
887 elif $have_f2c; then | 890 elif $have_f2c; then |
891 LIBS="$BLAS_LIBS $F2CLIBS $LIBS" | |
888 AC_LANG_PUSH(C) | 892 AC_LANG_PUSH(C) |
889 $(F2C) $(F2CFLAGS) < conftest.$ac_fc_srcext > conftest.$ac_ext | 893 octave_xlate="$F2C $F2CFLAGS < conftest.f > conftest.c" |
890 $ac_compile | 894 (eval "$octave_xlate") |
891 $ac_link | 895 (eval "$ac_compile"; eval "$ac_link") 2>conftest.er1 |
892 AC_LANG_POP(C) | 896 AC_LANG_POP(C) |
893 fi | 897 fi |
894 LIBS="$XLIBS" | 898 LIBS="$XLIBS" |
895 case "`conftest.$ac_exeext`" in | 899 case "`./conftest$ac_exeext`" in |
896 *success*) | 900 *succeeded*) |
897 AC_MSG_RESULT(yes) | 901 AC_MSG_RESULT(yes) |
898 ;; | 902 ;; |
899 *) | 903 *) |
900 AC_MSG_RESULT(no) | 904 AC_MSG_RESULT(no) |
901 AC_MSG_WARN([Your BLAS library was apparently compiled with a Fortran]) | 905 AC_MSG_WARN([Your BLAS library was apparently compiled with a Fortran]) |
2050 FORT="$F2C $F2CFLAGS" | 2054 FORT="$F2C $F2CFLAGS" |
2051 else | 2055 else |
2052 FORT="$F77 $FFLAGS" | 2056 FORT="$F77 $FFLAGS" |
2053 fi | 2057 fi |
2054 | 2058 |
2059 if $have_fortran_compiler; then | |
2060 true | |
2061 elif $have_f2c; then | |
2062 FLIBS="$F2CLIBS" | |
2063 fi | |
2064 | |
2055 AC_MSG_NOTICE([ | 2065 AC_MSG_NOTICE([ |
2056 | 2066 |
2057 Octave is now configured for $canonical_host_type | 2067 Octave is now configured for $canonical_host_type |
2058 | 2068 |
2059 Source directory: $srcdir | 2069 Source directory: $srcdir |