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