comparison configure.in @ 5844:034cdbd34c0a

[project @ 2006-06-07 15:38:58 by jwe]
author jwe
date Wed, 07 Jun 2006 15:38:58 +0000
parents ecb61a521d5b
children 68f8017ef077
comparison
equal deleted inserted replaced
5843:393100dce990 5844:034cdbd34c0a
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.512 $) 32 AC_REVISION($Revision: 1.513 $)
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
38
37 AC_DEFINE(OCTAVE_SOURCE, 1, [Define if this is Octave.]) 39 AC_DEFINE(OCTAVE_SOURCE, 1, [Define if this is Octave.])
38 40
39 OCTAVE_HOST_TYPE
40
41 AC_GNU_SOURCE 41 AC_GNU_SOURCE
42 42
43 AC_AIX 43 AC_AIX
44 AC_MINIX 44 AC_MINIX
45 AC_ISC_POSIX 45 AC_ISC_POSIX
46 46
47 ### Path separator. 47 ### Path separator.
48 sepchar=: 48 sepchar=:
49 AC_ARG_WITH(sepchar, 49 AC_ARG_WITH(sepchar,
50 [AS_HELP_STRING([--with-sepchar=<char>], 50 [AS_HELP_STRING([--with-sepchar=<char>],
51 [use <char> as the path separation character])]) 51 [use <char> as the path separation character])])
52 case $with_sepchar in 52 case $with_sepchar in
53 yes | "") 53 yes | "")
54 case "$canonical_host_type" in 54 case "$canonical_host_type" in
55 *-*-mingw*) 55 *-*-mingw*)
56 sepchar=';' 56 sepchar=';'
102 AC_SUBST(config_opts) 102 AC_SUBST(config_opts)
103 103
104 ### Allow the user to force us to use f2c. 104 ### Allow the user to force us to use f2c.
105 105
106 AC_ARG_WITH(f2c, 106 AC_ARG_WITH(f2c,
107 [ --with-f2c use f2c even if Fortran compiler is available], 107 [AS_HELP_STRING([--with-f2c],
108 [use f2c even if Fortran compiler is available])],
108 [if test "$withval" = no; then use_f2c=false; else use_f2c=true; fi], 109 [if test "$withval" = no; then use_f2c=false; else use_f2c=true; fi],
109 use_f2c=false) 110 use_f2c=false)
110 111
111 ### Allow the user to force us to use f77. 112 ### Allow the user to force us to use f77.
112 113
113 AC_ARG_WITH(f77, 114 AC_ARG_WITH(f77,
114 [ --with-f77 use f77 to compile Fortran subroutines], 115 [AS_HELP_STRING([--with-f77], [use f77 to compile Fortran subroutines])],
115 [if test "$withval" = no; then use_f77=false; else use_f77=true; fi], 116 [if test "$withval" = no; then use_f77=false; else use_f77=true; fi],
116 use_f77=false) 117 use_f77=false)
117 118
118 ### Make sure only one of the above options for Fortran compilers was 119 ### Make sure only one of the above options for Fortran compilers was
119 ### specified (multiple "no" or --without-FOO options are ok). 120 ### specified (multiple "no" or --without-FOO options are ok).
121 OCTAVE_CHECK_EXCLUSIVE_WITH_OPTIONS(f77, f2c, 122 OCTAVE_CHECK_EXCLUSIVE_WITH_OPTIONS(f77, f2c,
122 [warn_f2c_and_f77="--with-f2c and --with-f77 both specified! Using f77..." 123 [warn_f2c_and_f77="--with-f2c and --with-f77 both specified! Using f77..."
123 AC_MSG_WARN($warn_f2c_and_f77) 124 AC_MSG_WARN($warn_f2c_and_f77)
124 use_f2c=false]) 125 use_f2c=false])
125 126
126 dnl ### Allow the user disable support for plplot.
127 dnl
128 dnl # USE_PLPLOT=true
129 dnl # PLPLOT_DIR=plplot
130 dnl # LIBPLPLOT='$(TOPDIR)/plplot/libplplot.$(LIBEXT)
131 USE_PLPLOT=false
132 PLPLOT_DIR=""
133 LIBPLPLOT=""
134 dnl AC_ARG_ENABLE(plplot,
135 dnl [ --enable-plplot use plplot for plotting (default is yes)],
136 dnl [if test "$enableval" = no; then
137 dnl USE_PLPLOT=false;
138 dnl LIBPLPLOT="";
139 dnl PLPLOT_DIR="";
140 dnl fi], [])
141 dnl if $USE_PLPLOT; then
142 dnl AC_DEFINE(USE_PLPLOT, 1, [Define to use plplot.])
143 dnl fi
144 AC_SUBST(LIBPLPLOT)
145 AC_SUBST(PLPLOT_DIR)
146
147 ### Make it possible to have Octave's array and matrix classes do bounds 127 ### Make it possible to have Octave's array and matrix classes do bounds
148 ### checking on element references. This slows some operations down a 128 ### checking on element references. This slows some operations down a
149 ### bit, so it is turned off by default. 129 ### bit, so it is turned off by default.
150 130
151 BOUNDS_CHECKING=false 131 BOUNDS_CHECKING=false
152 AC_ARG_ENABLE(bounds-check, 132 AC_ARG_ENABLE(bounds-check,
153 [ --enable-bounds-check for internal array classes (default is no)], 133 [AS_HELP_STRING([--enable-bounds-check],
134 [for internal array classes (default is no)])],
154 [if test "$enableval" = yes; then BOUNDS_CHECKING=true; fi], []) 135 [if test "$enableval" = yes; then BOUNDS_CHECKING=true; fi], [])
155 if $BOUNDS_CHECKING; then 136 if $BOUNDS_CHECKING; then
156 AC_DEFINE(BOUNDS_CHECKING, 1, [Define to use internal bounds checking.]) 137 AC_DEFINE(BOUNDS_CHECKING, 1, [Define to use internal bounds checking.])
157 fi 138 fi
158 139
159 ### If possible, use a 64-bit integer type for array dimensions and indexing. 140 ### If possible, use a 64-bit integer type for array dimensions and indexing.
160 141
161 USE_64_BIT_IDX_T=false 142 USE_64_BIT_IDX_T=false
162 OCTAVE_IDX_TYPE=int 143 OCTAVE_IDX_TYPE=int
163 AC_ARG_ENABLE(64, 144 AC_ARG_ENABLE(64,
164 [ --enable-64 use 64-bit integer for array dimensions and indexing], 145 [AS_HELP_STRING([--enable-64],
146 [use 64-bit integer for array dimensions and indexing])],
165 [if test "$enableval" = yes; then USE_64_BIT_IDX_T=true; fi], []) 147 [if test "$enableval" = yes; then USE_64_BIT_IDX_T=true; fi], [])
166 if $USE_64_BIT_IDX_T; then 148 if $USE_64_BIT_IDX_T; then
167 AC_CHECK_SIZEOF(void *) 149 AC_CHECK_SIZEOF(void *)
168 AC_CHECK_SIZEOF(int) 150 AC_CHECK_SIZEOF(int)
169 AC_CHECK_SIZEOF(long) 151 AC_CHECK_SIZEOF(long)
191 173
192 ### It seems that there are some broken inline assembly functions in 174 ### It seems that there are some broken inline assembly functions in
193 ### the GNU libc. Since I'm not sure how to test whether we are using 175 ### the GNU libc. Since I'm not sure how to test whether we are using
194 ### GNU libc, just disable them for all platforms. 176 ### GNU libc, just disable them for all platforms.
195 177
196 AC_MSG_RESULT([defining __NO_MATH_INLINES avoids buggy GNU libc exp function]) 178 AC_MSG_NOTICE([defining __NO_MATH_INLINES avoids buggy GNU libc exp function])
197 AC_DEFINE(__NO_MATH_INLINES, 1, [Define if your version of GNU libc has buggy inline assembly code for math functions like exp.]) 179 AC_DEFINE(__NO_MATH_INLINES, 1, [Define if your version of GNU libc has buggy inline assembly code for math functions like exp.])
198 180
199 ### See which C++ compiler to use (we expect to find g++). 181 ### See which C++ compiler to use (we expect to find g++).
200 182
201 AC_PROG_CXX 183 AC_PROG_CXX
243 sed -e 's/^.*g.. version *//' -e 's/cygnus-//' -e 's/egcs-//'` 225 sed -e 's/^.*g.. version *//' -e 's/cygnus-//' -e 's/egcs-//'`
244 case "$gcc_version" in 226 case "$gcc_version" in
245 2.*) 227 2.*)
246 if test -z "$LDFLAGS"; then 228 if test -z "$LDFLAGS"; then
247 LDFLAGS="-g" 229 LDFLAGS="-g"
248 AC_MSG_RESULT([defining LDFLAGS to be $LDFLAGS]) 230 AC_MSG_NOTICE([defining LDFLAGS to be $LDFLAGS])
249 fi 231 fi
250 ;; 232 ;;
251 1.*) 233 1.*)
252 warn_gcc_version="gcc version $gcc_version is likely to cause problems" 234 warn_gcc_version="gcc version $gcc_version is likely to cause problems"
253 AC_MSG_WARN($warn_gcc_version) 235 AC_MSG_WARN($warn_gcc_version)
288 i[[3456789]]86-*-*) 270 i[[3456789]]86-*-*)
289 if test "$GCC" = yes; then 271 if test "$GCC" = yes; then
290 OCTAVE_CC_FLAG(-mieee-fp, [ 272 OCTAVE_CC_FLAG(-mieee-fp, [
291 ieee_fp_flag=-mieee-fp 273 ieee_fp_flag=-mieee-fp
292 XTRA_CFLAGS="$XTRA_CFLAGS -mieee-fp" 274 XTRA_CFLAGS="$XTRA_CFLAGS -mieee-fp"
293 AC_MSG_RESULT([adding -mieee-fp to XTRA_CFLAGS])]) 275 AC_MSG_NOTICE([adding -mieee-fp to XTRA_CFLAGS])])
294 276
295 ### OCTAVE_CC_FLAG(-ffloat-store, [ 277 ### OCTAVE_CC_FLAG(-ffloat-store, [
296 ### float_store_flag=-ffloat-store 278 ### float_store_flag=-ffloat-store
297 ### XTRA_CFLAGS="$XTRA_CFLAGS -ffloat-store" 279 ### XTRA_CFLAGS="$XTRA_CFLAGS -ffloat-store"
298 ### AC_MSG_RESULT([adding -ffloat-store to XTRA_CFLAGS])]) 280 ### AC_MSG_RESULT([adding -ffloat-store to XTRA_CFLAGS])])
299 fi 281 fi
300 if test "$GXX" = yes; then 282 if test "$GXX" = yes; then
301 OCTAVE_CXX_FLAG(-mieee-fp, [ 283 OCTAVE_CXX_FLAG(-mieee-fp, [
302 ieee_fp_flag=-mieee-fp 284 ieee_fp_flag=-mieee-fp
303 XTRA_CXXFLAGS="$XTRA_CXXFLAGS -mieee-fp" 285 XTRA_CXXFLAGS="$XTRA_CXXFLAGS -mieee-fp"
304 AC_MSG_RESULT([adding -mieee-fp to XTRA_CXXFLAGS])]) 286 AC_MSG_NOTICE([adding -mieee-fp to XTRA_CXXFLAGS])])
305 287
306 ### OCTAVE_CXX_FLAG(-ffloat-store, [ 288 ### OCTAVE_CXX_FLAG(-ffloat-store, [
307 ### float_store_flag=-ffloat-store 289 ### float_store_flag=-ffloat-store
308 ### XTRA_CXXFLAGS="$XTRA_CXXFLAGS -ffloat-store" 290 ### XTRA_CXXFLAGS="$XTRA_CXXFLAGS -ffloat-store"
309 ### AC_MSG_RESULT([adding -ffloat-store to XTRA_CXXFLAGS])]) 291 ### AC_MSG_RESULT([adding -ffloat-store to XTRA_CXXFLAGS])])
312 alpha*-*-*) 294 alpha*-*-*)
313 if test "$GCC" = yes; then 295 if test "$GCC" = yes; then
314 OCTAVE_CC_FLAG(-mieee, [ 296 OCTAVE_CC_FLAG(-mieee, [
315 ieee_fp_flag=-mieee 297 ieee_fp_flag=-mieee
316 XTRA_CFLAGS="$XTRA_CFLAGS -mieee" 298 XTRA_CFLAGS="$XTRA_CFLAGS -mieee"
317 AC_MSG_RESULT([adding -mieee to XTRA_CFLAGS])]) 299 AC_MSG_NOTICE([adding -mieee to XTRA_CFLAGS])])
318 else 300 else
319 OCTAVE_CC_FLAG(-ieee, [ 301 OCTAVE_CC_FLAG(-ieee, [
320 ieee_fp_flag=-ieee 302 ieee_fp_flag=-ieee
321 XTRA_CFLAGS="$XTRA_CFLAGS -ieee" 303 XTRA_CFLAGS="$XTRA_CFLAGS -ieee"
322 AC_MSG_RESULT([adding -ieee to XTRA_CFLAGS])]) 304 AC_MSG_NOTICE([adding -ieee to XTRA_CFLAGS])])
323 fi 305 fi
324 if test "$GXX" = yes; then 306 if test "$GXX" = yes; then
325 OCTAVE_CXX_FLAG(-mieee, [ 307 OCTAVE_CXX_FLAG(-mieee, [
326 ieee_fp_flag=-mieee 308 ieee_fp_flag=-mieee
327 XTRA_CXXFLAGS="$XTRA_CXXFLAGS -mieee" 309 XTRA_CXXFLAGS="$XTRA_CXXFLAGS -mieee"
328 AC_MSG_RESULT([adding -mieee to XTRA_CXXFLAGS])]) 310 AC_MSG_NOTICE([adding -mieee to XTRA_CXXFLAGS])])
329 else 311 else
330 OCTAVE_CXX_FLAG(-ieee, [ 312 OCTAVE_CXX_FLAG(-ieee, [
331 ieee_fp_flag=-ieee 313 ieee_fp_flag=-ieee
332 XTRA_CXXFLAGS="$XTRA_CXXFLAGS -ieee" 314 XTRA_CXXFLAGS="$XTRA_CXXFLAGS -ieee"
333 AC_MSG_RESULT([adding -ieee to XTRA_CXXFLAGS])]) 315 AC_MSG_NOTICE([adding -ieee to XTRA_CXXFLAGS])])
334 fi 316 fi
335 ;; 317 ;;
336 *ibm-aix4*) 318 *ibm-aix4*)
337 OCTAVE_CC_FLAG(-mminimal-toc, [ 319 OCTAVE_CC_FLAG(-mminimal-toc, [
338 XTRA_CFLAGS="$XTRA_CFLAGS -mminimal-toc"]) 320 XTRA_CFLAGS="$XTRA_CFLAGS -mminimal-toc"])
351 alpha*-dec-osf1.3) 333 alpha*-dec-osf1.3)
352 LD_STATIC_FLAG=-static 334 LD_STATIC_FLAG=-static
353 ;; 335 ;;
354 esac 336 esac
355 if test -n "$LD_STATIC_FLAG"; then 337 if test -n "$LD_STATIC_FLAG"; then
356 AC_MSG_RESULT([defining LD_STATIC_FLAG to be $LD_STATIC_FLAG]) 338 AC_MSG_NOTICE([defining LD_STATIC_FLAG to be $LD_STATIC_FLAG])
357 fi 339 fi
358 AC_SUBST(LD_STATIC_FLAG) 340 AC_SUBST(LD_STATIC_FLAG)
359 341
360 OCTAVE_CXX_PREPENDS_UNDERSCORE 342 OCTAVE_CXX_PREPENDS_UNDERSCORE
361 343
444 426
445 ### Check for ZLIB library. 427 ### Check for ZLIB library.
446 428
447 WITH_ZLIB=true 429 WITH_ZLIB=true
448 AC_ARG_WITH(zlib, 430 AC_ARG_WITH(zlib,
449 [ --without-zlib don't use zlib], 431 [AS_HELP_STRING([--without-zlib], [don't use zlib])],
450 with_zlib=$withval, with_zlib=yes) 432 with_zlib=$withval, with_zlib=yes)
451 433
452 zlib_lib= 434 zlib_lib=
453 if test "$with_zlib" = yes; then 435 if test "$with_zlib" = yes; then
454 zlib_lib="z" 436 zlib_lib="z"
470 if $WITH_ZLIB; then 452 if $WITH_ZLIB; then
471 ### Check for HDF5 library. 453 ### Check for HDF5 library.
472 454
473 WITH_HDF5=true 455 WITH_HDF5=true
474 AC_ARG_WITH(hdf5, 456 AC_ARG_WITH(hdf5,
475 [ --without-hdf5 don't use HDF5], 457 [AS_HELP_STRING([--without-hdf5], [don't use HDF5])],
476 with_hdf5=$withval, with_hdf5=yes) 458 with_hdf5=$withval, with_hdf5=yes)
477 459
478 hdf5_lib= 460 hdf5_lib=
479 if test "$with_hdf5" = yes; then 461 if test "$with_hdf5" = yes; then
480 hdf5_lib="hdf5" 462 hdf5_lib="hdf5"
514 # Installed fftw library, if any. 496 # Installed fftw library, if any.
515 FFTW_LIBS='' 497 FFTW_LIBS=''
516 AC_SUBST(FFTW_LIBS) 498 AC_SUBST(FFTW_LIBS)
517 499
518 AC_ARG_WITH(fftw, 500 AC_ARG_WITH(fftw,
519 [ --without-fftw use included fftpack instead of installed fftw], 501 [AS_HELP_STRING([--without-fftw],
502 [use included fftpack instead of installed fftw])],
520 with_fftw=$withval, with_fftw=yes) 503 with_fftw=$withval, with_fftw=yes)
521 504
522 if test "$with_fftw" = yes; then 505 if test "$with_fftw" = yes; then
523 have_fftw3_header=no 506 have_fftw3_header=no
524 with_fftw3=no 507 with_fftw3=no
534 fi 517 fi
535 518
536 # Checks for GLPK header and library. 519 # Checks for GLPK header and library.
537 520
538 AC_ARG_WITH(glpk, 521 AC_ARG_WITH(glpk,
539 [ --without-glpk don't use GLPK], 522 [AS_HELP_STRING([--without-glpk], [don't use GLPK])],
540 with_glpk=$withval, with_glpk=yes) 523 with_glpk=$withval, with_glpk=yes)
541 524
542 glpk_lib= 525 glpk_lib=
543 if test "$with_glpk" = yes; then 526 if test "$with_glpk" = yes; then
544 glpk_lib="glpk" 527 glpk_lib="glpk"
578 if test "$with_f77" = yes; then 561 if test "$with_f77" = yes; then
579 F77=f77 562 F77=f77
580 else 563 else
581 F77="$with_f77" 564 F77="$with_f77"
582 fi 565 fi
583 AC_MSG_RESULT([defining F77 to be $F77]) 566 AC_MSG_NOTICE([defining F77 to be $F77])
584 elif $use_f2c; then 567 elif $use_f2c; then
585 F77= 568 F77=
586 if test "$with_f2c" = yes; then 569 if test "$with_f2c" = yes; then
587 F2C=f2c 570 F2C=f2c
588 else 571 else
589 F2C="$with_f2c" 572 F2C="$with_f2c"
590 fi 573 fi
591 AC_MSG_RESULT([defining F2C to be $F2C]) 574 AC_MSG_NOTICE([defining F2C to be $F2C])
592 fi 575 fi
593 576
594 if test "x$FFLAGS" = x; then 577 if test "x$FFLAGS" = x; then
595 FFLAGS="-O" # override -g -O default by AC_PROG_F77 578 FFLAGS="-O" # override -g -O default by AC_PROG_F77
596 fi 579 fi
626 powerpc-apple-machten*) 609 powerpc-apple-machten*)
627 FFLAGS= 610 FFLAGS=
628 ;; 611 ;;
629 esac 612 esac
630 if test -n "$FFLAGS"; then 613 if test -n "$FFLAGS"; then
631 AC_MSG_RESULT([defining FFLAGS to be $FFLAGS]) 614 AC_MSG_NOTICE([defining FFLAGS to be $FFLAGS])
632 fi 615 fi
633 have_fortran_compiler=true 616 have_fortran_compiler=true
634 else 617 else
635 AC_CHECK_PROG(F2C, f2c, f2c, []) 618 AC_CHECK_PROG(F2C, f2c, f2c, [])
636 AC_ARG_VAR(F2C, [Fortran to C translator command]) 619 AC_ARG_VAR(F2C, [Fortran to C translator command])
730 713
731 UMFPACK_LIBS= 714 UMFPACK_LIBS=
732 AC_SUBST(UMFPACK_LIBS) 715 AC_SUBST(UMFPACK_LIBS)
733 716
734 AC_ARG_WITH(umfpack, 717 AC_ARG_WITH(umfpack,
735 [ --without-umfpack don't use UMFPACK, disable some sparse functionality], 718 [AS_HELP_STRING([--without-umfpack],
719 [don't use UMFPACK, disable some sparse functionality])],
736 with_umfpack=$withval, with_umfpack=yes) 720 with_umfpack=$withval, with_umfpack=yes)
737 721
738 warn_umfpack="UMFPACK not found. This will result in some lack of functionality for sparse matrices." 722 warn_umfpack="UMFPACK not found. This will result in some lack of functionality for sparse matrices."
739 if test "$with_umfpack" = yes && test "$with_amd" = yes; then 723 if test "$with_umfpack" = yes && test "$with_amd" = yes; then
740 with_umfpack=no 724 with_umfpack=no
767 751
768 COLAMD_LIBS= 752 COLAMD_LIBS=
769 AC_SUBST(COLAMD_LIBS) 753 AC_SUBST(COLAMD_LIBS)
770 754
771 AC_ARG_WITH(colamd, 755 AC_ARG_WITH(colamd,
772 [ --without-colamd don't use COLAMD, disable some sparse functionality], 756 [AS_HELP_STRING([--without-colamd],
757 [don't use COLAMD, disable some sparse functionality])],
773 with_colamd=$withval, with_colamd=yes) 758 with_colamd=$withval, with_colamd=yes)
774 759
775 warn_colamd="COLAMD not found. This will result in some lack of functionality for sparse matrices." 760 warn_colamd="COLAMD not found. This will result in some lack of functionality for sparse matrices."
776 if test "$with_colamd" = yes; then 761 if test "$with_colamd" = yes; then
777 with_colamd=no 762 with_colamd=no
789 774
790 CCOLAMD_LIBS= 775 CCOLAMD_LIBS=
791 AC_SUBST(CCOLAMD_LIBS) 776 AC_SUBST(CCOLAMD_LIBS)
792 777
793 AC_ARG_WITH(ccolamd, 778 AC_ARG_WITH(ccolamd,
794 [ --without-ccolamd don't use CCOLAMD, disable some sparse functionality], 779 [AS_HELP_STRING([--without-ccolamd],
780 [don't use CCOLAMD, disable some sparse functionality])],
795 with_ccolamd=$withval, with_ccolamd=yes) 781 with_ccolamd=$withval, with_ccolamd=yes)
796 782
797 warn_ccolamd="CCOLAMD not found. This will result in some lack of functionality for sparse matrices." 783 warn_ccolamd="CCOLAMD not found. This will result in some lack of functionality for sparse matrices."
798 if test "$with_ccolamd" = yes; then 784 if test "$with_ccolamd" = yes; then
799 with_ccolamd=no 785 with_ccolamd=no
808 794
809 CHOLMOD_LIBS= 795 CHOLMOD_LIBS=
810 AC_SUBST(CHOLMOD_LIBS) 796 AC_SUBST(CHOLMOD_LIBS)
811 797
812 AC_ARG_WITH(cholmod, 798 AC_ARG_WITH(cholmod,
813 [ --without-cholmod don't use CHOLMOD, disable some sparse functionality], 799 [AS_HELP_STRING([--without-cholmod],
800 [don't use CHOLMOD, disable some sparse functionality])],
814 with_cholmod=$withval, with_cholmod=yes) 801 with_cholmod=$withval, with_cholmod=yes)
815 802
816 warn_cholmod="CHOLMOD not found. This will result in some lack of functionality for sparse matrices." 803 warn_cholmod="CHOLMOD not found. This will result in some lack of functionality for sparse matrices."
817 if test "$with_cholmod" = yes && test "$with_colamd" = yes && 804 if test "$with_cholmod" = yes && test "$with_colamd" = yes &&
818 test "$with_ccolamd" = yes && test "$with_amd" = yes; then 805 test "$with_ccolamd" = yes && test "$with_amd" = yes; then
852 839
853 CXSPARSE_LIBS= 840 CXSPARSE_LIBS=
854 AC_SUBST(CXSPARSE_LIBS) 841 AC_SUBST(CXSPARSE_LIBS)
855 842
856 AC_ARG_WITH(cxsparse, 843 AC_ARG_WITH(cxsparse,
857 [ --without-cxsparse don't use CXSparse, disable some sparse functionality], 844 [AS_HELP_STRING([--without-cxsparse],
845 [don't use CXSparse, disable some sparse functionality])],
858 with_cxsparse=$withval, with_cxsparse=yes) 846 with_cxsparse=$withval, with_cxsparse=yes)
859 847
860 warn_cxsparse="CXSparse not found. This will result in some lack of functionality for sparse matrices." 848 warn_cxsparse="CXSparse not found. This will result in some lack of functionality for sparse matrices."
861 if test "$with_cxsparse" = yes; then 849 if test "$with_cxsparse" = yes; then
862 with_cxsparse=no 850 with_cxsparse=no
872 ### Handle shared library options. 860 ### Handle shared library options.
873 861
874 ### Enable creation of static libraries. 862 ### Enable creation of static libraries.
875 863
876 AC_ARG_ENABLE(static, 864 AC_ARG_ENABLE(static,
877 [ --enable-static create static libraries], 865 [AS_HELP_STRING([--enable-static], [create static libraries])],
878 [if test "$enableval" = no; then STATIC_LIBS=false; 866 [if test "$enableval" = no; then STATIC_LIBS=false;
879 else STATIC_LIBS=true; fi], 867 else STATIC_LIBS=true; fi],
880 STATIC_LIBS=false) 868 STATIC_LIBS=false)
881 AC_SUBST(STATIC_LIBS) 869 AC_SUBST(STATIC_LIBS)
882 870
883 ### Enable creation of shared libraries. Currently only works with 871 ### Enable creation of shared libraries. Currently only works with
884 ### gcc on some systems. 872 ### gcc on some systems.
885 873
886 AC_ARG_ENABLE(shared, 874 AC_ARG_ENABLE(shared,
887 [ --enable-shared create shared libraries (not all systems)], 875 [AS_HELP_STRING([--enable-shared],
876 [create shared libraries (not all systems)])],
888 [if test "$enableval" = no; then SHARED_LIBS=false; 877 [if test "$enableval" = no; then SHARED_LIBS=false;
889 else SHARED_LIBS=true; fi], 878 else SHARED_LIBS=true; fi],
890 SHARED_LIBS=true) 879 SHARED_LIBS=true)
891 AC_SUBST(SHARED_LIBS) 880 AC_SUBST(SHARED_LIBS)
892 881
894 ### --enable-dl is only need if you are only building static libraries 883 ### --enable-dl is only need if you are only building static libraries
895 ### and want to try dynamic linking too (works on some systems, for 884 ### and want to try dynamic linking too (works on some systems, for
896 ### example, OS X and Windows). 885 ### example, OS X and Windows).
897 886
898 AC_ARG_ENABLE(dl, 887 AC_ARG_ENABLE(dl,
899 [ --enable-dl create shared libraries (not all systems)], 888 [AS_HELP_STRING([--enable-dl],
889 [create shared libraries (not all systems)])],
900 [if test "$enableval" = no; then ENABLE_DYNAMIC_LINKING=false; 890 [if test "$enableval" = no; then ENABLE_DYNAMIC_LINKING=false;
901 else ENABLE_DYNAMIC_LINKING=true; fi], 891 else ENABLE_DYNAMIC_LINKING=true; fi],
902 ENABLE_DYNAMIC_LINKING=true) 892 ENABLE_DYNAMIC_LINKING=true)
903 893
904 if $STATIC_LIBS || $SHARED_LIBS; then 894 if $STATIC_LIBS || $SHARED_LIBS; then
906 else 896 else
907 AC_MSG_ERROR([You can't disable building static AND shared libraries!]) 897 AC_MSG_ERROR([You can't disable building static AND shared libraries!])
908 fi 898 fi
909 899
910 AC_ARG_ENABLE(rpath, 900 AC_ARG_ENABLE(rpath,
911 [ --enable-rpath override the default link options for rpath; 901 [AS_HELP_STRING([--enable-rpath],
912 e.g., --enable-rpath='-rpath $(octlibdir)'], 902 [override the default link options for rpath; e.g., --enable-rpath='-rpath $(octlibdir)'])],
913 [ if test "$enableval" = no; then use_rpath=false; 903 [ if test "$enableval" = no; then use_rpath=false;
914 else 904 else
915 use_rpath=true 905 use_rpath=true
916 if test "$enableval" = yes; then true; 906 if test "$enableval" = yes; then true;
917 else enable_rpath_arg="$enableval"; fi 907 else enable_rpath_arg="$enableval"; fi
1061 fi 1051 fi
1062 else 1052 else
1063 RLD_FLAG="" 1053 RLD_FLAG=""
1064 fi 1054 fi
1065 1055
1066 AC_MSG_RESULT([defining FPICFLAG to be $FPICFLAG]) 1056 AC_MSG_NOTICE([defining FPICFLAG to be $FPICFLAG])
1067 AC_MSG_RESULT([defining CPICFLAG to be $CPICFLAG]) 1057 AC_MSG_NOTICE([defining CPICFLAG to be $CPICFLAG])
1068 AC_MSG_RESULT([defining CXXPICFLAG to be $CXXPICFLAG]) 1058 AC_MSG_NOTICE([defining CXXPICFLAG to be $CXXPICFLAG])
1069 AC_MSG_RESULT([defining SHLEXT to be $SHLEXT]) 1059 AC_MSG_NOTICE([defining SHLEXT to be $SHLEXT])
1070 AC_MSG_RESULT([defining SHLLIB to be $SHLLIB]) 1060 AC_MSG_NOTICE([defining SHLLIB to be $SHLLIB])
1071 AC_MSG_RESULT([defining SHLBIN to be $SHLBIN]) 1061 AC_MSG_NOTICE([defining SHLBIN to be $SHLBIN])
1072 AC_MSG_RESULT([defining SHLEXT_VER to be $SHLEXT_VER]) 1062 AC_MSG_NOTICE([defining SHLEXT_VER to be $SHLEXT_VER])
1073 AC_MSG_RESULT([defining SHLLIB_VER to be $SHLLIB_VER]) 1063 AC_MSG_NOTICE([defining SHLLIB_VER to be $SHLLIB_VER])
1074 AC_MSG_RESULT([defining SHLBIN_VER to be $SHLBIN_VER]) 1064 AC_MSG_NOTICE([defining SHLBIN_VER to be $SHLBIN_VER])
1075 AC_MSG_RESULT([defining SHLLINKEXT to be $SHLLINKEXT]) 1065 AC_MSG_NOTICE([defining SHLLINKEXT to be $SHLLINKEXT])
1076 AC_MSG_RESULT([defining DLFCN_DIR to be $DLFCN_DIR]) 1066 AC_MSG_NOTICE([defining DLFCN_DIR to be $DLFCN_DIR])
1077 AC_MSG_RESULT([defining SH_LD to be $SH_LD]) 1067 AC_MSG_NOTICE([defining SH_LD to be $SH_LD])
1078 AC_MSG_RESULT([defining SH_LDFLAGS to be $SH_LDFLAGS]) 1068 AC_MSG_NOTICE([defining SH_LDFLAGS to be $SH_LDFLAGS])
1079 AC_MSG_RESULT([defining DL_LD to be $DL_LD]) 1069 AC_MSG_NOTICE([defining DL_LD to be $DL_LD])
1080 AC_MSG_RESULT([defining DL_LDFLAGS to be $DL_LDFLAGS]) 1070 AC_MSG_NOTICE([defining DL_LDFLAGS to be $DL_LDFLAGS])
1081 AC_MSG_RESULT([defining MKOCTFILE_DL_LDFLAGS to be $MKOCTFILE_DL_LDFLAGS]) 1071 AC_MSG_NOTICE([defining MKOCTFILE_DL_LDFLAGS to be $MKOCTFILE_DL_LDFLAGS])
1082 AC_MSG_RESULT([defining SONAME_FLAGS to be $SONAME_FLAGS]) 1072 AC_MSG_NOTICE([defining SONAME_FLAGS to be $SONAME_FLAGS])
1083 AC_MSG_RESULT([defining NO_OCT_FILE_STRIP to be $NO_OCT_FILE_STRIP]) 1073 AC_MSG_NOTICE([defining NO_OCT_FILE_STRIP to be $NO_OCT_FILE_STRIP])
1084 AC_MSG_RESULT([defining RLD_FLAG to be $RLD_FLAG]) 1074 AC_MSG_NOTICE([defining RLD_FLAG to be $RLD_FLAG])
1085 AC_MSG_RESULT([defining TEMPLATE_AR to be $TEMPLATE_AR]) 1075 AC_MSG_NOTICE([defining TEMPLATE_AR to be $TEMPLATE_AR])
1086 AC_MSG_RESULT([defining TEMPLATE_ARFLAGS to be $TEMPLATE_ARFLAGS]) 1076 AC_MSG_NOTICE([defining TEMPLATE_ARFLAGS to be $TEMPLATE_ARFLAGS])
1087 AC_MSG_RESULT([defining library_path_var to be $library_path_var]) 1077 AC_MSG_NOTICE([defining library_path_var to be $library_path_var])
1088 AC_SUBST(FPICFLAG) 1078 AC_SUBST(FPICFLAG)
1089 AC_SUBST(CPICFLAG) 1079 AC_SUBST(CPICFLAG)
1090 AC_SUBST(CXXPICFLAG) 1080 AC_SUBST(CXXPICFLAG)
1091 AC_SUBST(SHLEXT) 1081 AC_SUBST(SHLEXT)
1092 AC_SUBST(SHLLIB) 1082 AC_SUBST(SHLLIB)
1233 getpwuid gettimeofday getuid getwd _kbhit kill link localtime_r \ 1223 getpwuid gettimeofday getuid getwd _kbhit kill link localtime_r \
1234 lstat memmove mkdir mkfifo mkstemp on_exit pipe poll putenv raise \ 1224 lstat memmove mkdir mkfifo mkstemp on_exit pipe poll putenv raise \
1235 readlink rename resolvepath rindex rmdir round select setgrent \ 1225 readlink rename resolvepath rindex rmdir round select setgrent \
1236 setpwent setvbuf sigaction siglongjmp sigpending sigprocmask \ 1226 setpwent setvbuf sigaction siglongjmp sigpending sigprocmask \
1237 sigsuspend stat strcasecmp strdup strerror strftime stricmp \ 1227 sigsuspend stat strcasecmp strdup strerror strftime stricmp \
1238 strncasecmp strnicmp strptime symlink tempnam umask uname unlink \ 1228 strncasecmp strnicmp strptime strsignal symlink tempnam umask \
1239 usleep vfprintf vsprintf vsnprintf waitpid) 1229 uname unlink usleep vfprintf vsprintf vsnprintf waitpid)
1240 1230
1241 OCTAVE_SMART_PUTENV 1231 OCTAVE_SMART_PUTENV
1242 1232
1243 ### Dynamic linking is now enabled only if we are building shared 1233 ### Dynamic linking is now enabled only if we are building shared
1244 ### libs and some API for dynamic linking is detected. 1234 ### libs and some API for dynamic linking is detected.
1348 ### There is more than one possible prototype for gettimeofday. See 1338 ### There is more than one possible prototype for gettimeofday. See
1349 ### which one (if any) appears in sys/time.h. These tests are from 1339 ### which one (if any) appears in sys/time.h. These tests are from
1350 ### Emacs 19. 1340 ### Emacs 19.
1351 1341
1352 AC_MSG_CHECKING(for struct timeval) 1342 AC_MSG_CHECKING(for struct timeval)
1353 AC_TRY_COMPILE([#ifdef TIME_WITH_SYS_TIME 1343 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#ifdef TIME_WITH_SYS_TIME
1354 #include <sys/time.h> 1344 #include <sys/time.h>
1355 #include <time.h> 1345 #include <time.h>
1356 #else 1346 #else
1357 #ifdef HAVE_SYS_TIME_H 1347 #ifdef HAVE_SYS_TIME_H
1358 #include <sys/time.h> 1348 #include <sys/time.h>
1359 #else 1349 #else
1360 #include <time.h> 1350 #include <time.h>
1361 #endif 1351 #endif
1362 #endif], [static struct timeval x; x.tv_sec = x.tv_usec;], 1352 #endif]], [[static struct timeval x; x.tv_sec = x.tv_usec;]])],
1363 [AC_MSG_RESULT(yes) 1353 [AC_MSG_RESULT(yes)
1364 HAVE_TIMEVAL=yes 1354 HAVE_TIMEVAL=yes
1365 AC_DEFINE(HAVE_TIMEVAL, 1, [Define if struct timeval is defined.])], 1355 AC_DEFINE(HAVE_TIMEVAL, 1, [Define if struct timeval is defined.])],
1366 [AC_MSG_RESULT(no) 1356 [AC_MSG_RESULT(no)
1367 HAVE_TIMEVAL=no]) 1357 HAVE_TIMEVAL=no])
1403 1393
1404 case "$canonical_host_type" in 1394 case "$canonical_host_type" in
1405 m68k-hp-hpux*) 1395 m68k-hp-hpux*)
1406 ;; 1396 ;;
1407 *-*-sco*) 1397 *-*-sco*)
1408 AC_MSG_RESULT([defining SCO to be 1]) 1398 AC_MSG_NOTICE([defining SCO to be 1])
1409 AC_DEFINE(SCO, 1, [Define if using an SCO system.]) 1399 AC_DEFINE(SCO, 1, [Define if using an SCO system.])
1410 AC_MSG_RESULT([forcing HAVE_ISINF for SCO]) 1400 AC_MSG_NOTICE([forcing HAVE_ISINF for SCO])
1411 AC_DEFINE(HAVE_ISINF, 1, [Define if you have isinf().]) 1401 AC_DEFINE(HAVE_ISINF, 1, [Define if you have isinf().])
1412 AC_MSG_RESULT([forcing HAVE_ISNAN for SCO]) 1402 AC_MSG_NOTICE([forcing HAVE_ISNAN for SCO])
1413 AC_DEFINE(HAVE_ISNAN, 1, [Define if you have isnan().]) 1403 AC_DEFINE(HAVE_ISNAN, 1, [Define if you have isnan().])
1414 ;; 1404 ;;
1415 *) 1405 *)
1416 AC_CHECK_FUNCS(finite isnan isinf copysign signbit) 1406 AC_CHECK_FUNCS(finite isnan isinf copysign signbit)
1417 AC_CHECK_DECLS(signbit, , , [#include <math.h>]) 1407 AC_CHECK_DECLS(signbit, , , [#include <math.h>])
1465 [AC_MSG_RESULT(no)]) 1455 [AC_MSG_RESULT(no)])
1466 1456
1467 ### Signal stuff. 1457 ### Signal stuff.
1468 1458
1469 AC_TYPE_SIGNAL 1459 AC_TYPE_SIGNAL
1470 AC_CHECK_DECL([sys_siglist], 1460 AC_CHECK_DECLS([sys_siglist], [], [],
1471 [AC_DEFINE(SYS_SIGLIST_DECLARED, 1, [Define if your system has a declaration of sys_siglist.])], 1461 [#include <signal.h>
1472 [AC_CHECK_DECLS([sys_siglist])], [#include <signal.h>]) 1462 /* NetBSD declares sys_siglist in unistd.h. */
1473 AC_MSG_CHECKING([for sys_siglist variable]) 1463 #if HAVE_UNISTD_H
1474 AC_LINK_IFELSE([[#include <stdio.h>]], 1464 # include <unistd.h>
1475 [[extern char *sys_siglist[]; printf ("%s\n", sys_siglist[1]);]])], 1465 #endif
1476 [AC_MSG_RESULT(yes) 1466 ])
1477 AC_DEFINE(HAVE_SYS_SIGLIST, 1,
1478 [Define if your system has a sys_siglist variable.])],
1479 [AC_MSG_RESULT(no)])
1480 OCTAVE_SIGNAL_CHECK 1467 OCTAVE_SIGNAL_CHECK
1481 OCTAVE_REINSTALL_SIGHANDLERS 1468 OCTAVE_REINSTALL_SIGHANDLERS
1482 1469
1483 ### A system dependent kluge or two. 1470 ### A system dependent kluge or two.
1484 1471
1556 ;; 1543 ;;
1557 *) 1544 *)
1558 UGLY_DEFS=`echo $DEFS | sed 's,\\",\\\\\\\\\\\\\\\\\\",g'` 1545 UGLY_DEFS=`echo $DEFS | sed 's,\\",\\\\\\\\\\\\\\\\\\",g'`
1559 ;; 1546 ;;
1560 esac 1547 esac
1561 AC_MSG_RESULT([defining UGLY_DEFS to be $UGLY_DEFS]) 1548 AC_MSG_NOTICE([defining UGLY_DEFS to be $UGLY_DEFS])
1562 AC_SUBST(UGLY_DEFS) 1549 AC_SUBST(UGLY_DEFS)
1563 1550
1564 ### Maybe add -Wall, -W, and -Wshadow to compiler flags now that we're 1551 ### Maybe add -Wall, -W, and -Wshadow to compiler flags now that we're
1565 ### done feature testing. 1552 ### done feature testing.
1566 1553
1596 1583
1597 GXX_PICKY_FLAGS="-Wcast-align -Wcast-qual -Wpointer-arith \ 1584 GXX_PICKY_FLAGS="-Wcast-align -Wcast-qual -Wpointer-arith \
1598 -Wwrite-strings -Weffc++ -Wenum-clash" 1585 -Wwrite-strings -Weffc++ -Wenum-clash"
1599 1586
1600 AC_ARG_ENABLE(picky-flags, 1587 AC_ARG_ENABLE(picky-flags,
1601 [ --enable-picky-flags add picky options to CFLAGS, CXXFLAGS, FFLAGS], 1588 [AS_HELP_STRING([--enable-picky-flags],
1589 [add extra warning options to CFLAGS, CXXFLAGS, FFLAGS])],
1602 [if test "$enableval" = no; then 1590 [if test "$enableval" = no; then
1603 true 1591 true
1604 elif test "$enableval" = yes; then 1592 elif test "$enableval" = yes; then
1605 if test -z "$EXTERN_CFLAGS"; then 1593 if test -z "$EXTERN_CFLAGS"; then
1606 for flag in $GCC_PICKY_FLAGS; do 1594 for flag in $GCC_PICKY_FLAGS; do
1627 export CXX 1615 export CXX
1628 export F77 1616 export F77
1629 1617
1630 AC_CONFIG_SUBDIRS(scripts) 1618 AC_CONFIG_SUBDIRS(scripts)
1631 1619
1632 if test "x$PLPLOT_DIR" = xplplot; then
1633 AC_CONFIG_SUBDIRS(plplot)
1634 fi
1635
1636 ### Some things to add to the bottom of config.h. 1620 ### Some things to add to the bottom of config.h.
1637 1621
1638 AH_BOTTOM([ 1622 AH_BOTTOM([
1639 #if defined (__GNUC__) 1623 #if defined (__GNUC__)
1640 #define GCC_ATTR_DEPRECATED __attribute__ ((__deprecated__)) 1624 #define GCC_ATTR_DEPRECATED __attribute__ ((__deprecated__))
1769 FORT="$F2C $F2CFLAGS" 1753 FORT="$F2C $F2CFLAGS"
1770 else 1754 else
1771 FORT="$F77 $FFLAGS" 1755 FORT="$F77 $FFLAGS"
1772 fi 1756 fi
1773 1757
1774 AC_MSG_RESULT([ 1758 AC_MSG_NOTICE([
1775 1759
1776 Octave is now configured for $canonical_host_type 1760 Octave is now configured for $canonical_host_type
1777 1761
1778 Source directory: $srcdir 1762 Source directory: $srcdir
1779 Installation prefix: $prefix 1763 Installation prefix: $prefix
1926 AC_MSG_WARN([at the Octave prompt.]) 1910 AC_MSG_WARN([at the Octave prompt.])
1927 warn_msg_printed=true 1911 warn_msg_printed=true
1928 fi 1912 fi
1929 1913
1930 if $warn_msg_printed; then 1914 if $warn_msg_printed; then
1931 AC_MSG_RESULT([]) 1915 AC_MSG_NOTICE([])
1932 fi 1916 fi
1933 1917
1934 ### End of configure. 1918 ### End of configure.