Mercurial > hg > octave-lyh
annotate configure.in @ 8269:37afdd1d1bf8
Use FT2_CFLAGS when checking for FTGL headers.
The flags need added to both CXXFLAGS and CPPFLAGS to pass
all of AC_CHECK_HEADERS's tests.
author | Jason Riedy <jason@acm.org> |
---|---|
date | Thu, 23 Oct 2008 09:51:21 -0400 |
parents | dba0037e6602 |
children | 43795cf108d0 |
rev | line source |
---|---|
405 | 1 dnl configure.in |
2 dnl | |
5 | 3 dnl Process this file with autoconf to produce a configure script. |
4 dnl | |
7017 | 5 dnl Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, |
6 dnl 2002, 2003, 2004, 2005, 2006, 2007 John W. Eaton | |
869 | 7 ### |
8 ### This file is part of Octave. | |
9 ### | |
10 ### Octave is free software; you can redistribute it and/or modify it | |
11 ### under the terms of the GNU General Public License as published by the | |
7016 | 12 ### Free Software Foundation; either version 3 of the License, or (at |
13 ### your option) any later version. | |
869 | 14 ### |
15 ### Octave is distributed in the hope that it will be useful, but WITHOUT | |
16 ### ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
17 ### FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
18 ### for more details. | |
19 ### | |
20 ### You should have received a copy of the GNU General Public License | |
7016 | 21 ### along with Octave; see the file COPYING. If not, see |
22 ### <http://www.gnu.org/licenses/>. | |
869 | 23 |
4587 | 24 ### Preserve CFLAGS and CXXFLAGS from the environment before doing |
25 ### anything else because we don't know which macros might call | |
26 ### AC_PROG_CC or AC_PROG_CXX. | |
27 | |
28 EXTERN_CFLAGS="$CFLAGS" | |
29 EXTERN_CXXFLAGS="$CXXFLAGS" | |
30 | |
3887 | 31 AC_INIT |
7451 | 32 AC_REVISION($Revision: 1.603 $) |
4531 | 33 AC_PREREQ(2.57) |
3887 | 34 AC_CONFIG_SRCDIR([src/octave.cc]) |
1146 | 35 AC_CONFIG_HEADER(config.h) |
869 | 36 |
5844 | 37 OCTAVE_HOST_TYPE |
38 | |
3887 | 39 AC_DEFINE(OCTAVE_SOURCE, 1, [Define if this is Octave.]) |
40 | |
6090 | 41 dnl FIXME -- we should probably only generate this file if it is missing. |
42 ### Produce unistd.h for MSVC target, this simplifies changes in | |
43 ### Octave source tree and avoid problems with lex-generated code. | |
44 case "$canonical_host_type" in | |
45 *-*-msdosmsvc) | |
46 AC_MSG_NOTICE([Generating replacement for <unistd.h> for MSVC]) | |
47 cat << \EOF > unistd.h | |
48 /* File generated by configure script. */ | |
49 #include <direct.h> | |
50 #include <io.h> | |
51 #include <process.h> | |
52 EOF | |
53 CPPFLAGS="-I. $CPPFLAGS" | |
54 ;; | |
55 esac | |
56 | |
5098 | 57 AC_GNU_SOURCE |
58 | |
3923 | 59 AC_AIX |
3887 | 60 AC_MINIX |
3923 | 61 AC_ISC_POSIX |
1667 | 62 |
5451 | 63 ### Path separator. |
64 sepchar=: | |
65 AC_ARG_WITH(sepchar, | |
5842 | 66 [AS_HELP_STRING([--with-sepchar=<char>], |
5844 | 67 [use <char> as the path separation character])]) |
5451 | 68 case $with_sepchar in |
69 yes | "") | |
70 case "$canonical_host_type" in | |
6090 | 71 *-*-mingw* | *-*-msdosmsvc) |
5451 | 72 sepchar=';' |
73 ;; | |
74 esac | |
75 ;; | |
76 no) | |
77 AC_MSG_ERROR([You are required to define a path separation character]) | |
78 ;; | |
79 *) | |
80 sepchar=$with_sepchar | |
81 ;; | |
82 esac | |
83 AC_SUBST(sepchar) | |
84 AC_DEFINE_UNQUOTED(SEPCHAR, ['$sepchar'], [Define this to be the path separator for your system, as a character constant.]) | |
85 AC_DEFINE_UNQUOTED(SEPCHAR_STR, ["$sepchar"], [Define this to the path separator, as a string.]) | |
86 | |
2223 | 87 ### some defaults |
88 | |
2813 | 89 OCTAVE_SET_DEFAULT(man1dir, '$(mandir)/man1') |
90 OCTAVE_SET_DEFAULT(man1ext, '.1') | |
91 OCTAVE_SET_DEFAULT(infofile, '$(infodir)/octave.info') | |
3597 | 92 OCTAVE_SET_DEFAULT(octincludedir, '$(includedir)/octave-$(version)') |
3029 | 93 OCTAVE_SET_DEFAULT(fcnfiledir, '$(datadir)/octave/$(version)/m') |
2813 | 94 OCTAVE_SET_DEFAULT(localfcnfiledir, '$(datadir)/octave/site/m') |
4449 | 95 OCTAVE_SET_DEFAULT(localapifcnfiledir, |
5778 | 96 '$(datadir)/octave/site/$(api_version)/m') |
3597 | 97 OCTAVE_SET_DEFAULT(localverfcnfiledir, '$(datadir)/octave/$(version)/site/m') |
3141 | 98 OCTAVE_SET_DEFAULT(octlibdir, '$(libdir)/octave-$(version)') |
3029 | 99 OCTAVE_SET_DEFAULT(archlibdir, |
3130 | 100 '$(libexecdir)/octave/$(version)/exec/$(canonical_host_type)') |
3029 | 101 OCTAVE_SET_DEFAULT(localarchlibdir, |
3130 | 102 '$(libexecdir)/octave/site/exec/$(canonical_host_type)') |
5909 | 103 OCTAVE_SET_DEFAULT(localapiarchlibdir, |
104 '$(libexecdir)/octave/$(api_version)/site/exec/$(canonical_host_type)') | |
3597 | 105 OCTAVE_SET_DEFAULT(localverarchlibdir, |
106 '$(libexecdir)/octave/$(version)/site/exec/$(canonical_host_type)') | |
3029 | 107 OCTAVE_SET_DEFAULT(octfiledir, |
3130 | 108 '$(libexecdir)/octave/$(version)/oct/$(canonical_host_type)') |
3029 | 109 OCTAVE_SET_DEFAULT(localoctfiledir, |
3130 | 110 '$(libexecdir)/octave/site/oct/$(canonical_host_type)') |
4449 | 111 OCTAVE_SET_DEFAULT(localapioctfiledir, |
5778 | 112 '$(libexecdir)/octave/site/oct/$(api_version)/$(canonical_host_type)') |
3597 | 113 OCTAVE_SET_DEFAULT(localveroctfiledir, |
114 '$(libexecdir)/octave/$(version)/site/oct/$(canonical_host_type)') | |
3029 | 115 OCTAVE_SET_DEFAULT(imagedir, '$(datadir)/octave/$(version)/imagelib') |
1667 | 116 |
2155 | 117 ### Make configure args available for other uses. |
118 | |
119 config_opts=$ac_configure_args | |
120 AC_SUBST(config_opts) | |
121 | |
2813 | 122 ### Make it possible to have Octave's array and matrix classes do bounds |
2108 | 123 ### checking on element references. This slows some operations down a |
2813 | 124 ### bit, so it is turned off by default. |
2108 | 125 |
2450 | 126 BOUNDS_CHECKING=false |
2108 | 127 AC_ARG_ENABLE(bounds-check, |
5844 | 128 [AS_HELP_STRING([--enable-bounds-check], |
7091 | 129 [bounds checking for indexing in internal array classes (default is no)])], |
3060 | 130 [if test "$enableval" = yes; then BOUNDS_CHECKING=true; fi], []) |
2108 | 131 if $BOUNDS_CHECKING; then |
3887 | 132 AC_DEFINE(BOUNDS_CHECKING, 1, [Define to use internal bounds checking.]) |
2108 | 133 fi |
134 | |
5275 | 135 ### If possible, use a 64-bit integer type for array dimensions and indexing. |
136 | |
137 USE_64_BIT_IDX_T=false | |
138 OCTAVE_IDX_TYPE=int | |
139 AC_ARG_ENABLE(64, | |
5844 | 140 [AS_HELP_STRING([--enable-64], |
5857 | 141 [(EXPERIMENTAL) use 64-bit integers for array dimensions and indexing])], |
5275 | 142 [if test "$enableval" = yes; then USE_64_BIT_IDX_T=true; fi], []) |
143 if $USE_64_BIT_IDX_T; then | |
144 AC_CHECK_SIZEOF(void *) | |
145 AC_CHECK_SIZEOF(int) | |
146 AC_CHECK_SIZEOF(long) | |
147 if test $ac_cv_sizeof_void_p -eq 8; then | |
148 if test $ac_cv_sizeof_int -eq 8; then | |
149 OCTAVE_IDX_TYPE=int | |
150 elif test $ac_cv_sizeof_long -eq 8; then | |
151 OCTAVE_IDX_TYPE=long | |
5351 | 152 AC_DEFINE(IDX_TYPE_LONG, 1, [Define to 1 if octave index type is long]) |
5275 | 153 else |
5857 | 154 warn_64_bit="no suitable type found for octave_idx_type so disabling 64-bit features" |
155 AC_MSG_WARN($warn_64_bit) | |
5275 | 156 USE_64_BIT_IDX_T=false |
157 fi | |
158 else | |
159 warn_64_bit="pointers are not 64-bits wide so disabling 64-bit features" | |
160 AC_MSG_WARN($warn_64_bit) | |
161 USE_64_BIT_IDX_T=false | |
162 fi | |
163 fi | |
164 AC_SUBST(OCTAVE_IDX_TYPE) | |
165 if $USE_64_BIT_IDX_T; then | |
166 AC_DEFINE(USE_64_BIT_IDX_T, 1, [Define if using 64-bit integers for array dimensions and indexing]) | |
167 fi | |
168 AC_SUBST(USE_64_BIT_IDX_T) | |
169 | |
3215 | 170 ### It seems that there are some broken inline assembly functions in |
171 ### the GNU libc. Since I'm not sure how to test whether we are using | |
172 ### GNU libc, just disable them for all platforms. | |
173 | |
5844 | 174 AC_MSG_NOTICE([defining __NO_MATH_INLINES avoids buggy GNU libc exp function]) |
3887 | 175 AC_DEFINE(__NO_MATH_INLINES, 1, [Define if your version of GNU libc has buggy inline assembly code for math functions like exp.]) |
3215 | 176 |
869 | 177 ### See which C++ compiler to use (we expect to find g++). |
178 | |
405 | 179 AC_PROG_CXX |
180 AC_PROG_CXXCPP | |
869 | 181 |
182 ### Do special things for g++. | |
183 | |
2353 | 184 gxx_version=`$CXX -v 2>&1 | grep "^.*g.. version" | \ |
4368 | 185 sed -e 's/^.*g.. version *//' -e 's/cygnus-//' -e 's/egcs-//' -e 's/ .*//'` |
3107 | 186 |
405 | 187 case "$gxx_version" in |
4368 | 188 1.* | 2.[[012345678]].*) |
4843 | 189 AC_MSG_ERROR([g++ version $gxx_version will probably fail to compile Octave] |
190 ) | |
191 ;; | |
192 2.9*) | |
193 warn_gxx_version="g++ version $gxx_version is likely to cause problems" | |
194 AC_MSG_WARN($warn_gxx_version) | |
3775 | 195 ;; |
405 | 196 esac |
869 | 197 |
1894 | 198 CXX_VERSION= |
199 if test -n "$gxx_version"; then | |
200 CXX_VERSION="$gxx_version" | |
201 fi | |
202 AC_SUBST(CXX_VERSION) | |
203 | |
3107 | 204 OCTAVE_CXX_NEW_FRIEND_TEMPLATE_DECL |
3769 | 205 OCTAVE_CXX_ISO_COMPLIANT_LIBRARY |
5854 | 206 OCTAVE_CXX_BROKEN_REINTERPRET_CAST |
3107 | 207 |
869 | 208 ### See which C compiler to use (we expect to find gcc). |
209 | |
5 | 210 AC_PROG_CC |
405 | 211 AC_PROG_CPP |
832 | 212 AC_PROG_GCC_TRADITIONAL |
869 | 213 |
214 ### Do special things for gcc. | |
215 | |
2353 | 216 gcc_version=`$CC -v 2>&1 | grep "^.*gcc version" | \ |
3107 | 217 sed -e 's/^.*g.. version *//' -e 's/cygnus-//' -e 's/egcs-//'` |
405 | 218 case "$gcc_version" in |
219 2.*) | |
1087 | 220 if test -z "$LDFLAGS"; then |
221 LDFLAGS="-g" | |
5844 | 222 AC_MSG_NOTICE([defining LDFLAGS to be $LDFLAGS]) |
1087 | 223 fi |
405 | 224 ;; |
225 1.*) | |
3105 | 226 warn_gcc_version="gcc version $gcc_version is likely to cause problems" |
227 AC_MSG_WARN($warn_gcc_version) | |
405 | 228 ;; |
5 | 229 esac |
869 | 230 |
1894 | 231 CC_VERSION= |
232 if test -n "$gcc_version"; then | |
233 CC_VERSION="$gcc_version" | |
234 fi | |
235 AC_SUBST(CC_VERSION) | |
236 | |
3775 | 237 ### The flag to create dependency varies depending on the compier. |
238 | |
239 # Assume GCC. | |
6087 | 240 INCLUDE_DEPS=true |
3775 | 241 DEPEND_FLAGS="-M" |
242 DEPEND_EXTRA_SED_PATTERN="" | |
6087 | 243 if test "$GCC" = yes; then |
244 true | |
245 else | |
246 case "$canonical_host_type" in | |
247 sparc-sun-solaris2* | i386-pc-solaris2*) | |
3775 | 248 DEPEND_FLAGS="-xM1" |
249 DEPEND_EXTRA_SED_PATTERN="-e '/\/opt\/SUNWspro/d'" | |
6087 | 250 ;; |
7451 | 251 *-*-msdosmsvc) |
252 ;; | |
6087 | 253 *) |
254 INCLUDE_DEPS=false | |
255 ;; | |
256 esac | |
257 fi | |
258 AC_SUBST(INCLUDE_DEPS) | |
3775 | 259 AC_SUBST(DEPEND_FLAGS) |
260 AC_SUBST(DEPEND_EXTRA_SED_PATTERN) | |
261 | |
5076 | 262 ### On Intel systems with gcc, we may need to compile with -mieee-fp |
263 ### and -ffloat-store to get full support for IEEE floating point. | |
2020 | 264 ### |
3126 | 265 ### On Alpha/OSF systems, we need -mieee. |
869 | 266 |
3126 | 267 ieee_fp_flag= |
350 | 268 case "$canonical_host_type" in |
6102 | 269 ## Keep this pattern first, so that it is preferred over the |
270 ## following pattern for x86. | |
271 *-*-msdosmsvc) | |
272 CXXFLAGS="$CXXFLAGS -EHs -MD" | |
273 CFLAGS="$CFLAGS -MD" | |
274 ;; | |
3887 | 275 i[[3456789]]86-*-*) |
5076 | 276 if test "$GCC" = yes; then |
277 OCTAVE_CC_FLAG(-mieee-fp, [ | |
278 ieee_fp_flag=-mieee-fp | |
279 XTRA_CFLAGS="$XTRA_CFLAGS -mieee-fp" | |
5844 | 280 AC_MSG_NOTICE([adding -mieee-fp to XTRA_CFLAGS])]) |
3126 | 281 |
5078 | 282 ### OCTAVE_CC_FLAG(-ffloat-store, [ |
283 ### float_store_flag=-ffloat-store | |
284 ### XTRA_CFLAGS="$XTRA_CFLAGS -ffloat-store" | |
285 ### AC_MSG_RESULT([adding -ffloat-store to XTRA_CFLAGS])]) | |
5076 | 286 fi |
287 if test "$GXX" = yes; then | |
288 OCTAVE_CXX_FLAG(-mieee-fp, [ | |
289 ieee_fp_flag=-mieee-fp | |
290 XTRA_CXXFLAGS="$XTRA_CXXFLAGS -mieee-fp" | |
5844 | 291 AC_MSG_NOTICE([adding -mieee-fp to XTRA_CXXFLAGS])]) |
5076 | 292 |
5078 | 293 ### OCTAVE_CXX_FLAG(-ffloat-store, [ |
294 ### float_store_flag=-ffloat-store | |
295 ### XTRA_CXXFLAGS="$XTRA_CXXFLAGS -ffloat-store" | |
296 ### AC_MSG_RESULT([adding -ffloat-store to XTRA_CXXFLAGS])]) | |
5076 | 297 fi |
324 | 298 ;; |
3127 | 299 alpha*-*-*) |
4284 | 300 if test "$GCC" = yes; then |
4812 | 301 OCTAVE_CC_FLAG(-mieee, [ |
302 ieee_fp_flag=-mieee | |
303 XTRA_CFLAGS="$XTRA_CFLAGS -mieee" | |
5844 | 304 AC_MSG_NOTICE([adding -mieee to XTRA_CFLAGS])]) |
5076 | 305 else |
306 OCTAVE_CC_FLAG(-ieee, [ | |
307 ieee_fp_flag=-ieee | |
308 XTRA_CFLAGS="$XTRA_CFLAGS -ieee" | |
5844 | 309 AC_MSG_NOTICE([adding -ieee to XTRA_CFLAGS])]) |
5076 | 310 fi |
311 if test "$GXX" = yes; then | |
4812 | 312 OCTAVE_CXX_FLAG(-mieee, [ |
313 ieee_fp_flag=-mieee | |
314 XTRA_CXXFLAGS="$XTRA_CXXFLAGS -mieee" | |
5844 | 315 AC_MSG_NOTICE([adding -mieee to XTRA_CXXFLAGS])]) |
4284 | 316 else |
317 OCTAVE_CXX_FLAG(-ieee, [ | |
318 ieee_fp_flag=-ieee | |
319 XTRA_CXXFLAGS="$XTRA_CXXFLAGS -ieee" | |
5844 | 320 AC_MSG_NOTICE([adding -ieee to XTRA_CXXFLAGS])]) |
4284 | 321 fi |
2020 | 322 ;; |
3176 | 323 *ibm-aix4*) |
3351 | 324 OCTAVE_CC_FLAG(-mminimal-toc, [ |
325 XTRA_CFLAGS="$XTRA_CFLAGS -mminimal-toc"]) | |
3176 | 326 |
3351 | 327 OCTAVE_CXX_FLAG(-mminimal-toc, [ |
328 XTRA_CXXFLAGS="$XTRA_CXXFLAGS -mminimal-toc"]) | |
3176 | 329 ;; |
324 | 330 esac |
3126 | 331 |
332 AC_SUBST(XTRA_CFLAGS) | |
333 AC_SUBST(XTRA_CXXFLAGS) | |
869 | 334 |
1667 | 335 ### Use -static if compiling on Alpha OSF/1 1.3 systems. |
336 | |
337 case "$canonical_host_type" in | |
3127 | 338 alpha*-dec-osf1.3) |
1667 | 339 LD_STATIC_FLAG=-static |
340 ;; | |
341 esac | |
1679 | 342 if test -n "$LD_STATIC_FLAG"; then |
5844 | 343 AC_MSG_NOTICE([defining LD_STATIC_FLAG to be $LD_STATIC_FLAG]) |
1679 | 344 fi |
345 AC_SUBST(LD_STATIC_FLAG) | |
1667 | 346 |
4094 | 347 ### Defaults for cross compiling. BUILD_CC and BUILD_CXX are |
348 ### the compilers that we use for building tools on the build system. | |
4098 | 349 ### For now, we assume that the only cross compiling we can do is |
4298 | 350 ### with gcc on a Unixy system, but the dedicated hacker can override these. |
4094 | 351 |
352 if test "$cross_compiling" = yes; then | |
353 BUILD_CC="gcc" | |
354 BUILD_CFLAGS="-O2 -g" | |
355 BUILD_CXX="g++" | |
356 BUILD_CXXFLAGS="-O2 -g" | |
4298 | 357 BUILD_LDFLAGS="" |
4098 | 358 BUILD_EXEEXT="" |
4094 | 359 else |
4298 | 360 BUILD_CC='$(CC)' |
361 BUILD_CFLAGS='$(CFLAGS)' | |
362 BUILD_CXX='$(CXX)' | |
363 BUILD_CXXFLAGS='$(CXXFLAGS)' | |
364 BUILD_LDFLAGS='$(LDFLAGS)' | |
4284 | 365 case "$canonical_host_type" in |
366 sparc-sun-solaris2*) | |
367 if test "$GCC" != yes; then | |
4298 | 368 ## The Sun C++ compiler never seems to complete compiling |
369 ## gendoc.cc unless we reduce the optimization level... | |
370 BUILD_CXXFLAGS="-g -O1" | |
4284 | 371 fi |
372 ;; | |
373 esac | |
4298 | 374 BUILD_EXEEXT='$(EXEEXT)' |
4094 | 375 fi |
376 | |
377 AC_ARG_VAR(BUILD_CC, [build system C compiler (used if cross compiling)]) | |
378 AC_ARG_VAR(BUILD_CFLAGS, [build system C compiler flags (used if cross compiling)]) | |
379 AC_ARG_VAR(BUILD_CXX, [build system C++ compiler (used if cross compiling)]) | |
380 AC_ARG_VAR(BUILD_CXXFLAGS, [build system C++ compiler flags (used if cross compiling)]) | |
4298 | 381 AC_ARG_VAR(BUILD_LDFLAGS, [build system C++ compiler link flags (used if cross compiling)]) |
382 AC_ARG_VAR(BUILD_EXEEXT, [build system executable extension (used if cross compiling)]) | |
3222 | 383 |
3232 | 384 dnl This is bogus. We shouldn't have to explicitly add libc too! |
385 | |
386 ### Look for math library. If found, this will add -lm to LIBS. | |
387 | |
388 case "$canonical_host_type" in | |
389 *-*-nextstep*) | |
390 ;; | |
391 *-*-linux*) | |
392 AC_CHECK_LIB(m, sin, , , -lc) | |
393 ;; | |
394 *) | |
395 AC_CHECK_LIB(m, sin) | |
396 ;; | |
397 esac | |
398 | |
6823 | 399 ### Check for the QHull library |
400 AC_SUBST(QHULL_LIBS) | |
401 AC_CHECK_HEADER(qhull/qhull_a.h, have_qhull=yes, have_qhull=no) | |
402 if test "$have_qhull" = yes; then | |
403 AC_CHECK_LIB(qhull, qh_qhull, have_qhull=yes, have_qhull=no) | |
404 if test "$have_qhull" != yes; then | |
405 AC_CHECK_QHULL_VERSION(have_qhull=yes, have_qhull=no) | |
406 AC_DEFINE(NEED_QHULL_VERSION, 1, [Define if the QHull library needs a wh_version variable defined.]) | |
407 fi | |
408 fi | |
409 if test "$have_qhull" = yes; then | |
410 AC_DEFINE(HAVE_QHULL, 1, [Define if the QHull library is used.]) | |
411 QHULL_LIBS="-lqhull" | |
6855 | 412 TEXINFO_QHULL="@set HAVE_QHULL" |
6823 | 413 else |
414 warn_qhull="Qhull library not found --- This will result in loss of functionality of some geometry functions." | |
415 AC_MSG_WARN($warn_qhull) | |
416 fi | |
417 | |
6855 | 418 AC_SUBST(TEXINFO_QHULL) |
419 | |
5585 | 420 ### Check for pcre/regex library. |
7173 | 421 |
422 ## check for pcre-config, and if so, set CPPFLAGS appropriately | |
423 AC_CHECK_PROG(WITH_PCRE_CONFIG, pcre-config, yes, no) | |
424 if test $WITH_PCRE_CONFIG = yes ; then | |
425 CPPFLAGS="$CPPFLAGS $(pcre-config --cflags)" | |
426 fi | |
427 | |
428 ## NB: no need to do separate check for pcre.h header -- checking macros is good enough | |
429 AC_CACHE_CHECK([whether pcre.h defines the macros we need], [ac_cv_pcre_h_macros_present], [ | |
430 AC_EGREP_CPP([PCRE_HAS_MACROS_WE_NEED], [ | |
431 #include <pcre.h> | |
6133 | 432 #if defined (PCRE_INFO_NAMECOUNT) \ |
433 && defined (PCRE_INFO_NAMEENTRYSIZE) \ | |
434 && defined (PCRE_INFO_NAMETABLE) | |
435 PCRE_HAS_MACROS_WE_NEED | |
7173 | 436 #endif], ac_cv_pcre_h_macros_present=yes, ac_cv_pcre_h_macros_present=no)]) |
437 WITH_PCRE="$ac_cv_pcre_h_macros_present" | |
7169 | 438 |
7173 | 439 REGEX_LIBS= |
440 if test $WITH_PCRE = yes; then | |
441 AC_DEFINE(HAVE_PCRE, 1, [Define if PCRE is available.]) | |
442 if test $WITH_PCRE_CONFIG = yes; then | |
443 REGEX_LIBS=$(pcre-config --libs) | |
444 else | |
445 REGEX_LIBS=-lpcre | |
446 fi | |
7174 | 447 else |
6133 | 448 warn_pcre="PCRE library not found. This will result in some loss of functionality for the regular expression matching functions." |
449 AC_MSG_WARN($warn_pcre) | |
450 fi | |
7169 | 451 |
5585 | 452 AC_CHECK_FUNCS(regexec, WITH_REGEX=yes , [ |
453 AC_CHECK_LIB(regex, regexec, WITH_REGEX=yes, WITH_REGEX=no)]) | |
454 if test $WITH_REGEX = yes ; then | |
455 AC_DEFINE(HAVE_REGEX, 1, [Define if regex is available.]) | |
5600 | 456 if test $WITH_PCRE = no ; then |
5585 | 457 AC_CHECK_FUNCS(regexec, REGEX_LIBS= , [ |
458 AC_CHECK_LIB(regex, regexec, REGEX_LIBS="-lregex")]) | |
459 fi | |
460 fi | |
6133 | 461 if test $WITH_REGEX = no; then |
462 warn_regex="regular expression functions not found. The regular expression matching functions will be disabled." | |
463 AC_MSG_WARN($warn_regex) | |
464 fi | |
7173 | 465 |
7169 | 466 AC_SUBST(REGEX_LIBS) |
5585 | 467 |
5270 | 468 ### Check for ZLIB library. |
3820 | 469 |
5270 | 470 WITH_ZLIB=true |
471 AC_ARG_WITH(zlib, | |
5844 | 472 [AS_HELP_STRING([--without-zlib], [don't use zlib])], |
5270 | 473 with_zlib=$withval, with_zlib=yes) |
3820 | 474 |
5270 | 475 zlib_lib= |
476 if test "$with_zlib" = yes; then | |
477 zlib_lib="z" | |
478 elif test "$with_zlib" != no; then | |
479 zlib_lib="$with_zlib" | |
3687 | 480 fi |
481 | |
5270 | 482 ZLIB_LIBS= |
483 WITH_ZLIB=false | |
484 if test -n "$zlib_lib"; then | |
5337 | 485 AC_CHECK_LIB($zlib_lib, gzclearerr, [ |
5270 | 486 AC_CHECK_HEADERS(zlib.h, [ |
487 WITH_ZLIB=true | |
488 ZLIB_LIBS="-l$zlib_lib" | |
489 LIBS="$ZLIB_LIBS $LIBS" | |
490 AC_DEFINE(HAVE_ZLIB, 1, [Define if ZLIB is available.])])]) | |
491 fi | |
492 | |
493 if $WITH_ZLIB; then | |
494 ### Check for HDF5 library. | |
495 | |
496 WITH_HDF5=true | |
497 AC_ARG_WITH(hdf5, | |
5844 | 498 [AS_HELP_STRING([--without-hdf5], [don't use HDF5])], |
5270 | 499 with_hdf5=$withval, with_hdf5=yes) |
500 | |
501 hdf5_lib= | |
502 if test "$with_hdf5" = yes; then | |
503 hdf5_lib="hdf5" | |
504 elif test "$with_hdf5" != no; then | |
505 hdf5_lib="$with_hdf5" | |
506 fi | |
507 | |
508 HDF5_LIBS= | |
509 WITH_HDF5=false | |
510 if test -n "$hdf5_lib"; then | |
511 AC_CHECK_LIB($hdf5_lib, H5Pcreate, [ | |
3820 | 512 AC_CHECK_HEADERS(hdf5.h, [ |
5270 | 513 WITH_HDF5=true |
514 HDF5_LIBS="-l$hdf5_lib" | |
3820 | 515 LIBS="$HDF5_LIBS $LIBS" |
4696 | 516 AC_DEFINE(HAVE_HDF5, 1, [Define if HDF5 is available.]) |
517 AC_CHECK_LIB($hdf5_lib, H5Gget_num_objs, [ | |
5270 | 518 AC_DEFINE(HAVE_H5GGET_NUM_OBJS, 1, [Define if HDF5 has H5Gget_num_objs.])])])]) |
519 fi | |
520 | |
521 if $WITH_HDF5; then | |
6276 | 522 case "$canonical_host_type" in |
523 *-*-msdosmsvc) | |
524 OCTAVE_HDF5_DLL | |
525 ;; | |
526 esac | |
5270 | 527 true |
528 else | |
529 warn_hdf5="HDF5 library not found. Octave will not be able to save or load HDF5 data files." | |
6133 | 530 AC_MSG_WARN($warn_hdf5) |
5270 | 531 fi |
532 else | |
a313e928afb1
[project @ 2005-04-06 19:22:03 by dbateman]
dbateman |