Mercurial > hg > octave-nkf
annotate configure.in @ 8019:0ef13e15319b
replace NPOS with std::string::npos
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 07 Aug 2008 15:15:33 -0400 |
parents | 6a7db240b3a3 |
children | 66bc6f9b4f72 |
rev | line source |
---|---|
405 | 1 dnl configure.in |
2 dnl | |
5 | 3 dnl Process this file with autoconf to produce a configure script. |
4 dnl | |
7017 | 5 dnl Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, |
6 dnl 2002, 2003, 2004, 2005, 2006, 2007 John W. Eaton | |
869 | 7 ### |
8 ### This file is part of Octave. | |
9 ### | |
10 ### Octave is free software; you can redistribute it and/or modify it | |
11 ### under the terms of the GNU General Public License as published by the | |
7016 | 12 ### Free Software Foundation; either version 3 of the License, or (at |
13 ### your option) any later version. | |
869 | 14 ### |
15 ### Octave is distributed in the hope that it will be useful, but WITHOUT | |
16 ### ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
17 ### FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
18 ### for more details. | |
19 ### | |
20 ### You should have received a copy of the GNU General Public License | |
7016 | 21 ### along with Octave; see the file COPYING. If not, see |
22 ### <http://www.gnu.org/licenses/>. | |
869 | 23 |
4587 | 24 ### Preserve CFLAGS and CXXFLAGS from the environment before doing |
25 ### anything else because we don't know which macros might call | |
26 ### AC_PROG_CC or AC_PROG_CXX. | |
27 | |
28 EXTERN_CFLAGS="$CFLAGS" | |
29 EXTERN_CXXFLAGS="$CXXFLAGS" | |
30 | |
3887 | 31 AC_INIT |
7451 | 32 AC_REVISION($Revision: 1.603 $) |
4531 | 33 AC_PREREQ(2.57) |
3887 | 34 AC_CONFIG_SRCDIR([src/octave.cc]) |
1146 | 35 AC_CONFIG_HEADER(config.h) |
869 | 36 |
5844 | 37 OCTAVE_HOST_TYPE |
38 | |
3887 | 39 AC_DEFINE(OCTAVE_SOURCE, 1, [Define if this is Octave.]) |
40 | |
6090 | 41 dnl FIXME -- we should probably only generate this file if it is missing. |
42 ### Produce unistd.h for MSVC target, this simplifies changes in | |
43 ### Octave source tree and avoid problems with lex-generated code. | |
44 case "$canonical_host_type" in | |
45 *-*-msdosmsvc) | |
46 AC_MSG_NOTICE([Generating replacement for <unistd.h> for MSVC]) | |
47 cat << \EOF > unistd.h | |
48 /* File generated by configure script. */ | |
49 #include <direct.h> | |
50 #include <io.h> | |
51 #include <process.h> | |
52 EOF | |
53 CPPFLAGS="-I. $CPPFLAGS" | |
54 ;; | |
55 esac | |
56 | |
5098 | 57 AC_GNU_SOURCE |
58 | |
3923 | 59 AC_AIX |
3887 | 60 AC_MINIX |
3923 | 61 AC_ISC_POSIX |
1667 | 62 |
5451 | 63 ### Path separator. |
64 sepchar=: | |
65 AC_ARG_WITH(sepchar, | |
5842 | 66 [AS_HELP_STRING([--with-sepchar=<char>], |
5844 | 67 [use <char> as the path separation character])]) |
5451 | 68 case $with_sepchar in |
69 yes | "") | |
70 case "$canonical_host_type" in | |
6090 | 71 *-*-mingw* | *-*-msdosmsvc) |
5451 | 72 sepchar=';' |
73 ;; | |
74 esac | |
75 ;; | |
76 no) | |
77 AC_MSG_ERROR([You are required to define a path separation character]) | |
78 ;; | |
79 *) | |
80 sepchar=$with_sepchar | |
81 ;; | |
82 esac | |
83 AC_SUBST(sepchar) | |
84 AC_DEFINE_UNQUOTED(SEPCHAR, ['$sepchar'], [Define this to be the path separator for your system, as a character constant.]) | |
85 AC_DEFINE_UNQUOTED(SEPCHAR_STR, ["$sepchar"], [Define this to the path separator, as a string.]) | |
86 | |
2223 | 87 ### some defaults |
88 | |
2813 | 89 OCTAVE_SET_DEFAULT(man1dir, '$(mandir)/man1') |
90 OCTAVE_SET_DEFAULT(man1ext, '.1') | |
91 OCTAVE_SET_DEFAULT(infofile, '$(infodir)/octave.info') | |
3597 | 92 OCTAVE_SET_DEFAULT(octincludedir, '$(includedir)/octave-$(version)') |
3029 | 93 OCTAVE_SET_DEFAULT(fcnfiledir, '$(datadir)/octave/$(version)/m') |
2813 | 94 OCTAVE_SET_DEFAULT(localfcnfiledir, '$(datadir)/octave/site/m') |
4449 | 95 OCTAVE_SET_DEFAULT(localapifcnfiledir, |
5778 | 96 '$(datadir)/octave/site/$(api_version)/m') |
3597 | 97 OCTAVE_SET_DEFAULT(localverfcnfiledir, '$(datadir)/octave/$(version)/site/m') |
3141 | 98 OCTAVE_SET_DEFAULT(octlibdir, '$(libdir)/octave-$(version)') |
3029 | 99 OCTAVE_SET_DEFAULT(archlibdir, |
3130 | 100 '$(libexecdir)/octave/$(version)/exec/$(canonical_host_type)') |
3029 | 101 OCTAVE_SET_DEFAULT(localarchlibdir, |
3130 | 102 '$(libexecdir)/octave/site/exec/$(canonical_host_type)') |
5909 | 103 OCTAVE_SET_DEFAULT(localapiarchlibdir, |
104 '$(libexecdir)/octave/$(api_version)/site/exec/$(canonical_host_type)') | |
3597 | 105 OCTAVE_SET_DEFAULT(localverarchlibdir, |
106 '$(libexecdir)/octave/$(version)/site/exec/$(canonical_host_type)') | |
3029 | 107 OCTAVE_SET_DEFAULT(octfiledir, |
3130 | 108 '$(libexecdir)/octave/$(version)/oct/$(canonical_host_type)') |
3029 | 109 OCTAVE_SET_DEFAULT(localoctfiledir, |
3130 | 110 '$(libexecdir)/octave/site/oct/$(canonical_host_type)') |
4449 | 111 OCTAVE_SET_DEFAULT(localapioctfiledir, |
5778 | 112 '$(libexecdir)/octave/site/oct/$(api_version)/$(canonical_host_type)') |
3597 | 113 OCTAVE_SET_DEFAULT(localveroctfiledir, |
114 '$(libexecdir)/octave/$(version)/site/oct/$(canonical_host_type)') | |
3029 | 115 OCTAVE_SET_DEFAULT(imagedir, '$(datadir)/octave/$(version)/imagelib') |
1667 | 116 |
2155 | 117 ### Make configure args available for other uses. |
118 | |
119 config_opts=$ac_configure_args | |
120 AC_SUBST(config_opts) | |
121 | |
2813 | 122 ### Make it possible to have Octave's array and matrix classes do bounds |
2108 | 123 ### checking on element references. This slows some operations down a |
2813 | 124 ### bit, so it is turned off by default. |
2108 | 125 |
2450 | 126 BOUNDS_CHECKING=false |
2108 | 127 AC_ARG_ENABLE(bounds-check, |
5844 | 128 [AS_HELP_STRING([--enable-bounds-check], |
7091 | 129 [bounds checking for indexing in internal array classes (default is no)])], |
3060 | 130 [if test "$enableval" = yes; then BOUNDS_CHECKING=true; fi], []) |
2108 | 131 if $BOUNDS_CHECKING; then |
3887 | 132 AC_DEFINE(BOUNDS_CHECKING, 1, [Define to use internal bounds checking.]) |
2108 | 133 fi |
134 | |
5275 | 135 ### If possible, use a 64-bit integer type for array dimensions and indexing. |
136 | |
137 USE_64_BIT_IDX_T=false | |
138 OCTAVE_IDX_TYPE=int | |
139 AC_ARG_ENABLE(64, | |
5844 | 140 [AS_HELP_STRING([--enable-64], |
5857 | 141 [(EXPERIMENTAL) use 64-bit integers for array dimensions and indexing])], |
5275 | 142 [if test "$enableval" = yes; then USE_64_BIT_IDX_T=true; fi], []) |
143 if $USE_64_BIT_IDX_T; then | |
144 AC_CHECK_SIZEOF(void *) | |
145 AC_CHECK_SIZEOF(int) | |
146 AC_CHECK_SIZEOF(long) | |
147 if test $ac_cv_sizeof_void_p -eq 8; then | |
148 if test $ac_cv_sizeof_int -eq 8; then | |
149 OCTAVE_IDX_TYPE=int | |
150 elif test $ac_cv_sizeof_long -eq 8; then | |
151 OCTAVE_IDX_TYPE=long | |
5351 | 152 AC_DEFINE(IDX_TYPE_LONG, 1, [Define to 1 if octave index type is long]) |
5275 | 153 else |
5857 | 154 warn_64_bit="no suitable type found for octave_idx_type so disabling 64-bit features" |
155 AC_MSG_WARN($warn_64_bit) | |
5275 | 156 USE_64_BIT_IDX_T=false |
157 fi | |
158 else | |
159 warn_64_bit="pointers are not 64-bits wide so disabling 64-bit features" | |
160 AC_MSG_WARN($warn_64_bit) | |
161 USE_64_BIT_IDX_T=false | |
162 fi | |
163 fi | |
164 AC_SUBST(OCTAVE_IDX_TYPE) | |
165 if $USE_64_BIT_IDX_T; then | |
166 AC_DEFINE(USE_64_BIT_IDX_T, 1, [Define if using 64-bit integers for array dimensions and indexing]) | |
167 fi | |
168 AC_SUBST(USE_64_BIT_IDX_T) | |
169 | |
3215 | 170 ### It seems that there are some broken inline assembly functions in |
171 ### the GNU libc. Since I'm not sure how to test whether we are using | |
172 ### GNU libc, just disable them for all platforms. | |
173 | |
5844 | 174 AC_MSG_NOTICE([defining __NO_MATH_INLINES avoids buggy GNU libc exp function]) |
3887 | 175 AC_DEFINE(__NO_MATH_INLINES, 1, [Define if your version of GNU libc has buggy inline assembly code for math functions like exp.]) |
3215 | 176 |
869 | 177 ### See which C++ compiler to use (we expect to find g++). |
178 | |
405 | 179 AC_PROG_CXX |
180 AC_PROG_CXXCPP | |
869 | 181 |
182 ### Do special things for g++. | |
183 | |
2353 | 184 gxx_version=`$CXX -v 2>&1 | grep "^.*g.. version" | \ |
4368 | 185 sed -e 's/^.*g.. version *//' -e 's/cygnus-//' -e 's/egcs-//' -e 's/ .*//'` |
3107 | 186 |
405 | 187 case "$gxx_version" in |
4368 | 188 1.* | 2.[[012345678]].*) |
4843 | 189 AC_MSG_ERROR([g++ version $gxx_version will probably fail to compile Octave] |
190 ) | |
191 ;; | |
192 2.9*) | |
193 warn_gxx_version="g++ version $gxx_version is likely to cause problems" | |
194 AC_MSG_WARN($warn_gxx_version) | |
3775 | 195 ;; |
405 | 196 esac |
869 | 197 |
1894 | 198 CXX_VERSION= |
199 if test -n "$gxx_version"; then | |
200 CXX_VERSION="$gxx_version" | |
201 fi | |
202 AC_SUBST(CXX_VERSION) | |
203 | |
3107 | 204 OCTAVE_CXX_NEW_FRIEND_TEMPLATE_DECL |
3769 | 205 OCTAVE_CXX_ISO_COMPLIANT_LIBRARY |
5854 | 206 OCTAVE_CXX_BROKEN_REINTERPRET_CAST |
3107 | 207 |
869 | 208 ### See which C compiler to use (we expect to find gcc). |
209 | |
5 | 210 AC_PROG_CC |
405 | 211 AC_PROG_CPP |
832 | 212 AC_PROG_GCC_TRADITIONAL |
869 | 213 |
214 ### Do special things for gcc. | |
215 | |
2353 | 216 gcc_version=`$CC -v 2>&1 | grep "^.*gcc version" | \ |
3107 | 217 sed -e 's/^.*g.. version *//' -e 's/cygnus-//' -e 's/egcs-//'` |
405 | 218 case "$gcc_version" in |
219 2.*) | |
1087 | 220 if test -z "$LDFLAGS"; then |
221 LDFLAGS="-g" | |
5844 | 222 AC_MSG_NOTICE([defining LDFLAGS to be $LDFLAGS]) |
1087 | 223 fi |
405 | 224 ;; |
225 1.*) | |
3105 | 226 warn_gcc_version="gcc version $gcc_version is likely to cause problems" |
227 AC_MSG_WARN($warn_gcc_version) | |
405 | 228 ;; |
5 | 229 esac |
869 | 230 |
1894 | 231 CC_VERSION= |
232 if test -n "$gcc_version"; then | |
233 CC_VERSION="$gcc_version" | |
234 fi | |
235 AC_SUBST(CC_VERSION) | |
236 | |
3775 | 237 ### The flag to create dependency varies depending on the compier. |
238 | |
239 # Assume GCC. | |
6087 | 240 INCLUDE_DEPS=true |
3775 | 241 DEPEND_FLAGS="-M" |
242 DEPEND_EXTRA_SED_PATTERN="" | |
6087 | 243 if test "$GCC" = yes; then |
244 true | |
245 else | |
246 case "$canonical_host_type" in | |
247 sparc-sun-solaris2* | i386-pc-solaris2*) | |
3775 | 248 DEPEND_FLAGS="-xM1" |
249 DEPEND_EXTRA_SED_PATTERN="-e '/\/opt\/SUNWspro/d'" | |
6087 | 250 ;; |
7451 | 251 *-*-msdosmsvc) |
252 ;; | |
6087 | 253 *) |
254 INCLUDE_DEPS=false | |
255 ;; | |
256 esac | |
257 fi | |
258 AC_SUBST(INCLUDE_DEPS) | |
3775 | 259 AC_SUBST(DEPEND_FLAGS) |
260 AC_SUBST(DEPEND_EXTRA_SED_PATTERN) | |
261 | |
5076 | 262 ### On Intel systems with gcc, we may need to compile with -mieee-fp |
263 ### and -ffloat-store to get full support for IEEE floating point. | |
2020 | 264 ### |
3126 | 265 ### On Alpha/OSF systems, we need -mieee. |
869 | 266 |
3126 | 267 ieee_fp_flag= |
350 | 268 case "$canonical_host_type" in |
6102 | 269 ## Keep this pattern first, so that it is preferred over the |
270 ## following pattern for x86. | |
271 *-*-msdosmsvc) | |
272 CXXFLAGS="$CXXFLAGS -EHs -MD" | |
273 CFLAGS="$CFLAGS -MD" | |
274 ;; | |
3887 | 275 i[[3456789]]86-*-*) |
5076 | 276 if test "$GCC" = yes; then |
277 OCTAVE_CC_FLAG(-mieee-fp, [ | |
278 ieee_fp_flag=-mieee-fp | |
279 XTRA_CFLAGS="$XTRA_CFLAGS -mieee-fp" | |
5844 | 280 AC_MSG_NOTICE([adding -mieee-fp to XTRA_CFLAGS])]) |
3126 | 281 |
5078 | 282 ### OCTAVE_CC_FLAG(-ffloat-store, [ |
283 ### float_store_flag=-ffloat-store | |
284 ### XTRA_CFLAGS="$XTRA_CFLAGS -ffloat-store" | |
285 ### AC_MSG_RESULT([adding -ffloat-store to XTRA_CFLAGS])]) | |
5076 | 286 fi |
287 if test "$GXX" = yes; then | |
288 OCTAVE_CXX_FLAG(-mieee-fp, [ | |
289 ieee_fp_flag=-mieee-fp | |
290 XTRA_CXXFLAGS="$XTRA_CXXFLAGS -mieee-fp" | |
5844 | 291 AC_MSG_NOTICE([adding -mieee-fp to XTRA_CXXFLAGS])]) |
5076 | 292 |
5078 | 293 ### OCTAVE_CXX_FLAG(-ffloat-store, [ |
294 ### float_store_flag=-ffloat-store | |
295 ### XTRA_CXXFLAGS="$XTRA_CXXFLAGS -ffloat-store" | |
296 ### AC_MSG_RESULT([adding -ffloat-store to XTRA_CXXFLAGS])]) | |
5076 | 297 fi |
324 | 298 ;; |
3127 | 299 alpha*-*-*) |
4284 | 300 if test "$GCC" = yes; then |
4812 | 301 OCTAVE_CC_FLAG(-mieee, [ |
302 ieee_fp_flag=-mieee | |
303 XTRA_CFLAGS="$XTRA_CFLAGS -mieee" | |
5844 | 304 AC_MSG_NOTICE([adding -mieee to XTRA_CFLAGS])]) |
5076 | 305 else |
306 OCTAVE_CC_FLAG(-ieee, [ | |
307 ieee_fp_flag=-ieee | |
308 XTRA_CFLAGS="$XTRA_CFLAGS -ieee" | |
5844 | 309 AC_MSG_NOTICE([adding -ieee to XTRA_CFLAGS])]) |
5076 | 310 fi |
311 if test "$GXX" = yes; then | |
4812 | 312 OCTAVE_CXX_FLAG(-mieee, [ |
313 ieee_fp_flag=-mieee | |
314 XTRA_CXXFLAGS="$XTRA_CXXFLAGS -mieee" | |
5844 | 315 AC_MSG_NOTICE([adding -mieee to XTRA_CXXFLAGS])]) |
4284 | 316 else |
317 OCTAVE_CXX_FLAG(-ieee, [ | |
318 ieee_fp_flag=-ieee | |
319 XTRA_CXXFLAGS="$XTRA_CXXFLAGS -ieee" | |
5844 | 320 AC_MSG_NOTICE([adding -ieee to XTRA_CXXFLAGS])]) |
4284 | 321 fi |
2020 | 322 ;; |
3176 | 323 *ibm-aix4*) |
3351 | 324 OCTAVE_CC_FLAG(-mminimal-toc, [ |
325 XTRA_CFLAGS="$XTRA_CFLAGS -mminimal-toc"]) | |
3176 | 326 |
3351 | 327 OCTAVE_CXX_FLAG(-mminimal-toc, [ |
328 XTRA_CXXFLAGS="$XTRA_CXXFLAGS -mminimal-toc"]) | |
3176 | 329 ;; |
324 | 330 esac |
3126 | 331 |
332 AC_SUBST(XTRA_CFLAGS) | |
333 AC_SUBST(XTRA_CXXFLAGS) | |
869 | 334 |
1667 | 335 ### Use -static if compiling on Alpha OSF/1 1.3 systems. |
336 | |
337 case "$canonical_host_type" in | |
3127 | 338 alpha*-dec-osf1.3) |
1667 | 339 LD_STATIC_FLAG=-static |
340 ;; | |
341 esac | |
1679 | 342 if test -n "$LD_STATIC_FLAG"; then |
5844 | 343 AC_MSG_NOTICE([defining LD_STATIC_FLAG to be $LD_STATIC_FLAG]) |
1679 | 344 fi |
345 AC_SUBST(LD_STATIC_FLAG) | |
1667 | 346 |
4094 | 347 ### Defaults for cross compiling. BUILD_CC and BUILD_CXX are |
348 ### the compilers that we use for building tools on the build system. | |
4098 | 349 ### For now, we assume that the only cross compiling we can do is |
4298 | 350 ### with gcc on a Unixy system, but the dedicated hacker can override these. |
4094 | 351 |
352 if test "$cross_compiling" = yes; then | |
353 BUILD_CC="gcc" | |
354 BUILD_CFLAGS="-O2 -g" | |
355 BUILD_CXX="g++" | |
356 BUILD_CXXFLAGS="-O2 -g" | |
4298 | 357 BUILD_LDFLAGS="" |
4098 | 358 BUILD_EXEEXT="" |
4094 | 359 else |
4298 | 360 BUILD_CC='$(CC)' |
361 BUILD_CFLAGS='$(CFLAGS)' | |
362 BUILD_CXX='$(CXX)' | |
363 BUILD_CXXFLAGS='$(CXXFLAGS)' | |
364 BUILD_LDFLAGS='$(LDFLAGS)' | |
4284 | 365 case "$canonical_host_type" in |
366 sparc-sun-solaris2*) | |
367 if test "$GCC" != yes; then | |
4298 | 368 ## The Sun C++ compiler never seems to complete compiling |
369 ## gendoc.cc unless we reduce the optimization level... | |
370 BUILD_CXXFLAGS="-g -O1" | |
4284 | 371 fi |
372 ;; | |
373 esac | |
4298 | 374 BUILD_EXEEXT='$(EXEEXT)' |
4094 | 375 fi |
376 | |
377 AC_ARG_VAR(BUILD_CC, [build system C compiler (used if cross compiling)]) | |
378 AC_ARG_VAR(BUILD_CFLAGS, [build system C compiler flags (used if cross compiling)]) | |
379 AC_ARG_VAR(BUILD_CXX, [build system C++ compiler (used if cross compiling)]) | |
380 AC_ARG_VAR(BUILD_CXXFLAGS, [build system C++ compiler flags (used if cross compiling)]) | |
4298 | 381 AC_ARG_VAR(BUILD_LDFLAGS, [build system C++ compiler link flags (used if cross compiling)]) |
382 AC_ARG_VAR(BUILD_EXEEXT, [build system executable extension (used if cross compiling)]) | |
3222 | 383 |
3232 | 384 dnl This is bogus. We shouldn't have to explicitly add libc too! |
385 | |
386 ### Look for math library. If found, this will add -lm to LIBS. | |
387 | |
388 case "$canonical_host_type" in | |
389 *-*-nextstep*) | |
390 ;; | |
391 *-*-linux*) | |
392 AC_CHECK_LIB(m, sin, , , -lc) | |
393 ;; | |
394 *) | |
395 AC_CHECK_LIB(m, sin) | |
396 ;; | |
397 esac | |
398 | |
6823 | 399 ### Check for the QHull library |
400 AC_SUBST(QHULL_LIBS) | |
401 AC_CHECK_HEADER(qhull/qhull_a.h, have_qhull=yes, have_qhull=no) | |
402 if test "$have_qhull" = yes; then | |
403 AC_CHECK_LIB(qhull, qh_qhull, have_qhull=yes, have_qhull=no) | |
404 if test "$have_qhull" != yes; then | |
405 AC_CHECK_QHULL_VERSION(have_qhull=yes, have_qhull=no) | |
406 AC_DEFINE(NEED_QHULL_VERSION, 1, [Define if the QHull library needs a wh_version variable defined.]) | |
407 fi | |
408 fi | |
409 if test "$have_qhull" = yes; then | |
410 AC_DEFINE(HAVE_QHULL, 1, [Define if the QHull library is used.]) | |
411 QHULL_LIBS="-lqhull" | |
6855 | 412 TEXINFO_QHULL="@set HAVE_QHULL" |
6823 | 413 else |
414 warn_qhull="Qhull library not found --- This will result in loss of functionality of some geometry functions." | |
415 AC_MSG_WARN($warn_qhull) | |
416 fi | |
417 | |
6855 | 418 AC_SUBST(TEXINFO_QHULL) |
419 | |
5585 | 420 ### Check for pcre/regex library. |
7173 | 421 |
422 ## check for pcre-config, and if so, set CPPFLAGS appropriately | |
423 AC_CHECK_PROG(WITH_PCRE_CONFIG, pcre-config, yes, no) | |
424 if test $WITH_PCRE_CONFIG = yes ; then | |
425 CPPFLAGS="$CPPFLAGS $(pcre-config --cflags)" | |
426 fi | |
427 | |
428 ## NB: no need to do separate check for pcre.h header -- checking macros is good enough | |
429 AC_CACHE_CHECK([whether pcre.h defines the macros we need], [ac_cv_pcre_h_macros_present], [ | |
430 AC_EGREP_CPP([PCRE_HAS_MACROS_WE_NEED], [ | |
431 #include <pcre.h> | |
6133 | 432 #if defined (PCRE_INFO_NAMECOUNT) \ |
433 && defined (PCRE_INFO_NAMEENTRYSIZE) \ | |
434 && defined (PCRE_INFO_NAMETABLE) | |
435 PCRE_HAS_MACROS_WE_NEED | |
7173 | 436 #endif], ac_cv_pcre_h_macros_present=yes, ac_cv_pcre_h_macros_present=no)]) |
437 WITH_PCRE="$ac_cv_pcre_h_macros_present" | |
7169 | 438 |
7173 | 439 REGEX_LIBS= |
440 if test $WITH_PCRE = yes; then | |
441 AC_DEFINE(HAVE_PCRE, 1, [Define if PCRE is available.]) | |
442 if test $WITH_PCRE_CONFIG = yes; then | |
443 REGEX_LIBS=$(pcre-config --libs) | |
444 else | |
445 REGEX_LIBS=-lpcre | |
446 fi | |
7174 | 447 else |
6133 | 448 warn_pcre="PCRE library not found. This will result in some loss of functionality for the regular expression matching functions." |
449 AC_MSG_WARN($warn_pcre) | |
450 fi | |
7169 | 451 |
5585 | 452 AC_CHECK_FUNCS(regexec, WITH_REGEX=yes , [ |
453 AC_CHECK_LIB(regex, regexec, WITH_REGEX=yes, WITH_REGEX=no)]) | |
454 if test $WITH_REGEX = yes ; then | |
455 AC_DEFINE(HAVE_REGEX, 1, [Define if regex is available.]) | |
5600 | 456 if test $WITH_PCRE = no ; then |
5585 | 457 AC_CHECK_FUNCS(regexec, REGEX_LIBS= , [ |
458 AC_CHECK_LIB(regex, regexec, REGEX_LIBS="-lregex")]) | |
459 fi | |
460 fi | |
6133 | 461 if test $WITH_REGEX = no; then |
462 warn_regex="regular expression functions not found. The regular expression matching functions will be disabled." | |
463 AC_MSG_WARN($warn_regex) | |
464 fi | |
7173 | 465 |
7169 | 466 AC_SUBST(REGEX_LIBS) |
5585 | 467 |
5270 | 468 ### Check for ZLIB library. |
3820 | 469 |
5270 | 470 WITH_ZLIB=true |
471 AC_ARG_WITH(zlib, | |
5844 | 472 [AS_HELP_STRING([--without-zlib], [don't use zlib])], |
5270 | 473 with_zlib=$withval, with_zlib=yes) |
3820 | 474 |
5270 | 475 zlib_lib= |
476 if test "$with_zlib" = yes; then | |
477 zlib_lib="z" | |
478 elif test "$with_zlib" != no; then | |
479 zlib_lib="$with_zlib" | |
3687 | 480 fi |
481 | |
5270 | 482 ZLIB_LIBS= |
483 WITH_ZLIB=false | |
484 if test -n "$zlib_lib"; then | |
5337 | 485 AC_CHECK_LIB($zlib_lib, gzclearerr, [ |
5270 | 486 AC_CHECK_HEADERS(zlib.h, [ |
487 WITH_ZLIB=true | |
488 ZLIB_LIBS="-l$zlib_lib" | |
489 LIBS="$ZLIB_LIBS $LIBS" | |
490 AC_DEFINE(HAVE_ZLIB, 1, [Define if ZLIB is available.])])]) | |
491 fi | |
492 | |
493 if $WITH_ZLIB; then | |
494 ### Check for HDF5 library. | |
495 | |
496 WITH_HDF5=true | |
497 AC_ARG_WITH(hdf5, | |
5844 | 498 [AS_HELP_STRING([--without-hdf5], [don't use HDF5])], |
5270 | 499 with_hdf5=$withval, with_hdf5=yes) |
500 | |
501 hdf5_lib= | |
502 if test "$with_hdf5" = yes; then | |
503 hdf5_lib="hdf5" | |
504 elif test "$with_hdf5" != no; then | |
505 hdf5_lib="$with_hdf5" | |
506 fi | |
507 | |
508 HDF5_LIBS= | |
509 WITH_HDF5=false | |
510 if test -n "$hdf5_lib"; then | |
511 AC_CHECK_LIB($hdf5_lib, H5Pcreate, [ | |
3820 | 512 AC_CHECK_HEADERS(hdf5.h, [ |
5270 | 513 WITH_HDF5=true |
514 HDF5_LIBS="-l$hdf5_lib" | |
3820 | 515 LIBS="$HDF5_LIBS $LIBS" |
4696 | 516 AC_DEFINE(HAVE_HDF5, 1, [Define if HDF5 is available.]) |
517 AC_CHECK_LIB($hdf5_lib, H5Gget_num_objs, [ | |
5270 | 518 AC_DEFINE(HAVE_H5GGET_NUM_OBJS, 1, [Define if HDF5 has H5Gget_num_objs.])])])]) |
519 fi | |
520 | |
521 if $WITH_HDF5; then | |
6276 | 522 case "$canonical_host_type" in |
523 *-*-msdosmsvc) | |
524 OCTAVE_HDF5_DLL | |
525 ;; | |
526 esac | |
5270 | 527 true |
528 else | |
529 warn_hdf5="HDF5 library not found. Octave will not be able to save or load HDF5 data files." | |
6133 | 530 AC_MSG_WARN($warn_hdf5) |
5270 | 531 fi |
532 else | |
533 warn_zlib="ZLIB library not found. Octave will not be able to save or load compressed data files or HDF5 files." | |
6133 | 534 AC_MSG_WARN($warn_zlib) |
3820 | 535 fi |
3687 | 536 |
5203 | 537 |
3827 | 538 # Checks for FFTW header and library. |
539 | |
540 # subdirectories of libcruft to build if they aren't found on the system: | |
541 FFT_DIR="fftpack" | |
542 AC_SUBST(FFT_DIR) | |
543 | |
544 # Installed fftw library, if any. | |
545 FFTW_LIBS='' | |
546 AC_SUBST(FFTW_LIBS) | |
547 | |
548 AC_ARG_WITH(fftw, | |
5844 | 549 [AS_HELP_STRING([--without-fftw], |
550 [use included fftpack instead of installed fftw])], | |
3886 | 551 with_fftw=$withval, with_fftw=yes) |
3827 | 552 |
5513 | 553 if test "$with_fftw" = yes; then |
4773 | 554 have_fftw3_header=no |
555 with_fftw3=no | |
6668 | 556 AC_CHECK_HEADER(fftw3.h, [have_fftw3_header=yes]) |
4773 | 557 if test "$have_fftw3_header" = yes; then |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7683
diff
changeset
|
558 AC_CHECK_LIB(fftw3, fftw_plan_dft_1d, [ |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7683
diff
changeset
|
559 AC_CHECK_LIB(fftw3f, fftwf_plan_dft_1d, [FFTW_LIBS="-lfftw3 -lfftw3f"; with_fftw3=yes])]) |
3827 | 560 fi |
561 fi | |
562 | |
4773 | 563 if test "$with_fftw" = yes && test "$with_fftw3" = yes; then |
3827 | 564 FFT_DIR='' |
4773 | 565 AC_DEFINE(HAVE_FFTW3, 1, [Define if the FFTW3 library is used.]) |
6133 | 566 else |
567 warn_fftw="FFTW library not found. Octave will use the (slower) FFTPACK library instead." | |
568 AC_MSG_RESULT($warn_fftw) | |
3827 | 569 fi |
570 | |
5235 | 571 # Checks for GLPK header and library. |
572 | |
573 AC_ARG_WITH(glpk, | |
5844 | 574 [AS_HELP_STRING([--without-glpk], [don't use GLPK])], |
5235 | 575 with_glpk=$withval, with_glpk=yes) |
576 | |
577 glpk_lib= | |
578 if test "$with_glpk" = yes; then | |
579 glpk_lib="glpk" | |
580 elif test "$with_glpk" != no; then | |
581 glpk_lib="$with_glpk" | |
582 fi | |
583 | |
584 GLPK_LIBS= | |
585 if test -n "$glpk_lib"; then | |
6806 | 586 AC_CHECK_HEADERS([glpk/glpk.h glpk.h], [ |
587 AC_CHECK_LIB($glpk_lib, glp_lpx_simplex, [ | |
5235 | 588 GLPK_LIBS="-l$glpk_lib" |
6806 | 589 AC_DEFINE(GLPK_PRE_4_14, 1, [Define if GLPK version is less than 4.14.])], [ |
590 AC_CHECK_LIB($glpk_lib, _glp_lpx_simplex, [ | |
591 GLPK_LIBS="-l$glpk_lib"], [])]) | |
592 | |
593 if test -n "$GLPK_LIBS"; then | |
594 AC_DEFINE(HAVE_GLPK, 1, [Define if GLPK is available.]) | |
595 fi | |
596 break]) | |
5235 | 597 fi |
598 AC_SUBST(GLPK_LIBS) | |
6806 | 599 if test -z "$GLPK_LIBS"; then |
6133 | 600 warn_glpk="GLPK library not found. The glpk function for solving linear programs will be disabled." |
601 fi | |
5235 | 602 |
6043 | 603 # Checks for CURL header and library. |
604 | |
605 AC_ARG_WITH(curl, | |
606 [AS_HELP_STRING([--without-curl], [don't use CURL])], | |
607 with_curl=$withval, with_curl=yes) | |
608 | |
609 curl_lib= | |
610 if test "$with_curl" = yes; then | |
611 curl_lib="curl" | |
612 elif test "$with_curl" != no; then | |
613 curl_lib="$with_curl" | |
6335 | 614 else |
615 curl_missing=yes | |
6043 | 616 fi |
617 | |
618 CURL_LIBS= | |
619 if test -n "$curl_lib"; then | |
6056 | 620 AC_CHECK_LIB($curl_lib, curl_easy_escape, [ |
6043 | 621 AC_CHECK_HEADERS(curl/curl.h, [ |
622 CURL_LIBS="-l$curl_lib" | |
6133 | 623 AC_DEFINE(HAVE_CURL, 1, [Define if CURL is available.])], [ |
624 curl_missing=yes])]) | |
6043 | 625 fi |
626 AC_SUBST(CURL_LIBS) | |
6133 | 627 if test "$curl_missing" = yes; then |
628 warn_curl="cURL library not found. The urlread and urlwrite functions will be disabled." | |
629 fi | |
630 | |
7926
d74f996e005d
__magick_read__.cc: configuration and style fixes
John W. Eaton <jwe@octave.org>
parents:
7921
diff
changeset
|
631 # GraphicsMagick++ |
d74f996e005d
__magick_read__.cc: configuration and style fixes
John W. Eaton <jwe@octave.org>
parents:
7921
diff
changeset
|
632 |
d74f996e005d
__magick_read__.cc: configuration and style fixes
John W. Eaton <jwe@octave.org>
parents:
7921
diff
changeset
|
633 warn_magick= |
d74f996e005d
__magick_read__.cc: configuration and style fixes
John W. Eaton <jwe@octave.org>
parents:
7921
diff
changeset
|
634 AC_CHECK_PROGS(MAGICK_CONFIG, [GraphicsMagick++-config GraphicsMagick-config]) |
d74f996e005d
__magick_read__.cc: configuration and style fixes
John W. Eaton <jwe@octave.org>
parents:
7921
diff
changeset
|
635 if test -z "$MAGICK_CONFIG"; then |
d74f996e005d
__magick_read__.cc: configuration and style fixes
John W. Eaton <jwe@octave.org>
parents:
7921
diff
changeset
|
636 warn_magick="GraphicsMagick++ config script not found. Assuming GraphicsMagic++ library and header files are missing, so imread will not be fully functional" |
7937
6661387827d6
Allow build without GraphicsMagick installed
David Bateman <dbateman@free.fr>
parents:
7934
diff
changeset
|
637 else |
6661387827d6
Allow build without GraphicsMagick installed
David Bateman <dbateman@free.fr>
parents:
7934
diff
changeset
|
638 AC_DEFINE(HAVE_MAGICK, 1, [Define if GraphicsMagick++ is available.]) |
7926
d74f996e005d
__magick_read__.cc: configuration and style fixes
John W. Eaton <jwe@octave.org>
parents:
7921
diff
changeset
|
639 fi |
6043 | 640 |
7834
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
641 # --------------------------------------------------------------------- |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
642 |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
643 ## libraries needed for graphics |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
644 |
7944
c2449e91f50a
configure.in: fix FTGL test to handle either FTGL/ftgl.h or ftgl.h
John W. Eaton <jwe@octave.org>
parents:
7937
diff
changeset
|
645 warn_freetype="" |
c2449e91f50a
configure.in: fix FTGL test to handle either FTGL/ftgl.h or ftgl.h
John W. Eaton <jwe@octave.org>
parents:
7937
diff
changeset
|
646 warn_ftgl="" |
7863
2a62d45fa21d
added check for FTGL library
Shai Ayal <shaiay@users.sourceforge.net>
parents:
7834
diff
changeset
|
647 |
7834
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
648 OCTAVE_OPENGL |
7944
c2449e91f50a
configure.in: fix FTGL test to handle either FTGL/ftgl.h or ftgl.h
John W. Eaton <jwe@octave.org>
parents:
7937
diff
changeset
|
649 if test -n "$OPENGL_LIBS"; then |
7954 | 650 AC_DEFINE(HAVE_OPENGL, 1, [Define if OpenGL is available]) |
7863
2a62d45fa21d
added check for FTGL library
Shai Ayal <shaiay@users.sourceforge.net>
parents:
7834
diff
changeset
|
651 |
2a62d45fa21d
added check for FTGL library
Shai Ayal <shaiay@users.sourceforge.net>
parents:
7834
diff
changeset
|
652 ## ftgl (needs freetype 2) |
2a62d45fa21d
added check for FTGL library
Shai Ayal <shaiay@users.sourceforge.net>
parents:
7834
diff
changeset
|
653 AC_CHECK_FT2([9.0.3],[], |
7944
c2449e91f50a
configure.in: fix FTGL test to handle either FTGL/ftgl.h or ftgl.h
John W. Eaton <jwe@octave.org>
parents:
7937
diff
changeset
|
654 [warn_freetype="FreeType library not found. Native renderer will not have on-screen text"]) |
c2449e91f50a
configure.in: fix FTGL test to handle either FTGL/ftgl.h or ftgl.h
John W. Eaton <jwe@octave.org>
parents:
7937
diff
changeset
|
655 if test -z "$warn_freetype"; then |
7863
2a62d45fa21d
added check for FTGL library
Shai Ayal <shaiay@users.sourceforge.net>
parents:
7834
diff
changeset
|
656 AC_LANG_PUSH(C++) |
7953
efabe34cce70
make configure compatible with FTGL ver <= 2.1.2
Jaroslav Hajek <highegg@gmail.com>
parents:
7944
diff
changeset
|
657 has_ftgl_h=yes |
efabe34cce70
make configure compatible with FTGL ver <= 2.1.2
Jaroslav Hajek <highegg@gmail.com>
parents:
7944
diff
changeset
|
658 AC_CHECK_HEADERS([FTGL/ftgl.h ftgl.h], break, [ |
efabe34cce70
make configure compatible with FTGL ver <= 2.1.2
Jaroslav Hajek <highegg@gmail.com>
parents:
7944
diff
changeset
|
659 AC_CHECK_HEADERS([FTGL/FTGL.h FTGL.h], [ |
efabe34cce70
make configure compatible with FTGL ver <= 2.1.2
Jaroslav Hajek <highegg@gmail.com>
parents:
7944
diff
changeset
|
660 AC_DEFINE(HAVE_FTGL_UPPERCASE,1,[Define to 1 if you have FTGL.h or FTGL/FTGL.h]) |
efabe34cce70
make configure compatible with FTGL ver <= 2.1.2
Jaroslav Hajek <highegg@gmail.com>
parents:
7944
diff
changeset
|
661 break |
efabe34cce70
make configure compatible with FTGL ver <= 2.1.2
Jaroslav Hajek <highegg@gmail.com>
parents:
7944
diff
changeset
|
662 ], has_ftgl_h=no)]) |
efabe34cce70
make configure compatible with FTGL ver <= 2.1.2
Jaroslav Hajek <highegg@gmail.com>
parents:
7944
diff
changeset
|
663 if test "$has_ftgl_h" = yes; then |
7863
2a62d45fa21d
added check for FTGL library
Shai Ayal <shaiay@users.sourceforge.net>
parents:
7834
diff
changeset
|
664 AC_MSG_CHECKING([for FTGLTextureFont in -lftgl]) |
2a62d45fa21d
added check for FTGL library
Shai Ayal <shaiay@users.sourceforge.net>
parents:
7834
diff
changeset
|
665 save_LIBS="$LIBS" |
2a62d45fa21d
added check for FTGL library
Shai Ayal <shaiay@users.sourceforge.net>
parents:
7834
diff
changeset
|
666 save_CXXFLAGS="$CXXFLAGS" |
2a62d45fa21d
added check for FTGL library
Shai Ayal <shaiay@users.sourceforge.net>
parents:
7834
diff
changeset
|
667 LIBS="$LIBS $OPENGL_LIBS $FT2_LIBS -lftgl" |
2a62d45fa21d
added check for FTGL library
Shai Ayal <shaiay@users.sourceforge.net>
parents:
7834
diff
changeset
|
668 CXXFLAGS="$CXXFLAGS $FT2_CFLAGS" |
2a62d45fa21d
added check for FTGL library
Shai Ayal <shaiay@users.sourceforge.net>
parents:
7834
diff
changeset
|
669 AC_TRY_LINK([ |
7915
d74e515cb535
configure.in: check for ftgl.h instead of FTGL.h
John W. Eaton <jwe@octave.org>
parents:
7914
diff
changeset
|
670 #ifdef HAVE_FTGL_FTGL_H |
7953
efabe34cce70
make configure compatible with FTGL ver <= 2.1.2
Jaroslav Hajek <highegg@gmail.com>
parents:
7944
diff
changeset
|
671 #ifdef HAVE_FTGL_UPPERCASE |
efabe34cce70
make configure compatible with FTGL ver <= 2.1.2
Jaroslav Hajek <highegg@gmail.com>
parents:
7944
diff
changeset
|
672 #include <FTGL/FTGL.h> |
7958 | 673 #include <FTGL/FTGLTextureFont.h> |
7953
efabe34cce70
make configure compatible with FTGL ver <= 2.1.2
Jaroslav Hajek <highegg@gmail.com>
parents:
7944
diff
changeset
|
674 #else |
7915
d74e515cb535
configure.in: check for ftgl.h instead of FTGL.h
John W. Eaton <jwe@octave.org>
parents:
7914
diff
changeset
|
675 #include <FTGL/ftgl.h> |
7953
efabe34cce70
make configure compatible with FTGL ver <= 2.1.2
Jaroslav Hajek <highegg@gmail.com>
parents:
7944
diff
changeset
|
676 #endif |
7915
d74e515cb535
configure.in: check for ftgl.h instead of FTGL.h
John W. Eaton <jwe@octave.org>
parents:
7914
diff
changeset
|
677 #elif HAVE_FTGL_H |
7953
efabe34cce70
make configure compatible with FTGL ver <= 2.1.2
Jaroslav Hajek <highegg@gmail.com>
parents:
7944
diff
changeset
|
678 #ifdef HAVE_FTGL_UPPERCASE |
efabe34cce70
make configure compatible with FTGL ver <= 2.1.2
Jaroslav Hajek <highegg@gmail.com>
parents:
7944
diff
changeset
|
679 #include <FTGL.h> |
7958 | 680 #include <FTGLTextureFont.h> |
7953
efabe34cce70
make configure compatible with FTGL ver <= 2.1.2
Jaroslav Hajek <highegg@gmail.com>
parents:
7944
diff
changeset
|
681 #else |
7915
d74e515cb535
configure.in: check for ftgl.h instead of FTGL.h
John W. Eaton <jwe@octave.org>
parents:
7914
diff
changeset
|
682 #include <ftgl.h> |
7953
efabe34cce70
make configure compatible with FTGL ver <= 2.1.2
Jaroslav Hajek <highegg@gmail.com>
parents:
7944
diff
changeset
|
683 #endif |
7921
fcc70f30fe31
configure.in: use #endif, not #fi in test
John W. Eaton <jwe@octave.org>
parents:
7915
diff
changeset
|
684 #endif], [ |
7863
2a62d45fa21d
added check for FTGL library
Shai Ayal <shaiay@users.sourceforge.net>
parents:
7834
diff
changeset
|
685 FTGLTextureFont font("");], [ |
2a62d45fa21d
added check for FTGL library
Shai Ayal <shaiay@users.sourceforge.net>
parents:
7834
diff
changeset
|
686 OPENGL_LIBS="$OPENGL_LIBS $FT2_LIBS -lftgl" |
2a62d45fa21d
added check for FTGL library
Shai Ayal <shaiay@users.sourceforge.net>
parents:
7834
diff
changeset
|
687 LIBS="$save_LIBS" |
2a62d45fa21d
added check for FTGL library
Shai Ayal <shaiay@users.sourceforge.net>
parents:
7834
diff
changeset
|
688 AC_DEFINE(HAVE_FTGL, 1, [Define to 1 if FTGL is present]) |
7874
e3a502930e2a
eliminate src/graphics subdirectory
John W. Eaton <jwe@octave.org>
parents:
7863
diff
changeset
|
689 AC_MSG_RESULT(yes) |
e3a502930e2a
eliminate src/graphics subdirectory
John W. Eaton <jwe@octave.org>
parents:
7863
diff
changeset
|
690 XTRA_CXXFLAGS="$XTRA_CXXFLAGS $FT2_CFLAGS"],[ |
7944
c2449e91f50a
configure.in: fix FTGL test to handle either FTGL/ftgl.h or ftgl.h
John W. Eaton <jwe@octave.org>
parents:
7937
diff
changeset
|
691 AC_MSG_RESULT(no) |
c2449e91f50a
configure.in: fix FTGL test to handle either FTGL/ftgl.h or ftgl.h
John W. Eaton <jwe@octave.org>
parents:
7937
diff
changeset
|
692 warn_ftgl="FTGL library not found. Native renderer will not have on-screen text" |
c2449e91f50a
configure.in: fix FTGL test to handle either FTGL/ftgl.h or ftgl.h
John W. Eaton <jwe@octave.org>
parents:
7937
diff
changeset
|
693 ]) |
7887
627b10572d82
configure.in: fix invalid placement of variables restoration statements
Jaroslav Hajek <highegg@gmail.com>
parents:
7874
diff
changeset
|
694 LIBS="$save_LIBS" |
627b10572d82
configure.in: fix invalid placement of variables restoration statements
Jaroslav Hajek <highegg@gmail.com>
parents:
7874
diff
changeset
|
695 CXXFLAGS="$save_CXXFLAGS" |
7944
c2449e91f50a
configure.in: fix FTGL test to handle either FTGL/ftgl.h or ftgl.h
John W. Eaton <jwe@octave.org>
parents:
7937
diff
changeset
|
696 else |
c2449e91f50a
configure.in: fix FTGL test to handle either FTGL/ftgl.h or ftgl.h
John W. Eaton <jwe@octave.org>
parents:
7937
diff
changeset
|
697 warn_ftgl="FTGL headers not found. Native renderer will not have on-screen text" |
c2449e91f50a
configure.in: fix FTGL test to handle either FTGL/ftgl.h or ftgl.h
John W. Eaton <jwe@octave.org>
parents:
7937
diff
changeset
|
698 fi |
7863
2a62d45fa21d
added check for FTGL library
Shai Ayal <shaiay@users.sourceforge.net>
parents:
7834
diff
changeset
|
699 AC_LANG_POP(C++) |
2a62d45fa21d
added check for FTGL library
Shai Ayal <shaiay@users.sourceforge.net>
parents:
7834
diff
changeset
|
700 fi |
7834
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
701 fi |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
702 |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
703 GRAPHICS_LIBS= |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
704 GRAPHICS_CFLAGS= |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
705 |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
706 ## fltk (www.fltk.org) |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
707 AC_ARG_WITH(fltk-prefix, |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
708 [ --with-fltk-prefix=PFX Prefix where FLTK is installed (optional)], |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
709 fltk_prefix="$withval", |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
710 fltk_prefix="") |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
711 AC_ARG_WITH(fltk-exec-prefix, |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
712 [ --with-fltk-exec-prefix=PFX Exec prefix where FLTK is installed (optional)], |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
713 fltk_exec_prefix="$withval", |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
714 fltk_exec_prefix="") |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
715 |
7944
c2449e91f50a
configure.in: fix FTGL test to handle either FTGL/ftgl.h or ftgl.h
John W. Eaton <jwe@octave.org>
parents:
7937
diff
changeset
|
716 if test -n "$fltk_exec_prefix"; then |
7834
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
717 fltk_args="$fltk_args --exec-prefix=$fltk_exec_prefix" |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
718 if test "x${FLTK_CONFIG+set}" != xset ; then |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
719 FLTK_CONFIG="$fltk_exec_prefix/bin/fltk-config" |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
720 fi |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
721 fi |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
722 |
7944
c2449e91f50a
configure.in: fix FTGL test to handle either FTGL/ftgl.h or ftgl.h
John W. Eaton <jwe@octave.org>
parents:
7937
diff
changeset
|
723 if test -n "$fltk_prefix"; then |
7834
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
724 fltk_args="$fltk_args --prefix=$fltk_prefix" |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
725 if test x${FLTK_CONFIG+set} != xset ; then |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
726 FLTK_CONFIG="$fltk_prefix/bin/fltk-config" |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
727 fi |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
728 fi |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
729 |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
730 AC_PATH_PROG(FLTK_CONFIG, fltk-config, no) |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
731 |
7944
c2449e91f50a
configure.in: fix FTGL test to handle either FTGL/ftgl.h or ftgl.h
John W. Eaton <jwe@octave.org>
parents:
7937
diff
changeset
|
732 warn_fltk_config="" |
c2449e91f50a
configure.in: fix FTGL test to handle either FTGL/ftgl.h or ftgl.h
John W. Eaton <jwe@octave.org>
parents:
7937
diff
changeset
|
733 warn_fltk_opengl="" |
c2449e91f50a
configure.in: fix FTGL test to handle either FTGL/ftgl.h or ftgl.h
John W. Eaton <jwe@octave.org>
parents:
7937
diff
changeset
|
734 |
7834
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
735 if test "$FLTK_CONFIG" = "no" ; then |
7944
c2449e91f50a
configure.in: fix FTGL test to handle either FTGL/ftgl.h or ftgl.h
John W. Eaton <jwe@octave.org>
parents:
7937
diff
changeset
|
736 warn_fltk_config="FLTK config script not found. Native graphics will be disabled." |
7834
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
737 else |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
738 FLTK_CFLAGS="`$FLTK_CONFIG $fltkconf_args --use-gl --cflags`" |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
739 FLTK_LDFLAGS="`$FLTK_CONFIG $fltkconf_args --use-gl --ldflags`" |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
740 |
7944
c2449e91f50a
configure.in: fix FTGL test to handle either FTGL/ftgl.h or ftgl.h
John W. Eaton <jwe@octave.org>
parents:
7937
diff
changeset
|
741 AC_MSG_CHECKING(for OpenGL support in FLTK) |
7834
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
742 cat > conftest.cc <<EOF |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
743 #include <FL/gl.h> |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
744 int nothing=0; |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
745 EOF |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
746 $CXX $CXXFLAGS $FLTK_CFLAGS -c conftest.cc || \ |
7944
c2449e91f50a
configure.in: fix FTGL test to handle either FTGL/ftgl.h or ftgl.h
John W. Eaton <jwe@octave.org>
parents:
7937
diff
changeset
|
747 warn_fltk_opengl="FLTK does not have OpenGL support. Native graphics will be disabled." |
7834
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
748 |
7944
c2449e91f50a
configure.in: fix FTGL test to handle either FTGL/ftgl.h or ftgl.h
John W. Eaton <jwe@octave.org>
parents:
7937
diff
changeset
|
749 if test -z "$warn_fltk_opengl"; then |
7834
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
750 AC_MSG_RESULT(yes) |
7954 | 751 AC_DEFINE(HAVE_FLTK, 1, [Define if FLTK is available]) |
7863
2a62d45fa21d
added check for FTGL library
Shai Ayal <shaiay@users.sourceforge.net>
parents:
7834
diff
changeset
|
752 GRAPHICS_CFLAGS="$FLTK_CFLAGS" |
2a62d45fa21d
added check for FTGL library
Shai Ayal <shaiay@users.sourceforge.net>
parents:
7834
diff
changeset
|
753 GRAPHICS_LIBS="$FLTK_LDFLAGS" |
7834
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
754 else |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
755 AC_MSG_RESULT(no) |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
756 fi |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
757 fi |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
758 |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
759 AC_SUBST(GRAPHICS_CFLAGS) |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
760 AC_SUBST(GRAPHICS_LIBS) |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
761 |
4853 | 762 OCTAVE_IEEE754_DATA_FORMAT |
4850 | 763 |
3827 | 764 # ---------------------------------------------------------------------- |
765 | |
3130 | 766 OCTAVE_PROG_AR |
3012 | 767 |
768 AC_PROG_RANLIB | |
769 | |
7063 | 770 ## Default FFLAGS is -O. |
771 if test "x$FFLAGS" = x; then | |
772 FFLAGS="-O" | |
1233 | 773 fi |
5 | 774 |
7063 | 775 ## the F77 variable, if set, overrides AC_PROG_F77 automatically |
3887 | 776 AC_PROG_F77 |
7063 | 777 AC_F77_LIBRARY_LDFLAGS |
778 AC_F77_DUMMY_MAIN | |
779 AC_F77_WRAPPERS | |
5 | 780 |
6102 | 781 F77_TOLOWER=true |
782 F77_APPEND_UNDERSCORE=true | |
783 F77_APPEND_EXTRA_UNDERSCORE=true | |
7063 | 784 |
785 case "$ac_cv_f77_mangling" in | |
786 "upper case") F77_TOLOWER=false ;; | |
787 esac | |
788 case "$ac_cv_f77_mangling" in | |
789 "no underscore") F77_APPEND_UNDERSCORE=false ;; | |
790 esac | |
791 case "$ac_cv_f77_mangling" in | |
792 "no extra underscore") F77_APPEND_EXTRA_UNDERSCORE=false ;; | |
793 esac | |
6102 | 794 |
7063 | 795 case "$canonical_host_type" in |
796 i[[3456789]]86-*-*) | |
797 if test "$ac_cv_f77_compiler_gnu" = yes; then | |
798 OCTAVE_F77_FLAG(-mieee-fp) | |
799 ### OCTAVE_F77_FLAG(-ffloat-store) | |
1239 | 800 fi |
7063 | 801 ;; |
802 alpha*-*-*) | |
803 if test "$ac_cv_f77_compiler_gnu" = yes; then | |
804 OCTAVE_F77_FLAG(-mieee) | |
805 else | |
806 OCTAVE_F77_FLAG(-ieee) | |
807 OCTAVE_F77_FLAG(-fpe1) | |
5 | 808 fi |
7063 | 809 ;; |
810 powerpc-apple-machten*) | |
811 FFLAGS= | |
812 ;; | |
813 esac | |
814 | |
815 if test -n "$FFLAGS"; then | |
816 AC_MSG_NOTICE([defining FFLAGS to be $FFLAGS]) | |
5 | 817 fi |
7063 | 818 |
6102 | 819 AC_SUBST(F77_TOLOWER) |
820 AC_SUBST(F77_APPEND_UNDERSCORE) | |
821 AC_SUBST(F77_APPEND_EXTRA_UNDERSCORE) | |
869 | 822 |
7063 | 823 if test -z "$F77"; then |
832 | 824 AC_MSG_WARN([in order to build octave, you must have a compatible]) |
7063 | 825 AC_MSG_WARN([Fortran compiler or wrapper script for f2c that functions]) |
826 AC_MSG_WARN([as a Fortran compiler installed and in your path.]) | |
1664 | 827 AC_MSG_ERROR([See the file INSTALL for more information.]) |
5 | 828 fi |
869 | 829 |
6137 | 830 XTRA_CRUFT_SH_LDFLAGS= |
6102 | 831 case "$canonical_host_type" in |
832 *-*-msdosmsvc) | |
833 FLIBS="$FLIBS -lkernel32" | |
6137 | 834 XTRA_CRUFT_SH_LDFLAGS="-Wl,-def:cruft.def" |
6102 | 835 ;; |
836 esac | |
6137 | 837 AC_SUBST(XTRA_CRUFT_SH_LDFLAGS) |
6102 | 838 |
1163 | 839 FC=$F77 |
840 AC_SUBST(FC) | |
869 | 841 |
5498 | 842 OCTAVE_F77_FLAG(-ffloat-store, [ |
843 AC_MSG_RESULT([setting F77_FLOAT_STORE_FLAG to -ffloat-store]) | |
844 F77_FLOAT_STORE_FLAG=-ffloat-store | |
845 AC_SUBST(F77_FLOAT_STORE_FLAG) | |
846 ]) | |
847 | |
3820 | 848 ### Checks for BLAS and LAPACK libraries: |
3887 | 849 # (Build subdirectories of libcruft if they aren't found on the system.) |
850 sinclude(acx_blas.m4) | |
7683
8136cb19fb7a
implement BLAS-F77 call compatibility check
Jaroslav Hajek <highegg@gmail.com>
parents:
7638
diff
changeset
|
851 sinclude(acx_blas_f77_func.m4) |
3887 | 852 sinclude(acx_lapack.m4) |
7683
8136cb19fb7a
implement BLAS-F77 call compatibility check
Jaroslav Hajek <highegg@gmail.com>
parents:
7638
diff
changeset
|
853 ACX_BLAS_WITH_F77_FUNC([], [BLAS_DIR="blas"]) |
3887 | 854 ACX_LAPACK([BLAS_LIBS="$LAPACK_LIBS $BLAS_LIBS"], [LAPACK_DIR="lapack"]) |
3690 | 855 AC_SUBST(BLAS_DIR) |
856 AC_SUBST(LAPACK_DIR) | |
857 | |
7683
8136cb19fb7a
implement BLAS-F77 call compatibility check
Jaroslav Hajek <highegg@gmail.com>
parents:
7638
diff
changeset
|
858 if test "x$acx_blas_f77_func_ok" = "xno"; then |
8136cb19fb7a
implement BLAS-F77 call compatibility check
Jaroslav Hajek <highegg@gmail.com>
parents:
7638
diff
changeset
|
859 warn_blas_f77_incompatible="A BLAS library was detected but found incompatible with your Fortran 77 compiler. The reference BLAS implementation will be used. To improve performance, consider using a different Fortran compiler or a switch like -ff2c to make your Fortran compiler use a calling convention compatible with the way your BLAS library was compiled, or use a different BLAS library." |
8136cb19fb7a
implement BLAS-F77 call compatibility check
Jaroslav Hajek <highegg@gmail.com>
parents:
7638
diff
changeset
|
860 AC_MSG_WARN($warn_blas_f77_incompatible) |
8136cb19fb7a
implement BLAS-F77 call compatibility check
Jaroslav Hajek <highegg@gmail.com>
parents:
7638
diff
changeset
|
861 fi |
8136cb19fb7a
implement BLAS-F77 call compatibility check
Jaroslav Hajek <highegg@gmail.com>
parents:
7638
diff
changeset
|
862 |
5451 | 863 # Check for AMD library |
864 AMD_LIBS= | |
865 AC_SUBST(AMD_LIBS) | |
7619 | 866 |
867 AC_ARG_WITH(amd, | |
868 [AS_HELP_STRING([--without-amd], | |
869 [don't use AMD, disable some sparse functionality])], | |
870 with_amd=$withval, with_amd=yes) | |
871 | |
872 warn_amd="AMD not found. This will result in some lack of functionality for sparse matrices." | |
873 if test "$with_amd" = yes; then | |
874 with_amd=no | |
875 AC_CHECK_HEADERS([suitesparse/amd.h ufsparse/amd.h amd/amd.h amd.h], [ | |
876 AC_CHECK_LIB(amd, amd_postorder, [AMD_LIBS="-lamd"; with_amd=yes]) | |
877 if test "$with_amd" = yes; then | |
878 AC_DEFINE(HAVE_AMD, 1, [Define if the AMD library is used.]) | |
879 warn_amd= | |
880 fi | |
881 break]) | |
882 fi | |
883 if test -n "$warn_amd"; then | |
884 AC_MSG_WARN($warn_amd) | |
885 fi | |
5451 | 886 |
6024 | 887 # Check for CAMD library |
888 CAMD_LIBS= | |
889 AC_SUBST(CAMD_LIBS) | |
890 AC_CHECK_LIB(camd, camd_postorder, [CAMD_LIBS="-lcamd"; with_camd=yes],[with_camd=no]) | |
891 | |
5226 | 892 # Check for UMFPACK library. |
893 | |
894 UMFPACK_LIBS= | |
895 AC_SUBST(UMFPACK_LIBS) | |
896 | |
897 AC_ARG_WITH(umfpack, | |
5844 | 898 [AS_HELP_STRING([--without-umfpack], |
899 [don't use UMFPACK, disable some sparse functionality])], | |
5226 | 900 with_umfpack=$withval, with_umfpack=yes) |
901 | |
5703 | 902 warn_umfpack="UMFPACK not found. This will result in some lack of functionality for sparse matrices." |
5513 | 903 if test "$with_umfpack" = yes && test "$with_amd" = yes; then |
5226 | 904 with_umfpack=no |
6232 | 905 AC_CHECK_HEADERS([suitesparse/umfpack.h ufsparse/umfpack.h umfpack/umfpack.h umfpack.h], [ |
5512 | 906 AC_CHECK_LIB(umfpack, umfpack_zi_get_determinant, [ |
907 UMFPACK_LIBS="-lumfpack"; with_umfpack=yes], [ | |
908 ## Invalidate the cache. | |
909 $as_unset ac_cv_lib_umfpack_umfpack_zi_get_determinant | |
910 AC_CHECK_LIB(umfpack, umfpack_zi_get_determinant, [ | |
911 UMFPACK_LIBS="-lumfpack"; with_umfpack=yes], [ | |
912 | |
5226 | 913 ## Invalidate the cache. |
914 $as_unset ac_cv_lib_umfpack_umfpack_zi_get_determinant | |
915 AC_CHECK_LIB(umfpack, umfpack_zi_get_determinant, [ | |
5512 | 916 UMFPACK_LIBS="-lumfpack -lcblas"; with_umfpack=yes], [], $AMD_LIBS -lcblas $BLAS_LIBS)], $AMD_LIBS $BLAS_LIBS $FLIBS)], $AMD_LIBS) |
5451 | 917 |
5226 | 918 if test "$with_umfpack" = yes; then |
5451 | 919 AC_DEFINE(HAVE_UMFPACK, 1, [Define if the UMFPACK library is used.]) |
5505 | 920 OLD_LIBS=$LIBS |
921 LIBS="$LIBS $UMFPACK_LIBS $AMD_LIBS $BLAS_LIBS $FLIBS" | |
922 OCTAVE_UMFPACK_SEPERATE_SPLIT | |
923 LIBS=$OLD_LIBS | |
5648 | 924 TEXINFO_UMFPACK="@set HAVE_UMFPACK" |
5513 | 925 warn_umfpack= |
5512 | 926 fi |
5513 | 927 break]) |
928 fi | |
6133 | 929 if test -n "$warn_umfpack"; then |
930 AC_MSG_WARN($warn_umfpack) | |
931 fi | |
5513 | 932 |
5648 | 933 AC_SUBST(TEXINFO_UMFPACK) |
5226 | 934 |
5451 | 935 COLAMD_LIBS= |
936 AC_SUBST(COLAMD_LIBS) | |
937 | |
938 AC_ARG_WITH(colamd, | |
5844 | 939 [AS_HELP_STRING([--without-colamd], |
940 [don't use COLAMD, disable some sparse functionality])], | |
5451 | 941 with_colamd=$withval, with_colamd=yes) |
942 | |
5703 | 943 warn_colamd="COLAMD not found. This will result in some lack of functionality for sparse matrices." |
5513 | 944 if test "$with_colamd" = yes; then |
5451 | 945 with_colamd=no |
6232 | 946 AC_CHECK_HEADERS([suitesparse/colamd.h ufsparse/colamd.h colamd/colamd.h colamd.h], [ |
5451 | 947 AC_CHECK_LIB(colamd, colamd, [COLAMD_LIBS="-lcolamd"; with_colamd=yes]) |
948 if test "$with_colamd" = yes; then | |
949 AC_DEFINE(HAVE_COLAMD, 1, [Define if the COLAMD library is used.]) | |
5648 | 950 TEXINFO_COLAMD="@set HAVE_COLAMD" |
5513 | 951 warn_colamd= |
5512 | 952 fi |
5513 | 953 break]) |
5451 | 954 fi |
6133 | 955 if test -n "$warn_colamd"; then |
956 AC_MSG_WARN($warn_colamd) | |
957 fi | |
5451 | 958 |
5648 | 959 AC_SUBST(TEXINFO_COLAMD) |
5513 | 960 |
5451 | 961 CCOLAMD_LIBS= |
962 AC_SUBST(CCOLAMD_LIBS) | |
963 | |
964 AC_ARG_WITH(ccolamd, | |
5844 | 965 [AS_HELP_STRING([--without-ccolamd], |
966 [don't use CCOLAMD, disable some sparse functionality])], | |
5451 | 967 with_ccolamd=$withval, with_ccolamd=yes) |
968 | |
5703 | 969 warn_ccolamd="CCOLAMD not found. This will result in some lack of functionality for sparse matrices." |
5513 | 970 if test "$with_ccolamd" = yes; then |
5451 | 971 with_ccolamd=no |
6232 | 972 AC_CHECK_HEADERS([suitesparse/ccolamd.h ufsparse/ccolamd.h ccolamd/ccolamd.h ccolamd.h], [ |
5451 | 973 AC_CHECK_LIB(ccolamd, ccolamd, [CCOLAMD_LIBS="-lccolamd"; with_ccolamd=yes]) |
974 if test "$with_ccolamd" = yes; then | |
975 AC_DEFINE(HAVE_CCOLAMD, 1, [Define if the CCOLAMD library is used.]) | |
5513 | 976 warn_ccolamd= |
5512 | 977 fi |
5513 | 978 break]) |
5451 | 979 fi |
6133 | 980 if test -n "$warn_ccolamd"; then |
981 AC_MSG_WARN($warn_ccolamd) | |
982 fi | |
5451 | 983 |
984 CHOLMOD_LIBS= | |
985 AC_SUBST(CHOLMOD_LIBS) | |
986 | |
987 AC_ARG_WITH(cholmod, | |
5844 | 988 [AS_HELP_STRING([--without-cholmod], |
989 [don't use CHOLMOD, disable some sparse functionality])], | |
5451 | 990 with_cholmod=$withval, with_cholmod=yes) |
991 | |
5703 | 992 warn_cholmod="CHOLMOD not found. This will result in some lack of functionality for sparse matrices." |
5513 | 993 if test "$with_cholmod" = yes && test "$with_colamd" = yes && |
994 test "$with_ccolamd" = yes && test "$with_amd" = yes; then | |
5451 | 995 with_cholmod=no |
6232 | 996 AC_CHECK_HEADERS([suitesparse/cholmod.h ufsparse/cholmod.h cholmod/cholmod.h cholmod.h], [ |
7036 | 997 AC_CHECK_LIB(cholmod, cholmod_start, [CHOLMOD_LIBS="-lcholmod"; |
998 with_cholmod=yes], [ | |
999 AC_CHECK_LIB(cholmod, cholmod_start, [CHOLMOD_LIBS="-lcholmod -cblas"; | |
1000 with_cholmod=yes], [], | |
1001 $CAMD_LIBS $AMD_LIBS $COLAMD_LIBS $CCOLAMD_LIBS $BLAS_LIBS $FLIBS)], | |
1002 $CAMD_LIBS $AMD_LIBS $COLAMD_LIBS $CCOLAMD_LIBS $BLAS_LIBS $FLIBS) | |
5451 | 1003 |
1004 if test "$with_cholmod" = yes; then | |
1005 AC_DEFINE(HAVE_CHOLMOD, 1, [Define if the CHOLMOD library is used.]) | |
5648 | 1006 TEXINFO_CHOLMOD="@set HAVE_CHOLMOD" |
5513 | 1007 warn_cholmod= |
5512 | 1008 fi |
5513 | 1009 break]) |
6133 | 1010 fi |
1011 if test -n "$warn_cholmod"; then | |
1012 AC_MSG_WARN($warn_cholmod) | |
1013 fi | |
5226 | 1014 |
5648 | 1015 AC_SUBST(TEXINFO_CHOLMOD) |
5513 | 1016 |
5610 | 1017 CXSPARSE_LIBS= |
1018 AC_SUBST(CXSPARSE_LIBS) | |
1019 | |
1020 AC_ARG_WITH(cxsparse, | |
5844 | 1021 [AS_HELP_STRING([--without-cxsparse], |
1022 [don't use CXSparse, disable some sparse functionality])], | |
5610 | 1023 with_cxsparse=$withval, with_cxsparse=yes) |
1024 | |
5703 | 1025 warn_cxsparse="CXSparse not found. This will result in some lack of functionality for sparse matrices." |
5610 | 1026 if test "$with_cxsparse" = yes; then |
1027 with_cxsparse=no | |
6719 | 1028 AC_LANG_PUSH(C++) |
6232 | 1029 AC_CHECK_HEADERS([suitesparse/cs.h ufsparse/cs.h cxsparse/cs.h cs.h], [ |
5648 | 1030 AC_CHECK_LIB(cxsparse, cs_di_sqr, [CXSPARSE_LIBS="-lcxsparse"; with_cxsparse=yes]) |
5610 | 1031 if test "$with_cxsparse" = yes; then |
1032 AC_DEFINE(HAVE_CXSPARSE, 1, [Define if the CXSparse library is used.]) | |
1033 warn_cxsparse= | |
1034 fi | |
1035 break]) | |
6719 | 1036 AC_LANG_POP(C++) |
5610 | 1037 fi |
6133 | 1038 if test -n "$warn_cxsparse"; then |
1039 AC_MSG_WARN($warn_cxsparse) | |
1040 fi | |
5610 | 1041 |
4110 | 1042 ### Handle shared library options. |
2813 | 1043 |
3034 | 1044 ### Enable creation of static libraries. |
1045 | |
1046 AC_ARG_ENABLE(static, | |
5844 | 1047 [AS_HELP_STRING([--enable-static], [create static libraries])], |
3034 | 1048 [if test "$enableval" = no; then STATIC_LIBS=false; |
1049 else STATIC_LIBS=true; fi], | |
5221 | 1050 STATIC_LIBS=false) |
3034 | 1051 AC_SUBST(STATIC_LIBS) |
1052 | |
2813 | 1053 ### Enable creation of shared libraries. Currently only works with |
1054 ### gcc on some systems. | |
1055 | |
1056 AC_ARG_ENABLE(shared, | |
5844 | 1057 [AS_HELP_STRING([--enable-shared], |
1058 [create shared libraries (not all systems)])], | |
2813 | 1059 [if test "$enableval" = no; then SHARED_LIBS=false; |
1060 else SHARED_LIBS=true; fi], | |
5221 | 1061 SHARED_LIBS=true) |
2813 | 1062 AC_SUBST(SHARED_LIBS) |
1063 | |
4128 | 1064 ### Enable dynamic linking. --enable-shared implies this, so |
1065 ### --enable-dl is only need if you are only building static libraries | |
1066 ### and want to try dynamic linking too (works on some systems, for | |
1067 ### example, OS X and Windows). | |
1068 | |
1069 AC_ARG_ENABLE(dl, | |
5844 | 1070 [AS_HELP_STRING([--enable-dl], |
1071 [create shared libraries (not all systems)])], | |
4128 | 1072 [if test "$enableval" = no; then ENABLE_DYNAMIC_LINKING=false; |
1073 else ENABLE_DYNAMIC_LINKING=true; fi], | |
5221 | 1074 ENABLE_DYNAMIC_LINKING=true) |
4128 | 1075 |
3034 | 1076 if $STATIC_LIBS || $SHARED_LIBS; then |
1077 true | |
1078 else | |
1079 AC_MSG_ERROR([You can't disable building static AND shared libraries!]) | |
1080 fi | |
1081 | |
2813 | 1082 AC_ARG_ENABLE(rpath, |
5844 | 1083 [AS_HELP_STRING([--enable-rpath], |
1084 [override the default link options for rpath; e.g., --enable-rpath='-rpath $(octlibdir)'])], | |
4353 | 1085 [ if test "$enableval" = no; then use_rpath=false; |
1086 else | |
1087 use_rpath=true | |
1088 if test "$enableval" = yes; then true; | |
1089 else enable_rpath_arg="$enableval"; fi | |
4439 | 1090 fi], [use_rpath=true]) |
2813 | 1091 |
1092 CPICFLAG=-fPIC | |
1093 CXXPICFLAG=-fPIC | |
1094 FPICFLAG=-fPIC | |
1095 SHLEXT=so | |
4190 | 1096 SHLLIB='$(SHLEXT)' |
4102 | 1097 SHLBIN= |
4138 | 1098 SHLEXT_VER='$(SHLEXT).$(version)' |
1099 SHLLIB_VER='$(SHLLIB).$(version)' | |
1100 SHLBIN_VER='$(SHLBIN).$(version)' | |
4126 | 1101 SHLLINKEXT= |
6051 | 1102 LIBPRE=lib |
4323 | 1103 SH_LD='$(CXX)' |
2813 | 1104 SH_LDFLAGS=-shared |
4759 | 1105 DL_LD='$(SH_LD)' |
1106 DL_LDFLAGS='$(SH_LDFLAGS)' | |
1107 MKOCTFILE_DL_LDFLAGS='$(DL_LDFLAGS)' | |
3036 | 1108 SONAME_FLAGS= |
2813 | 1109 RLD_FLAG= |
4199 | 1110 NO_OCT_FILE_STRIP=false |
4323 | 1111 TEMPLATE_AR='$(AR)' |
3775 | 1112 TEMPLATE_ARFLAGS="$ARFLAGS" |
6137 | 1113 CRUFT_DLL_DEFS= |
1114 OCTAVE_DLL_DEFS= | |
1115 OCTINTERP_DLL_DEFS= | |
7825
13871b7de124
Import sources for OpenGL-based renderer.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7789
diff
changeset
|
1116 OCTGRAPHICS_DLL_DEFS= |
4104 | 1117 library_path_var=LD_LIBRARY_PATH |
2813 | 1118 case "$canonical_host_type" in |
6668 | 1119 *-*-386bsd* | *-*-netbsd*) |
2813 | 1120 SH_LD=ld |
1121 SH_LDFLAGS=-Bshareable | |
1122 ;; | |
6668 | 1123 *-*-openbsd*) |
1124 SH_LDFLAGS='-shared -fPIC' | |
1125 ;; | |
4323 | 1126 *-*-freebsd*) |
5508 | 1127 SH_LDFLAGS="-shared -Wl,-x" |
1128 RLD_FLAG='-Wl,-rpath -Wl,$(octlibdir)' | |
4323 | 1129 ;; |
3127 | 1130 alpha*-dec-osf*) |
2813 | 1131 CPICFLAG= |
1132 CXXPICFLAG= | |
1133 FPICFLAG= | |
4283 | 1134 SH_LDFLAGS="-shared -Wl,-expect_unresolved -Wl,'*'" |
1135 RLD_FLAG='-Wl,-rpath -Wl,$(octlibdir)' | |
2813 | 1136 ;; |
3956 | 1137 *-*-darwin*) |
4759 | 1138 DL_LDFLAGS='-bundle -bundle_loader $(TOPDIR)/src/octave $(LDFLAGS)' |
6682 | 1139 MKOCTFILE_DL_LDFLAGS='-bundle -bundle_loader $$BINDIR/octave-$$OCTAVE_VERSION$$EXEEXT' |
4759 | 1140 SH_LDFLAGS='-dynamiclib -single_module $(LDFLAGS)' |
7266 | 1141 case "$canonical_host_type" in |
1142 powerpc-*) | |
1143 CXXPICFLAG= | |
1144 CPICFLAG= | |
1145 FPICFLAG= | |
1146 ;; | |
1147 esac | |
4759 | 1148 SHLEXT=dylib |
1149 SHLLIB='$(SHLEXT)' | |
1150 SHLEXT_VER='$(version).$(SHLEXT)' | |
1151 SHLLIB_VER='$(version).$(SHLLIB)' | |
4199 | 1152 NO_OCT_FILE_STRIP=true |
4786 | 1153 SONAME_FLAGS='-install_name $(octlibdir)/$@' |
4759 | 1154 library_path_var=DYLD_LIBRARY_PATH |
3956 | 1155 ;; |
4105 | 1156 *-*-cygwin* | *-*-mingw*) |
5451 | 1157 DL_LDFLAGS="-shared -Wl,--export-all-symbols -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc" |
4102 | 1158 CXXPICFLAG= |
1159 CPICFLAG= | |
1160 FPICFLAG= | |
1161 SHLEXT=dll | |
1162 SHLLIB=dll.a | |
1163 SHLBIN=dll | |
5414 | 1164 SH_LDFLAGS="-shared -Wl,--export-all-symbols -Wl,--enable-auto-import -Wl,--enable-auto-image-base" |
4102 | 1165 SHLLINKEXT=.dll |
1166 SONAME_FLAGS='-Wl,--out-implib=$@.a' | |
4104 | 1167 library_path_var=PATH |
4102 | 1168 ;; |
6089 | 1169 *-*-msdosmsvc) |
6794 | 1170 DL_LDFLAGS="-shared" |
6051 | 1171 CPICFLAG= |
1172 CXXPICFLAG= | |
1173 FPICFLAG= | |
1174 SHLEXT=dll | |
1175 SHLLIB=lib | |
1176 SHLBIN=dll | |
1177 LIBPRE= | |
6794 | 1178 SH_LDFLAGS="-shared" |
1179 if test -n "`echo $CFLAGS | grep -e '-g'`" -o -n "`echo $CXXFLAGS | grep -e '-g'`"; then | |
1180 DL_LDFLAGS="$DL_LDFLAGS -g" | |
1181 SH_LDFLAGS="$SH_LDFLAGS -g" | |
1182 fi | |
6255 | 1183 NO_OCT_FILE_STRIP=true |
6100 | 1184 library_path_var=PATH |
6718 | 1185 NO_OCT_FILE_STRIP=true |
6087 | 1186 ## Extra compilation flags. |
6137 | 1187 CRUFT_DLL_DEFS="-DCRUFT_DLL" |
1188 OCTAVE_DLL_DEFS="-DOCTAVE_DLL" | |
1189 OCTINTERP_DLL_DEFS="-DOCTINTERP_DLL" | |
7825
13871b7de124
Import sources for OpenGL-based renderer.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7789
diff
changeset
|
1190 OCTGRAPHICS_DLL_DEFS="-DOCTGRAPHICS_DLL" |
6051 | 1191 ;; |
3740 | 1192 *-*-linux* | *-*-gnu*) |
4906 | 1193 MKOCTFILE_DL_LDFLAGS="-shared -Wl,-Bsymbolic" |
4283 | 1194 SONAME_FLAGS='-Wl,-soname -Wl,$@' |
1195 RLD_FLAG='-Wl,-rpath -Wl,$(octlibdir)' | |
2813 | 1196 ;; |
3887 | 1197 i[[3456]]86-*-sco3.2v5*) |
4283 | 1198 SONAME_FLAGS='-Wl,-h -Wl,$@' |
3705 | 1199 RLD_FLAG= |
3160 | 1200 SH_LDFLAGS=-G |
1201 ;; | |
2813 | 1202 rs6000-ibm-aix* | powerpc-ibm-aix*) |
1203 CPICFLAG= | |
1204 CXXPICFLAG= | |
1205 FPICFLAG= | |
1206 ;; | |
1207 hppa*-hp-hpux*) | |
3887 | 1208 if test "$ac_cv_f77_compiler_gnu" = yes; then |
2813 | 1209 FPICFLAG=-fPIC |
1210 else | |
1211 FPICFLAG=+Z | |
1212 fi | |
1213 SHLEXT=sl | |
1214 SH_LDFLAGS="-shared -fPIC" | |
4283 | 1215 RLD_FLAG='-Wl,+b -Wl,$(octlibdir)' |
2813 | 1216 ;; |
1217 *-sgi-*) | |
1218 CPICFLAG= | |
1219 CXXPICFLAG= | |
1220 FPICFLAG= | |
4353 | 1221 RLD_FLAG='-rpath $(octlibdir)' |
2813 | 1222 ;; |
1223 sparc-sun-sunos4*) | |
3887 | 1224 if test "$ac_cv_f77_compiler_gnu" = yes; then |
2813 | 1225 FPICFLAG=-fPIC |
1226 else | |
1227 FPICFLAG=-PIC | |
1228 fi | |
3059 | 1229 SH_LD=ld |
1230 SH_LDFLAGS="-assert nodefinitions" | |
3162 | 1231 RLD_FLAG='-L$(octlibdir)' |
2813 | 1232 ;; |
3606 | 1233 sparc-sun-solaris2* | i386-pc-solaris2*) |
3887 | 1234 if test "$ac_cv_f77_compiler_gnu" = yes; then |
2813 | 1235 FPICFLAG=-fPIC |
1236 else | |
3775 | 1237 FPICFLAG=-KPIC |
1238 fi | |
1239 if test "$GCC" = yes; then | |
1240 CPICFLAG=-fPIC | |
1241 else | |
1242 CPICFLAG=-KPIC | |
2813 | 1243 fi |
3775 | 1244 if test "$GXX" = yes; then |
1245 CXXPICFLAG=-fPIC | |
1246 SH_LDFLAGS=-shared | |
1247 else | |
1248 CXXPICFLAG=-KPIC | |
1249 SH_LDFLAGS=-G | |
1250 fi | |
1251 RLD_FLAG='-R $(octlibdir)' | |
6087 | 1252 ## Template closures in archive libraries need a different mechanism. |
3820 | 1253 if test "$GXX" = yes; then |
3775 | 1254 true |
1255 else | |
4323 | 1256 TEMPLATE_AR='$(CXX)' |
3775 | 1257 TEMPLATE_ARFLAGS="-xar -o" |
1258 fi | |
2813 | 1259 ;; |
1260 esac | |
1261 | |
1262 if $use_rpath; then | |
4353 | 1263 if test -n "$enable_rpath_arg"; then |
1264 RLD_FLAG="$enable_rpath_arg" | |
1265 fi | |
2813 | 1266 else |
4353 | 1267 RLD_FLAG="" |
2813 | 1268 fi |
1269 | |
5844 | 1270 AC_MSG_NOTICE([defining FPICFLAG to be $FPICFLAG]) |
1271 AC_MSG_NOTICE([defining CPICFLAG to be $CPICFLAG]) | |
1272 AC_MSG_NOTICE([defining CXXPICFLAG to be $CXXPICFLAG]) | |
1273 AC_MSG_NOTICE([defining SHLEXT to be $SHLEXT]) | |
1274 AC_MSG_NOTICE([defining SHLLIB to be $SHLLIB]) | |
1275 AC_MSG_NOTICE([defining SHLBIN to be $SHLBIN]) | |
1276 AC_MSG_NOTICE([defining SHLEXT_VER to be $SHLEXT_VER]) | |
1277 AC_MSG_NOTICE([defining SHLLIB_VER to be $SHLLIB_VER]) | |
1278 AC_MSG_NOTICE([defining SHLBIN_VER to be $SHLBIN_VER]) | |
1279 AC_MSG_NOTICE([defining SHLLINKEXT to be $SHLLINKEXT]) | |
6051 | 1280 AC_MSG_NOTICE([defining LIBPRE to be $LIBPRE]) |
5844 | 1281 AC_MSG_NOTICE([defining SH_LD to be $SH_LD]) |
1282 AC_MSG_NOTICE([defining SH_LDFLAGS to be $SH_LDFLAGS]) | |
1283 AC_MSG_NOTICE([defining DL_LD to be $DL_LD]) | |
1284 AC_MSG_NOTICE([defining DL_LDFLAGS to be $DL_LDFLAGS]) | |
1285 AC_MSG_NOTICE([defining MKOCTFILE_DL_LDFLAGS to be $MKOCTFILE_DL_LDFLAGS]) | |
1286 AC_MSG_NOTICE([defining SONAME_FLAGS to be $SONAME_FLAGS]) | |
1287 AC_MSG_NOTICE([defining NO_OCT_FILE_STRIP to be $NO_OCT_FILE_STRIP]) | |
1288 AC_MSG_NOTICE([defining RLD_FLAG to be $RLD_FLAG]) | |
1289 AC_MSG_NOTICE([defining TEMPLATE_AR to be $TEMPLATE_AR]) | |
1290 AC_MSG_NOTICE([defining TEMPLATE_ARFLAGS to be $TEMPLATE_ARFLAGS]) | |
6137 | 1291 AC_MSG_NOTICE([defining CRUFT_DLL_DEFS to be $CRUFT_DLL_DEFS]) |
1292 AC_MSG_NOTICE([defining OCTAVE_DLL_DEFS to be $OCTAVE_DLL_DEFS]) | |
1293 AC_MSG_NOTICE([defining OCTINTERP_DLL_DEFS to be $OCTINTERP_DLL_DEFS]) | |
7825
13871b7de124
Import sources for OpenGL-based renderer.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7789
diff
changeset
|
1294 AC_MSG_NOTICE([defining OCTGRAPHICS_DLL_DEFS to be $OCTGRAPHICS_DLL_DEFS]) |
5844 | 1295 AC_MSG_NOTICE([defining library_path_var to be $library_path_var]) |
2813 | 1296 AC_SUBST(FPICFLAG) |
1297 AC_SUBST(CPICFLAG) | |
1298 AC_SUBST(CXXPICFLAG) | |
1299 AC_SUBST(SHLEXT) | |
4102 | 1300 AC_SUBST(SHLLIB) |
1301 AC_SUBST(SHLBIN) | |
4126 | 1302 AC_SUBST(SHLEXT_VER) |
1303 AC_SUBST(SHLLIB_VER) | |
1304 AC_SUBST(SHLBIN_VER) | |
1305 AC_SUBST(SHLLINKEXT) | |
6051 | 1306 AC_SUBST(LIBPRE) |
2813 | 1307 AC_SUBST(SH_LD) |
1308 AC_SUBST(SH_LDFLAGS) | |
4759 | 1309 AC_SUBST(DL_LD) |
1310 AC_SUBST(DL_LDFLAGS) | |
1311 AC_SUBST(MKOCTFILE_DL_LDFLAGS) | |
3036 | 1312 AC_SUBST(SONAME_FLAGS) |
4199 | 1313 AC_SUBST(NO_OCT_FILE_STRIP) |
2813 | 1314 AC_SUBST(RLD_FLAG) |
3775 | 1315 AC_SUBST(TEMPLATE_AR) |
1316 AC_SUBST(TEMPLATE_ARFLAGS) | |
6141 | 1317 AC_SUBST(CRUFT_DLL_DEFS) |
1318 AC_SUBST(OCTAVE_DLL_DEFS) | |
1319 AC_SUBST(OCTINTERP_DLL_DEFS) | |
7825
13871b7de124
Import sources for OpenGL-based renderer.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7789
diff
changeset
|
1320 AC_SUBST(OCTGRAPHICS_DLL_DEFS) |
4104 | 1321 AC_SUBST(library_path_var) |
4102 | 1322 |
2813 | 1323 ### special checks for odd OS specific things. |
1324 ### | |
1325 ### I am told that on some SCO systems, the only place to find some | |
1326 ### functions like gethostname and gettimeofday is in libsocket. | |
1327 | |
3887 | 1328 AC_CHECK_FUNCS(gethostname, [], [AC_CHECK_LIB(socket, gethostname)]) |
1329 AC_CHECK_FUNCS(getpwnam, [], [AC_CHECK_LIB(sun, getpwnam)]) | |
2813 | 1330 |
4388 | 1331 case "$canonical_host_type" in |
6704 | 1332 *-*-cygwin*) |
4388 | 1333 AC_CHECK_LIB(wsock32, gethostname) |
5451 | 1334 LIBS="$LIBS -lwsock32" |
4388 | 1335 ;; |
6704 | 1336 *-*-msdosmsvc* | *-*-mingw*) |
6091 | 1337 LIBS="$LIBS -lws2_32 -lkernel32" |
1338 ;; | |
4388 | 1339 esac |
1340 | |
4353 | 1341 ### Type stuff. |
1342 | |
1343 AC_TYPE_MODE_T | |
1344 AC_TYPE_OFF_T | |
1345 AC_TYPE_PID_T | |
1346 AC_TYPE_SIZE_T | |
1347 AC_TYPE_UID_T | |
1348 AC_CHECK_TYPES([dev_t, ino_t, nlink_t, nlink_t]) | |
1349 AC_CHECK_TYPES([long long int, unsigned long long int]) | |
7237 | 1350 AC_CHECK_TYPES([sigset_t, sig_atomic_t], , , [ |
1351 #if defined (HAVE_SYS_TYPES_H) | |
1352 #include <sys/types.h> | |
1353 #endif | |
1354 #include <signal.h>]) | |
4353 | 1355 |
2813 | 1356 ### How big are ints and how are they oriented? These could probably |
1357 ### be eliminated in favor of run-time checks. | |
1358 | |
3888 | 1359 AC_CHECK_SIZEOF(short) |
1360 AC_CHECK_SIZEOF(int) | |
1361 AC_CHECK_SIZEOF(long) | |
1362 AC_CHECK_SIZEOF(long long) | |
2813 | 1363 |
1364 ### Does the C compiler handle alloca() and const correctly? | |
1365 | |
4602 | 1366 AC_FUNC_ALLOCA |
2813 | 1367 AC_C_CONST |
1368 | |
4360 | 1369 ### See if we should use placement delete. |
1370 | |
1371 OCTAVE_PLACEMENT_DELETE | |
1372 | |
4366 | 1373 ### See if we can auto allocate variable sized arrays. |
1374 | |
1375 OCTAVE_DYNAMIC_AUTO_ARRAYS | |
1376 | |
869 | 1377 ### Checks for header files. |
1378 | |
832 | 1379 AC_HEADER_STDC |
1380 AC_HEADER_DIRENT | |
1377 | 1381 AC_HEADER_TIME |
1382 AC_HEADER_SYS_WAIT | |
2097 | 1383 |
4051 | 1384 ### C headers |
1385 | |
4067 | 1386 AC_CHECK_HEADERS(assert.h curses.h direct.h dlfcn.h fcntl.h float.h \ |
5990 | 1387 floatingpoint.h grp.h ieeefp.h inttypes.h limits.h locale.h memory.h nan.h \ |
7934 | 1388 ncurses.h poll.h pthread.h pwd.h stdint.h stdlib.h string.h sunmath.h sys/ioctl.h \ |
3308 | 1389 sys/param.h sys/poll.h sys/resource.h sys/select.h sys/stat.h \ |
6694 | 1390 sys/time.h sys/times.h sys/types.h sys/utsname.h sys/utime.h termcap.h \ |
1391 unistd.h utime.h varargs.h) | |
3887 | 1392 |
4051 | 1393 ### C++ headers |
1394 | |
1395 AC_LANG_PUSH(C++) | |
1396 AC_CHECK_HEADERS(sstream) | |
1397 AC_LANG_POP(C++) | |
1398 | |
3887 | 1399 have_termios_h=no |
1400 AC_CHECK_HEADERS($TERMIOS_H, have_termios_h=yes) | |
1401 AC_CHECK_HEADERS(termio.h, have_termio_h=yes, have_termio_h=no) | |
1402 AC_CHECK_HEADERS(sgtty.h, have_sgtty_h=yes, have_sgtty_h=no) | |
5451 | 1403 AC_CHECK_HEADERS(glob.h, have_glob_h=yes, have_glob_h=no) |
1404 AC_CHECK_HEADERS(fnmatch.h, have_fnmatch_h=yes, have_fnmatch_h=no) | |
4067 | 1405 AC_CHECK_HEADERS(conio.h, have_conio_h=yes, have_conio_h=no) |
3249 | 1406 |
3225 | 1407 ### I'm told that termios.h is broken on NeXT systems. |
1408 | |
1409 case "$canonical_host_type" in | |
1410 *-*-nextstep*) | |
3887 | 1411 if test "$have_termios_h" = yes; then |
3249 | 1412 AC_MSG_WARN([Ignoring termios.h on NeXT systems.]) |
3887 | 1413 have_termios_h=no |
3249 | 1414 fi |
3225 | 1415 ;; |
1416 esac | |
1417 | |
3887 | 1418 if test "$have_termios_h" = yes \ |
1419 || test "$have_termio_h" = yes \ | |
1420 || test "$have_sgtty_h" = yes; then | |
832 | 1421 true |
1422 else | |
4064 | 1423 AC_MSG_WARN([I couldn't find termios.h, termio.h, or sgtty.h!]) |
832 | 1424 fi |
869 | 1425 |
5451 | 1426 LIBGLOB= |
1427 AC_SUBST(LIBGLOB) | |
1428 if test "$have_fnmatch_h" = yes && test "$have_glob_h" = yes; then | |
1429 AC_CHECK_FUNCS(fnmatch, have_fnmatch=yes, [ | |
1430 AC_CHECK_LIB(glob, fnmatch, [have_fnmatch=yes; LIBGLOB=-lglob], | |
1431 have_fnmatch=no)]) | |
1432 AC_CHECK_FUNCS(glob, have_glob=yes, [ | |
1433 AC_CHECK_LIB(glob, glob, [have_glob=yes; LIBGLOB=-lglob], | |
1434 have_glob=no)]) | |
1435 | |
1436 if test "$have_fnmatch" != yes || test "$have_glob" != yes; then | |
1437 AC_MSG_ERROR([You are required to have fnmatch and glob]) | |
1438 fi | |
1439 else | |
1440 AC_MSG_ERROR([You are required to have fnmatch.h and glob.h]) | |
1441 fi | |
1442 | |
1788 | 1443 ### Checks for functions and variables. |
869 | 1444 |
7638
2df457529cfa
implement expm1 and log1p functions
Jaroslav Hajek <highegg@gmail.com>
parents:
7636
diff
changeset
|
1445 AC_CHECK_FUNCS(atexit basename bcopy bzero canonicalize_file_name \ |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7683
diff
changeset
|
1446 chmod dup2 endgrent endpwent execvp expm1 expm1f fcntl fork getcwd \ |
7638
2df457529cfa
implement expm1 and log1p functions
Jaroslav Hajek <highegg@gmail.com>
parents:
7636
diff
changeset
|
1447 getegid geteuid getgid getgrent getgrgid getgrnam getpgrp getpid \ |
2df457529cfa
implement expm1 and log1p functions
Jaroslav Hajek <highegg@gmail.com>
parents:
7636
diff
changeset
|
1448 getppid getpwent getpwuid gettimeofday getuid getwd _kbhit kill \ |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7683
diff
changeset
|
1449 lgamma lgammaf lgamma_r lgammaf_r link localtime_r log1p log1pf lstat \ |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7683
diff
changeset
|
1450 memmove mkdir mkfifo mkstemp on_exit pipe poll putenv raise readlink \ |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7683
diff
changeset
|
1451 realpath rename resolvepath rindex rmdir round select setgrent setlocale \ |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7683
diff
changeset
|
1452 setpwent setvbuf sigaction siglongjmp sigpending sigprocmask sigsuspend \ |
7638
2df457529cfa
implement expm1 and log1p functions
Jaroslav Hajek <highegg@gmail.com>
parents:
7636
diff
changeset
|
1453 snprintf stat strcasecmp strdup strerror stricmp strncasecmp \ |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7683
diff
changeset
|
1454 strnicmp strptime strsignal symlink tempnam tgamma tgammaf trunc umask \ |
6694 | 1455 uname unlink usleep utime vfprintf vsprintf vsnprintf waitpid \ |
6829 | 1456 _chmod _snprintf x_utime _utime32) |
1300 | 1457 |
6094 | 1458 case "$canonical_host_type" in |
1459 *-*-msdosmsvc) | |
1460 ## The %T format specifier for strftime is reportedly broken, | |
1461 ## so use our version. We could use an actual configure test | |
1462 ## for this. | |
1463 ;; | |
1464 *) | |
1465 AC_CHECK_FUNCS(strftime) | |
1466 ;; | |
1467 esac | |
1468 | |
7058 | 1469 OCTAVE_STRPTIME_BROKEN |
1708 | 1470 OCTAVE_SMART_PUTENV |
1471 | |
6103 | 1472 case "$canonical_host_type" in |
6704 | 1473 *-*-msdosmsvc | *-*-mingw*) |
6103 | 1474 AC_MSG_CHECKING([for required _WIN32_WINNT]) |
1475 AC_COMPILE_IFELSE(AC_LANG_PROGRAM([[ | |
1476 #include <windows.h> | |
1477 #if _WIN32_WINNT < 0x0403 | |
1478 #error "Wrong version" | |
1479 #endif]], []), | |
1480 AC_MSG_RESULT([none]), [ | |
1481 AC_DEFINE(_WIN32_WINNT, 0x0403, [Define to 0x0403 to access InitializeCriticalSectionAndSpinCount]) | |
1482 AC_MSG_RESULT([0x0403])]) | |
1483 AC_MSG_CHECKING([whether _USE_MATH_DEFINES needs to be defined]) | |
1484 AC_COMPILE_IFELSE(AC_LANG_PROGRAM([[#include <math.h>]], | |
1485 [[int x = M_LN2;]]), | |
1486 AC_MSG_RESULT([no]), [ | |
1487 AC_DEFINE(_USE_MATH_DEFINES, 1, [Define if your system needs it to define math constants like M_LN2]) | |
1488 AC_MSG_RESULT([yes])]) | |
1489 ;; | |
1490 esac | |
1491 | |
4110 | 1492 ### Dynamic linking is now enabled only if we are building shared |
1493 ### libs and some API for dynamic linking is detected. | |
1494 | |
3705 | 1495 LD_CXX='$(CXX)' |
3232 | 1496 RDYNAMIC_FLAG= |
4110 | 1497 DL_API_MSG="" |
1498 dlopen_api=false | |
1499 shl_load_api=false | |
1500 loadlibrary_api=false | |
4163 | 1501 dyld_api=false |
4110 | 1502 |
4163 | 1503 if $SHARED_LIBS || $ENABLE_DYNAMIC_LINKING; then |
1504 | |
6087 | 1505 ## Check for dyld first since OS X can have a non-standard libdl |
4110 | 1506 |
5599 | 1507 AC_CHECK_HEADER(mach-o/dyld.h) |
5717 | 1508 if test "$ac_cv_header_mach_o_dyld_h" = yes; then |
4163 | 1509 dyld_api=true |
1510 else | |
4189 | 1511 AC_CHECK_LIB(dld, shl_load) |
1512 AC_CHECK_FUNCS(shl_load shl_findsym) | |
4201 | 1513 if test "$ac_cv_func_shl_load" = yes \ |
1514 && test "$ac_cv_func_shl_findsym" = yes; then | |
4189 | 1515 shl_load_api=true |
4110 | 1516 else |
4189 | 1517 AC_CHECK_LIB(wsock32, LoadLibrary) |
1518 AC_CHECK_FUNCS(LoadLibrary) | |
4201 | 1519 if test "$ac_cv_func_loadlibrary" = yes; then |
4189 | 1520 loadlibrary_api=true |
2063 | 1521 else |
4189 | 1522 AC_CHECK_LIB(dl, dlopen) |
1523 AC_CHECK_FUNCS(dlopen dlsym dlerror dlclose) | |
4201 | 1524 if test "$ac_cv_func_dlclose" = yes \ |
1525 && test "$ac_cv_func_dlerror" = yes \ | |
1526 && test "$ac_cv_func_dlopen" = yes \ | |
1527 && test "$ac_cv_func_dlsym" = yes; then | |
4189 | 1528 dlopen_api=true |
1529 else | |
4163 | 1530 case "$canonical_host_type" in |
1531 i[[3456]]86-*-sco3.2v5*) | |
1532 LD_CXX='LD_RUN_PATH=$LD_RUN_PATH:$(octlibdir) $(CXX)' | |
1533 dlopen_api=true | |
1534 ;; | |
1535 esac | |
1536 fi | |
2063 | 1537 fi |
4110 | 1538 fi |
1539 fi | |
1540 | |
5451 | 1541 ## autoconf test for LoadLibrary appears broken. Bypass for cygwin/mingw |
6286 | 1542 if $dlopen_api || $shl_load_api || $loadlibrary_api || $dyld_api; then |
1543 true | |
1544 else | |
5451 | 1545 case "$canonical_host_type" in |
6091 | 1546 *-*-cygwin* | *-*-mingw* | *-*-msdosmsvc) |
5451 | 1547 loadlibrary_api=true; |
1548 ;; | |
1549 esac | |
1550 fi | |
1551 | |
4110 | 1552 if $dlopen_api; then |
1553 DL_API_MSG="(dlopen)" | |
1554 AC_DEFINE(HAVE_DLOPEN_API, 1, [Define if your system has dlopen, dlsym, dlerror, and dlclose for dynamic linking]) | |
3958 | 1555 OCTAVE_CXX_FLAG(-rdynamic, [RDYNAMIC_FLAG=-rdynamic]) |
4110 | 1556 elif $shl_load_api; then |
1557 DL_API_MSG="(shl_load)" | |
1558 AC_DEFINE(HAVE_SHL_LOAD_API, 1, [Define if your system has shl_load and shl_findsym for dynamic linking]) | |
1559 elif $loadlibrary_api; then | |
1560 DL_API_MSG="(LoadLibrary)" | |
1561 AC_DEFINE(HAVE_LOADLIBRARY_API, 1, [Define if your system has LoadLibrary for dynamic linking]) | |
4163 | 1562 elif $dyld_api; then |
1563 DL_API_MSG="(dyld)" | |
1564 AC_DEFINE(HAVE_DYLD_API, 1, [Define if your system has dyld for dynamic linking]) | |
4110 | 1565 fi |
1566 | |
4163 | 1567 if $dlopen_api || $shl_load_api || $loadlibrary_api || $dyld_api; then |
4128 | 1568 ENABLE_DYNAMIC_LINKING=true |
1569 AC_DEFINE(ENABLE_DYNAMIC_LINKING, 1, [Define if using dynamic linking]) | |
1978 | 1570 fi |
4163 | 1571 fi |
1572 | |
1573 if $SHARED_LIBS; then | |
1574 LIBOCTINTERP=-loctinterp$SHLLINKEXT | |
1575 LIBOCTAVE=-loctave$SHLLINKEXT | |
1576 LIBCRUFT=-lcruft$SHLLINKEXT | |
1978 | 1577 else |
4110 | 1578 LIBOCTINTERP='$(TOPDIR)/src/liboctinterp.$(LIBEXT)' |
1579 LIBOCTAVE='$(TOPDIR)/liboctave/liboctave.$(LIBEXT)' | |
1580 LIBCRUFT='$(TOPDIR)/libcruft/libcruft.$(LIBEXT)' | |
1664 | 1581 fi |
4163 | 1582 |
4110 | 1583 AC_SUBST(LD_CXX) |
3232 | 1584 AC_SUBST(RDYNAMIC_FLAG) |
4128 | 1585 AC_SUBST(ENABLE_DYNAMIC_LINKING) |
4110 | 1586 AC_SUBST(LIBOCTINTERP) |
1587 AC_SUBST(LIBOCTAVE) | |
1588 AC_SUBST(LIBCRUFT) | |
1901 | 1589 |
1300 | 1590 ### There is more than one possible prototype for gettimeofday. See |
2782 | 1591 ### which one (if any) appears in sys/time.h. These tests are from |
1592 ### Emacs 19. | |
1300 | 1593 |
2782 | 1594 AC_MSG_CHECKING(for struct timeval) |
5844 | 1595 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#ifdef TIME_WITH_SYS_TIME |
2782 | 1596 #include <sys/time.h> |
1597 #include <time.h> | |
1598 #else | |
1599 #ifdef HAVE_SYS_TIME_H | |
1600 #include <sys/time.h> | |
1601 #else | |
1602 #include <time.h> | |
1603 #endif | |
5844 | 1604 #endif]], [[static struct timeval x; x.tv_sec = x.tv_usec;]])], |
2782 | 1605 [AC_MSG_RESULT(yes) |
1606 HAVE_TIMEVAL=yes | |
3887 | 1607 AC_DEFINE(HAVE_TIMEVAL, 1, [Define if struct timeval is defined.])], |
2782 | 1608 [AC_MSG_RESULT(no) |
1609 HAVE_TIMEVAL=no]) | |
1610 | |
1611 if test "x$HAVE_TIMEVAL" = xyes; then | |
1612 AC_MSG_CHECKING(whether gettimeofday can't accept two arguments) | |
5842 | 1613 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#ifdef TIME_WITH_SYS_TIME |
2782 | 1614 #include <sys/time.h> |
1615 #include <time.h> | |
1616 #else | |
1617 #ifdef HAVE_SYS_TIME_H | |
1618 #include <sys/time.h> | |
1619 #else | |
1620 #include <time.h> | |
1621 #endif | |
5842 | 1622 #endif]], [[struct timeval time; |
1623 struct timezone dummy; | |
1624 gettimeofday (&time, &dummy);]])], | |
1625 [AC_MSG_RESULT(no)], | |
2782 | 1626 [AC_MSG_RESULT(yes) |
5842 | 1627 AC_DEFINE(GETTIMEOFDAY_NO_TZ, 1, |
1628 [Define if your system has a single-arg prototype for gettimeofday.])]) | |
2782 | 1629 fi |
869 | 1630 |
832 | 1631 dnl Would like to get rid of this cruft, and just have |
1632 dnl | |
1633 dnl AC_CHECK_FUNCS(finite isnan isinf) | |
1634 dnl | |
1635 dnl instead, but that used to fail on some systems... | |
369 | 1636 dnl |
832 | 1637 dnl Also just using AC_CHECK_FUNCS doesn't seem to work to find isinf |
1638 dnl and isnan on Linux systems, so we use AC_CHECK_FUNC, and if that | |
369 | 1639 dnl fails, we try again by including math.h and invoking the function |
1640 dnl with an argument. | |
869 | 1641 |
2508 | 1642 ### I am told that Inf and NaN don't work on m68k HP sytems, and that |
1643 ### on SCO systems, isnan and isinf don't work, but they can be | |
1644 ### replaced by something that does. | |
956 | 1645 |
1646 case "$canonical_host_type" in | |
1384 | 1647 m68k-hp-hpux*) |
956 | 1648 ;; |
2508 | 1649 *-*-sco*) |
5844 | 1650 AC_MSG_NOTICE([defining SCO to be 1]) |
3887 | 1651 AC_DEFINE(SCO, 1, [Define if using an SCO system.]) |
5844 | 1652 AC_MSG_NOTICE([forcing HAVE_ISINF for SCO]) |
3887 | 1653 AC_DEFINE(HAVE_ISINF, 1, [Define if you have isinf().]) |
5844 | 1654 AC_MSG_NOTICE([forcing HAVE_ISNAN for SCO]) |
3887 | 1655 AC_DEFINE(HAVE_ISNAN, 1, [Define if you have isnan().]) |
2508 | 1656 ;; |
956 | 1657 *) |
4349 | 1658 AC_CHECK_FUNCS(finite isnan isinf copysign signbit) |
6061 | 1659 AC_CHECK_FUNCS(_finite _isnan _copysign) |
5098 | 1660 AC_CHECK_DECLS(signbit, , , [#include <math.h>]) |
956 | 1661 ;; |
1662 esac | |
1663 | |
1076 | 1664 ### Check for nonstandard but common math functions that we need. |
1665 | |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7683
diff
changeset
|
1666 AC_CHECK_FUNCS(acosh acoshf asinh asinhf atanh atanhf erf erff erfc erfcf exp2 exp2f log2 log2f) |
7914
e998e81224b5
Various compilation fixes for MSVC.
John W. Eaton <jwe@octave.org>
parents:
7905
diff
changeset
|
1667 AC_CHECK_FUNCS(hypotf _hypotf) |
3130 | 1668 |
869 | 1669 ### Checks for OS specific cruft. |
1670 | |
3887 | 1671 AC_CHECK_MEMBERS([struct stat.st_blksize, struct stat.st_blocks, struct stat.st_rdev]) |
1672 | |
405 | 1673 AC_STRUCT_TM |
1186 | 1674 AC_STRUCT_TIMEZONE |
1388 | 1675 AC_FUNC_CLOSEDIR_VOID |
1225 | 1676 |
3892 | 1677 AC_CHECK_MEMBERS(struct group.gr_passwd) |
2548 | 1678 |
4067 | 1679 # mkdir takes a single argument on some systems. |
1680 OCTAVE_MKDIR_TAKES_ONE_ARG | |
1681 | |
3887 | 1682 octave_found_termlib=no |
2592 | 1683 for termlib in ncurses curses termcap terminfo termlib; do |
2034 | 1684 AC_CHECK_LIB(${termlib}, tputs, [TERMLIBS="${TERMLIBS} -l${termlib}"]) |
405 | 1685 case "${TERMLIBS}" in |
1686 *-l${termlib}*) | |
3822 | 1687 LIBS="$TERMLIBS $LIBS" |
4102 | 1688 AC_SUBST(TERMLIBS) |
3887 | 1689 octave_found_termlib=yes |
405 | 1690 break |
1691 ;; | |
1692 esac | |
1693 done | |
869 | 1694 |
3887 | 1695 if test "$octave_found_termlib" = no; then |
1696 warn_termlibs="I couldn't find -ltermcap, -lterminfo, -lncurses, -lcurses, o\ | |
1697 r -ltermlib!" | |
3105 | 1698 AC_MSG_WARN($warn_termlibs) |
2488 | 1699 fi |
1700 | |
3822 | 1701 OCTAVE_ENABLE_READLINE |
1702 | |
832 | 1703 AC_MSG_CHECKING([for struct exception in math.h]) |
5842 | 1704 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <math.h>]], |
1705 [[struct exception *x; x->type; x->name;]])], | |
1706 [AC_MSG_RESULT(yes) | |
1707 AC_DEFINE(EXCEPTION_IN_MATH, 1, | |
1708 [Define if your math.h declares struct exception for matherr().])], | |
1709 [AC_MSG_RESULT(no)]) | |
869 | 1710 |
1711 ### Signal stuff. | |
1712 | |
834 | 1713 AC_TYPE_SIGNAL |
5844 | 1714 AC_CHECK_DECLS([sys_siglist], [], [], |
1715 [#include <signal.h> | |
1716 /* NetBSD declares sys_siglist in unistd.h. */ | |
1717 #if HAVE_UNISTD_H | |
1718 # include <unistd.h> | |
1719 #endif | |
1720 ]) | |
2470 | 1721 OCTAVE_SIGNAL_CHECK |
1722 OCTAVE_REINSTALL_SIGHANDLERS | |
6098 | 1723 if test "$ac_cv_type_signal" = "void"; then |
1724 AC_DEFINE(RETSIGTYPE_IS_VOID, 1, [Define if this if RETSIGTYPE is defined to be void. Needed because preprocessor comparisons to void fail on some systems.]) | |
1725 fi | |
869 | 1726 |
2633 | 1727 ### A system dependent kluge or two. |
1728 | |
2035 | 1729 AC_CHECK_FUNCS(getrusage times) |
2427 | 1730 case "$canonical_host_type" in |
3971 | 1731 *-*-cygwin*) |
3887 | 1732 AC_DEFINE(RUSAGE_TIMES_ONLY, 1, [Define if your struct rusage only has time information.]) |
2427 | 1733 ;; |
1734 esac | |
1735 | |
869 | 1736 ### Checks for other programs used for building, testing, installing, |
1737 ### and running Octave. | |
1738 | |
4544 | 1739 AC_PROG_AWK |
7244 | 1740 OCTAVE_PROG_FIND |
4084 | 1741 OCTAVE_PROG_SED |
5465 | 1742 OCTAVE_PROG_PERL |
5496 | 1743 OCTAVE_PROG_PYTHON |
4084 | 1744 |
3729 | 1745 OCTAVE_PROG_FLEX |
1746 OCTAVE_PROG_BISON | |
869 | 1747 |
1722 | 1748 AC_PROG_LN_S |
1749 | |
405 | 1750 AC_PROG_INSTALL |
2642 | 1751 INSTALL_SCRIPT='${INSTALL}' |
1752 AC_SUBST(INSTALL_SCRIPT) | |
869 | 1753 |
5468 | 1754 OCTAVE_PROG_DESKTOP_FILE_INSTALL |
1755 | |
3130 | 1756 OCTAVE_PROG_GNUPLOT |
1757 OCTAVE_PROG_PAGER | |
3673 | 1758 OCTAVE_PROG_GPERF |
3130 | 1759 |
5934 | 1760 OCTAVE_PROG_GHOSTSCRIPT |
1761 OCTAVE_PROG_MAKEINFO | |
1762 OCTAVE_PROG_TEXI2DVI | |
1763 OCTAVE_PROG_TEXI2PDF | |
1764 | |
2032 | 1765 ### Even though we include config.h, we need to have the preprocessor |
1766 ### defines available in a variable for the octave-bug script. Use | |
1767 ### UGLY_DEFS for that. | |
1768 | |
1769 AC_OUTPUT_MAKE_DEFS | |
3956 | 1770 |
6957 | 1771 ### We have to insert extra levels of backslash quoting here so that |
1772 ### the right thing ends up in oct-conf.h. | |
6959 | 1773 UGLY_DEFS=`echo $DEFS | $SED 's,\\",\\\\\\\\\\\\\\\\\\",g'` |
5844 | 1774 AC_MSG_NOTICE([defining UGLY_DEFS to be $UGLY_DEFS]) |
2032 | 1775 AC_SUBST(UGLY_DEFS) |
1776 | |
4645 | 1777 ### Maybe add -Wall, -W, and -Wshadow to compiler flags now that we're |
4587 | 1778 ### done feature testing. |
869 | 1779 |
3131 | 1780 if test -z "$EXTERN_CFLAGS"; then |
4626 | 1781 OCTAVE_CC_FLAG(-Wall, [ |
1782 WARN_CFLAGS="$WARN_CFLAGS -Wall"; | |
1783 AC_MSG_RESULT([adding -Wall to WARN_CFLAGS])]) | |
4645 | 1784 OCTAVE_CC_FLAG(-W, [ |
1785 WARN_CFLAGS="$WARN_CFLAGS -W"; | |
1786 AC_MSG_RESULT([adding -W to WARN_CFLAGS])]) | |
4626 | 1787 OCTAVE_CC_FLAG(-Wshadow, [ |
1788 WARN_CFLAGS="$WARN_CFLAGS -Wshadow"; | |
1789 AC_MSG_RESULT([adding -Wshadow to WARN_CFLAGS])]) | |
405 | 1790 fi |
3131 | 1791 |
1792 if test -z "$EXTERN_CXXFLAGS"; then | |
4626 | 1793 OCTAVE_CXX_FLAG(-Wall, [ |
1794 WARN_CXXFLAGS="$WARN_CXXFLAGS -Wall"; | |
1795 AC_MSG_RESULT([adding -Wall to WARN_CXXFLAGS])]) | |
4645 | 1796 OCTAVE_CXX_FLAG(-W, [ |
1797 WARN_CXXFLAGS="$WARN_CXXFLAGS -W"; | |
1798 AC_MSG_RESULT([adding -W to WARN_CXXFLAGS])]) | |
4626 | 1799 OCTAVE_CXX_FLAG(-Wshadow, [ |
1800 WARN_CXXFLAGS="$WARN_CXXFLAGS -Wshadow"; | |
1801 AC_MSG_RESULT([adding -Wshadow to WARN_CXXFLAGS])]) | |
5759 | 1802 OCTAVE_CXX_FLAG(-Wold-style-cast, [ |
1803 WARN_CXXFLAGS="$WARN_CXXFLAGS -Wold-style-cast"; | |
1804 AC_MSG_RESULT([adding -Wold-style-cast to WARN_CXXFLAGS])]) | |
405 | 1805 fi |
869 | 1806 |
4971 | 1807 GCC_PICKY_FLAGS="-Wcast-align -Wcast-qual -Wmissing-prototypes \ |
1808 -Wpointer-arith -Wstrict-prototypes -Wwrite-strings" | |
2813 | 1809 |
5194 | 1810 GXX_PICKY_FLAGS="-Wcast-align -Wcast-qual -Wpointer-arith \ |
1811 -Wwrite-strings -Weffc++ -Wenum-clash" | |
2813 | 1812 |
1813 AC_ARG_ENABLE(picky-flags, | |
5844 | 1814 [AS_HELP_STRING([--enable-picky-flags], |
1815 [add extra warning options to CFLAGS, CXXFLAGS, FFLAGS])], | |
3131 | 1816 [if test "$enableval" = no; then |
1817 true | |
2813 | 1818 elif test "$enableval" = yes; then |
3131 | 1819 if test -z "$EXTERN_CFLAGS"; then |
1820 for flag in $GCC_PICKY_FLAGS; do | |
4626 | 1821 OCTAVE_CC_FLAG($flag, [ |
1822 WARN_CFLAGS="$WARN_CFLAGS $flag"; | |
1823 AC_MSG_RESULT([adding $flag to WARN_CFLAGS])]) | |
3131 | 1824 done |
2813 | 1825 fi |
3131 | 1826 if test -z "$EXTERN_CXXFLAGS"; then |
1827 for flag in $GXX_PICKY_FLAGS; do | |
4626 | 1828 OCTAVE_CXX_FLAG($flag, [ |
1829 WARN_CXXFLAGS="$WARN_CXXFLAGS $flag"; | |
1830 AC_MSG_RESULT([adding $flag to WARN_CXXFLAGS])]) | |
3131 | 1831 done |
2813 | 1832 fi |
1833 fi], []) | |
1834 | |
4626 | 1835 AC_SUBST(WARN_CFLAGS) |
1836 AC_SUBST(WARN_CXXFLAGS) | |
1837 | |
1146 | 1838 ### Run configure in subdirectories. |
1839 | |
1304 | 1840 export CC |
1841 export CXX | |
1842 export F77 | |
1843 | |
4378 | 1844 AC_CONFIG_SUBDIRS(scripts) |
3887 | 1845 |
3923 | 1846 ### Some things to add to the bottom of config.h. |
1847 | |
1848 AH_BOTTOM([ | |
1849 #if defined (__GNUC__) | |
5389 | 1850 #define GCC_ATTR_DEPRECATED __attribute__ ((__deprecated__)) |
3923 | 1851 #define GCC_ATTR_NORETURN __attribute__ ((__noreturn__)) |
1852 #define GCC_ATTR_UNUSED __attribute__ ((__unused__)) | |
1853 #else | |
5389 | 1854 #define GCC_ATTR_DEPRECATED |
3923 | 1855 #define GCC_ATTR_NORETURN |
1856 #define GCC_ATTR_UNUSED | |
1857 #endif | |
1858 | |
1859 #define X_CAST(T, E) (T) (E) | |
1860 | |
5854 | 1861 #if defined (CXX_BROKEN_REINTERPRET_CAST) |
1862 #define FCN_PTR_CAST(T, E) (T) (E) | |
1863 #else | |
1864 #define FCN_PTR_CAST(T, E) reinterpret_cast<T> (E) | |
1865 #endif | |
1866 | |
3923 | 1867 #if defined(HAVE_F2C) && !defined(F77_FUNC) |
1868 # define F77_FUNC(x,X) x ## _ | |
1869 # define F77_FUNC_(x,X) x ## __ | |
1870 #endif | |
1871 | |
1872 #if !defined(HAVE_DEV_T) | |
4064 | 1873 typedef short dev_t; |
3923 | 1874 #endif |
1875 | |
1876 #if !defined(HAVE_INO_T) | |
4064 | 1877 typedef unsigned long ino_t; |
3923 | 1878 #endif |
1879 | |
1880 #if !defined(HAVE_NLINK_T) | |
4064 | 1881 typedef short nlink_t; |
3923 | 1882 #endif |
1883 | |
1884 #if !defined(HAVE_SIGSET_T) | |
4064 | 1885 typedef int sigset_t; |
3923 | 1886 #endif |
4101 | 1887 |
4180 | 1888 #if !defined(HAVE_SIG_ATOMIC_T) |
1889 typedef int sig_atomic_t; | |
1890 #endif | |
1891 | |
6122 | 1892 #if defined (_MSC_VER) |
1893 #define __WIN32__ | |
6276 | 1894 #define WIN32 |
6122 | 1895 /* missing parameters in macros */ |
1896 #pragma warning (disable: 4003) | |
1897 /* missing implementations in template instantiation */ | |
1898 #pragma warning (disable: 4996) | |
1899 /* deprecated function names (FIXME?) */ | |
1900 #pragma warning (disable: 4661) | |
1901 #endif | |
1902 | |
4377 | 1903 #if defined (__WIN32__) && ! defined (__CYGWIN__) |
4101 | 1904 #define OCTAVE_HAVE_WINDOWS_FILESYSTEM 1 |
6049 | 1905 #elif defined (__CYGWIN__) |
4377 | 1906 #define OCTAVE_HAVE_WINDOWS_FILESYSTEM 1 |
1907 #define OCTAVE_HAVE_POSIX_FILESYSTEM 1 | |
6049 | 1908 #else |
1909 #define OCTAVE_HAVE_POSIX_FILESYSTEM 1 | |
4101 | 1910 #endif |
1911 | |
1912 /* Define if we expect to have <windows.h>, Sleep, etc. */ | |
4102 | 1913 #if defined (__WIN32__) && ! defined (__CYGWIN__) |
4101 | 1914 #define OCTAVE_USE_WINDOWS_API 1 |
1915 #endif | |
4153 | 1916 |
4180 | 1917 /* sigsetjmp is a macro, not a function. */ |
1918 #if defined (sigsetjmp) && defined (HAVE_SIGLONGJMP) | |
1919 #define OCTAVE_HAVE_SIG_JUMP | |
1920 #endif | |
4249 | 1921 |
4726 | 1922 /* Always use vector<T>, since we sometimes allocate large chunks |
1923 of memory and that can cause trouble due to stack size limits. | |
1924 | |
1925 Note that using auto_ptr is not appropriate because it uses delete, | |
1926 not delete[] and we need the latter to properly handle arrays | |
1927 allocated with new[size]. | |
1928 | |
5174 | 1929 Use < T > instead of <T> to avoid problems if T is a template type |
1930 (say, foo<int>) and the preprocessor fails to insert a space and | |
1931 generates <foo<int>>. | |
1932 | |
4366 | 1933 #if defined (HAVE_DYNAMIC_AUTO_ARRAYS) |
5174 | 1934 |
4249 | 1935 #define OCTAVE_LOCAL_BUFFER(T, buf, size) \ |
1936 T buf[size] | |
5174 | 1937 |
1938 #else | |
1939 | |
1940 */ | |
1941 | |
4249 | 1942 #define OCTAVE_LOCAL_BUFFER(T, buf, size) \ |
5174 | 1943 std::vector< T > buf ## _vector (size); \ |
6149 | 1944 T *buf = ((size) > 0 ? &(buf ## _vector[0]) : 0) |
5174 | 1945 |
4382 | 1946 /* #endif */ |
4278 | 1947 |
1948 #if defined (__DECCXX) | |
1949 #define __USE_STD_IOSTREAM | |
1950 #endif | |
4552 | 1951 |
1952 #if defined (_UNICOS) | |
1953 #define F77_USES_CRAY_CALLING_CONVENTION | |
1954 #endif | |
1955 | |
1956 #if 0 | |
1957 #define F77_USES_VISUAL_FORTRAN_CALLING_CONVENTION | |
1958 #endif | |
5275 | 1959 |
5297 | 1960 #ifdef USE_64_BIT_IDX_T |
1961 #define SIZEOF_OCTAVE_IDX_TYPE 8 | |
1962 #else | |
1963 #define SIZEOF_OCTAVE_IDX_TYPE SIZEOF_INT | |
1964 #endif | |
1965 | |
7067 | 1966 #define OCTAVE_EMPTY_CPP_ARG |
1967 | |
6121 | 1968 #include "oct-dlldefs.h" |
5275 | 1969 #include "oct-types.h" |
3923 | 1970 ]) |
1971 | |
869 | 1972 ### Do the substitutions in all the Makefiles. |
1973 | |
7253 | 1974 AC_CONFIG_FILES([Makefile octMakefile Makeconf test/Makefile |
1975 doc/Makefile doc/faq/Makefile doc/interpreter/Makefile | |
1976 doc/liboctave/Makefile doc/refcard/Makefile emacs/Makefile | |
1977 examples/Makefile liboctave/Makefile liboctave/oct-types.h | |
1978 src/Makefile src/mxarray.h libcruft/Makefile libcruft/Makerules | |
1979 libcruft/amos/Makefile libcruft/blas/Makefile | |
1980 libcruft/daspk/Makefile libcruft/dasrt/Makefile | |
1981 libcruft/dassl/Makefile libcruft/fftpack/Makefile | |
1982 libcruft/lapack/Makefile libcruft/minpack/Makefile | |
1983 libcruft/misc/Makefile libcruft/odepack/Makefile | |
1984 libcruft/ordered-qz/Makefile libcruft/quadpack/Makefile | |
7553
56be6f31dd4e
implementation of QR factorization updating
Jaroslav Hajek <highegg@gmail.com>
parents:
7483
diff
changeset
|
1985 libcruft/qrupdate/Makefile |
7253 | 1986 libcruft/ranlib/Makefile libcruft/slatec-fn/Makefile |
1987 libcruft/slatec-err/Makefile libcruft/villad/Makefile | |
7874
e3a502930e2a
eliminate src/graphics subdirectory
John W. Eaton <jwe@octave.org>
parents:
7863
diff
changeset
|
1988 libcruft/blas-xtra/Makefile libcruft/lapack-xtra/Makefile]) |
3887 | 1989 AC_OUTPUT |
1225 | 1990 |
3887 | 1991 AC_CONFIG_COMMANDS([default-1],[[chmod +x install-octave]],[[]]) |
3176 | 1992 |
1225 | 1993 ### Print a summary so that important information isn't missed. |
1994 | |
1995 if test -z "$F77"; then | |
1996 FORT="$F2C $F2CFLAGS" | |
1997 else | |
2610 | 1998 FORT="$F77 $FFLAGS" |
1225 | 1999 fi |
2000 | |
5844 | 2001 AC_MSG_NOTICE([ |
1225 | 2002 |
2003 Octave is now configured for $canonical_host_type | |
2004 | |
1664 | 2005 Source directory: $srcdir |
2006 Installation prefix: $prefix | |
4626 | 2007 C compiler: $CC $XTRA_CFLAGS $WARN_CFLAGS $CFLAGS |
2008 C++ compiler: $CXX $XTRA_CXXFLAGS $WARN_CXXFLAGS $CXXFLAGS | |
1664 | 2009 Fortran compiler: $FORT |
2010 Fortran libraries: $FLIBS | |
3820 | 2011 BLAS libraries: $BLAS_LIBS |
3827 | 2012 FFTW libraries: $FFTW_LIBS |
5235 | 2013 GLPK libraries: $GLPK_LIBS |
5203 | 2014 UMFPACK libraries: $UMFPACK_LIBS |
6024 | 2015 AMD libraries: $AMD_LIBS |
2016 CAMD libraries: $CAMD_LIBS | |
5451 | 2017 COLAMD libraries: $COLAMD_LIBS |
2018 CCOLAMD libraries: $CCOLAMD_LIBS | |
2019 CHOLMOD libraries: $CHOLMOD_LIBS | |
5610 | 2020 CXSPARSE libraries: $CXSPARSE_LIBS |
3820 | 2021 HDF5 libraries: $HDF5_LIBS |
6043 | 2022 CURL libraries: $CURL_LIBS |
6024 | 2023 REGEX libraries: $REGEX_LIBS |
6829 | 2024 QHULL libraries: $QHULL_LIBS |
3822 | 2025 LIBS: $LIBS |
1664 | 2026 Default pager: $DEFAULT_PAGER |
7361 | 2027 gnuplot: $GNUPLOT |
7863
2a62d45fa21d
added check for FTGL library
Shai Ayal <shaiay@users.sourceforge.net>
parents:
7834
diff
changeset
|
2028 OPENGL libraries: $OPENGL_LIBS |
7944
c2449e91f50a
configure.in: fix FTGL test to handle either FTGL/ftgl.h or ftgl.h
John W. Eaton <jwe@octave.org>
parents:
7937
diff
changeset
|
2029 FLTK backend libs: $GRAPHICS_LIBS |
7926
d74f996e005d
__magick_read__.cc: configuration and style fixes
John W. Eaton <jwe@octave.org>
parents:
7921
diff
changeset
|
2030 Magick config: $MAGICK_CONFIG |
1664 | 2031 |
4110 | 2032 Do internal array bounds checking: $BOUNDS_CHECKING |
2033 Build static libraries: $STATIC_LIBS | |
2034 Build shared libraries: $SHARED_LIBS | |
4128 | 2035 Dynamic Linking: $ENABLE_DYNAMIC_LINKING $DL_API_MSG |
4110 | 2036 Include support for GNU readline: $USE_READLINE |
5275 | 2037 64-bit array dims and indexing: $USE_64_BIT_IDX_T |
1225 | 2038 ]) |
3105 | 2039 |
2040 warn_msg_printed=false | |
2041 | |
4469 | 2042 if $ENABLE_DYNAMIC_LINKING; then |
2043 if $SHARED_LIBS; then | |
2044 true | |
2045 else | |
2046 AC_MSG_WARN([You used --enable-dl but not --enable-shared.]) | |
2047 AC_MSG_WARN([Are you sure that is what you want to do?]) | |
2048 warn_msg_printed=true | |
2049 fi | |
2050 fi | |
2051 | |
3105 | 2052 if test -n "$gxx_only"; then |
2053 AC_MSG_WARN($gxx_only) | |
2054 warn_msg_printed=true | |
2055 fi | |
2056 | |
2057 if test -n "$warn_gcc_version"; then | |
2058 AC_MSG_WARN($warn_gcc_version) | |
2059 warn_msg_printed=true | |
2060 fi | |
2061 | |
2062 if test -n "$warn_gcc_only"; then | |
2063 AC_MSG_WARN($warn_gcc_only) | |
2064 warn_msg_printed=true | |
2065 fi | |
2066 | |
3825 | 2067 if test -n "$warn_readline"; then |
2068 AC_MSG_WARN($warn_readline) | |
2069 warn_msg_printed=true | |
2070 fi | |
2071 | |
3105 | 2072 if test -n "$warn_termlibs"; then |
2073 AC_MSG_WARN($warn_termlibs) | |
2074 warn_msg_printed=true | |
2075 fi | |
2076 | |
3673 | 2077 if test -n "$warn_gperf"; then |
2078 AC_MSG_WARN($warn_gperf) | |
2079 warn_msg_printed=true | |
2080 fi | |
2081 | |
3105 | 2082 if test -n "$warn_flex"; then |
2083 AC_MSG_WARN($warn_flex) | |
2084 warn_msg_printed=true | |
2085 fi | |
2086 | |
2087 if test -n "$warn_bison"; then | |
2088 AC_MSG_WARN($warn_bison) | |
2089 warn_msg_printed=true | |
2090 fi | |
2091 | |
2092 if test -n "$warn_less"; then | |
2093 AC_MSG_WARN($warn_less) | |
2094 warn_msg_printed=true | |
2095 fi | |
2096 | |
7683
8136cb19fb7a
implement BLAS-F77 call compatibility check
Jaroslav Hajek <highegg@gmail.com>
parents:
7638
diff
changeset
|
2097 if test -n "$warn_blas_f77_incompatible"; then |
8136cb19fb7a
implement BLAS-F77 call compatibility check
Jaroslav Hajek <highegg@gmail.com>
parents:
7638
diff
changeset
|
2098 AC_MSG_WARN($warn_blas_f77_incompatible) |
8136cb19fb7a
implement BLAS-F77 call compatibility check
Jaroslav Hajek <highegg@gmail.com>
parents:
7638
diff
changeset
|
2099 warn_msg_printed=true |
8136cb19fb7a
implement BLAS-F77 call compatibility check
Jaroslav Hajek <highegg@gmail.com>
parents:
7638
diff
changeset
|
2100 fi |
8136cb19fb7a
implement BLAS-F77 call compatibility check
Jaroslav Hajek <highegg@gmail.com>
parents:
7638
diff
changeset
|
2101 |
5203 | 2102 if test -n "$warn_umfpack"; then |
2103 AC_MSG_WARN($warn_umfpack) | |
2104 warn_msg_printed=true | |
2105 fi | |
2106 | |
7619 | 2107 if test -n "$warn_amd"; then |
2108 AC_MSG_WARN($warn_amd) | |
2109 warn_msg_printed=true | |
2110 fi | |
2111 | |
5451 | 2112 if test -n "$warn_colamd"; then |
2113 AC_MSG_WARN($warn_colamd) | |
2114 warn_msg_printed=true | |
2115 fi | |
2116 | |
2117 if test -n "$warn_ccolamd"; then | |
2118 AC_MSG_WARN($warn_ccolamd) | |
2119 warn_msg_printed=true | |
2120 fi | |
2121 | |
2122 if test -n "$warn_cholmod"; then | |
2123 AC_MSG_WARN($warn_cholmod) | |
2124 warn_msg_printed=true | |
2125 fi | |
2126 | |
5703 | 2127 if test -n "$warn_cxsparse"; then |
2128 AC_MSG_WARN($warn_cxsparse) | |
2129 warn_msg_printed=true | |
2130 fi | |
2131 | |
6335 | 2132 if test -n "$warn_curl"; then |
2133 AC_MSG_WARN($warn_curl) | |
2134 warn_msg_printed=true | |
2135 fi | |
2136 | |
6133 | 2137 if test -n "$warn_fftw"; then |
2138 AC_MSG_WARN($warn_fftw) | |
2139 warn_msg_printed=true | |
2140 fi | |
2141 | |
2142 if test -n "$warn_glpk"; then | |
2143 AC_MSG_WARN($warn_glpk) | |
2144 warn_msg_printed=true | |
2145 fi | |
2146 | |
7926
d74f996e005d
__magick_read__.cc: configuration and style fixes
John W. Eaton <jwe@octave.org>
parents:
7921
diff
changeset
|
2147 if test -n "$warn_magick"; then |
d74f996e005d
__magick_read__.cc: configuration and style fixes
John W. Eaton <jwe@octave.org>
parents:
7921
diff
changeset
|
2148 AC_MSG_WARN($warn_magick) |
d74f996e005d
__magick_read__.cc: configuration and style fixes
John W. Eaton <jwe@octave.org>
parents:
7921
diff
changeset
|
2149 warn_msg_printed=true |
d74f996e005d
__magick_read__.cc: configuration and style fixes
John W. Eaton <jwe@octave.org>
parents:
7921
diff
changeset
|
2150 fi |
d74f996e005d
__magick_read__.cc: configuration and style fixes
John W. Eaton <jwe@octave.org>
parents:
7921
diff
changeset
|
2151 |
5203 | 2152 if test -n "$warn_hdf5"; then |
2153 AC_MSG_WARN($warn_hdf5) | |
2154 warn_msg_printed=true | |
2155 fi | |
2156 | |
6133 | 2157 if test -n "$warn_regex"; then |
2158 AC_MSG_WARN($warn_regex) | |
2159 warn_msg_printed=true | |
2160 fi | |
2161 | |
6025 | 2162 if test -n "$warn_pcre"; then |
2163 AC_MSG_WARN($warn_pcre) | |
2164 warn_msg_printed=true | |
2165 fi | |
2166 | |
6829 | 2167 if test -n "$warn_qhull"; then |
2168 AC_MSG_WARN($warn_qhull) | |
2169 warn_msg_printed=true | |
2170 fi | |
2171 | |
5270 | 2172 if test -n "$warn_zlib"; then |
2173 AC_MSG_WARN($warn_zlib) | |
2174 warn_msg_printed=true | |
2175 fi | |
2176 | |
5934 | 2177 if test -n "$warn_ghostscript"; then |
2178 AC_MSG_WARN($warn_ghostscript) | |
2179 warn_msg_printed=true | |
2180 fi | |
2181 | |
2182 if test -n "$warn_makeinfo"; then | |
2183 AC_MSG_WARN($warn_makeinfo) | |
2184 warn_msg_printed=true | |
2185 fi | |
2186 | |
2187 if test -n "$warn_texi2dvi"; then | |
2188 AC_MSG_WARN($warn_texi2dvi) | |
2189 warn_msg_printed=true | |
2190 fi | |
2191 | |
2192 if test -n "$warn_texi2pdf"; then | |
2193 AC_MSG_WARN($warn_texi2pdf) | |
2194 warn_msg_printed=true | |
2195 fi | |
2196 | |
5275 | 2197 if test -n "$warn_64_bit"; then |
2198 AC_MSG_WARN($warn_64_bit) | |
2199 warn_msg_printed=true | |
2200 fi | |
2201 | |
3105 | 2202 if test -n "$warn_gnuplot"; then |
2203 | |
2204 ## If you change this text, be sure to also change the corresponding | |
2205 ## set of warnings above. | |
2206 | |
6161 | 2207 AC_MSG_WARN([]) |
3105 | 2208 AC_MSG_WARN([I didn't find gnuplot. It isn't necessary to have gnuplot]) |
2209 AC_MSG_WARN([installed, but you won't be able to use any of Octave's]) | |
2210 AC_MSG_WARN([plotting commands without it.]) | |
2211 AC_MSG_WARN([]) | |
2212 AC_MSG_WARN([If gnuplot is installed but it isn't in your path, you can]) | |
2213 AC_MSG_WARN([tell Octave where to find it by typing the command]) | |
2214 AC_MSG_WARN([]) | |
2215 AC_MSG_WARN([gnuplot_binary = "/full/path/to/gnuplot/binary"]) | |
2216 AC_MSG_WARN([]) | |
2217 AC_MSG_WARN([at the Octave prompt.]) | |
6161 | 2218 AC_MSG_WARN([]) |
3105 | 2219 warn_msg_printed=true |
2220 fi | |
2221 | |
5857 | 2222 if $USE_64_BIT_IDX_T; then |
6161 | 2223 AC_MSG_WARN([]) |
5857 | 2224 AC_MSG_WARN([You used the EXPERIMENTAL --enable-64 option.]) |
2225 AC_MSG_WARN([Are you sure that is what you want to do?]) | |
2226 AC_MSG_WARN([]) | |
2227 AC_MSG_WARN([You must ensure that the Fortran compiler generates]) | |
2228 AC_MSG_WARN([code with 8 byte signed INTEGER values, and that your]) | |
2229 AC_MSG_WARN([BLAS and LAPACK libraries are compiled to use 8 byte]) | |
2230 AC_MSG_WARN([signed integers for array indexing.]) | |
6161 | 2231 AC_MSG_WARN([]) |
5857 | 2232 warn_msg_printed=true |
3105 | 2233 fi |
2234 | |
7944
c2449e91f50a
configure.in: fix FTGL test to handle either FTGL/ftgl.h or ftgl.h
John W. Eaton <jwe@octave.org>
parents:
7937
diff
changeset
|
2235 native_graphics=true |
c2449e91f50a
configure.in: fix FTGL test to handle either FTGL/ftgl.h or ftgl.h
John W. Eaton <jwe@octave.org>
parents:
7937
diff
changeset
|
2236 if test -n "$warn_freetype"; then |
c2449e91f50a
configure.in: fix FTGL test to handle either FTGL/ftgl.h or ftgl.h
John W. Eaton <jwe@octave.org>
parents:
7937
diff
changeset
|
2237 AC_MSG_WARN("$warn_freetype") |
c2449e91f50a
configure.in: fix FTGL test to handle either FTGL/ftgl.h or ftgl.h
John W. Eaton <jwe@octave.org>
parents:
7937
diff
changeset
|
2238 native_graphics=false |
c2449e91f50a
configure.in: fix FTGL test to handle either FTGL/ftgl.h or ftgl.h
John W. Eaton <jwe@octave.org>
parents:
7937
diff
changeset
|
2239 warn_msg_printed=true |
c2449e91f50a
configure.in: fix FTGL test to handle either FTGL/ftgl.h or ftgl.h
John W. Eaton <jwe@octave.org>
parents:
7937
diff
changeset
|
2240 fi |
c2449e91f50a
configure.in: fix FTGL test to handle either FTGL/ftgl.h or ftgl.h
John W. Eaton <jwe@octave.org>
parents:
7937
diff
changeset
|
2241 |
c2449e91f50a
configure.in: fix FTGL test to handle either FTGL/ftgl.h or ftgl.h
John W. Eaton <jwe@octave.org>
parents:
7937
diff
changeset
|
2242 if test -n "$warn_ftgl"; then |
c2449e91f50a
configure.in: fix FTGL test to handle either FTGL/ftgl.h or ftgl.h
John W. Eaton <jwe@octave.org>
parents:
7937
diff
changeset
|
2243 AC_MSG_WARN("$warn_ftgl") |
c2449e91f50a
configure.in: fix FTGL test to handle either FTGL/ftgl.h or ftgl.h
John W. Eaton <jwe@octave.org>
parents:
7937
diff
changeset
|
2244 native_graphics=false |
c2449e91f50a
configure.in: fix FTGL test to handle either FTGL/ftgl.h or ftgl.h
John W. Eaton <jwe@octave.org>
parents:
7937
diff
changeset
|
2245 warn_msg_printed=true |
c2449e91f50a
configure.in: fix FTGL test to handle either FTGL/ftgl.h or ftgl.h
John W. Eaton <jwe@octave.org>
parents:
7937
diff
changeset
|
2246 fi |
c2449e91f50a
configure.in: fix FTGL test to handle either FTGL/ftgl.h or ftgl.h
John W. Eaton <jwe@octave.org>
parents:
7937
diff
changeset
|
2247 |
c2449e91f50a
configure.in: fix FTGL test to handle either FTGL/ftgl.h or ftgl.h
John W. Eaton <jwe@octave.org>
parents:
7937
diff
changeset
|
2248 if test -n "$warn_fltk_config"; then |
c2449e91f50a
configure.in: fix FTGL test to handle either FTGL/ftgl.h or ftgl.h
John W. Eaton <jwe@octave.org>
parents:
7937
diff
changeset
|
2249 AC_MSG_WARN("$warn_fltk_config") |
c2449e91f50a
configure.in: fix FTGL test to handle either FTGL/ftgl.h or ftgl.h
John W. Eaton <jwe@octave.org>
parents:
7937
diff
changeset
|
2250 native_graphics=false |
c2449e91f50a
configure.in: fix FTGL test to handle either FTGL/ftgl.h or ftgl.h
John W. Eaton <jwe@octave.org>
parents:
7937
diff
changeset
|
2251 warn_msg_printed=true |
c2449e91f50a
configure.in: fix FTGL test to handle either FTGL/ftgl.h or ftgl.h
John W. Eaton <jwe@octave.org>
parents:
7937
diff
changeset
|
2252 fi |
c2449e91f50a
configure.in: fix FTGL test to handle either FTGL/ftgl.h or ftgl.h
John W. Eaton <jwe@octave.org>
parents:
7937
diff
changeset
|
2253 |
c2449e91f50a
configure.in: fix FTGL test to handle either FTGL/ftgl.h or ftgl.h
John W. Eaton <jwe@octave.org>
parents:
7937
diff
changeset
|
2254 if test -n "$warn_fltk_opengl"; then |
c2449e91f50a
configure.in: fix FTGL test to handle either FTGL/ftgl.h or ftgl.h
John W. Eaton <jwe@octave.org>
parents:
7937
diff
changeset
|
2255 AC_MSG_WARN("$warn_fltk_opengl") |
c2449e91f50a
configure.in: fix FTGL test to handle either FTGL/ftgl.h or ftgl.h
John W. Eaton <jwe@octave.org>
parents:
7937
diff
changeset
|
2256 native_graphics=false |
c2449e91f50a
configure.in: fix FTGL test to handle either FTGL/ftgl.h or ftgl.h
John W. Eaton <jwe@octave.org>
parents:
7937
diff
changeset
|
2257 warn_msg_printed=true |
c2449e91f50a
configure.in: fix FTGL test to handle either FTGL/ftgl.h or ftgl.h
John W. Eaton <jwe@octave.org>
parents:
7937
diff
changeset
|
2258 fi |
c2449e91f50a
configure.in: fix FTGL test to handle either FTGL/ftgl.h or ftgl.h
John W. Eaton <jwe@octave.org>
parents:
7937
diff
changeset
|
2259 |
c2449e91f50a
configure.in: fix FTGL test to handle either FTGL/ftgl.h or ftgl.h
John W. Eaton <jwe@octave.org>
parents:
7937
diff
changeset
|
2260 if $native_graphics; then |
c2449e91f50a
configure.in: fix FTGL test to handle either FTGL/ftgl.h or ftgl.h
John W. Eaton <jwe@octave.org>
parents:
7937
diff
changeset
|
2261 true; |
c2449e91f50a
configure.in: fix FTGL test to handle either FTGL/ftgl.h or ftgl.h
John W. Eaton <jwe@octave.org>
parents:
7937
diff
changeset
|
2262 else |
7834
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
2263 AC_MSG_WARN([]) |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
2264 AC_MSG_WARN([I didn't find the necessary libraries to compile native]) |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
2265 AC_MSG_WARN([graphics. It isn't necessary to have native graphics]) |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
2266 AC_MSG_WARN([but you will have to use gnuplot or you won't be able]) |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
2267 AC_MSG_WARN([to use any of Octave's plotting commands]) |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
2268 AC_MSG_WARN([]) |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
2269 warn_msg_printed=true |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
2270 fi |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
2271 |
6191 | 2272 if $warn_msg_printed; then |
6161 | 2273 AC_MSG_NOTICE([ |
2274 | |
2275 NOTE: libraries may be skipped if a library is not found OR | |
2276 if the library on your system is missing required features. | |
2277 ]) | |
2278 fi | |
2279 | |
3105 | 2280 ### End of configure. |