comparison configure.in @ 2562:0c978e147a3a

[project @ 1996-12-05 17:05:54 by jwe]
author jwe
date Thu, 05 Dec 1996 17:05:54 +0000
parents c097977bca6f
children bcdd6bf533ea
comparison
equal deleted inserted replaced
2561:96b57a9485b6 2562:0c978e147a3a
19 ### You should have received a copy of the GNU General Public License 19 ### You should have received a copy of the GNU General Public License
20 ### along with Octave; see the file COPYING. If not, write to the Free 20 ### along with Octave; see the file COPYING. If not, write to the Free
21 ### Software Foundation, 59 Temple Place - Suite 330, Boston, MA 21 ### Software Foundation, 59 Temple Place - Suite 330, Boston, MA
22 ### 02111-1307, USA. 22 ### 02111-1307, USA.
23 23
24 AC_REVISION($Revision: 1.236 $) 24 AC_REVISION($Revision: 1.237 $)
25 AC_PREREQ(2.9) 25 AC_PREREQ(2.9)
26 AC_INIT(src/octave.cc) 26 AC_INIT(src/octave.cc)
27 AC_CONFIG_HEADER(config.h) 27 AC_CONFIG_HEADER(config.h)
28 28
29 AC_DEFINE(OCTAVE_SOURCE, 1) 29 AC_DEFINE(OCTAVE_SOURCE, 1)
455 AC_C_CONST 455 AC_C_CONST
456 456
457 ### Get the list of libraries that the C++ compiler normally uses. 457 ### Get the list of libraries that the C++ compiler normally uses.
458 458
459 OCTAVE_CXXLIBS 459 OCTAVE_CXXLIBS
460
461 ### We need these before trying to find libf2c.
462
463 if test -z "$AR"; then
464 AR=ar
465 fi
466 AC_SUBST(AR)
467
468 if test -z "$ARFLAGS"; then
469 ARFLAGS="rc"
470 fi
471 AC_SUBST(ARFLAGS)
472
473 AC_PROG_RANLIB
460 474
461 ### If we haven't been forced to use f2c, try to find a Fortran compiler 475 ### If we haven't been forced to use f2c, try to find a Fortran compiler
462 ### under any one of several common Un*x Fortran compiler names. 476 ### under any one of several common Un*x Fortran compiler names.
463 ### Put fc last to avoid confusion with some vendor's /bin/sh fc 477 ### Put fc last to avoid confusion with some vendor's /bin/sh fc
464 ### builtin. 478 ### builtin.
569 EOF 583 EOF
570 changequote([,])dnl 584 changequote([,])dnl
571 elif $have_f2c; then 585 elif $have_f2c; then
572 AC_DEFINE(F77_APPEND_UNDERSCORE, 1) 586 AC_DEFINE(F77_APPEND_UNDERSCORE, 1)
573 AC_MSG_RESULT([defining F77_APPEND_UNDERSCORE to be 1]) 587 AC_MSG_RESULT([defining F77_APPEND_UNDERSCORE to be 1])
574 AC_CHECK_LIB(f2c, f_open, FLIBS=-lf2c, [], -lm) 588
575 if test -z "$FLIBS"; then 589 ### This seems to be necessary on some Linux system.
576 AC_CHECK_LIB(F77, d_sin, FLIBS=-lF77, [], -lm) 590
577 if test -n "$FLIBS"; then 591 cat > conftest.$ac_ext << EOF
578 AC_CHECK_LIB(I77, f_rew, FLIBS="$FLIBS -lI77", [], -lF77) 592 int MAIN_ () { return 0; }
593 int MAIN__ () { return 0; }
594 EOF
595
596 ### XXX FIMXE XXX -- these shouldn't be fixed names, eh?
597
598 oct_conflib=libconflib.a
599 oct_obj_ext=o
600
601 if AC_TRY_EVAL(ac_compile); then
602 $AR $ARFLAGS $oct_conflib conftest.$oct_obj_ext 1>&AC_FD_CC
603 if test -n "$RANLIB"; then
604 $RANLIB $oct_conflib 1>&AC_FD_CC
579 fi 605 fi
580 fi 606 fi
607 rm -f conftest*
608 AC_CHECK_LIB(f2c, f_open, FLIBS=-lf2c, FLIBS=, [-L. -lconflib -lm])
609 rm -f $oct_conflib
610
611 if test -z "$FLIBS"; then
612 AC_CHECK_LIB(F77, d_sin, FLIBS=-lF77, FLIBS=, -lm)
613 if test -n "$FLIBS"; then
614 AC_CHECK_LIB(I77, f_rew, FLIBS="$FLIBS -lI77", FLIBS=, -lF77)
615 fi
616 fi
617
581 if test -z "$FLIBS"; then 618 if test -z "$FLIBS"; then
582 AC_MSG_WARN([I found f2c but not libf2c.a, or libF77.a and libI77.a]) 619 AC_MSG_WARN([I found f2c but not libf2c.a, or libF77.a and libI77.a])
583 fi 620 fi
584 f77_rules_frag=Makerules.f77 621 f77_rules_frag=Makerules.f77
585 cat << \EOF > $f77_rules_frag 622 cat << \EOF > $f77_rules_frag
919 AC_MSG_WARN([I didn't find bison, but that's only a problem]) 956 AC_MSG_WARN([I didn't find bison, but that's only a problem])
920 AC_MSG_WARN([if you need to reconstruct parse.cc]) 957 AC_MSG_WARN([if you need to reconstruct parse.cc])
921 ;; 958 ;;
922 esac 959 esac
923 960
924 if test -z "$AR"; then
925 AR=ar
926 fi
927 AC_SUBST(AR)
928
929 if test -z "$ARFLAGS"; then
930 ARFLAGS="rc"
931 fi
932 AC_SUBST(ARFLAGS)
933
934 AC_PROG_RANLIB
935
936 AC_PROG_LN_S 961 AC_PROG_LN_S
937 962
938 ### Kluge for SunOS 4.x vs. shared libraries. 963 ### Kluge for SunOS 4.x vs. shared libraries.
939 964
940 SH_LIBS="$LIBS" 965 SH_LIBS="$LIBS"