1232
|
1 dnl aclocal.m4 -- extra macros for configuring Octave |
|
2 dnl |
2847
|
3 dnl Copyright (C) 1996, 1997 John W. Eaton |
1232
|
4 dnl |
|
5 dnl This file is part of Octave. |
|
6 dnl |
|
7 dnl Octave is free software; you can redistribute it and/or modify it |
|
8 dnl under the terms of the GNU General Public License as published by the |
|
9 dnl Free Software Foundation; either version 2, or (at your option) any |
|
10 dnl later version. |
|
11 dnl |
|
12 dnl Octave is distributed in the hope that it will be useful, but WITHOUT |
|
13 dnl ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
14 dnl FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
15 dnl for more details. |
|
16 dnl |
|
17 dnl You should have received a copy of the GNU General Public License |
|
18 dnl along with Octave; see the file COPYING. If not, write to the Free |
5307
|
19 dnl Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
|
20 dnl 02110-1301, USA. |
2548
|
21 dnl |
2813
|
22 dnl ---------------------------------------------------------------------- |
|
23 dnl |
|
24 dnl Figure out the hardware-vendor-os info. |
|
25 dnl |
|
26 dnl OCTAVE_HOST_TYPE |
|
27 AC_DEFUN(OCTAVE_HOST_TYPE, |
|
28 [AC_CANONICAL_HOST |
|
29 if test -z "$host"; then |
|
30 host=unknown |
|
31 fi |
|
32 canonical_host_type=$host |
|
33 if test "$host" = unknown; then |
|
34 AC_MSG_WARN([configuring Octave for unknown system type |
|
35 ]) |
|
36 fi |
3130
|
37 AC_SUBST(canonical_host_type)]) |
2813
|
38 dnl |
|
39 dnl Set default value for a variable and substitute it. |
|
40 dnl |
|
41 dnl OCTAVE_SET_DEFAULT |
|
42 AC_DEFUN(OCTAVE_SET_DEFAULT, |
3176
|
43 [ifelse($#, 2, [: ${$1=$2} |
2813
|
44 ])dnl |
|
45 AC_MSG_RESULT([defining $1 to be $$1]) |
|
46 AC_SUBST($1)]) |
|
47 dnl |
|
48 dnl |
|
49 dnl OCTAVE_CHECK_EXCLUSIVE_WITH_OPTIONS |
|
50 AC_DEFUN(OCTAVE_CHECK_EXCLUSIVE_WITH_OPTIONS, |
|
51 [if test "${with_$1+set}" = set; then |
|
52 if test "${with_$2+set}" = set; then |
|
53 if test "$with_$2" = no; then |
|
54 true |
|
55 else |
|
56 $3 |
|
57 fi |
|
58 fi |
|
59 fi]) |
|
60 dnl |
3130
|
61 dnl Check for ar. |
|
62 dnl |
|
63 AC_DEFUN(OCTAVE_PROG_AR, |
|
64 [if test -z "$AR"; then |
|
65 AR=ar |
|
66 fi |
|
67 AC_SUBST(AR) |
|
68 |
|
69 if test -z "$ARFLAGS"; then |
|
70 ARFLAGS="rc" |
|
71 fi |
|
72 AC_SUBST(ARFLAGS) |
|
73 ]) |
|
74 dnl |
2574
|
75 dnl See if the standard string class has npos as a member. |
|
76 dnl |
|
77 AC_DEFUN(OCTAVE_STRING_NPOS, |
|
78 [AC_CACHE_CHECK([whether including <string> defines NPOS], |
|
79 octave_cv_string_npos, |
3888
|
80 [AC_LANG_PUSH(C++) |
2574
|
81 AC_TRY_COMPILE([#include <string>], |
|
82 [size_t foo = NPOS], |
|
83 octave_cv_string_npos=yes, octave_cv_string_npos=no)]) |
|
84 if test $octave_cv_string_npos = no; then |
3887
|
85 AC_DEFINE(NPOS, [std::string::npos], [Define (to string::npos) if <string> doesn't]) |
2574
|
86 fi |
3888
|
87 AC_LANG_POP(C++) |
2574
|
88 ]) |
|
89 dnl |
4360
|
90 dnl See if the compiler supports placement delete |
|
91 dnl |
|
92 AC_DEFUN(OCTAVE_PLACEMENT_DELETE, |
|
93 [AC_CACHE_CHECK([whether <new> defines placement delete operator], |
|
94 octave_cv_placement_delete, |
|
95 [AC_LANG_PUSH(C++) |
|
96 AC_TRY_COMPILE([#include <new>], |
|
97 [operator delete((void *)0, (void *)0);], |
|
98 octave_cv_placement_delete=yes, octave_cv_placement_delete=no)]) |
|
99 if test $octave_cv_placement_delete = yes; then |
|
100 AC_DEFINE(HAVE_PLACEMENT_DELETE,1,[Define if C++ supports operator delete(void *, void *)]) |
|
101 fi |
|
102 AC_LANG_POP(C++) |
|
103 ]) |
|
104 dnl |
4366
|
105 dnl See if the compiler dynamic auto arrays |
|
106 dnl |
|
107 AC_DEFUN(OCTAVE_DYNAMIC_AUTO_ARRAYS, |
|
108 [AC_CACHE_CHECK([whether C++ supports dynamic auto arrays], |
|
109 octave_cv_dynamic_auto_arrays, |
|
110 [AC_LANG_PUSH(C++) |
|
111 AC_TRY_COMPILE(, |
|
112 [void test(char *); int length(); char x[length()]; test(x);], |
|
113 octave_cv_dynamic_auto_arrays=yes, octave_cv_dynamic_auto_arrays=no)]) |
|
114 if test $octave_cv_dynamic_auto_arrays = yes; then |
|
115 AC_DEFINE(HAVE_DYNAMIC_AUTO_ARRAYS,1,[Define if C++ supports dynamic auto arrays]) |
|
116 fi |
|
117 AC_LANG_POP(C++) |
|
118 ]) |
|
119 dnl |
1707
|
120 dnl The following test is from Karl Berry's Kpathseach library. I'm |
|
121 dnl including it here in case we someday want to make the use of |
|
122 dnl kpathsea optional. |
1708
|
123 dnl |
|
124 dnl Some BSD putenv's, e.g., FreeBSD, do malloc/free's on the environment. |
|
125 dnl This test program is due to Mike Hibler <mike@cs.utah.edu>. |
|
126 dnl We don't actually need to run this if we don't have putenv, but it |
|
127 dnl doesn't hurt. |
|
128 AC_DEFUN(OCTAVE_SMART_PUTENV, |
|
129 [AC_MSG_CHECKING(whether putenv uses malloc) |
1707
|
130 AC_CACHE_VAL(octave_cv_func_putenv_malloc, |
|
131 [AC_TRY_RUN([ |
|
132 #define VAR "YOW_VAR" |
|
133 #define STRING1 "GabbaGabbaHey" |
|
134 #define STRING2 "Yow!!" /* should be shorter than STRING1 */ |
|
135 extern char *getenv (); /* in case char* and int don't mix gracefully */ |
|
136 main () |
|
137 { |
|
138 char *str1, *rstr1, *str2, *rstr2; |
|
139 str1 = getenv (VAR); |
|
140 if (str1) |
|
141 exit (1); |
|
142 str1 = malloc (strlen (VAR) + 1 + strlen (STRING1) + 1); |
|
143 if (str1 == 0) |
|
144 exit (2); |
|
145 strcpy (str1, VAR); |
|
146 strcat (str1, "="); |
|
147 strcat (str1, STRING1); |
|
148 if (putenv (str1) < 0) |
|
149 exit (3); |
|
150 rstr1 = getenv (VAR); |
|
151 if (rstr1 == 0) |
|
152 exit (4); |
|
153 rstr1 -= strlen (VAR) + 1; |
|
154 if (strncmp (rstr1, VAR, strlen (VAR))) |
|
155 exit (5); |
|
156 str2 = malloc (strlen (VAR) + 1 + strlen (STRING2) + 1); |
|
157 if (str2 == 0 || str1 == str2) |
|
158 exit (6); |
|
159 strcpy (str2, VAR); |
|
160 strcat (str2, "="); |
|
161 strcat (str2, STRING2); |
|
162 if (putenv (str2) < 0) |
|
163 exit (7); |
|
164 rstr2 = getenv (VAR); |
|
165 if (rstr2 == 0) |
|
166 exit (8); |
|
167 rstr2 -= strlen (VAR) + 1; |
|
168 #if 0 |
|
169 printf ("rstr1=0x%x, rstr2=0x%x\n", rstr1, rstr2); |
|
170 /* |
|
171 * If string from first call was reused for the second call, |
|
172 * you had better not do a free on the first string! |
|
173 */ |
|
174 if (rstr1 == rstr2) |
|
175 printf ("#define SMART_PUTENV\n"); |
|
176 else |
|
177 printf ("#undef SMART_PUTENV\n"); |
|
178 #endif |
|
179 exit (rstr1 == rstr2 ? 0 : 1); |
|
180 }], octave_cv_func_putenv_malloc=yes, octave_cv_func_putenv_malloc=no, |
|
181 octave_cv_func_putenv_malloc=no)])dnl |
|
182 AC_MSG_RESULT($octave_cv_func_putenv_malloc) |
|
183 if test $octave_cv_func_putenv_malloc = yes; then |
3887
|
184 AC_DEFINE(SMART_PUTENV,1,[To quiet autoheader.]) |
1708
|
185 fi]) |
1788
|
186 dnl |
2469
|
187 dnl These two checks for signal functions were originally part of the |
|
188 dnl aclocal.m4 file distributed with bash 2.0. |
|
189 dnl |
|
190 dnl Check type of signal routines (posix, 4.2bsd, 4.1bsd or v7) |
|
191 AC_DEFUN(OCTAVE_SIGNAL_CHECK, |
|
192 [AC_REQUIRE([AC_TYPE_SIGNAL]) |
|
193 AC_MSG_CHECKING(for type of signal functions) |
|
194 AC_CACHE_VAL(octave_cv_signal_vintage, |
|
195 [ |
|
196 AC_TRY_LINK([#include <signal.h>],[ |
|
197 sigset_t ss; |
|
198 struct sigaction sa; |
|
199 sigemptyset(&ss); sigsuspend(&ss); |
|
200 sigaction(SIGINT, &sa, (struct sigaction *) 0); |
|
201 sigprocmask(SIG_BLOCK, &ss, (sigset_t *) 0); |
|
202 ], octave_cv_signal_vintage=posix, |
|
203 [ |
|
204 AC_TRY_LINK([#include <signal.h>], [ |
|
205 int mask = sigmask(SIGINT); |
|
206 sigsetmask(mask); sigblock(mask); sigpause(mask); |
|
207 ], octave_cv_signal_vintage=4.2bsd, |
|
208 [ |
|
209 AC_TRY_LINK([ |
|
210 #include <signal.h> |
|
211 RETSIGTYPE foo() { }], [ |
|
212 int mask = sigmask(SIGINT); |
|
213 sigset(SIGINT, foo); sigrelse(SIGINT); |
|
214 sighold(SIGINT); sigpause(SIGINT); |
2491
|
215 ], octave_cv_signal_vintage=svr3, octave_cv_signal_vintage=v7 |
2469
|
216 )] |
|
217 )] |
|
218 ) |
|
219 ]) |
|
220 AC_MSG_RESULT($octave_cv_signal_vintage) |
2491
|
221 if test "$octave_cv_signal_vintage" = posix; then |
3887
|
222 AC_DEFINE(HAVE_POSIX_SIGNALS,1,[Define if you have POSIX style signals.]) |
2491
|
223 elif test "$octave_cv_signal_vintage" = "4.2bsd"; then |
3887
|
224 AC_DEFINE(HAVE_BSD_SIGNALS,1,[Define if you have BSD style signals.]) |
2491
|
225 elif test "$octave_cv_signal_vintage" = svr3; then |
3887
|
226 AC_DEFINE(HAVE_USG_SIGHOLD,1,[Define if you have System V Release 3 signals.]) |
2469
|
227 fi |
|
228 ]) |
|
229 dnl |
|
230 AC_DEFUN(OCTAVE_REINSTALL_SIGHANDLERS, |
|
231 [AC_REQUIRE([AC_TYPE_SIGNAL]) |
|
232 AC_REQUIRE([OCTAVE_SIGNAL_CHECK]) |
|
233 AC_MSG_CHECKING([if signal handlers must be reinstalled when invoked]) |
|
234 AC_CACHE_VAL(octave_cv_must_reinstall_sighandlers, |
|
235 [AC_TRY_RUN([ |
|
236 #include <signal.h> |
|
237 #ifdef HAVE_UNISTD_H |
|
238 #include <unistd.h> |
|
239 #endif |
|
240 typedef RETSIGTYPE sigfunc(); |
|
241 int nsigint; |
|
242 #ifdef HAVE_POSIX_SIGNALS |
|
243 sigfunc * |
|
244 set_signal_handler(sig, handler) |
|
245 int sig; |
|
246 sigfunc *handler; |
|
247 { |
|
248 struct sigaction act, oact; |
|
249 act.sa_handler = handler; |
|
250 act.sa_flags = 0; |
|
251 sigemptyset (&act.sa_mask); |
|
252 sigemptyset (&oact.sa_mask); |
|
253 sigaction (sig, &act, &oact); |
|
254 return (oact.sa_handler); |
|
255 } |
|
256 #else |
|
257 #define set_signal_handler(s, h) signal(s, h) |
|
258 #endif |
|
259 RETSIGTYPE |
|
260 sigint(s) |
|
261 int s; |
|
262 { |
|
263 nsigint++; |
|
264 } |
|
265 main() |
|
266 { |
|
267 nsigint = 0; |
|
268 set_signal_handler(SIGINT, sigint); |
|
269 kill((int)getpid(), SIGINT); |
|
270 kill((int)getpid(), SIGINT); |
|
271 exit(nsigint != 2); |
|
272 } |
|
273 ], octave_cv_must_reinstall_sighandlers=no, octave_cv_must_reinstall_sighandlers=yes, |
3130
|
274 if test "$octave_cv_signal_vintage" = svr3; then |
|
275 octave_cv_must_reinstall_sighandlers=yes |
|
276 else |
|
277 octave_cv_must_reinstall_sighandlers=no |
|
278 fi)]) |
|
279 if test "$cross_compiling" = yes; then |
|
280 AC_MSG_RESULT([$octave_cv_must_reinstall_sighandlers assumed for cross compilation]) |
|
281 else |
|
282 AC_MSG_RESULT($octave_cv_must_reinstall_sighandlers) |
|
283 fi |
2491
|
284 if test "$octave_cv_must_reinstall_sighandlers" = yes; then |
3887
|
285 AC_DEFINE(MUST_REINSTALL_SIGHANDLERS,1,[Define if signal handlers must be reinstalled after they are called.]) |
2469
|
286 fi |
|
287 ]) |
2626
|
288 dnl |
3107
|
289 dnl Check to see if C++ compiler needs the new friend template declaration |
|
290 dnl syntax. |
|
291 dnl |
|
292 dnl OCTAVE_CXX_NEW_FRIEND_TEMPLATE_DECL |
|
293 AC_DEFUN(OCTAVE_CXX_NEW_FRIEND_TEMPLATE_DECL, [ |
|
294 AC_REQUIRE([AC_PROG_CXX]) |
|
295 AC_MSG_CHECKING([for C++ support for new friend template declaration]) |
|
296 AC_CACHE_VAL(octave_cv_cxx_new_friend_template_decl, [ |
3888
|
297 AC_LANG_PUSH(C++) |
3107
|
298 rm -f conftest.h |
|
299 cat > conftest.h <<EOB |
|
300 struct A { |
|
301 friend int operator== (const A&, const A&); |
|
302 A (int) { } |
|
303 }; |
|
304 |
|
305 template <class T> int |
|
306 operator== (const T&, const T&) |
|
307 { |
|
308 return 0; |
|
309 } |
|
310 EOB |
|
311 AC_TRY_LINK([#include "conftest.h"], [ |
|
312 A a (1); |
|
313 return a == A(1); |
|
314 ], |
|
315 octave_cv_cxx_new_friend_template_decl=no, |
|
316 octave_cv_cxx_new_friend_template_decl=yes |
|
317 ) |
3888
|
318 AC_LANG_POP(C++) |
3107
|
319 ]) |
|
320 AC_MSG_RESULT($octave_cv_cxx_new_friend_template_decl) |
|
321 if test $octave_cv_cxx_new_friend_template_decl = yes; then |
3887
|
322 AC_DEFINE(CXX_NEW_FRIEND_TEMPLATE_DECL,1,[Define if your compiler supports `<>' stuff for template friends.]) |
3107
|
323 fi |
|
324 ]) |
3126
|
325 dnl |
3233
|
326 dnl Check to see if C compiler handles FLAG command line option. If |
|
327 dnl two arguments are specified, execute the second arg as shell |
|
328 dnl commands. Otherwise, add FLAG to CFLAGS if the compiler accepts |
|
329 dnl the flag. |
3126
|
330 dnl |
|
331 dnl OCTAVE_CC_FLAG |
|
332 AC_DEFUN(OCTAVE_CC_FLAG, [ |
3908
|
333 ac_safe=`echo "$1" | sed 'y%./+-:=%__p___%'` |
3126
|
334 AC_MSG_CHECKING(whether ${CC-cc} accepts $1) |
|
335 AC_CACHE_VAL(octave_cv_cc_flag_$ac_safe, [ |
3888
|
336 AC_LANG_PUSH(C) |
3126
|
337 XCFLAGS="$CFLAGS" |
|
338 CFLAGS="$CFLAGS $1" |
5177
|
339 AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], |
3126
|
340 eval "octave_cv_cc_flag_$ac_safe=yes", |
|
341 eval "octave_cv_cc_flag_$ac_safe=no") |
|
342 CFLAGS="$XCFLAGS" |
3888
|
343 AC_LANG_POP(C) |
3126
|
344 ]) |
|
345 if eval "test \"`echo '$octave_cv_cc_flag_'$ac_safe`\" = yes"; then |
|
346 AC_MSG_RESULT(yes) |
3131
|
347 ifelse([$2], , [ |
|
348 CFLAGS="$CFLAGS $1" |
|
349 AC_MSG_RESULT([adding $1 to CFLAGS])], [$2]) |
3126
|
350 else |
|
351 AC_MSG_RESULT(no) |
|
352 ifelse([$3], , , [$3]) |
|
353 fi |
|
354 ]) |
|
355 dnl |
3233
|
356 dnl Check to see if C++ compiler handles FLAG command line option. If |
|
357 dnl two arguments are specified, execute the second arg as shell |
|
358 dnl commands. Otherwise, add FLAG to CXXFLAGS if the compiler accepts |
|
359 dnl the flag. |
3126
|
360 dnl |
|
361 dnl OCTAVE_CXX_FLAG |
|
362 AC_DEFUN(OCTAVE_CXX_FLAG, [ |
3908
|
363 ac_safe=`echo "$1" | sed 'y%./+-:=%__p___%'` |
3222
|
364 AC_MSG_CHECKING(whether ${CXX-g++} accepts $1) |
3126
|
365 AC_CACHE_VAL(octave_cv_cxx_flag_$ac_safe, [ |
3888
|
366 AC_LANG_PUSH(C++) |
3126
|
367 XCXXFLAGS="$CXXFLAGS" |
|
368 CXXFLAGS="$CXXFLAGS $1" |
5177
|
369 AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], |
3126
|
370 eval "octave_cv_cxx_flag_$ac_safe=yes", |
|
371 eval "octave_cv_cxx_flag_$ac_safe=no") |
|
372 CXXFLAGS="$XCXXFLAGS" |
3888
|
373 AC_LANG_POP(C++) |
3126
|
374 ]) |
|
375 if eval "test \"`echo '$octave_cv_cxx_flag_'$ac_safe`\" = yes"; then |
|
376 AC_MSG_RESULT(yes) |
3131
|
377 ifelse([$2], , [ |
|
378 CXXFLAGS="$CXXFLAGS $1" |
|
379 AC_MSG_RESULT([adding $1 to CXXFLAGS])], [$2]) |
3126
|
380 else |
|
381 AC_MSG_RESULT(no) |
|
382 ifelse([$3], , , [$3]) |
|
383 fi |
|
384 ]) |
3130
|
385 dnl |
5076
|
386 dnl Check to see if Fortran compiler handles FLAG command line option. If |
|
387 dnl two arguments are specified, execute the second arg as shell |
|
388 dnl commands. Otherwise, add FLAG to FFLAGS if the compiler accepts |
|
389 dnl the flag. |
|
390 dnl |
|
391 dnl OCTAVE_F77_FLAG |
|
392 AC_DEFUN(OCTAVE_F77_FLAG, [ |
|
393 ac_safe=`echo "$1" | sed 'y%./+-:=%__p___%'` |
|
394 AC_MSG_CHECKING(whether ${F77-g77} accepts $1) |
|
395 AC_CACHE_VAL(octave_cv_f77_flag_$ac_safe, [ |
|
396 AC_LANG_PUSH(Fortran 77) |
|
397 XFFLAGS="$FFLAGS" |
|
398 FFLAGS="$FFLAGS $1" |
5177
|
399 AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], |
5076
|
400 eval "octave_cv_f77_flag_$ac_safe=yes", |
|
401 eval "octave_cv_f77_flag_$ac_safe=no") |
|
402 FFLAGS="$XFFLAGS" |
|
403 AC_LANG_POP(Fortran 77) |
|
404 ]) |
|
405 if eval "test \"`echo '$octave_cv_f77_flag_'$ac_safe`\" = yes"; then |
|
406 AC_MSG_RESULT(yes) |
|
407 ifelse([$2], , [ |
|
408 FFLAGS="$FFLAGS $1" |
|
409 AC_MSG_RESULT([adding $1 to FFLAGS])], [$2]) |
|
410 else |
|
411 AC_MSG_RESULT(no) |
|
412 ifelse([$3], , , [$3]) |
|
413 fi |
|
414 ]) |
|
415 dnl |
3729
|
416 dnl Check for flex |
|
417 dnl |
|
418 AC_DEFUN(OCTAVE_PROG_FLEX, [ |
|
419 ### For now, don't define LEXLIB to be -lfl -- we don't use anything in |
|
420 ### it, and it might not be installed. |
|
421 ### |
|
422 ### Also make sure that we generate an interactive scanner if we are |
|
423 ### using flex. |
|
424 AC_PROG_LEX |
|
425 case "$LEX" in |
|
426 flex*) |
|
427 LFLAGS="-t -I" |
|
428 AC_MSG_RESULT([defining LFLAGS to be $LFLAGS]) |
|
429 LEXLIB= |
|
430 ;; |
|
431 *) |
|
432 LEX='$(top_srcdir)/missing flex' |
|
433 warn_flex="I didn't find flex, but it's only a problem if you need to reconstruct lex.cc" |
|
434 AC_MSG_WARN($warn_flex) |
|
435 ;; |
|
436 esac |
|
437 AC_SUBST(LFLAGS) |
|
438 ]) |
|
439 dnl |
|
440 dnl Check for bison |
|
441 dnl |
|
442 AC_DEFUN(OCTAVE_PROG_BISON, [ |
|
443 AC_PROG_YACC |
|
444 case "$YACC" in |
|
445 bison*) |
|
446 ;; |
|
447 *) |
|
448 YACC='$(top_srcdir)/missing bison' |
|
449 warn_bison="I didn't find bison, but it's only a problem if you need to reconstruct parse.cc" |
|
450 AC_MSG_WARN($warn_bison) |
|
451 ;; |
|
452 esac |
|
453 ]) |
|
454 dnl |
3130
|
455 dnl What pager should we use? |
|
456 dnl |
|
457 AC_DEFUN(OCTAVE_PROG_PAGER, |
|
458 [if test "$cross_compiling" = yes; then |
|
459 DEFAULT_PAGER=less |
|
460 AC_MSG_RESULT(assuming $DEFAULT_PAGER exists on $canonical_host_type host) |
|
461 AC_SUBST(DEFAULT_PAGER) |
|
462 else |
|
463 octave_possible_pagers="less more page pg" |
|
464 case "$canonical_host_type" in |
3971
|
465 *-*-cygwin*) |
3130
|
466 octave_possible_pagers="$octave_possible_pagers more.com" |
|
467 ;; |
|
468 esac |
|
469 |
|
470 AC_CHECK_PROGS(DEFAULT_PAGER, $octave_possible_pagers, []) |
|
471 if test -z "$DEFAULT_PAGER"; then |
|
472 warn_less="I couldn't find \`less', \`more', \`page', or \`pg'" |
|
473 AC_MSG_WARN($warn_less) |
|
474 fi |
|
475 fi |
|
476 ]) |
|
477 dnl |
|
478 dnl Does gnuplot exist? Is it a recent version? |
|
479 dnl |
4098
|
480 AC_DEFUN(OCTAVE_PROG_GNUPLOT, [ |
|
481 case "$canonical_host_type" in |
|
482 *-*-cygwin*|*-*-mingw32*) |
|
483 gp_names="pgnuplot pipe-gnuplot gnuplot" |
|
484 gp_default=pgnuplot |
|
485 ;; |
|
486 *) |
|
487 gp_names=gnuplot |
|
488 gp_default=gnuplot |
|
489 ;; |
|
490 esac |
|
491 GNUPLOT_HAS_FRAMES=1 |
|
492 if test "$cross_compiling" = yes; then |
3130
|
493 AC_MSG_RESULT(assuming $GNUPLOT_BINARY exists on $canonical_host_type host) |
|
494 AC_MSG_RESULT(assuming $GNUPLOT_BINARY supports multiple frams) |
|
495 else |
4098
|
496 AC_CHECK_PROGS(GNUPLOT_BINARY, $gp_names) |
3130
|
497 if test -n "$GNUPLOT_BINARY"; then |
|
498 AC_MSG_CHECKING([to see if your gnuplot supports multiplot]) |
|
499 if test -z "`echo 'set term unknown; set multiplot' | \ |
|
500 $GNUPLOT_BINARY 2>&1`"; then |
|
501 AC_MSG_RESULT([yes]) |
|
502 else |
|
503 AC_MSG_RESULT([no]) |
|
504 fi |
|
505 AC_MSG_CHECKING([to see if your gnuplot supports multiple plot windows]) |
|
506 if test -z "`echo 'set term x11 2' | $GNUPLOT_BINARY 2>&1`"; then |
|
507 AC_MSG_RESULT([yes]) |
|
508 else |
4098
|
509 GNUPLOT_HAS_FRAMES= |
3130
|
510 AC_MSG_RESULT([no]) |
|
511 fi |
|
512 else |
|
513 warn_gnuplot="yes" |
|
514 |
5076
|
515 GNUPLOT_BINARY="$gp_default" |
|
516 |
3130
|
517 ## If you change this text, be sure to also copy it to the set of |
|
518 ## warnings at the end of the script |
|
519 |
|
520 AC_MSG_WARN([I didn't find gnuplot. It isn't necessary to have gnuplot]) |
|
521 AC_MSG_WARN([installed, but you won't be able to use any of Octave's]) |
|
522 AC_MSG_WARN([plotting commands without it.]) |
|
523 AC_MSG_WARN([]) |
|
524 AC_MSG_WARN([If gnuplot is installed but it isn't in your path, you can]) |
|
525 AC_MSG_WARN([tell Octave where to find it by typing the command]) |
|
526 AC_MSG_WARN([]) |
|
527 AC_MSG_WARN([gnuplot_binary = "/full/path/to/gnuplot/binary"]) |
|
528 AC_MSG_WARN([]) |
|
529 AC_MSG_WARN([at the Octave prompt.]) |
5076
|
530 AC_MSG_WARN([]) |
|
531 AC_MSG_WARN([Setting default value to $GNUPLOT_BINARY]) |
3130
|
532 fi |
|
533 fi |
4098
|
534 AC_DEFINE_UNQUOTED(GNUPLOT_BINARY, "$GNUPLOT_BINARY", [Name of gnuplot program.]) |
|
535 AC_DEFINE_UNQUOTED(GNUPLOT_HAS_FRAMES, $GNUPLOT_HAS_FRAMES, [Define if your gnuplot program supports multiple plot windows.]) |
3130
|
536 ]) |
|
537 dnl |
|
538 dnl Is DejaGNU installed? |
|
539 dnl |
3222
|
540 dnl OCTAVE_PROG_RUNTEST |
3130
|
541 AC_DEFUN(OCTAVE_PROG_RUNTEST, |
|
542 [if test "$cross_compiling" = yes; then |
|
543 RUNTEST=runtest |
|
544 AC_MSG_RESULT(assuming $RUNTEST exists on $canonical_host_type host) |
|
545 AC_SUBST(RUNTEST) |
|
546 else |
|
547 AC_CHECK_PROG(RUNTEST, runtest, runtest, []) |
|
548 if test -z "$RUNTEST"; then |
|
549 warn_runtest="I didn't find runtest -- install DejaGNU if you want to run \`make check'" |
|
550 AC_MSG_WARN($warn_runtest) |
|
551 fi |
|
552 AC_SUBST(RUNTEST) |
|
553 fi |
|
554 ]) |
3222
|
555 dnl |
3673
|
556 dnl Is gperf installed? |
|
557 dnl |
|
558 dnl OCTAVE_PROG_GPERF |
3731
|
559 AC_DEFUN(OCTAVE_PROG_GPERF, [ |
|
560 AC_CHECK_PROG(GPERF, gperf, gperf, []) |
|
561 if test -n "$GPERF"; then |
|
562 if echo "%{ |
4416
|
563 enum octave_kw_id { a_kw }; |
3731
|
564 %} |
4416
|
565 struct octave_kw { const char *name; int tok; octave_kw_id kw_id; }; |
3731
|
566 %% |
5094
|
567 foo" | $GPERF -t -C -D -E -G -L C++ -H octave_kw_hash -N octave_kw_lookup > /dev/null 2>&1; then |
3731
|
568 true |
|
569 else |
|
570 GPERF="" |
5094
|
571 warn_gperf="I found gperf, but it does not support all of the following options: -t -C -D -E -G -L C++ -H -N; you need gperf 3.0.1 or a more recent version" |
3731
|
572 AC_MSG_WARN($warn_gperf) |
|
573 fi |
|
574 else |
|
575 GPERF='$(top_srcdir)/missing gperf' |
|
576 warn_gperf="I didn't find gperf, but it's only a problem if you need to reconstruct oct-gperf.h" |
|
577 AC_MSG_WARN($warn_gperf) |
|
578 fi |
|
579 AC_SUBST(GPERF) |
3673
|
580 ]) |
|
581 dnl |
3222
|
582 dnl Find nm. |
|
583 dnl |
|
584 dnl OCTAVE_PROG_NM |
|
585 AC_DEFUN(OCTAVE_PROG_NM, |
4093
|
586 [AC_CHECK_PROG(NM, ${ac_tool_prefix}nm, ${ac_tool_prefix}nm, []) |
3222
|
587 AC_SUBST(NM) |
|
588 ]) |
|
589 dnl |
|
590 dnl See if the C++ compiler prepends an underscore to external names. |
|
591 dnl |
|
592 dnl OCTAVE_CXX_PREPENDS_UNDERSCORE |
4093
|
593 AC_DEFUN(OCTAVE_CXX_PREPENDS_UNDERSCORE, [ |
|
594 AC_REQUIRE([OCTAVE_PROG_NM]) |
|
595 AC_MSG_CHECKING([whether ${CXX-g++} prepends an underscore to external names]) |
3222
|
596 AC_CACHE_VAL(octave_cv_cxx_prepends_underscore, |
|
597 [octave_cv_cxx_prepends_underscore=no |
3888
|
598 AC_LANG_PUSH(C++) |
3222
|
599 cat > conftest.$ac_ext <<EOF |
3842
|
600 bool FSmy_dld_fcn (void) { return false; } |
3222
|
601 EOF |
|
602 if AC_TRY_EVAL(ac_compile); then |
|
603 if test "`${NM-nm} conftest.o | grep _FSmy_dld_fcn`" != ""; then |
|
604 octave_cv_cxx_prepends_underscore=yes |
|
605 fi |
|
606 else |
3888
|
607 echo "configure: failed program was:" >&AS_MESSAGE_LOG_FD |
|
608 cat conftest.$ac_ext >&AS_MESSAGE_LOG_FD |
3222
|
609 fi |
3888
|
610 AC_LANG_POP(C++) |
4105
|
611 ### XXX FIXME XXX -- Ignore test result on Windows. Yes it prepends |
|
612 ### underscore, but LoadLibrary ignores it automatically. The |
4102
|
613 ### correct test is to build the shared library then try to grab the |
|
614 ### symbol from it with and without underscore. |
|
615 case "$canonical_host_type" in |
4105
|
616 *-*-cygwin* | *-*-mingw*) |
4102
|
617 octave_cv_cxx_prepends_underscore=no |
|
618 ;; |
4162
|
619 ### XXX FIXME XXX -- Ignore test result on OS X. Yes it prepends |
|
620 ### underscore, but also messes with the name so test fails (incorrectly). |
4685
|
621 *-*-darwin*) |
4162
|
622 octave_cv_cxx_prepends_underscore=yes |
|
623 ;; |
4102
|
624 esac |
3222
|
625 ]) |
|
626 AC_MSG_RESULT($octave_cv_cxx_prepends_underscore) |
|
627 if test $octave_cv_cxx_prepends_underscore = yes; then |
3887
|
628 AC_DEFINE(CXX_PREPENDS_UNDERSCORE, 1, [Define if your compiler prepends underscores to external names.]) |
3222
|
629 fi |
|
630 ]) |
3769
|
631 dnl |
|
632 dnl See if the C++ library is ISO compliant. |
|
633 dnl FIXME: This is obviously very simplistic, and trivially fooled. |
|
634 dnl |
|
635 dnl OCTAVE_CXX_ISO_COMPLIANT_LIBRARY |
|
636 AC_DEFUN(OCTAVE_CXX_ISO_COMPLIANT_LIBRARY, [ |
|
637 AC_REQUIRE([AC_PROG_CXX]) |
|
638 AC_MSG_CHECKING([if C++ library is ISO compliant]) |
|
639 AC_CACHE_VAL(octave_cv_cxx_iso_compliant_library, [ |
3888
|
640 AC_LANG_PUSH(C++) |
3769
|
641 rm -f conftest.h |
3943
|
642 ### Omitting cwctype for now, since it is broken with gcc-3.0.x and |
|
643 ### possibly other versions... |
3769
|
644 for inc in algorithm bitset cassert cctype cerrno cfloat ciso646 \ |
|
645 climits clocale cmath complex csetjmp csignal cstdarg cstddef \ |
3943
|
646 cstdio cstdlib cstring ctime cwchar deque exception \ |
3769
|
647 fstream functional iomanip ios iosfwd iostream istream iterator \ |
|
648 limits list locale map memory new numeric ostream queue set \ |
|
649 sstream stack stdexcept streambuf string strstream typeinfo \ |
|
650 utility valarray vector; do |
|
651 echo "#include <$inc>" >> conftest.h |
|
652 done |
|
653 AC_TRY_LINK([#include "conftest.h"], [ |
|
654 std::bitset<50> flags; |
|
655 flags.set(); |
|
656 int digits = std::numeric_limits<unsigned long>::digits; |
|
657 digits = 0; |
|
658 ], |
|
659 octave_cv_cxx_iso_compliant_library=yes, |
|
660 octave_cv_cxx_iso_compliant_library=no |
|
661 ) |
3888
|
662 AC_LANG_POP(C++) |
3769
|
663 ]) |
|
664 AC_MSG_RESULT($octave_cv_cxx_iso_compliant_library) |
|
665 if test $octave_cv_cxx_iso_compliant_library = yes; then |
3887
|
666 AC_DEFINE(CXX_ISO_COMPLIANT_LIBRARY, 1, [Define if your C++ runtime library is ISO compliant.]) |
3769
|
667 fi |
|
668 ]) |
3822
|
669 dnl |
|
670 dnl Allow the user disable support for command line editing using GNU |
|
671 dnl readline. |
|
672 dnl |
|
673 dnl OCTAVE_ENABLE_READLINE |
|
674 AC_DEFUN(OCTAVE_ENABLE_READLINE, [ |
|
675 USE_READLINE=true |
4102
|
676 LIBREADLINE= |
3822
|
677 AC_ARG_ENABLE(readline, |
|
678 [ --enable-readline use readline library (default is yes)], |
|
679 [if test "$enableval" = no; then |
3824
|
680 USE_READLINE=false |
3825
|
681 warn_readline="command editing and history features require GNU Readline" |
3824
|
682 fi]) |
3822
|
683 if $USE_READLINE; then |
|
684 AC_CHECK_LIB(readline, rl_set_keyboard_input_timeout, [ |
4102
|
685 LIBREADLINE="-lreadline" |
|
686 LIBS="$LIBREADLINE $LIBS" |
3887
|
687 AC_DEFINE(USE_READLINE, 1, [Define to use the readline library.]) |
3822
|
688 ], [ |
3824
|
689 AC_MSG_WARN([I need GNU Readline 4.2 or later]) |
|
690 AC_MSG_ERROR([this is fatal unless you specify --disable-readline]) |
3822
|
691 ]) |
|
692 fi |
4102
|
693 AC_SUBST(LIBREADLINE) |
3822
|
694 ]) |
3842
|
695 dnl |
|
696 dnl Determine the C++ compiler ABI. It sets the macro CXX_ABI to the |
|
697 dnl name of the ABI, and is used to mangle the C linkage loadable |
|
698 dnl functions to avoid ABI mismatch. GNU C++ currently uses gnu_v2 |
|
699 dnl (GCC versions <= 2.95.x) dnl or gnu_v3 (GCC versions >= 3.0). |
|
700 dnl Set to "unknown" is when we don't know enough about the ABI, which |
|
701 dnl will happen when using an unsupported C++ compiler. |
|
702 dnl |
|
703 dnl OCTAVE_CXX_ABI |
4093
|
704 AC_DEFUN(OCTAVE_CXX_ABI, [ |
|
705 AC_REQUIRE([OCTAVE_PROG_NM]) |
|
706 AC_MSG_CHECKING([C++ ABI version used by ${CXX}]) |
3842
|
707 AC_CACHE_VAL(octave_cv_cxx_abi, |
|
708 [octave_cv_cxx_abi='unknown' |
3888
|
709 AC_LANG_PUSH(C++) |
3842
|
710 cat > conftest.$ac_ext <<EOF |
|
711 bool FSmy_dld_fcn (void) { return false; } |
|
712 EOF |
|
713 if AC_TRY_EVAL(ac_compile); then |
|
714 if test "`${NM-nm} conftest.o | grep FSmy_dld_fcn__Fv`" != ""; then |
|
715 octave_cv_cxx_abi='gnu_v2' |
|
716 fi |
|
717 if test "`${NM-nm} conftest.o | grep _Z12FSmy_dld_fcnv`" != ""; then |
|
718 octave_cv_cxx_abi='gnu_v3' |
|
719 fi |
|
720 if test "`${NM-nm} conftest.o | grep __1cMFSmy_dld_fcn6F_b_`" != ""; then |
3843
|
721 octave_cv_cxx_abi='sun_v5' |
3842
|
722 fi |
|
723 else |
3888
|
724 echo "configure: failed program was:" >&AS_MESSAGE_LOG_FD |
|
725 cat conftest.$ac_ext >&AS_MESSAGE_LOG_FD |
3842
|
726 fi |
3888
|
727 AC_LANG_POP(C++) |
3842
|
728 ]) |
|
729 AC_MSG_RESULT($octave_cv_cxx_abi) |
3887
|
730 AC_DEFINE_UNQUOTED(CXX_ABI, $octave_cv_cxx_abi, [Define to the C++ ABI your compiler uses.]) |
3842
|
731 ]) |
4067
|
732 dnl |
|
733 dnl Determine if mkdir accepts only one argument instead dnl of the usual 2. |
|
734 dnl |
|
735 AC_DEFUN(OCTAVE_MKDIR_TAKES_ONE_ARG, |
|
736 [AC_CACHE_CHECK([if mkdir takes one argument], octave_cv_mkdir_takes_one_arg, |
|
737 [AC_TRY_COMPILE([ |
|
738 #include <sys/types.h> |
|
739 #ifdef HAVE_SYS_STAT_H |
|
740 # include <sys/stat.h> |
|
741 #endif |
|
742 #ifdef HAVE_UNISTD_H |
|
743 # include <unistd.h> |
|
744 #endif |
|
745 #ifdef HAVE_DIRECT_H |
|
746 # include <direct.h> |
|
747 #endif], [mkdir ("foo", 0);], |
|
748 octave_cv_mkdir_takes_one_arg=no, octave_cv_mkdir_takes_one_arg=yes)]) |
|
749 if test $octave_cv_mkdir_takes_one_arg = yes ; then |
|
750 AC_DEFINE(MKDIR_TAKES_ONE_ARG, 1, [Define if host mkdir takes a single argument.]) |
|
751 fi |
|
752 ]) |
4084
|
753 # OCTAVE_PROG_SED |
|
754 # -------------- |
|
755 # Check for a fully-functional sed program, that truncates |
|
756 # as few characters as possible. Prefer GNU sed if found. |
|
757 AC_DEFUN([OCTAVE_PROG_SED], |
|
758 [AC_MSG_CHECKING([for a sed that does not truncate output]) |
|
759 if test -z "$SED"; then |
|
760 AC_CACHE_VAL(ac_cv_path_sed, |
|
761 [# Loop through the user's path and test for sed and gsed. |
|
762 # Then use that list of sed's as ones to test for truncation. |
|
763 _AS_PATH_WALK([$PATH], |
|
764 [for ac_prog in sed gsed; do |
|
765 for ac_exec_ext in '' $ac_executable_extensions; do |
|
766 if AS_EXECUTABLE_P(["$as_dir/$ac_prog$ac_exec_ext"]); then |
|
767 _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext" |
|
768 fi |
|
769 done |
|
770 done |
|
771 ]) |
|
772 AS_TMPDIR(sed) |
|
773 _max=0 |
|
774 _count=0 |
|
775 # Add /usr/xpg4/bin/sed as it is typically found on Solaris |
|
776 # along with /bin/sed that truncates output. |
|
777 for _sed in $_sed_list /usr/xpg4/bin/sed; do |
|
778 test ! -f ${_sed} && break |
|
779 cat /dev/null > "$tmp/sed.in" |
|
780 _count=0 |
|
781 echo $ECHO_N "0123456789$ECHO_C" >"$tmp/sed.in" |
|
782 # Check for GNU sed and select it if it is found. |
|
783 if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; |
|
784 then |
|
785 octave_cv_path_sed=${_sed} |
|
786 break; |
|
787 fi |
|
788 while true; do |
|
789 cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp" |
|
790 mv "$tmp/sed.tmp" "$tmp/sed.in" |
|
791 cp "$tmp/sed.in" "$tmp/sed.nl" |
|
792 echo >>"$tmp/sed.nl" |
|
793 ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break |
|
794 cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break |
|
795 # 10000 chars as input seems more than enough |
|
796 test $_count -gt 10 && break |
|
797 _count=`expr $_count + 1` |
|
798 if test $_count -gt $_max; then |
|
799 _max=$_count |
|
800 octave_cv_path_sed=$_sed |
|
801 fi |
|
802 done |
|
803 done |
|
804 rm -rf "$tmp" |
|
805 ]) |
|
806 fi |
|
807 AC_SUBST([SED], $octave_cv_path_sed) |
|
808 AC_MSG_RESULT([$SED]) |
|
809 ]) |
5465
|
810 dnl |
|
811 dnl Find Perl. |
|
812 dnl |
|
813 dnl OCTAVE_PROG_PERL |
|
814 AC_DEFUN(OCTAVE_PROG_PERL, |
5468
|
815 [AC_CHECK_PROG(PERL, perl, perl, []) |
5465
|
816 AC_SUBST(PERL) |
|
817 ]) |
5468
|
818 dnl |
5495
|
819 dnl Find Python. |
|
820 dnl |
|
821 dnl OCTAVE_PROG_PYTHON |
|
822 AC_DEFUN(OCTAVE_PROG_PYTHON, |
|
823 [AC_CHECK_PROG(PYTHON, python, python, []) |
|
824 AC_SUBST(PYTHON) |
|
825 ]) |
|
826 dnl |
5468
|
827 dnl Find desktop-file-install. |
|
828 dnl |
|
829 dnl OCTAVE_PROG_DESKTOP_FILE_INSTALL |
|
830 AC_DEFUN(OCTAVE_PROG_DESKTOP_FILE_INSTALL, |
|
831 [AC_CHECK_PROG(DESKTOP_FILE_INSTALL, desktop-file-install, desktop-file-install, []) |
|
832 AC_SUBST(DESKTOP_FILE_INSTALL) |
|
833 ]) |
|
834 dnl |
|
835 dnl Check for IEEE 754 data format. |
|
836 dnl |
4853
|
837 AC_DEFUN([OCTAVE_IEEE754_DATA_FORMAT], |
|
838 [AC_MSG_CHECKING([for IEEE 754 data format]) |
|
839 AC_CACHE_VAL(octave_cv_ieee754_data_format, |
|
840 [AC_TRY_RUN([ |
|
841 int |
|
842 main (void) |
|
843 { |
|
844 typedef union { unsigned char c[8]; double d; } ieeebytes; |
|
845 |
|
846 ieeebytes l = {0x1c, 0xbc, 0x6e, 0xf2, 0x54, 0x8b, 0x11, 0x43}; |
|
847 ieeebytes b = {0x43, 0x11, 0x8b, 0x54, 0xf2, 0x6e, 0xbc, 0x1c}; |
|
848 |
|
849 return l.d != 1234567891234567.0 && b.d != 1234567891234567.0; |
|
850 }], |
|
851 octave_cv_ieee754_data_format=yes, |
|
852 octave_cv_ieee754_data_format=no, |
|
853 octave_cv_ieee754_data_format=no)]) |
|
854 if test "$cross_compiling" = yes; then |
|
855 AC_MSG_RESULT([$octave_cv_ieee754_data_format assumed for cross compilation]) |
|
856 else |
|
857 AC_MSG_RESULT($octave_cv_ieee754_data_format) |
|
858 fi |
|
859 if test "$octave_cv_ieee754_data_format" = yes; then |
|
860 AC_DEFINE(HAVE_IEEE754_DATA_FORMAT, 1, [Define if your system uses IEEE 754 data format.]) |
|
861 fi |
|
862 ]) |
5505
|
863 dnl |
|
864 dnl Check for UMFPACK seperately split complex matrix and RHS. Note |
|
865 dnl that as umfpack.h can be in three different places, rather than |
|
866 dnl include it, just declare the functions needed. |
|
867 dnl |
5512
|
868 dnl Assumes that the check for umfpack has already been performed. |
5505
|
869 dnl |
|
870 AC_DEFUN([OCTAVE_UMFPACK_SEPERATE_SPLIT], |
|
871 [AC_MSG_CHECKING([for UMFPACK seperate complex matrix and rhs split]) |
|
872 AC_CACHE_VAL(octave_cv_umfpack_seperate_split, |
|
873 [AC_TRY_RUN([ |
|
874 #include <stdlib.h> |
5512
|
875 #if defined (HAVE_UFSPARSE_UMFPACK_h) |
|
876 #include <ufsparse/umfpack.h> |
|
877 #elif defined (HAVE_UMFPACK_UMFPACK_H) |
|
878 #include <umfpack/umfpack.h> |
|
879 #elif defined (HAVE_UMFPACK_H) |
|
880 #include <umfpack.h> |
|
881 #endif |
5505
|
882 int n = 5; |
|
883 int Ap[] = {0, 2, 5, 9, 10, 12}; |
|
884 int Ai[] = {0, 1, 0, 2, 4, 1, 2, 3, 4, 2, 1, 4}; |
|
885 double Ax[] = {2., 0., 3., 0., 3., 0., -1., 0., 4., 0., 4., 0., |
|
886 -3., 0., 1., 0., 2., 0., 2., 0., 6., 0., 1., 0.}; |
|
887 double br[] = {8., 45., -3., 3., 19.}; |
|
888 double bi[] = {0., 0., 0., 0., 0.}; |
|
889 int main (void) |
|
890 { |
|
891 double *null = (double *) NULL ; |
|
892 double *x = (double *)malloc (2 * n * sizeof(double)); |
|
893 int i ; |
|
894 void *Symbolic, *Numeric ; |
|
895 (void) umfpack_zi_symbolic (n, n, Ap, Ai, Ax, null, &Symbolic, null, null) ; |
|
896 (void) umfpack_zi_numeric (Ap, Ai, Ax, null, Symbolic, &Numeric, null, null) ; |
|
897 umfpack_zi_free_symbolic (&Symbolic) ; |
|
898 (void) umfpack_zi_solve (0, Ap, Ai, Ax, null, x, null, br, bi, |
|
899 Numeric, null, null) ; |
|
900 umfpack_zi_free_numeric (&Numeric) ; |
|
901 for (i = 0; i < n; i++, x+=2) |
|
902 if (fabs(*x - i - 1.) > 1.e-13) |
|
903 return (1); |
|
904 return (0) ; |
|
905 } |
|
906 ], |
|
907 octave_cv_umfpack_seperate_split=yes, |
|
908 octave_cv_umfpack_seperate_split=no, |
|
909 octave_cv_umfpack_seperate_split=no)]) |
|
910 if test "$cross_compiling" = yes; then |
|
911 AC_MSG_RESULT([$octave_cv_umfpack_seperate_split assumed for cross compilation]) |
|
912 else |
|
913 AC_MSG_RESULT($octave_cv_umfpack_seperate_split) |
|
914 fi |
|
915 if test "$octave_cv_umfpack_seperate_split" = yes; then |
|
916 AC_DEFINE(UMFPACK_SEPARATE_SPLIT, 1, [Define if the UMFPACK Complex solver allow matrix and RHS to be split independently]) |
|
917 fi |
|
918 ]) |