Mercurial > hg > octave-lyh
comparison configure.in @ 3130:02766207b74c
[project @ 1998-01-25 08:27:23 by jwe]
author | jwe |
---|---|
date | Sun, 25 Jan 1998 08:27:25 +0000 |
parents | d6ebd123170a |
children | 9c5160c83bd2 |
comparison
equal
deleted
inserted
replaced
3129:4061d67231a8 | 3130:02766207b74c |
---|---|
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.293 $) | 24 AC_REVISION($Revision: 1.294 $) |
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) |
38 OCTAVE_SET_DEFAULT(octincludedir, '$(includedir)/octave-$(version)/octave') | 38 OCTAVE_SET_DEFAULT(octincludedir, '$(includedir)/octave-$(version)/octave') |
39 OCTAVE_SET_DEFAULT(fcnfiledir, '$(datadir)/octave/$(version)/m') | 39 OCTAVE_SET_DEFAULT(fcnfiledir, '$(datadir)/octave/$(version)/m') |
40 OCTAVE_SET_DEFAULT(localfcnfiledir, '$(datadir)/octave/site/m') | 40 OCTAVE_SET_DEFAULT(localfcnfiledir, '$(datadir)/octave/site/m') |
41 OCTAVE_SET_DEFAULT(localfcnfilepath, '$(localfcnfiledir)//') | 41 OCTAVE_SET_DEFAULT(localfcnfilepath, '$(localfcnfiledir)//') |
42 OCTAVE_SET_DEFAULT(archlibdir, | 42 OCTAVE_SET_DEFAULT(archlibdir, |
43 '$(libexecdir)/octave/$(version)/exec/$(target_host_type)') | 43 '$(libexecdir)/octave/$(version)/exec/$(canonical_host_type)') |
44 OCTAVE_SET_DEFAULT(localarchlibdir, | 44 OCTAVE_SET_DEFAULT(localarchlibdir, |
45 '$(libexecdir)/octave/site/exec/$(target_host_type)') | 45 '$(libexecdir)/octave/site/exec/$(canonical_host_type)') |
46 OCTAVE_SET_DEFAULT(octfiledir, | 46 OCTAVE_SET_DEFAULT(octfiledir, |
47 '$(libexecdir)/octave/$(version)/oct/$(target_host_type)') | 47 '$(libexecdir)/octave/$(version)/oct/$(canonical_host_type)') |
48 OCTAVE_SET_DEFAULT(localoctfiledir, | 48 OCTAVE_SET_DEFAULT(localoctfiledir, |
49 '$(libexecdir)/octave/site/oct/$(target_host_type)') | 49 '$(libexecdir)/octave/site/oct/$(canonical_host_type)') |
50 OCTAVE_SET_DEFAULT(localoctfilepath, '$(localoctfiledir)//') | 50 OCTAVE_SET_DEFAULT(localoctfilepath, '$(localoctfiledir)//') |
51 OCTAVE_SET_DEFAULT(fcnfilepath, | 51 OCTAVE_SET_DEFAULT(fcnfilepath, |
52 '.:$(localoctfilepath):$(localfcnfilepath):$(octfiledir)//:$(fcnfiledir)//') | 52 '.:$(localoctfilepath):$(localfcnfilepath):$(octfiledir)//:$(fcnfiledir)//') |
53 OCTAVE_SET_DEFAULT(imagedir, '$(datadir)/octave/$(version)/imagelib') | 53 OCTAVE_SET_DEFAULT(imagedir, '$(datadir)/octave/$(version)/imagelib') |
54 OCTAVE_SET_DEFAULT(imagepath, '.:$(imagedir)//') | 54 OCTAVE_SET_DEFAULT(imagepath, '.:$(imagedir)//') |
285 ieee_fp_flag=-mieee | 285 ieee_fp_flag=-mieee |
286 XTRA_CXXFLAGS="$XTRA_CXXFLAGS -mieee"]) | 286 XTRA_CXXFLAGS="$XTRA_CXXFLAGS -mieee"]) |
287 ;; | 287 ;; |
288 esac | 288 esac |
289 | 289 |
290 ### Octave doesn't use exceptions yet, so disable them for somewhat | 290 ### Octave doesn't use run-time type identification or exceptions yet, |
291 ### faster and smaller code. | 291 ### so disable them for somewhat faster and smaller code. |
292 | |
293 OCTAVE_CXX_FLAG(-fno-rtti, | |
294 [XTRA_CXXFLAGS="$XTRA_CXXFLAGS -fno-rtti"]) | |
292 | 295 |
293 OCTAVE_CXX_FLAG(-fno-exceptions, | 296 OCTAVE_CXX_FLAG(-fno-exceptions, |
294 [XTRA_CXXFLAGS="$XTRA_CXXFLAGS -fno-exceptions"]) | 297 [XTRA_CXXFLAGS="$XTRA_CXXFLAGS -fno-exceptions"]) |
295 | 298 |
296 ### We do our own template instantiation. | 299 ### We do our own template instantiation. |
313 fi | 316 fi |
314 AC_SUBST(LD_STATIC_FLAG) | 317 AC_SUBST(LD_STATIC_FLAG) |
315 | 318 |
316 ### We need these before trying to find libf2c. | 319 ### We need these before trying to find libf2c. |
317 | 320 |
318 if test -z "$AR"; then | 321 OCTAVE_PROG_AR |
319 AR=ar | |
320 fi | |
321 AC_SUBST(AR) | |
322 | |
323 if test -z "$ARFLAGS"; then | |
324 ARFLAGS="rc" | |
325 fi | |
326 AC_SUBST(ARFLAGS) | |
327 | 322 |
328 AC_PROG_RANLIB | 323 AC_PROG_RANLIB |
329 | 324 |
330 ### If we haven't been forced to use a particular Fortran compiler, | 325 ### If we haven't been forced to use a particular Fortran compiler, |
331 ### try to find one using any one of several common Un*x Fortran | 326 ### try to find one using any one of several common Un*x Fortran |
377 fi | 372 fi |
378 | 373 |
379 have_fortran_compiler=false | 374 have_fortran_compiler=false |
380 have_f2c=false | 375 have_f2c=false |
381 | 376 |
382 f77_is_g77=false | |
383 | |
384 if $use_f2c; then | 377 if $use_f2c; then |
385 have_f2c=true | 378 have_f2c=true |
386 else | 379 else |
387 if test -n "$F77"; then | 380 if test -n "$F77"; then |
388 OCTAVE_FLIBS | 381 OCTAVE_FLIBS |
389 OCTAVE_F77_APPEND_UNDERSCORE | 382 OCTAVE_F77_APPEND_UNDERSCORE |
390 OCTAVE_F2C_F77_COMPAT | 383 OCTAVE_F2C_F77_COMPAT |
391 if test "$octave_cv_f2c_f77_compat" = no; then | 384 if test "$octave_cv_f2c_f77_compat" = no; then |
392 F77= | 385 F77= |
393 else | 386 else |
394 if $use_g77; then | |
395 f77_is_g77=true | |
396 else | |
397 f77_output=`$F77 -v 2>&1 | grep "GNU F77"` | |
398 if test -n "$f77_output"; then | |
399 f77_is_g77=true | |
400 fi | |
401 fi | |
402 if test -z "$FFLAGS"; then | 387 if test -z "$FFLAGS"; then |
403 FFLAGS="-O" | 388 FFLAGS="-O" |
404 fi | 389 fi |
405 case "$canonical_host_type" in | 390 case "$canonical_host_type" in |
406 alpha*-*-*) | 391 alpha*-*-*) |
407 if $f77_is_g77 || test -z "$ieee_fp_flag" ; then | 392 if test "$f77_is_g77" = yes || test -z "$ieee_fp_flag" ; then |
408 true | 393 true |
409 else | 394 else |
410 FFLAGS="-fpe1 $FFLAGS" | 395 FFLAGS="-fpe1 $FFLAGS" |
411 fi | 396 fi |
412 ;; | 397 ;; |
492 AC_MSG_WARN([in order to build octave, you must have a compatible]) | 477 AC_MSG_WARN([in order to build octave, you must have a compatible]) |
493 AC_MSG_WARN([Fortran compiler or f2c installed and in your path.]) | 478 AC_MSG_WARN([Fortran compiler or f2c installed and in your path.]) |
494 AC_MSG_ERROR([See the file INSTALL for more information.]) | 479 AC_MSG_ERROR([See the file INSTALL for more information.]) |
495 fi | 480 fi |
496 | 481 |
497 FORTRAN_MAIN_FLAG= | 482 OCTAVE_F77_MAIN_FLAG |
498 case "$canonical_host_type" in | |
499 *-linux-*) | |
500 FORTRAN_MAIN_FLAG="-u MAIN__" | |
501 ;; | |
502 esac | |
503 if test -n "$FORTRAN_MAIN_FLAG"; then | |
504 AC_MSG_RESULT([defining FORTRAN_MAIN_FLAG to be $FORTRAN_MAIN_FLAG]) | |
505 fi | |
506 | 483 |
507 FC=$F77 | 484 FC=$F77 |
508 AC_SUBST(FC) | 485 AC_SUBST(FC) |
509 AC_SUBST(F77) | 486 AC_SUBST(F77) |
510 AC_SUBST(FFLAGS) | 487 AC_SUBST(FFLAGS) |
511 AC_SUBST(FLIBS) | 488 AC_SUBST(FLIBS) |
512 AC_SUBST(F2C) | 489 AC_SUBST(F2C) |
513 AC_SUBST(F2CFLAGS) | 490 AC_SUBST(F2CFLAGS) |
514 AC_SUBST(FORTRAN_MAIN_FLAG) | |
515 AC_SUBST_FILE(f77_rules_frag) | 491 AC_SUBST_FILE(f77_rules_frag) |
516 | 492 |
517 ### Handle dynamic linking and shared library options. | 493 ### Handle dynamic linking and shared library options. |
518 | 494 |
519 ### Allow the user to experiment with dynamic linking using dlopen/dlsym. | 495 ### Allow the user to experiment with dynamic linking using dlopen/dlsym. |
598 CXXPICFLAG= | 574 CXXPICFLAG= |
599 FPICFLAG= | 575 FPICFLAG= |
600 DLFCN_DIR=dlfcn | 576 DLFCN_DIR=dlfcn |
601 ;; | 577 ;; |
602 hppa*-hp-hpux*) | 578 hppa*-hp-hpux*) |
603 if $f77_is_g77; then | 579 if test "$f77_is_g77" = yes; then |
604 FPICFLAG=-fPIC | 580 FPICFLAG=-fPIC |
605 else | 581 else |
606 FPICFLAG=+Z | 582 FPICFLAG=+Z |
607 fi | 583 fi |
608 SHLEXT=sl | 584 SHLEXT=sl |
614 CXXPICFLAG= | 590 CXXPICFLAG= |
615 FPICFLAG= | 591 FPICFLAG= |
616 RLD_FLAG='-L$(libdir)' | 592 RLD_FLAG='-L$(libdir)' |
617 ;; | 593 ;; |
618 sparc-sun-sunos4*) | 594 sparc-sun-sunos4*) |
619 if $f77_is_g77; then | 595 if test "$f77_is_g77" = yes; then |
620 FPICFLAG=-fPIC | 596 FPICFLAG=-fPIC |
621 else | 597 else |
622 FPICFLAG=-PIC | 598 FPICFLAG=-PIC |
623 fi | 599 fi |
624 SH_LD=ld | 600 SH_LD=ld |
625 SH_LDFLAGS="-assert nodefinitions" | 601 SH_LDFLAGS="-assert nodefinitions" |
626 RLD_FLAG='-L$(libdir)' | 602 RLD_FLAG='-L$(libdir)' |
627 ;; | 603 ;; |
628 sparc-sun-solaris2*) | 604 sparc-sun-solaris2*) |
629 if $f77_is_g77; then | 605 if test "$f77_is_g77" = yes; then |
630 FPICFLAG=-fPIC | 606 FPICFLAG=-fPIC |
631 else | 607 else |
632 FPICFLAG=-PIC | 608 FPICFLAG=-PIC |
633 fi | 609 fi |
634 RLD_FLAG='-Xlinker -R -Xlinker $(libdir)' | 610 RLD_FLAG='-Xlinker -R -Xlinker $(libdir)' |
692 AC_SUBST(SPECIAL_MATH_LIB) | 668 AC_SUBST(SPECIAL_MATH_LIB) |
693 | 669 |
694 ### How big are ints and how are they oriented? These could probably | 670 ### How big are ints and how are they oriented? These could probably |
695 ### be eliminated in favor of run-time checks. | 671 ### be eliminated in favor of run-time checks. |
696 | 672 |
697 AC_CHECK_SIZEOF(short) | 673 AC_CHECK_SIZEOF(short, 2) |
698 AC_CHECK_SIZEOF(int) | 674 AC_CHECK_SIZEOF(int, 4) |
699 AC_CHECK_SIZEOF(long) | 675 AC_CHECK_SIZEOF(long, 4) |
700 | 676 |
701 ### Does the C compiler handle alloca() and const correctly? | 677 ### Does the C compiler handle alloca() and const correctly? |
702 | 678 |
703 AC_ALLOCA | 679 AC_ALLOCA |
704 AC_C_CONST | 680 AC_C_CONST |
895 ;; | 871 ;; |
896 esac | 872 esac |
897 | 873 |
898 ### Check for nonstandard but common math functions that we need. | 874 ### Check for nonstandard but common math functions that we need. |
899 | 875 |
900 AC_CHECK_FUNCS(acosh asinh atanh erf erfc gamma lgamma) | 876 AC_CHECK_FUNCS(acosh asinh atanh erf erfc) |
877 | |
878 case "$canonical_host_type" in | |
879 *-*-cygwin32) | |
880 AC_MSG_RESULT(assuming gamma works) | |
881 AC_DEFINE(HAVE_GAMMA, 1) | |
882 AC_MSG_RESULT(assuming lgamma works) | |
883 AC_DEFINE(HAVE_LGAMMA, 1) | |
884 ;; | |
885 *) | |
886 AC_CHECK_FUNCS(gamma lgamma) | |
887 ;; | |
888 esac | |
901 | 889 |
902 ### Checks for OS specific cruft. | 890 ### Checks for OS specific cruft. |
903 | 891 |
904 AC_STRUCT_ST_BLKSIZE | 892 AC_STRUCT_ST_BLKSIZE |
905 AC_STRUCT_ST_BLOCKS | 893 AC_STRUCT_ST_BLOCKS |
1047 ;; | 1035 ;; |
1048 esac | 1036 esac |
1049 | 1037 |
1050 AC_PROG_LN_S | 1038 AC_PROG_LN_S |
1051 | 1039 |
1052 AC_CHECK_PROG(RUNTEST, runtest, runtest, []) | 1040 OCTAVE_PROG_RUNTEST |
1053 if test -z "$RUNTEST"; then | |
1054 warn_runtest="I didn't find runtest -- install DejaGNU if you want to run \`make check'" | |
1055 AC_MSG_WARN($warn_runtest) | |
1056 fi | |
1057 AC_SUBST(RUNTEST) | |
1058 | 1041 |
1059 AC_PROG_INSTALL | 1042 AC_PROG_INSTALL |
1060 INSTALL_SCRIPT='${INSTALL}' | 1043 INSTALL_SCRIPT='${INSTALL}' |
1061 AC_SUBST(INSTALL_SCRIPT) | 1044 AC_SUBST(INSTALL_SCRIPT) |
1045 | |
1046 OCTAVE_PROG_GNUPLOT | |
1047 OCTAVE_PROG_PAGER | |
1062 | 1048 |
1063 EXE= | 1049 EXE= |
1064 case "$canonical_host_type" in | 1050 case "$canonical_host_type" in |
1065 *-*-cygwin32) | 1051 *-*-cygwin32) |
1066 EXE=.exe | 1052 EXE=.exe |
1067 ;; | 1053 ;; |
1068 esac | 1054 esac |
1069 AC_SUBST(EXE) | 1055 AC_SUBST(EXE) |
1070 | |
1071 AC_CHECK_PROG(GNUPLOT_BINARY, gnuplot, gnuplot, []) | |
1072 if test -n "$GNUPLOT_BINARY"; then | |
1073 AC_MSG_CHECKING([to see if your gnuplot supports multiplot]) | |
1074 if test -z "`echo 'set term unknown; set multiplot' | \ | |
1075 $GNUPLOT_BINARY 2>&1`"; then | |
1076 AC_MSG_RESULT([yes]) | |
1077 AC_DEFINE(GNUPLOT_HAS_MULTIPLOT, 1) | |
1078 else | |
1079 AC_MSG_RESULT([no]) | |
1080 fi | |
1081 AC_MSG_CHECKING([to see if your gnuplot supports multiple plot windows]) | |
1082 if test -z "`echo 'set term x11 2' | $GNUPLOT_BINARY 2>&1`"; then | |
1083 AC_MSG_RESULT([yes]) | |
1084 AC_DEFINE(GNUPLOT_HAS_FRAMES, 1) | |
1085 else | |
1086 AC_MSG_RESULT([no]) | |
1087 fi | |
1088 else | |
1089 warn_gnuplot="yes" | |
1090 | |
1091 ## If you change this text, be sure to also copy it to the set of | |
1092 ## warnings at the end of the script | |
1093 | |
1094 AC_MSG_WARN([I didn't find gnuplot. It isn't necessary to have gnuplot]) | |
1095 AC_MSG_WARN([installed, but you won't be able to use any of Octave's]) | |
1096 AC_MSG_WARN([plotting commands without it.]) | |
1097 AC_MSG_WARN([]) | |
1098 AC_MSG_WARN([If gnuplot is installed but it isn't in your path, you can]) | |
1099 AC_MSG_WARN([tell Octave where to find it by typing the command]) | |
1100 AC_MSG_WARN([]) | |
1101 AC_MSG_WARN([gnuplot_binary = "/full/path/to/gnuplot/binary"]) | |
1102 AC_MSG_WARN([]) | |
1103 AC_MSG_WARN([at the Octave prompt.]) | |
1104 fi | |
1105 | |
1106 octave_possible_pagers="less more page pg" | |
1107 case "$canonical_host_type" in | |
1108 *-*-cygwin32) | |
1109 octave_possible_pagers="$octave_possible_pagers more.com" | |
1110 ;; | |
1111 esac | |
1112 | |
1113 AC_CHECK_PROGS(DEFAULT_PAGER, $octave_possible_pagers, []) | |
1114 if test -z "$DEFAULT_PAGER"; then | |
1115 warn_less="I couldn't find \`less', \`more', \`page', or \`pg'" | |
1116 AC_MSG_WARN($warn_less) | |
1117 fi | |
1118 | 1056 |
1119 ### Even though we include config.h, we need to have the preprocessor | 1057 ### Even though we include config.h, we need to have the preprocessor |
1120 ### defines available in a variable for the octave-bug script. Use | 1058 ### defines available in a variable for the octave-bug script. Use |
1121 ### UGLY_DEFS for that. | 1059 ### UGLY_DEFS for that. |
1122 | 1060 |