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