comparison configure.in @ 3887:7da18459c08b

[project @ 2002-04-04 00:44:21 by jwe]
author jwe
date Thu, 04 Apr 2002 00:46:37 +0000
parents 96919c87953c
children 70ebd3d672a1
comparison
equal deleted inserted replaced
3886:96919c87953c 3887:7da18459c08b
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.352 $) 24 AC_INIT
25 AC_PREREQ(2.9) 25 AC_REVISION($Revision: 1.353 $)
26 AC_INIT(src/octave.cc) 26 AC_PREREQ(2.52)
27 AC_CONFIG_SRCDIR([src/octave.cc])
27 AC_CONFIG_HEADER(config.h) 28 AC_CONFIG_HEADER(config.h)
28 29
29 AC_DEFINE(OCTAVE_SOURCE, 1) 30 AC_DEFINE(OCTAVE_SOURCE, 1, [Define if this is Octave.])
30 31
31 OCTAVE_HOST_TYPE 32 OCTAVE_HOST_TYPE
33
34 AC_ISC_POSIX
35 AC_MINIX
36 AC_AIX
32 37
33 ### some defaults 38 ### some defaults
34 39
35 OCTAVE_SET_DEFAULT(man1dir, '$(mandir)/man1') 40 OCTAVE_SET_DEFAULT(man1dir, '$(mandir)/man1')
36 OCTAVE_SET_DEFAULT(man1ext, '.1') 41 OCTAVE_SET_DEFAULT(man1ext, '.1')
66 config_opts=$ac_configure_args 71 config_opts=$ac_configure_args
67 AC_SUBST(config_opts) 72 AC_SUBST(config_opts)
68 73
69 ### Path separator. 74 ### Path separator.
70 75
71 AC_DEFINE(SEPCHAR, [':']) 76 AC_DEFINE(SEPCHAR, [':'], Define this to be the path separator for your system, as a character constant.])
72 AC_DEFINE(SEPCHAR_STR, [":"]) 77 AC_DEFINE(SEPCHAR_STR, [":"], [Define this to the path separator, as a string.])
73 78
74 ### Allow the user to force us to use f2c. 79 ### Allow the user to force us to use f2c.
75 80
76 AC_ARG_WITH(f2c, 81 AC_ARG_WITH(f2c,
77 [ --with-f2c use f2c even if Fortran compiler is available], 82 [ --with-f2c use f2c even if Fortran compiler is available],
124 dnl USE_PLPLOT=false; 129 dnl USE_PLPLOT=false;
125 dnl LIBPLPLOT=""; 130 dnl LIBPLPLOT="";
126 dnl PLPLOT_DIR=""; 131 dnl PLPLOT_DIR="";
127 dnl fi], []) 132 dnl fi], [])
128 dnl if $USE_PLPLOT; then 133 dnl if $USE_PLPLOT; then
129 dnl AC_DEFINE(USE_PLPLOT, 1) 134 dnl AC_DEFINE(USE_PLPLOT, 1, [Define to use plplot.])
130 dnl fi 135 dnl fi
131 AC_SUBST(LIBPLPLOT) 136 AC_SUBST(LIBPLPLOT)
132 AC_SUBST(PLPLOT_DIR) 137 AC_SUBST(PLPLOT_DIR)
133 138
134 LIBKPATHSEA='$(TOPDIR)/kpathsea/libkpathsea.$(LIBEXT)' 139 LIBKPATHSEA='$(TOPDIR)/kpathsea/libkpathsea.$(LIBEXT)'
141 BOUNDS_CHECKING=false 146 BOUNDS_CHECKING=false
142 AC_ARG_ENABLE(bounds-check, 147 AC_ARG_ENABLE(bounds-check,
143 [ --enable-bounds-check for internal array classes (default is no)], 148 [ --enable-bounds-check for internal array classes (default is no)],
144 [if test "$enableval" = yes; then BOUNDS_CHECKING=true; fi], []) 149 [if test "$enableval" = yes; then BOUNDS_CHECKING=true; fi], [])
145 if $BOUNDS_CHECKING; then 150 if $BOUNDS_CHECKING; then
146 AC_DEFINE(BOUNDS_CHECKING, 1) 151 AC_DEFINE(BOUNDS_CHECKING, 1, [Define to use internal bounds checking.])
147 fi 152 fi
148 153
149 ### It seems that there are some broken inline assembly functions in 154 ### It seems that there are some broken inline assembly functions in
150 ### the GNU libc. Since I'm not sure how to test whether we are using 155 ### the GNU libc. Since I'm not sure how to test whether we are using
151 ### GNU libc, just disable them for all platforms. 156 ### GNU libc, just disable them for all platforms.
152 157
153 AC_MSG_RESULT([defining __NO_MATH_INLINES avoids buggy GNU libc exp function]) 158 AC_MSG_RESULT([defining __NO_MATH_INLINES avoids buggy GNU libc exp function])
154 AC_DEFINE(__NO_MATH_INLINES, 1) 159 AC_DEFINE(__NO_MATH_INLINES, 1, [Define if your version of GNU libc has buggy inline assembly code for math functions like exp.])
155 160
156 ### See which C++ compiler to use (we expect to find g++). 161 ### See which C++ compiler to use (we expect to find g++).
157 162
158 EXTERN_CXXFLAGS="$CXXFLAGS" 163 EXTERN_CXXFLAGS="$CXXFLAGS"
159 164
171 # templates for GCC-2.8.x and EGCS-1.1.x, but not for newer GNU releases 176 # templates for GCC-2.8.x and EGCS-1.1.x, but not for newer GNU releases
172 # nor for other supported compilers. 177 # nor for other supported compilers.
173 # 178 #
174 cxx_auto_instantiate_templates=yes 179 cxx_auto_instantiate_templates=yes
175 case "$gxx_version" in 180 case "$gxx_version" in
176 changequote(,)dnl 181 1.* | 2.[[0123456]].* | 2.7.[01]*)
177 1.* | 2.[0123456].* | 2.7.[01]*)
178 changequote([,])dnl
179 AC_MSG_ERROR([g++ version $gxx_version will not work to compile Octave]) 182 AC_MSG_ERROR([g++ version $gxx_version will not work to compile Octave])
180 ;; 183 ;;
181 changequote(,)dnl 184 2.8* | 2.9[[1-6]]*)
182 2.8* | 2.9[1-6]*)
183 changequote([,])dnl
184 cxx_auto_instantiate_templates=no 185 cxx_auto_instantiate_templates=no
185 ;; 186 ;;
186 esac 187 esac
187 188
188 CXX_VERSION= 189 CXX_VERSION=
253 ### 254 ###
254 ### On Alpha/OSF systems, we need -mieee. 255 ### On Alpha/OSF systems, we need -mieee.
255 256
256 ieee_fp_flag= 257 ieee_fp_flag=
257 case "$canonical_host_type" in 258 case "$canonical_host_type" in
258 changequote(,)dnl 259 i[[3456789]]86-*-*)
259 i[3456789]86-*-*)
260 changequote([,])dnl
261 OCTAVE_CC_FLAG(-mieee-fp, [ 260 OCTAVE_CC_FLAG(-mieee-fp, [
262 ieee_fp_flag=-mieee-fp 261 ieee_fp_flag=-mieee-fp
263 XTRA_CFLAGS="$XTRA_CFLAGS -mieee-fp" 262 XTRA_CFLAGS="$XTRA_CFLAGS -mieee-fp"
264 AC_MSG_RESULT([adding -mieee-fp to XTRA_CFLAGS])]) 263 AC_MSG_RESULT([adding -mieee-fp to XTRA_CFLAGS])])
265 264
351 AC_CHECK_LIB(z, deflate, [ 350 AC_CHECK_LIB(z, deflate, [
352 AC_CHECK_HEADERS(hdf5.h, [ 351 AC_CHECK_HEADERS(hdf5.h, [
353 WITH_HDF5=true 352 WITH_HDF5=true
354 HDF5_LIBS="-l$hdf5_lib -lz" 353 HDF5_LIBS="-l$hdf5_lib -lz"
355 LIBS="$HDF5_LIBS $LIBS" 354 LIBS="$HDF5_LIBS $LIBS"
356 AC_DEFINE(HAVE_HDF5)])])]) 355 AC_DEFINE(HAVE_HDF5,1,[Define if HDF5 is available.])])])])
357 fi 356 fi
358 357
359 # Checks for FFTW header and library. 358 # Checks for FFTW header and library.
360 359
361 # subdirectories of libcruft to build if they aren't found on the system: 360 # subdirectories of libcruft to build if they aren't found on the system:
369 AC_ARG_WITH(fftw, 368 AC_ARG_WITH(fftw,
370 [ --without-fftw use included fftpack instead of installed fftw], 369 [ --without-fftw use included fftpack instead of installed fftw],
371 with_fftw=$withval, with_fftw=yes) 370 with_fftw=$withval, with_fftw=yes)
372 371
373 if test "$with_fftw" = "yes"; then 372 if test "$with_fftw" = "yes"; then
374 AC_CHECK_HEADERS(dfftw.h fftw.h) 373 have_fftw_header=no
375 if test "$ac_cv_header_dfftw_h" = yes \ 374 AC_CHECK_HEADERS(dfftw.h fftw.h, [have_fftw_header=yes; break])
376 || test "$ac_cv_header_fftw_h" = yes; then 375 if test "$have_fftw_header" = yes; then
377 AC_CHECK_LIB(dfftw, fftw_create_plan, FFTW_LIBS="-ldfftw", 376 AC_CHECK_LIB(dfftw, fftw_create_plan, FFTW_LIBS="-ldfftw",
378 [AC_CHECK_LIB(fftw, fftw_create_plan, FFTW_LIBS="-lfftw", with_fftw=no)]) 377 [AC_CHECK_LIB(fftw, fftw_create_plan, FFTW_LIBS="-lfftw", with_fftw=no)])
379 else 378 else
380 with_fftw=no 379 with_fftw=no
381 fi 380 fi
382 fi 381 fi
383 382
384 if test "$with_fftw" = yes; then 383 if test "$with_fftw" = yes; then
385 FFT_DIR='' 384 FFT_DIR=''
386 AC_DEFINE(HAVE_FFTW) 385 AC_DEFINE(HAVE_FFTW,1,[Define if the FFTW library is available.])
387 fi 386 fi
388 387
389 # ---------------------------------------------------------------------- 388 # ----------------------------------------------------------------------
390 389
391 ### We need these before trying to find libf2c. 390 ### We need these before trying to find libf2c.
394 393
395 AC_PROG_RANLIB 394 AC_PROG_RANLIB
396 395
397 ### If we haven't been forced to use a particular Fortran compiler, 396 ### If we haven't been forced to use a particular Fortran compiler,
398 ### try to find one using any one of several common Un*x Fortran 397 ### try to find one using any one of several common Un*x Fortran
399 ### compiler names. Put fc last to avoid confusion with some vendor's 398 ### compiler names using the AC_PROG_F77 macro.
400 ### /bin/sh fc builtin.
401 ###
402 ### f77 : most Unix systems
403 ### xlf : IBM / AIX
404 ### cf77 : Cray / Unicos
405 ### g77 : GNU Fortran
406 ### fc : Convex
407 ###
408 ### If a compiler is found, check to see if it is compatible with our
409 ### assumptions. If it is, use it. Otherwise, look for f2c. If we
410 ### can't find a compatible fortran compiler or f2c, issue a warning.
411 ###
412 ### I don't think the Cray compiler will ever work like f2c...
413 ### 399 ###
414 ### The configure options --with-f77, --with-g77, or --with-f2c 400 ### The configure options --with-f77, --with-g77, or --with-f2c
415 ### force f77, g77 or f2c to be used. It is also possible to use 401 ### force f77, g77 or f2c to be used. It is also possible to use
416 ### these options to specify the name of the compiler. For example, 402 ### these options to specify the name of the compiler. For example,
417 ### `--with-g77=/opt/gnu/bin/f77' says that we are using g77 but it is 403 ### `--with-g77=/opt/gnu/bin/f77' says that we are using g77 but it is
437 F2C=f2c 423 F2C=f2c
438 else 424 else
439 F2C="$with_f2c" 425 F2C="$with_f2c"
440 fi 426 fi
441 AC_MSG_RESULT([defining F2C to be $F2C]) 427 AC_MSG_RESULT([defining F2C to be $F2C])
442 else 428 fi
443 AC_CHECK_PROGS(F77, g77 f77 f90 xlf cf77 fc) 429
444 fi 430 if test "x$FFLAGS" = x; then
431 FFLAGS="-O" # override -g -O default by AC_PROG_F77
432 fi
433
434 # the F77 variable, if set, overrides AC_PROG_F77 automatically
435 AC_PROG_F77
445 436
446 have_fortran_compiler=false 437 have_fortran_compiler=false
447 have_f2c=false 438 have_f2c=false
448 439
449 if $use_f2c; then 440 if $use_f2c; then
450 have_f2c=true 441 have_f2c=true
451 else 442 else
452 if test -n "$F77"; then 443 if test -n "$F77"; then
453 OCTAVE_FLIBS 444 AC_F77_LIBRARY_LDFLAGS
454 OCTAVE_F77_APPEND_UNDERSCORE 445 AC_F77_DUMMY_MAIN
455 OCTAVE_F2C_F77_COMPAT 446 AC_F77_WRAPPERS
456 if test "$octave_cv_f2c_f77_compat" = no; then 447 case "$canonical_host_type" in
457 F77= 448 alpha*-*-*)
458 else 449 if test "$ac_cv_f77_compiler_gnu" = yes; then
459 if test -z "$FFLAGS"; then 450 FFLAGS="$ieee_fp_flag $FFLAGS"
460 FFLAGS="-O" 451 else
461 fi 452 FFLAGS="-fpe1 $FFLAGS"
462 case "$canonical_host_type" in 453 fi
463 alpha*-*-*) 454 ;;
464 if test "$octave_cv_f77_is_g77" = yes; then 455 powerpc-apple-machten*)
465 FFLAGS="$ieee_fp_flag $FFLAGS" 456 FFLAGS=
466 else 457 ;;
467 FFLAGS="-fpe1 $FFLAGS" 458 esac
468 fi 459 if test -n "$FFLAGS"; then
469 ;; 460 AC_MSG_RESULT([defining FFLAGS to be $FFLAGS])
470 powerpc-apple-machten*)
471 FFLAGS=
472 ;;
473 esac
474 if test -n "$FFLAGS"; then
475 AC_MSG_RESULT([defining FFLAGS to be $FFLAGS])
476 fi
477 fi 461 fi
478 fi
479 if test -n "$F77"; then
480 have_fortran_compiler=true 462 have_fortran_compiler=true
481 else 463 else
482 AC_CHECK_PROG(F2C, f2c, f2c, []) 464 AC_CHECK_PROG(F2C, f2c, f2c, [])
483 if test -n "$F2C"; then 465 if test -n "$F2C"; then
484 have_f2c=true 466 have_f2c=true
487 fi 469 fi
488 470
489 f77_rules_frag=/dev/null 471 f77_rules_frag=/dev/null
490 if $have_fortran_compiler; then 472 if $have_fortran_compiler; then
491 f77_rules_frag=Makefrag.f77 473 f77_rules_frag=Makefrag.f77
492 changequote(,)dnl
493 cat << \EOF > $f77_rules_frag 474 cat << \EOF > $f77_rules_frag
494 475
495 %.c : %.f 476 %.c : %.f
496 477
497 %.o : %.f 478 %.o : %.f
499 480
500 pic/%.o : %.f 481 pic/%.o : %.f
501 $(FC) -c $(FPICFLAG) $(ALL_FFLAGS) $< -o $@ 482 $(FC) -c $(FPICFLAG) $(ALL_FFLAGS) $< -o $@
502 483
503 EOF 484 EOF
504 changequote([,])dnl
505 elif $have_f2c; then 485 elif $have_f2c; then
506 AC_DEFINE(F77_APPEND_UNDERSCORE, 1) 486 AC_DEFINE(HAVE_F2C, 1, [Define if we are using f2c.])
507 AC_MSG_RESULT([defining F77_APPEND_UNDERSCORE to be 1])
508
509 ### This seems to be necessary on some Linux system.
510
511 cat > conftest.$ac_ext << EOF
512 int MAIN_ () { return 0; }
513 int MAIN__ () { return 0; }
514 EOF
515 487
516 ### XXX FIMXE XXX -- these shouldn't be fixed names, eh? 488 ### XXX FIMXE XXX -- these shouldn't be fixed names, eh?
517 489
518 oct_conflib=libconflib.a 490 oct_conflib=libconflib.a
519 oct_obj_ext=o 491 oct_obj_ext=o
520 492
521 if AC_TRY_EVAL(ac_compile); then 493 if AC_TRY_EVAL(ac_compile); then
522 $AR $ARFLAGS $oct_conflib conftest.$oct_obj_ext 1>&AC_FD_CC 494 $AR $ARFLAGS $oct_conflib conftest.$oct_obj_ext 1>&AS_MESSAGE_LOG_FD()
523 if test -n "$RANLIB"; then 495 if test -n "$RANLIB"; then
524 $RANLIB $oct_conflib 1>&AC_FD_CC 496 $RANLIB $oct_conflib 1>&AS_MESSAGE_LOG_FD()
525 fi 497 fi
526 fi 498 fi
527 rm -f conftest* 499 rm -f conftest*
528 AC_CHECK_LIB(f2c, f_open, FLIBS=-lf2c, FLIBS=, [-L. -lconflib]) 500 AC_CHECK_LIB(f2c, f_open, FLIBS=-lf2c, FLIBS=, [-L. -lconflib])
529 rm -f $oct_conflib 501 rm -f $oct_conflib
551 else 523 else
552 AC_MSG_WARN([in order to build octave, you must have a compatible]) 524 AC_MSG_WARN([in order to build octave, you must have a compatible])
553 AC_MSG_WARN([Fortran compiler or f2c installed and in your path.]) 525 AC_MSG_WARN([Fortran compiler or f2c installed and in your path.])
554 AC_MSG_ERROR([See the file INSTALL for more information.]) 526 AC_MSG_ERROR([See the file INSTALL for more information.])
555 fi 527 fi
556
557 OCTAVE_F77_MAIN_FLAG
558 528
559 FC=$F77 529 FC=$F77
560 AC_SUBST(FC) 530 AC_SUBST(FC)
561 AC_SUBST(F77) 531 AC_SUBST(F77)
562 AC_SUBST(FFLAGS) 532 AC_SUBST(FFLAGS)
564 AC_SUBST(F2C) 534 AC_SUBST(F2C)
565 AC_SUBST(F2CFLAGS) 535 AC_SUBST(F2CFLAGS)
566 AC_SUBST_FILE(f77_rules_frag) 536 AC_SUBST_FILE(f77_rules_frag)
567 537
568 ### Checks for BLAS and LAPACK libraries: 538 ### Checks for BLAS and LAPACK libraries:
569 539 # (Build subdirectories of libcruft if they aren't found on the system.)
570 ### XXX FIXME XXX -- how can user specify a set of libraries here? 540
571 541 sinclude(acx_blas.m4)
572 ### Subdirectories of libcruft to build if they aren't found on the system: 542 sinclude(acx_lapack.m4)
573 543 ACX_BLAS([], [BLAS_DIR="blas"])
574 BLAS_DIR="blas" 544 ACX_LAPACK([BLAS_LIBS="$LAPACK_LIBS $BLAS_LIBS"], [LAPACK_DIR="lapack"])
575 LAPACK_DIR="lapack"
576 AC_SUBST(BLAS_DIR) 545 AC_SUBST(BLAS_DIR)
577 AC_SUBST(LAPACK_DIR) 546 AC_SUBST(LAPACK_DIR)
578
579 ### names of Fortran dgemm & cheev functions to check for (depends upon
580 ### F77 compiler name-mangling scheme):
581
582 if test "$octave_cv_f77_uppercase_names" = yes; then
583 if test "$octave_cv_f77_append_underscore" = yes; then
584 dgemm_func=DGEMM_
585 cheev_func=CHEEV_
586 else
587 dgemm_func=DGEMM
588 cheev_func=CHEEV
589 fi
590 else
591 if test "$octave_cv_f77_append_underscore" = yes || test -n "${F2C}"; then
592 dgemm_func=dgemm_
593 cheev_func=cheev_
594 else
595 dgemm_func=dgemm
596 cheev_func=cheev
597 fi
598 fi
599
600 AC_ARG_WITH(fastblas,
601 [ --without-fastblas use included (generic) BLAS and LAPACK],
602 with_fastblas=$withval, with_fastblas=yes)
603
604 if test "$with_fastblas" = no; then
605 BLAS_LIBS=" "
606 elif test "$with_fastblas" != yes; then
607 # user specified a BLAS library to try on the command line
608 AC_CHECK_LIB($with_fastblas, $dgemm_func,
609 BLAS_LIBS="-l$with_fastblas", , $FLIBS)
610 fi
611
612 if test "x$BLAS_LIBS" = x; then
613 # Checks for ATLAS BLAS library:
614 AC_CHECK_LIB(atlas, ATL_xerbla, BLAS_LIBS="-latlas")
615 if test "x$BLAS_LIBS" != x; then
616 # check for other atlas libs:
617 AC_CHECK_LIB(cblas, cblas_dgemm,BLAS_LIBS="-lcblas $BLAS_LIBS",,$BLAS_LIBS)
618 AC_CHECK_LIB(f77blas, $dgemm_func,
619 BLAS_LIBS="-lf77blas $BLAS_LIBS", , $BLAS_LIBS $FLIBS)
620 fi
621 fi
622
623 if test "x$BLAS_LIBS" = x; then
624 # BLAS in Alpha CXML library?
625 AC_CHECK_LIB(cxml, $dgemm_func, BLAS_LIBS="-lcxml", , $FLIBS)
626 fi
627
628 if test "x$BLAS_LIBS" = x; then
629 # BLAS in Alpha DXML library? (now called CXML, see above)
630 AC_CHECK_LIB(dxml, $dgemm_func, BLAS_LIBS="-ldxml", , $FLIBS)
631 fi
632
633 if test "x$BLAS_LIBS" = x; then
634 # Check for BLAS in Sun Performance library:
635 AC_CHECK_LIB(sunmath, acosp, BLAS_LIBS="-lsunmath")
636 # Don't use AC_CHECK_LIB here.
637 saved_LIBS="$LIBS"
638 LIBS="$LIBS $BLAS_LIBS -xlic_lib=sunperf"
639 AC_CHECK_FUNC($dgemm_func, BLAS_LIBS="-xlic_lib=sunperf $BLAS_LIBS",)
640 LIBS="$saved_LIBS"
641 fi
642
643 if test "x$BLAS_LIBS" = x; then
644 # Check for BLAS in SCSL and SGIMATH libraries (prefer SCSL):
645 AC_CHECK_LIB(scs, $dgemm_func,
646 BLAS_LIBS="-lscs",
647 AC_CHECK_LIB(complib.sgimath, $dgemm_func,
648 BLAS_LIBS="-lcomplib.sgimath", , $FLIBS), $FLIBS)
649 fi
650
651 if test "x$BLAS_LIBS" = x; then
652 # Checks for BLAS in IBM ESSL library. We must also link
653 # with -lblas in this case (ESSL does not include the full BLAS):
654 AC_CHECK_LIB(blas, zherk,
655 AC_CHECK_LIB(essl, $dgemm_func,
656 BLAS_LIBS="-lessl -lblas", , $FLIBS), , $FLIBS)
657 fi
658
659 if test "x$BLAS_LIBS" = x; then
660 # Finally, check for the generic BLAS library:
661 AC_CHECK_LIB(blas, $dgemm_func, BLAS_LIBS="-lblas", , $FLIBS)
662 fi
663
664 if test "$with_fastblas" = no; then
665 # Unset BLAS_LIBS so that we know below that nothing was found.
666 BLAS_LIBS=""
667 fi
668
669 if test "x$BLAS_LIBS" != x; then
670 BLAS_DIR="" # don't build our own BLAS
671
672 ### Check for LAPACK library. Note that ATLAS has its own liblapack.a,
673 ### which is designed to be combined with the real LAPACK. cheev is a
674 ### function in the real LAPACK but not in ATLAS's version, so this
675 ### (hopefully) insures that we are getting the real LAPACK. Note also
676 ### that on some systems, LAPACK is included in the math library
677 ### (e.g. DXML) that we already linked to above...we detect this by
678 ### doing AC_CHECK_FUNC if -llapack isn't found:
679
680 AC_CHECK_LIB(lapack, $cheev_func,
681 [BLAS_LIBS="-llapack $BLAS_LIBS"; LAPACK_DIR=""],
682 [AC_CHECK_FUNC($cheev_func, LAPACK_DIR="")],
683 [$BLAS_LIBS $FLIBS])
684 fi
685
686 AC_SUBST(BLAS_LIBS)
687 547
688 ### Handle dynamic linking and shared library options. 548 ### Handle dynamic linking and shared library options.
689 549
690 ### Allow the user to experiment with dynamic linking using dlopen/dlsym. 550 ### Allow the user to experiment with dynamic linking using dlopen/dlsym.
691 551
781 ;; 641 ;;
782 *-*-linux* | *-*-gnu*) 642 *-*-linux* | *-*-gnu*)
783 SONAME_FLAGS='-Xlinker -soname -Xlinker $@' 643 SONAME_FLAGS='-Xlinker -soname -Xlinker $@'
784 RLD_FLAG='-Xlinker -rpath -Xlinker $(octlibdir)' 644 RLD_FLAG='-Xlinker -rpath -Xlinker $(octlibdir)'
785 ;; 645 ;;
786 changequote(,)dnl 646 i[[3456]]86-*-sco3.2v5*)
787 i[3456]86-*-sco3.2v5*)
788 changequote([,])dnl
789 SONAME_FLAGS='-Xlinker -h -Xlinker $@' 647 SONAME_FLAGS='-Xlinker -h -Xlinker $@'
790 RLD_FLAG= 648 RLD_FLAG=
791 SH_LDFLAGS=-G 649 SH_LDFLAGS=-G
792 ;; 650 ;;
793 rs6000-ibm-aix* | powerpc-ibm-aix*) 651 rs6000-ibm-aix* | powerpc-ibm-aix*)
795 CXXPICFLAG= 653 CXXPICFLAG=
796 FPICFLAG= 654 FPICFLAG=
797 DLFCN_DIR=dlfcn 655 DLFCN_DIR=dlfcn
798 ;; 656 ;;
799 hppa*-hp-hpux*) 657 hppa*-hp-hpux*)
800 if test "$octave_cv_f77_is_g77" = yes; then 658 if test "$ac_cv_f77_compiler_gnu" = yes; then
801 FPICFLAG=-fPIC 659 FPICFLAG=-fPIC
802 else 660 else
803 FPICFLAG=+Z 661 FPICFLAG=+Z
804 fi 662 fi
805 SHLEXT=sl 663 SHLEXT=sl
811 CXXPICFLAG= 669 CXXPICFLAG=
812 FPICFLAG= 670 FPICFLAG=
813 RLD_FLAG='-L$(octlibdir)' 671 RLD_FLAG='-L$(octlibdir)'
814 ;; 672 ;;
815 sparc-sun-sunos4*) 673 sparc-sun-sunos4*)
816 if test "$octave_cv_f77_is_g77" = yes; then 674 if test "$ac_cv_f77_compiler_gnu" = yes; then
817 FPICFLAG=-fPIC 675 FPICFLAG=-fPIC
818 else 676 else
819 FPICFLAG=-PIC 677 FPICFLAG=-PIC
820 fi 678 fi
821 SH_LD=ld 679 SH_LD=ld
822 SH_LDFLAGS="-assert nodefinitions" 680 SH_LDFLAGS="-assert nodefinitions"
823 RLD_FLAG='-L$(octlibdir)' 681 RLD_FLAG='-L$(octlibdir)'
824 ;; 682 ;;
825 sparc-sun-solaris2* | i386-pc-solaris2*) 683 sparc-sun-solaris2* | i386-pc-solaris2*)
826 if test "$octave_cv_f77_is_g77" = yes; then 684 if test "$ac_cv_f77_compiler_gnu" = yes; then
827 FPICFLAG=-fPIC 685 FPICFLAG=-fPIC
828 else 686 else
829 FPICFLAG=-KPIC 687 FPICFLAG=-KPIC
830 fi 688 fi
831 if test "$GCC" = yes; then 689 if test "$GCC" = yes; then
887 [ --enable-lite-kernel compile smaller kernel (requires dynamic linking)], 745 [ --enable-lite-kernel compile smaller kernel (requires dynamic linking)],
888 [if test "$enableval" = no; then OCTAVE_LITE=false; 746 [if test "$enableval" = no; then OCTAVE_LITE=false;
889 else OCTAVE_LITE=true; fi], 747 else OCTAVE_LITE=true; fi],
890 OCTAVE_LITE=false) 748 OCTAVE_LITE=false)
891 if $OCTAVE_LITE; then 749 if $OCTAVE_LITE; then
892 AC_DEFINE(OCTAVE_LITE, 1) 750 AC_DEFINE(OCTAVE_LITE, 1, [Define to compile smaller kernel.])
893 fi 751 fi
894 AC_SUBST(OCTAVE_LITE) 752 AC_SUBST(OCTAVE_LITE)
895 753
896 ### special checks for odd OS specific things. 754 ### special checks for odd OS specific things.
897 ### 755 ###
898 ### I am told that on some SCO systems, the only place to find some 756 ### I am told that on some SCO systems, the only place to find some
899 ### functions like gethostname and gettimeofday is in libsocket. 757 ### functions like gethostname and gettimeofday is in libsocket.
900 758
901 AC_ISC_POSIX 759 AC_CHECK_FUNCS(gethostname, [], [AC_CHECK_LIB(socket, gethostname)])
902 AC_MINIX 760 AC_CHECK_FUNCS(getpwnam, [], [AC_CHECK_LIB(sun, getpwnam)])
903 AC_AIX
904 AC_CHECK_FUNCS(gethostname getpwnam)
905 if test "$ac_cv_func_gethostname" = yes; then
906 true
907 else
908 AC_CHECK_LIB(socket, gethostname)
909 fi
910 if test "$ac_cv_func_getpwnam" = yes; then
911 true
912 else
913 AC_CHECK_LIB(sun, getpwnam)
914 fi
915 761
916 ### How big are ints and how are they oriented? These could probably 762 ### How big are ints and how are they oriented? These could probably
917 ### be eliminated in favor of run-time checks. 763 ### be eliminated in favor of run-time checks.
918 764
919 AC_CHECK_SIZEOF(short, 2) 765 AC_CHECK_SIZEOF(short, 2)
921 AC_CHECK_SIZEOF(long, 4) 767 AC_CHECK_SIZEOF(long, 4)
922 AC_CHECK_SIZEOF(long long, 8) 768 AC_CHECK_SIZEOF(long long, 8)
923 769
924 ### Does the C compiler handle alloca() and const correctly? 770 ### Does the C compiler handle alloca() and const correctly?
925 771
926 AC_ALLOCA 772 AC_FUNC_ALLOCA([])
927 AC_C_CONST 773 AC_C_CONST
928 774
929 ### See if we should define NPOS. 775 ### See if we should define NPOS.
930 776
931 OCTAVE_STRING_NPOS 777 OCTAVE_STRING_NPOS
936 AC_HEADER_DIRENT 782 AC_HEADER_DIRENT
937 AC_HEADER_TIME 783 AC_HEADER_TIME
938 AC_HEADER_SYS_WAIT 784 AC_HEADER_SYS_WAIT
939 785
940 AC_CHECK_HEADERS(assert.h curses.h dlfcn.h fcntl.h float.h \ 786 AC_CHECK_HEADERS(assert.h curses.h dlfcn.h fcntl.h float.h \
941 floatingpoint.h fnmatch.h glob.h grp.h ieeefp.h limits.h memory.h \ 787 floatingpoint.h grp.h ieeefp.h limits.h memory.h \
942 nan.h ncurses.h poll.h pwd.h sgtty.h stdlib.h string.h sys/ioctl.h \ 788 nan.h ncurses.h poll.h pwd.h stdlib.h string.h sys/ioctl.h \
943 sys/param.h sys/poll.h sys/resource.h sys/select.h sys/stat.h \ 789 sys/param.h sys/poll.h sys/resource.h sys/select.h sys/stat.h \
944 sys/time.h sys/times.h sys/types.h sys/utsname.h termcap.h \ 790 sys/time.h sys/times.h sys/types.h sys/utsname.h termcap.h \
945 termio.h $TERMIOS_H unistd.h varargs.h) 791 unistd.h varargs.h)
792
793 have_termios_h=no
794 AC_CHECK_HEADERS($TERMIOS_H, have_termios_h=yes)
795 AC_CHECK_HEADERS(termio.h, have_termio_h=yes, have_termio_h=no)
796 AC_CHECK_HEADERS(sgtty.h, have_sgtty_h=yes, have_sgtty_h=no)
797 AC_CHECK_HEADERS(glob.h, have_glob_h=yes, have_glob_h=no)
798 AC_CHECK_HEADERS(fnmatch.h, have_fnmatch_h=yes, have_fnmatch_h=no)
946 799
947 ### I'm told that termios.h is broken on NeXT systems. 800 ### I'm told that termios.h is broken on NeXT systems.
948 801
949 case "$canonical_host_type" in 802 case "$canonical_host_type" in
950 *-*-nextstep*) 803 *-*-nextstep*)
951 if test "$ac_cv_header_termios_h" = yes; then 804 if test "$have_termios_h" = yes; then
952 AC_MSG_WARN([Ignoring termios.h on NeXT systems.]) 805 AC_MSG_WARN([Ignoring termios.h on NeXT systems.])
953 ac_cv_header_termios_h=no 806 have_termios_h=no
954 fi 807 fi
955 ;; 808 ;;
956 esac 809 esac
957 810
958 if test "$ac_cv_header_termios_h" = yes \ 811 if test "$have_termios_h" = yes \
959 || test "$ac_cv_header_termio_h" = yes \ 812 || test "$have_termio_h" = yes \
960 || test "$ac_cv_header_sgtty_h" = yes; then 813 || test "$have_sgtty_h" = yes; then
961 true 814 true
962 else 815 else
963 AC_MSG_ERROR([I couldn't find termios.h, termio.h, or sgtty.h!]) 816 AC_MSG_ERROR([I couldn't find termios.h, termio.h, or sgtty.h!])
964 fi 817 fi
965 818
968 ## avoids the problem. 821 ## avoids the problem.
969 822
970 GLOB_DIR=glob 823 GLOB_DIR=glob
971 LIBGLOB='$(TOPDIR)/glob/glob.o $(TOPDIR)/glob/fnmatch.o' 824 LIBGLOB='$(TOPDIR)/glob/glob.o $(TOPDIR)/glob/fnmatch.o'
972 GLOB_INCFLAGS='-I$(top_srcdir)/glob -I$(TOPDIR)/glob' 825 GLOB_INCFLAGS='-I$(top_srcdir)/glob -I$(TOPDIR)/glob'
973 if test "$ac_cv_header_fnmatch_h" = yes \ 826 if test "$have_fnmatch_h" = yes && test "$have_glob_h" = yes; then
974 && test "$ac_cv_header_glob_h" = yes; then 827 AC_EGREP_CPP(yes, [#include <fnmatch.h>
975 AC_EGREP_CPP(yes, 828 #ifdef FNM_NOESCAPE
976 [#ifdef FNM_NOESCAPE 829 #ifdef FNM_FOOBAR_PATHNAME /* FIXME: delete FOOBAR_ ? */
977 #ifdef FNM_FOOBAR_PATHNAME 830 #ifdef FNM_PERIOD
978 #ifdef FNM_PERIOD 831 yes
979 yes 832 #endif
980 #endif 833 #endif
981 #endif 834 #endif
982 #endif
983 ], [ 835 ], [
984 GLOB_DIR= 836 GLOB_DIR=
985 AC_CHECK_LIB(glob, glob) 837 AC_CHECK_LIB(glob, glob)
986 AC_CHECK_FUNCS(fnmatch glob) 838 AC_CHECK_FUNCS(fnmatch, have_fnmatch=yes, have_fnmatch=no)
987 if test "$ac_cv_func_fnmatch" = yes \ 839 AC_CHECK_FUNCS(glob, have_glob=yes, have_glob=no)
988 && test "$ac_cv_func_glob" = yes; then 840 if test "$have_fnmatch" = yes && test "$have_glob" = yes; then
989 GLOB_DIR= 841 GLOB_DIR=
990 LIBGLOB= 842 LIBGLOB=
991 GLOB_INCFLAGS= 843 GLOB_INCFLAGS=
992 fi 844 fi
993 ], [
994 ### We provide replacements, so we should set these to "yes".
995 AC_CACHE_VAL(ac_cv_func_fnmatch, ac_cv_func_fnmatch=yes)
996 AC_CACHE_VAL(ac_cv_func_glob, ac_cv_func_glob=yes)
997 ]) 845 ])
998 else
999 ### We provide replacements, so we should set these to "yes".
1000 ac_cv_header_fnmatch_h=yes
1001 ac_cv_header_glob_h=yes
1002 AC_CACHE_VAL(ac_cv_func_fnmatch, ac_cv_func_fnmatch=yes)
1003 AC_CACHE_VAL(ac_cv_func_glob, ac_cv_func_glob=yes)
1004 fi 846 fi
1005 AC_SUBST(GLOB_DIR) 847 AC_SUBST(GLOB_DIR)
1006 AC_SUBST(LIBGLOB) 848 AC_SUBST(LIBGLOB)
1007 AC_SUBST(GLOB_INCFLAGS) 849 AC_SUBST(GLOB_INCFLAGS)
1008 850
1029 rs6000-ibm-aix* | powerpc-ibm-aix*) 871 rs6000-ibm-aix* | powerpc-ibm-aix*)
1030 LIBDLFCN="-ldlfcn -ll -lld" 872 LIBDLFCN="-ldlfcn -ll -lld"
1031 DLFCN_INCFLAGS='-I$(top_srcdir)/dlfcn -I$(TOPDIR)/dlfcn' 873 DLFCN_INCFLAGS='-I$(top_srcdir)/dlfcn -I$(TOPDIR)/dlfcn'
1032 WITH_DL=true 874 WITH_DL=true
1033 ;; 875 ;;
1034 changequote(,)dnl 876 i[[3456]]86-*-sco3.2v5*)
1035 i[3456]86-*-sco3.2v5*)
1036 changequote([,])dnl
1037 LD_CXX='LD_RUN_PATH=$LD_RUN_PATH:$(octlibdir) $(CXX)' 877 LD_CXX='LD_RUN_PATH=$LD_RUN_PATH:$(octlibdir) $(CXX)'
1038 WITH_DL=true 878 WITH_DL=true
1039 ;; 879 ;;
1040 *) 880 *)
1041 AC_CHECK_LIB(dl, dlopen) 881 AC_CHECK_LIB(dl, dlopen)
1042 AC_CHECK_FUNCS(dlopen dlsym dlerror dlclose) 882 AC_CHECK_FUNCS(dlopen dlsym dlerror dlclose, [], [have_dl=false])
1043 if test "$ac_cv_func_dlopen" = yes \ 883 if test "x$have_dl" != xfalse; then
1044 && test "$ac_cv_func_dlsym" = yes \ 884 WITH_DL=true
1045 && test "$ac_cv_func_dlerror" = yes \
1046 && test "$ac_cv_func_dlclose" = yes; then
1047 WITH_DL=true
1048 else 885 else
1049 if test "$WITH_DL" = yes; then 886 if test "$WITH_DL" = yes; then
1050 AC_MSG_ERROR([--enable-dl specified, but functions are missing!]) 887 AC_MSG_ERROR([--enable-dl specified, but functions are missing!])
1051 fi 888 fi
1052 WITH_DL=false 889 WITH_DL=false
1053 fi 890 fi
1054 ;; 891 ;;
1055 esac 892 esac
1056 if $WITH_DL; then 893 if $WITH_DL; then
1057 OCTAVE_CXX_FLAG(-rdynamic, [RDYNAMIC_FLAG=-rdynamic]) 894 OCTAVE_CXX_FLAG(-rdynamic, [RDYNAMIC_FLAG=-rdynamic])
1058 AC_DEFINE(WITH_DL, 1) 895 AC_DEFINE(WITH_DL, 1, [Define if using dlopen/dlsym.])
1059 fi 896 fi
1060 else 897 else
1061 WITH_DL=false 898 WITH_DL=false
1062 fi 899 fi
1063 AC_SUBST(WITH_DL) 900 AC_SUBST(WITH_DL)
1066 AC_SUBST(RDYNAMIC_FLAG) 903 AC_SUBST(RDYNAMIC_FLAG)
1067 AC_SUBST(LD_CXX) 904 AC_SUBST(LD_CXX)
1068 905
1069 if test "$WITH_SHL" = yes || test "$WITH_SHL" = maybe; then 906 if test "$WITH_SHL" = yes || test "$WITH_SHL" = maybe; then
1070 AC_CHECK_LIB(dld, shl_load) 907 AC_CHECK_LIB(dld, shl_load)
1071 AC_CHECK_FUNCS(shl_load shl_findsym) 908 AC_CHECK_FUNCS(shl_load shl_findsym, [], [have_shl=false])
1072 if test "$ac_cv_func_shl_load" = yes \ 909 if test "x$have_shl" != xfalse; then
1073 && test "$ac_cv_func_shl_findsym" = yes; then
1074 WITH_SHL=true 910 WITH_SHL=true
1075 else 911 else
1076 if test "$WITH_SHL" = yes; then 912 if test "$WITH_SHL" = yes; then
1077 AC_MSG_ERROR([--enable-shl specified, but functions are missing!]) 913 AC_MSG_ERROR([--enable-shl specified, but functions are missing!])
1078 fi 914 fi
1079 WITH_SHL=false 915 WITH_SHL=false
1080 fi 916 fi
1081 if $WITH_SHL; then 917 if $WITH_SHL; then
1082 AC_DEFINE(WITH_SHL, 1) 918 AC_DEFINE(WITH_SHL, 1, [Define if using dld for dynamic linking.])
1083 fi 919 fi
1084 else 920 else
1085 WITH_SHL=false 921 WITH_SHL=false
1086 fi 922 fi
1087 AC_SUBST(WITH_SHL) 923 AC_SUBST(WITH_SHL)
1088 924
1089 ### Set WITH_DYNAMIC_LINKING after all the other shared library stuff 925 ### Set WITH_DYNAMIC_LINKING after all the other shared library stuff
1090 ### has been determined. 926 ### has been determined.
1091 927
1092 if $WITH_DL || $WITH_SHL; then 928 if $WITH_DL || $WITH_SHL; then
1093 AC_DEFINE(WITH_DYNAMIC_LINKING, 1) 929 AC_DEFINE(WITH_DYNAMIC_LINKING, 1, [Define if using dynamic linking.])
1094 WITH_DYNAMIC_LINKING=true 930 WITH_DYNAMIC_LINKING=true
1095 else 931 else
1096 WITH_DYNAMIC_LINKING=false 932 WITH_DYNAMIC_LINKING=false
1097 fi 933 fi
1098 AC_SUBST(WITH_DYNAMIC_LINKING) 934 AC_SUBST(WITH_DYNAMIC_LINKING)
1112 #include <time.h> 948 #include <time.h>
1113 #endif 949 #endif
1114 #endif], [static struct timeval x; x.tv_sec = x.tv_usec;], 950 #endif], [static struct timeval x; x.tv_sec = x.tv_usec;],
1115 [AC_MSG_RESULT(yes) 951 [AC_MSG_RESULT(yes)
1116 HAVE_TIMEVAL=yes 952 HAVE_TIMEVAL=yes
1117 AC_DEFINE(HAVE_TIMEVAL)], 953 AC_DEFINE(HAVE_TIMEVAL, 1, [Define if struct timeval is defined.])],
1118 [AC_MSG_RESULT(no) 954 [AC_MSG_RESULT(no)
1119 HAVE_TIMEVAL=no]) 955 HAVE_TIMEVAL=no])
1120 956
1121 if test "x$HAVE_TIMEVAL" = xyes; then 957 if test "x$HAVE_TIMEVAL" = xyes; then
1122 AC_MSG_CHECKING(whether gettimeofday can't accept two arguments) 958 AC_MSG_CHECKING(whether gettimeofday can't accept two arguments)
1130 #include <time.h> 966 #include <time.h>
1131 #endif 967 #endif
1132 #endif],[struct timeval time; struct timezone dummy; 968 #endif],[struct timeval time; struct timezone dummy;
1133 gettimeofday (&time, &dummy);], [AC_MSG_RESULT(no)], 969 gettimeofday (&time, &dummy);], [AC_MSG_RESULT(no)],
1134 [AC_MSG_RESULT(yes) 970 [AC_MSG_RESULT(yes)
1135 AC_DEFINE(GETTIMEOFDAY_NO_TZ)]) 971 AC_DEFINE(GETTIMEOFDAY_NO_TZ, 1, [Define if your system has a single-arg prototype for gettimeofday.])])
1136 fi 972 fi
1137 973
1138 dnl Would like to get rid of this cruft, and just have 974 dnl Would like to get rid of this cruft, and just have
1139 dnl 975 dnl
1140 dnl AC_CHECK_FUNCS(finite isnan isinf) 976 dnl AC_CHECK_FUNCS(finite isnan isinf)
1153 case "$canonical_host_type" in 989 case "$canonical_host_type" in
1154 m68k-hp-hpux*) 990 m68k-hp-hpux*)
1155 ;; 991 ;;
1156 *-*-sco*) 992 *-*-sco*)
1157 AC_MSG_RESULT([defining SCO to be 1]) 993 AC_MSG_RESULT([defining SCO to be 1])
1158 AC_DEFINE(SCO, 1) 994 AC_DEFINE(SCO, 1, [Define if using an SCO system.])
1159 AC_MSG_RESULT([forcing HAVE_ISINF for SCO]) 995 AC_MSG_RESULT([forcing HAVE_ISINF for SCO])
1160 AC_DEFINE(HAVE_ISINF, 1) 996 AC_DEFINE(HAVE_ISINF, 1, [Define if you have isinf().])
1161 AC_MSG_RESULT([forcing HAVE_ISNAN for SCO]) 997 AC_MSG_RESULT([forcing HAVE_ISNAN for SCO])
1162 AC_DEFINE(HAVE_ISNAN, 1) 998 AC_DEFINE(HAVE_ISNAN, 1, [Define if you have isnan().])
1163 ;; 999 ;;
1164 *) 1000 *)
1165 AC_CHECK_FUNCS(finite isnan isinf) 1001 AC_CHECK_FUNCS(finite isnan isinf)
1166 ;; 1002 ;;
1167 esac 1003 esac
1170 1006
1171 AC_CHECK_FUNCS(acosh asinh atanh erf erfc) 1007 AC_CHECK_FUNCS(acosh asinh atanh erf erfc)
1172 1008
1173 ### Checks for OS specific cruft. 1009 ### Checks for OS specific cruft.
1174 1010
1175 AC_STRUCT_ST_BLKSIZE 1011 AC_CHECK_MEMBERS([struct stat.st_blksize, struct stat.st_blocks, struct stat.st_rdev])
1176 AC_STRUCT_ST_BLOCKS 1012
1177 AC_STRUCT_ST_RDEV
1178 AC_STRUCT_TM 1013 AC_STRUCT_TM
1179 AC_STRUCT_TIMEZONE 1014 AC_STRUCT_TIMEZONE
1180 AC_FUNC_CLOSEDIR_VOID 1015 AC_FUNC_CLOSEDIR_VOID
1181 1016
1182 OCTAVE_STRUCT_GR_PASSWD 1017 OCTAVE_STRUCT_GR_PASSWD
1183 1018
1019 octave_found_termlib=no
1184 for termlib in ncurses curses termcap terminfo termlib; do 1020 for termlib in ncurses curses termcap terminfo termlib; do
1185 AC_CHECK_LIB(${termlib}, tputs, [TERMLIBS="${TERMLIBS} -l${termlib}"]) 1021 AC_CHECK_LIB(${termlib}, tputs, [TERMLIBS="${TERMLIBS} -l${termlib}"])
1186 case "${TERMLIBS}" in 1022 case "${TERMLIBS}" in
1187 *-l${termlib}*) 1023 *-l${termlib}*)
1188 LIBS="$TERMLIBS $LIBS" 1024 LIBS="$TERMLIBS $LIBS"
1025 octave_found_termlib=yes
1189 break 1026 break
1190 ;; 1027 ;;
1191 esac 1028 esac
1192 done 1029 done
1193 1030
1194 if test "$ac_cv_lib_termcap_tputs" = yes \ 1031 if test "$octave_found_termlib" = no; then
1195 || test "$ac_cv_lib_terminfo_tputs" = yes \ 1032 warn_termlibs="I couldn't find -ltermcap, -lterminfo, -lncurses, -lcurses, o\
1196 || test "$ac_cv_lib_ncurses_tputs" = yes \ 1033 r -ltermlib!"
1197 || test "$ac_cv_lib_curses_tputs" = yes \
1198 || test "$ac_cv_lib_termlib_tputs" = yes; then
1199 true
1200 else
1201 warn_termlibs="I couldn't find -ltermcap, -lterminfo, -lncurses, -lcurses, or -ltermlib!"
1202 AC_MSG_WARN($warn_termlibs) 1034 AC_MSG_WARN($warn_termlibs)
1203 fi 1035 fi
1204 1036
1205 OCTAVE_ENABLE_READLINE 1037 OCTAVE_ENABLE_READLINE
1206 1038
1207 AC_MSG_CHECKING([for struct exception in math.h]) 1039 AC_MSG_CHECKING([for struct exception in math.h])
1208 AC_TRY_LINK([#include <math.h>], 1040 AC_TRY_LINK([#include <math.h>],
1209 [struct exception *x; x->type; x->name;], 1041 [struct exception *x; x->type; x->name;],
1210 AC_MSG_RESULT(yes) 1042 AC_MSG_RESULT(yes)
1211 AC_DEFINE(EXCEPTION_IN_MATH, 1), 1043 AC_DEFINE(EXCEPTION_IN_MATH, 1, [Define if your math.h declares struct exception for matherr().]),
1212 AC_MSG_RESULT(no)) 1044 AC_MSG_RESULT(no))
1213 1045
1214 ### Signal stuff. 1046 ### Signal stuff.
1215 1047
1216 AC_TYPE_SIGNAL 1048 AC_TYPE_SIGNAL
1217 AC_DECL_SYS_SIGLIST 1049 AC_DECL_SYS_SIGLIST
1218 AC_MSG_CHECKING([for sys_siglist variable]) 1050 AC_MSG_CHECKING([for sys_siglist variable])
1219 AC_TRY_LINK([#include <stdio.h>], 1051 AC_TRY_LINK([#include <stdio.h>],
1220 [extern char *sys_siglist[]; printf ("%s\n", sys_siglist[1]);], 1052 [extern char *sys_siglist[]; printf ("%s\n", sys_siglist[1]);],
1221 AC_MSG_RESULT(yes) 1053 AC_MSG_RESULT(yes)
1222 AC_DEFINE(HAVE_SYS_SIGLIST, 1), 1054 AC_DEFINE(HAVE_SYS_SIGLIST, 1, [Define if your system has a sys_siglist variable.]),
1223 AC_MSG_RESULT(no)) 1055 AC_MSG_RESULT(no))
1224 OCTAVE_SIGNAL_CHECK 1056 OCTAVE_SIGNAL_CHECK
1225 OCTAVE_REINSTALL_SIGHANDLERS 1057 OCTAVE_REINSTALL_SIGHANDLERS
1226 1058
1227 ### Type stuff. 1059 ### Type stuff.
1239 ### A system dependent kluge or two. 1071 ### A system dependent kluge or two.
1240 1072
1241 AC_CHECK_FUNCS(getrusage times) 1073 AC_CHECK_FUNCS(getrusage times)
1242 case "$canonical_host_type" in 1074 case "$canonical_host_type" in
1243 *-*-cygwin32) 1075 *-*-cygwin32)
1244 AC_DEFINE(RUSAGE_TIMES_ONLY, 1) 1076 AC_DEFINE(RUSAGE_TIMES_ONLY, 1, [Define if your struct rusage only has time information.])
1245 ;; 1077 ;;
1246 esac 1078 esac
1247 1079
1248 bsd_gcc_kluge_targets_frag=/dev/null 1080 bsd_gcc_kluge_targets_frag=/dev/null
1249 case "$canonical_host_type" in 1081 case "$canonical_host_type" in
1347 1179
1348 export CC 1180 export CC
1349 export CXX 1181 export CXX
1350 export F77 1182 export F77
1351 1183
1352 AC_CONFIG_SUBDIRS($GLOB_DIR kpathsea scripts $PLPLOT_DIR) 1184 AC_CONFIG_SUBDIRS(kpathsea scripts)
1185
1186 # autoconf 2.50 deprecates the use of variables (e.g. $GLOB_DIR)
1187 # in AC_CONFIG_SUBDIRS; the following form is recommended instead:
1188
1189 if test "x$GLOB_DIR" = xglob; then
1190 AC_CONFIG_SUBDIRS(glob)
1191 fi
1192
1193 if test "x$PLPLOT_DIR" = xplplot; then
1194 AC_CONFIG_SUBDIRS(plplot)
1195 fi
1353 1196
1354 ### Do the substitutions in all the Makefiles. 1197 ### Do the substitutions in all the Makefiles.
1355 1198
1356 AC_OUTPUT(Makefile octMakefile Makeconf install-octave \ 1199 AC_CONFIG_FILES([Makefile octMakefile Makeconf install-octave \
1357 test/Makefile dlfcn/Makefile \ 1200 test/Makefile dlfcn/Makefile \
1358 doc/Makefile doc/faq/Makefile doc/interpreter/Makefile \ 1201 doc/Makefile doc/faq/Makefile doc/interpreter/Makefile \
1359 doc/liboctave/Makefile doc/refcard/Makefile emacs/Makefile \ 1202 doc/liboctave/Makefile doc/refcard/Makefile emacs/Makefile \
1360 examples/Makefile liboctave/Makefile src/Makefile \ 1203 examples/Makefile liboctave/Makefile src/Makefile \
1361 libcruft/Makefile libcruft/Makerules \ 1204 libcruft/Makefile libcruft/Makerules \
1365 libcruft/minpack/Makefile libcruft/misc/Makefile \ 1208 libcruft/minpack/Makefile libcruft/misc/Makefile \
1366 libcruft/odepack/Makefile libcruft/ordered-qz/Makefile \ 1209 libcruft/odepack/Makefile libcruft/ordered-qz/Makefile \
1367 libcruft/quadpack/Makefile libcruft/ranlib/Makefile \ 1210 libcruft/quadpack/Makefile libcruft/ranlib/Makefile \
1368 libcruft/slatec-fn/Makefile libcruft/slatec-err/Makefile \ 1211 libcruft/slatec-fn/Makefile libcruft/slatec-err/Makefile \
1369 libcruft/villad/Makefile \ 1212 libcruft/villad/Makefile \
1370 libcruft/blas-xtra/Makefile libcruft/lapack-xtra/Makefile) 1213 libcruft/blas-xtra/Makefile libcruft/lapack-xtra/Makefile])
1371 1214 AC_OUTPUT
1372 AC_OUTPUT_COMMANDS([chmod +x install-octave]) 1215
1216 AC_CONFIG_COMMANDS([default-1],[[chmod +x install-octave]],[[]])
1373 1217
1374 ### Print a summary so that important information isn't missed. 1218 ### Print a summary so that important information isn't missed.
1375 1219
1376 if test -z "$F77"; then 1220 if test -z "$F77"; then
1377 FORT="$F2C $F2CFLAGS" 1221 FORT="$F2C $F2CFLAGS"