Mercurial > hg > octave-jordi
annotate aclocal.m4 @ 8659:9792c26bffc7
configure: check whether qhull works
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Wed, 04 Feb 2009 10:18:20 +0100 |
parents | bef8f001032f |
children | 22462fd58e66 |
rev | line source |
---|---|
1232 | 1 dnl aclocal.m4 -- extra macros for configuring Octave |
2 dnl | |
7017 | 3 dnl Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, |
4 dnl 2003, 2004, 2005, 2006, 2007 John W. Eaton | |
1232 | 5 dnl |
6 dnl This file is part of Octave. | |
7 dnl | |
8 dnl Octave is free software; you can redistribute it and/or modify it | |
9 dnl under the terms of the GNU General Public License as published by the | |
7016 | 10 dnl Free Software Foundation; either version 3 of the License, or (at |
11 dnl your option) any later version. | |
1232 | 12 dnl |
13 dnl Octave is distributed in the hope that it will be useful, but WITHOUT | |
14 dnl ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
15 dnl FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
16 dnl for more details. | |
17 dnl | |
18 dnl You should have received a copy of the GNU General Public License | |
7016 | 19 dnl along with Octave; see the file COPYING. If not, see |
20 dnl <http://www.gnu.org/licenses/>. | |
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 | |
3130 | 48 dnl Check for ar. |
49 dnl | |
50 AC_DEFUN(OCTAVE_PROG_AR, | |
51 [if test -z "$AR"; then | |
52 AR=ar | |
53 fi | |
54 AC_SUBST(AR) | |
55 | |
56 if test -z "$ARFLAGS"; then | |
57 ARFLAGS="rc" | |
58 fi | |
59 AC_SUBST(ARFLAGS) | |
60 ]) | |
61 dnl | |
4360 | 62 dnl See if the compiler supports placement delete |
63 dnl | |
64 AC_DEFUN(OCTAVE_PLACEMENT_DELETE, | |
65 [AC_CACHE_CHECK([whether <new> defines placement delete operator], | |
66 octave_cv_placement_delete, | |
67 [AC_LANG_PUSH(C++) | |
5844 | 68 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <new>]], |
69 [[operator delete((void *)0, (void *)0);]])], | |
4360 | 70 octave_cv_placement_delete=yes, octave_cv_placement_delete=no)]) |
71 if test $octave_cv_placement_delete = yes; then | |
72 AC_DEFINE(HAVE_PLACEMENT_DELETE,1,[Define if C++ supports operator delete(void *, void *)]) | |
73 fi | |
74 AC_LANG_POP(C++) | |
75 ]) | |
76 dnl | |
4366 | 77 dnl See if the compiler dynamic auto arrays |
78 dnl | |
79 AC_DEFUN(OCTAVE_DYNAMIC_AUTO_ARRAYS, | |
80 [AC_CACHE_CHECK([whether C++ supports dynamic auto arrays], | |
81 octave_cv_dynamic_auto_arrays, | |
82 [AC_LANG_PUSH(C++) | |
5844 | 83 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], |
84 [[void test(char *); int length(); char x[length()]; test(x);]])], | |
4366 | 85 octave_cv_dynamic_auto_arrays=yes, octave_cv_dynamic_auto_arrays=no)]) |
86 if test $octave_cv_dynamic_auto_arrays = yes; then | |
87 AC_DEFINE(HAVE_DYNAMIC_AUTO_ARRAYS,1,[Define if C++ supports dynamic auto arrays]) | |
88 fi | |
89 AC_LANG_POP(C++) | |
90 ]) | |
91 dnl | |
7058 | 92 dnl Check for broken strptime |
93 dnl | |
94 AC_DEFUN(OCTAVE_STRPTIME_BROKEN, | |
95 [AC_CACHE_CHECK([whether strptime is broken], | |
96 octave_cv_strptime_broken, | |
97 [AC_LANG_PUSH(C) | |
98 AC_RUN_IFELSE([AC_LANG_PROGRAM([[ | |
99 #define _XOPEN_SOURCE | |
100 #if defined (HAVE_SYS_TYPES_H) | |
101 #include <sys/types.h> | |
102 #if defined (HAVE_UNISTD_H) | |
103 #include <unistd.h> | |
104 #endif | |
105 #endif | |
106 #include <stdio.h> | |
107 #include <time.h> | |
108 ]], [[ | |
109 struct tm t; | |
110 char *q = strptime ("09/13", "%m/%d/%y", &t); | |
111 return q ? 1 : 0; | |
112 ]])], [octave_cv_strptime_broken=no], [octave_cv_strptime_broken=yes])]) | |
113 if test $octave_cv_strptime_broken = yes; then | |
114 AC_DEFINE(OCTAVE_HAVE_BROKEN_STRPTIME, 1, [Define if strptime is broken on your system]) | |
115 fi | |
116 AC_LANG_POP(C) | |
117 ]) | |
118 dnl | |
1707 | 119 dnl The following test is from Karl Berry's Kpathseach library. I'm |
120 dnl including it here in case we someday want to make the use of | |
121 dnl kpathsea optional. | |
1708 | 122 dnl |
123 dnl Some BSD putenv's, e.g., FreeBSD, do malloc/free's on the environment. | |
124 dnl This test program is due to Mike Hibler <mike@cs.utah.edu>. | |
125 dnl We don't actually need to run this if we don't have putenv, but it | |
126 dnl doesn't hurt. | |
127 AC_DEFUN(OCTAVE_SMART_PUTENV, | |
128 [AC_MSG_CHECKING(whether putenv uses malloc) | |
1707 | 129 AC_CACHE_VAL(octave_cv_func_putenv_malloc, |
5844 | 130 [AC_RUN_IFELSE([AC_LANG_SOURCE([[ |
1707 | 131 #define VAR "YOW_VAR" |
132 #define STRING1 "GabbaGabbaHey" | |
133 #define STRING2 "Yow!!" /* should be shorter than STRING1 */ | |
134 extern char *getenv (); /* in case char* and int don't mix gracefully */ | |
135 main () | |
136 { | |
137 char *str1, *rstr1, *str2, *rstr2; | |
138 str1 = getenv (VAR); | |
139 if (str1) | |
140 exit (1); | |
141 str1 = malloc (strlen (VAR) + 1 + strlen (STRING1) + 1); | |
142 if (str1 == 0) | |
143 exit (2); | |
144 strcpy (str1, VAR); | |
145 strcat (str1, "="); | |
146 strcat (str1, STRING1); | |
147 if (putenv (str1) < 0) | |
148 exit (3); | |
149 rstr1 = getenv (VAR); | |
150 if (rstr1 == 0) | |
151 exit (4); | |
152 rstr1 -= strlen (VAR) + 1; | |
153 if (strncmp (rstr1, VAR, strlen (VAR))) | |
154 exit (5); | |
155 str2 = malloc (strlen (VAR) + 1 + strlen (STRING2) + 1); | |
156 if (str2 == 0 || str1 == str2) | |
157 exit (6); | |
158 strcpy (str2, VAR); | |
159 strcat (str2, "="); | |
160 strcat (str2, STRING2); | |
161 if (putenv (str2) < 0) | |
162 exit (7); | |
163 rstr2 = getenv (VAR); | |
164 if (rstr2 == 0) | |
165 exit (8); | |
166 rstr2 -= strlen (VAR) + 1; | |
167 #if 0 | |
168 printf ("rstr1=0x%x, rstr2=0x%x\n", rstr1, rstr2); | |
169 /* | |
170 * If string from first call was reused for the second call, | |
171 * you had better not do a free on the first string! | |
172 */ | |
173 if (rstr1 == rstr2) | |
174 printf ("#define SMART_PUTENV\n"); | |
175 else | |
176 printf ("#undef SMART_PUTENV\n"); | |
177 #endif | |
178 exit (rstr1 == rstr2 ? 0 : 1); | |
5844 | 179 }]])], octave_cv_func_putenv_malloc=yes, octave_cv_func_putenv_malloc=no, |
1707 | 180 octave_cv_func_putenv_malloc=no)])dnl |
181 AC_MSG_RESULT($octave_cv_func_putenv_malloc) | |
182 if test $octave_cv_func_putenv_malloc = yes; then | |
3887 | 183 AC_DEFINE(SMART_PUTENV,1,[To quiet autoheader.]) |
1708 | 184 fi]) |
1788 | 185 dnl |
2469 | 186 dnl These two checks for signal functions were originally part of the |
187 dnl aclocal.m4 file distributed with bash 2.0. | |
188 dnl | |
189 dnl Check type of signal routines (posix, 4.2bsd, 4.1bsd or v7) | |
190 AC_DEFUN(OCTAVE_SIGNAL_CHECK, | |
191 [AC_REQUIRE([AC_TYPE_SIGNAL]) | |
192 AC_MSG_CHECKING(for type of signal functions) | |
193 AC_CACHE_VAL(octave_cv_signal_vintage, | |
194 [ | |
5842 | 195 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <signal.h>]], |
196 [[sigset_t ss; | |
197 struct sigaction sa; | |
198 sigemptyset (&ss); | |
199 sigsuspend (&ss); | |
200 sigaction (SIGINT, &sa, (struct sigaction *) 0); | |
201 sigprocmask (SIG_BLOCK, &ss, (sigset_t *) 0);]])], | |
202 [octave_cv_signal_vintage=posix], | |
203 [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <signal.h>]], | |
204 [[int mask = sigmask (SIGINT); | |
205 sigsetmask (mask); | |
206 sigblock (mask); | |
207 sigpause (mask);]])], | |
208 [octave_cv_signal_vintage=4.2bsd], | |
209 [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <signal.h> | |
5844 | 210 RETSIGTYPE foo() { }]], |
5842 | 211 [[int mask = sigmask (SIGINT); |
212 sigset (SIGINT, foo); | |
213 sigrelse (SIGINT); | |
214 sighold (SIGINT); | |
5844 | 215 sigpause (SIGINT);]])], |
5842 | 216 [octave_cv_signal_vintage=svr3], |
217 [octave_cv_signal_vintage=v7])])])]) | |
2469 | 218 AC_MSG_RESULT($octave_cv_signal_vintage) |
2491 | 219 if test "$octave_cv_signal_vintage" = posix; then |
5842 | 220 AC_DEFINE(HAVE_POSIX_SIGNALS, 1, [Define if you have POSIX style signals.]) |
2491 | 221 elif test "$octave_cv_signal_vintage" = "4.2bsd"; then |
5842 | 222 AC_DEFINE(HAVE_BSD_SIGNALS, 1, [Define if you have BSD style signals.]) |
2491 | 223 elif test "$octave_cv_signal_vintage" = svr3; then |
5842 | 224 AC_DEFINE(HAVE_USG_SIGHOLD, 1, [Define if you have System V Release 3 signals.]) |
2469 | 225 fi |
226 ]) | |
227 dnl | |
228 AC_DEFUN(OCTAVE_REINSTALL_SIGHANDLERS, | |
229 [AC_REQUIRE([AC_TYPE_SIGNAL]) | |
230 AC_REQUIRE([OCTAVE_SIGNAL_CHECK]) | |
231 AC_MSG_CHECKING([if signal handlers must be reinstalled when invoked]) | |
232 AC_CACHE_VAL(octave_cv_must_reinstall_sighandlers, | |
5844 | 233 [AC_RUN_IFELSE([AC_LANG_SOURCE([[ |
2469 | 234 #include <signal.h> |
235 #ifdef HAVE_UNISTD_H | |
236 #include <unistd.h> | |
237 #endif | |
238 typedef RETSIGTYPE sigfunc(); | |
239 int nsigint; | |
240 #ifdef HAVE_POSIX_SIGNALS | |
241 sigfunc * | |
242 set_signal_handler(sig, handler) | |
243 int sig; | |
244 sigfunc *handler; | |
245 { | |
246 struct sigaction act, oact; | |
247 act.sa_handler = handler; | |
248 act.sa_flags = 0; | |
249 sigemptyset (&act.sa_mask); | |
250 sigemptyset (&oact.sa_mask); | |
251 sigaction (sig, &act, &oact); | |
252 return (oact.sa_handler); | |
253 } | |
254 #else | |
255 #define set_signal_handler(s, h) signal(s, h) | |
256 #endif | |
257 RETSIGTYPE | |
258 sigint(s) | |
259 int s; | |
260 { | |
261 nsigint++; | |
262 } | |
263 main() | |
264 { | |
265 nsigint = 0; | |
266 set_signal_handler(SIGINT, sigint); | |
267 kill((int)getpid(), SIGINT); | |
268 kill((int)getpid(), SIGINT); | |
269 exit(nsigint != 2); | |
270 } | |
5844 | 271 ]])], |
272 octave_cv_must_reinstall_sighandlers=no, | |
273 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 | |
5842 | 311 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include "conftest.h"]], |
312 [[A a (1); | |
313 return a == A(1);]])], | |
314 [octave_cv_cxx_new_friend_template_decl=no], | |
315 [octave_cv_cxx_new_friend_template_decl=yes]) | |
3888 | 316 AC_LANG_POP(C++) |
3107 | 317 ]) |
318 AC_MSG_RESULT($octave_cv_cxx_new_friend_template_decl) | |
319 if test $octave_cv_cxx_new_friend_template_decl = yes; then | |
3887 | 320 AC_DEFINE(CXX_NEW_FRIEND_TEMPLATE_DECL,1,[Define if your compiler supports `<>' stuff for template friends.]) |
3107 | 321 fi |
322 ]) | |
3126 | 323 dnl |
3233 | 324 dnl Check to see if C compiler handles FLAG command line option. If |
325 dnl two arguments are specified, execute the second arg as shell | |
326 dnl commands. Otherwise, add FLAG to CFLAGS if the compiler accepts | |
327 dnl the flag. | |
3126 | 328 dnl |
329 dnl OCTAVE_CC_FLAG | |
330 AC_DEFUN(OCTAVE_CC_FLAG, [ | |
3908 | 331 ac_safe=`echo "$1" | sed 'y%./+-:=%__p___%'` |
3126 | 332 AC_MSG_CHECKING(whether ${CC-cc} accepts $1) |
333 AC_CACHE_VAL(octave_cv_cc_flag_$ac_safe, [ | |
3888 | 334 AC_LANG_PUSH(C) |
3126 | 335 XCFLAGS="$CFLAGS" |
336 CFLAGS="$CFLAGS $1" | |
5177 | 337 AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], |
3126 | 338 eval "octave_cv_cc_flag_$ac_safe=yes", |
339 eval "octave_cv_cc_flag_$ac_safe=no") | |
340 CFLAGS="$XCFLAGS" | |
3888 | 341 AC_LANG_POP(C) |
3126 | 342 ]) |
343 if eval "test \"`echo '$octave_cv_cc_flag_'$ac_safe`\" = yes"; then | |
344 AC_MSG_RESULT(yes) | |
3131 | 345 ifelse([$2], , [ |
346 CFLAGS="$CFLAGS $1" | |
347 AC_MSG_RESULT([adding $1 to CFLAGS])], [$2]) | |
3126 | 348 else |
349 AC_MSG_RESULT(no) | |
350 ifelse([$3], , , [$3]) | |
351 fi | |
352 ]) | |
353 dnl | |
3233 | 354 dnl Check to see if C++ compiler handles FLAG command line option. If |
355 dnl two arguments are specified, execute the second arg as shell | |
356 dnl commands. Otherwise, add FLAG to CXXFLAGS if the compiler accepts | |
357 dnl the flag. | |
3126 | 358 dnl |
359 dnl OCTAVE_CXX_FLAG | |
360 AC_DEFUN(OCTAVE_CXX_FLAG, [ | |
3908 | 361 ac_safe=`echo "$1" | sed 'y%./+-:=%__p___%'` |
3222 | 362 AC_MSG_CHECKING(whether ${CXX-g++} accepts $1) |
3126 | 363 AC_CACHE_VAL(octave_cv_cxx_flag_$ac_safe, [ |
3888 | 364 AC_LANG_PUSH(C++) |
3126 | 365 XCXXFLAGS="$CXXFLAGS" |
366 CXXFLAGS="$CXXFLAGS $1" | |
5177 | 367 AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], |
3126 | 368 eval "octave_cv_cxx_flag_$ac_safe=yes", |
369 eval "octave_cv_cxx_flag_$ac_safe=no") | |
370 CXXFLAGS="$XCXXFLAGS" | |
3888 | 371 AC_LANG_POP(C++) |
3126 | 372 ]) |
373 if eval "test \"`echo '$octave_cv_cxx_flag_'$ac_safe`\" = yes"; then | |
374 AC_MSG_RESULT(yes) | |
3131 | 375 ifelse([$2], , [ |
376 CXXFLAGS="$CXXFLAGS $1" | |
377 AC_MSG_RESULT([adding $1 to CXXFLAGS])], [$2]) | |
3126 | 378 else |
379 AC_MSG_RESULT(no) | |
380 ifelse([$3], , , [$3]) | |
381 fi | |
382 ]) | |
3130 | 383 dnl |
5076 | 384 dnl Check to see if Fortran compiler handles FLAG command line option. If |
385 dnl two arguments are specified, execute the second arg as shell | |
386 dnl commands. Otherwise, add FLAG to FFLAGS if the compiler accepts | |
387 dnl the flag. | |
388 dnl | |
389 dnl OCTAVE_F77_FLAG | |
390 AC_DEFUN(OCTAVE_F77_FLAG, [ | |
391 ac_safe=`echo "$1" | sed 'y%./+-:=%__p___%'` | |
392 AC_MSG_CHECKING(whether ${F77-g77} accepts $1) | |
393 AC_CACHE_VAL(octave_cv_f77_flag_$ac_safe, [ | |
394 AC_LANG_PUSH(Fortran 77) | |
395 XFFLAGS="$FFLAGS" | |
396 FFLAGS="$FFLAGS $1" | |
5177 | 397 AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], |
5076 | 398 eval "octave_cv_f77_flag_$ac_safe=yes", |
399 eval "octave_cv_f77_flag_$ac_safe=no") | |
400 FFLAGS="$XFFLAGS" | |
401 AC_LANG_POP(Fortran 77) | |
402 ]) | |
403 if eval "test \"`echo '$octave_cv_f77_flag_'$ac_safe`\" = yes"; then | |
404 AC_MSG_RESULT(yes) | |
405 ifelse([$2], , [ | |
406 FFLAGS="$FFLAGS $1" | |
407 AC_MSG_RESULT([adding $1 to FFLAGS])], [$2]) | |
408 else | |
409 AC_MSG_RESULT(no) | |
410 ifelse([$3], , , [$3]) | |
411 fi | |
412 ]) | |
413 dnl | |
3729 | 414 dnl Check for flex |
415 dnl | |
416 AC_DEFUN(OCTAVE_PROG_FLEX, [ | |
417 ### For now, don't define LEXLIB to be -lfl -- we don't use anything in | |
418 ### it, and it might not be installed. | |
419 ### | |
420 ### Also make sure that we generate an interactive scanner if we are | |
421 ### using flex. | |
422 AC_PROG_LEX | |
423 case "$LEX" in | |
424 flex*) | |
425 LFLAGS="-t -I" | |
426 AC_MSG_RESULT([defining LFLAGS to be $LFLAGS]) | |
427 LEXLIB= | |
428 ;; | |
429 *) | |
430 LEX='$(top_srcdir)/missing flex' | |
431 warn_flex="I didn't find flex, but it's only a problem if you need to reconstruct lex.cc" | |
432 AC_MSG_WARN($warn_flex) | |
433 ;; | |
434 esac | |
435 AC_SUBST(LFLAGS) | |
436 ]) | |
437 dnl | |
438 dnl Check for bison | |
439 dnl | |
440 AC_DEFUN(OCTAVE_PROG_BISON, [ | |
441 AC_PROG_YACC | |
442 case "$YACC" in | |
443 bison*) | |
444 ;; | |
445 *) | |
446 YACC='$(top_srcdir)/missing bison' | |
447 warn_bison="I didn't find bison, but it's only a problem if you need to reconstruct parse.cc" | |
448 AC_MSG_WARN($warn_bison) | |
449 ;; | |
450 esac | |
451 ]) | |
452 dnl | |
3130 | 453 dnl What pager should we use? |
454 dnl | |
455 AC_DEFUN(OCTAVE_PROG_PAGER, | |
456 [if test "$cross_compiling" = yes; then | |
457 DEFAULT_PAGER=less | |
458 AC_MSG_RESULT(assuming $DEFAULT_PAGER exists on $canonical_host_type host) | |
459 AC_SUBST(DEFAULT_PAGER) | |
460 else | |
461 octave_possible_pagers="less more page pg" | |
462 case "$canonical_host_type" in | |
6103 | 463 *-*-cygwin* | *-*-mingw32* | *-*-msdosmsvc) |
3130 | 464 octave_possible_pagers="$octave_possible_pagers more.com" |
465 ;; | |
466 esac | |
467 | |
468 AC_CHECK_PROGS(DEFAULT_PAGER, $octave_possible_pagers, []) | |
469 if test -z "$DEFAULT_PAGER"; then | |
470 warn_less="I couldn't find \`less', \`more', \`page', or \`pg'" | |
471 AC_MSG_WARN($warn_less) | |
472 fi | |
473 fi | |
474 ]) | |
475 dnl | |
6821 | 476 dnl Does gnuplot exist? |
3130 | 477 dnl |
4098 | 478 AC_DEFUN(OCTAVE_PROG_GNUPLOT, [ |
479 case "$canonical_host_type" in | |
6103 | 480 *-*-cygwin* | *-*-mingw32* | *-*-msdosmsvc) |
4098 | 481 gp_names="pgnuplot pipe-gnuplot gnuplot" |
482 gp_default=pgnuplot | |
483 ;; | |
484 *) | |
485 gp_names=gnuplot | |
486 gp_default=gnuplot | |
487 ;; | |
488 esac | |
489 if test "$cross_compiling" = yes; then | |
7361 | 490 GNUPLOT="$gp_default" |
491 AC_MSG_RESULT(assuming $GNUPLOT exists on $canonical_host_type host) | |
3130 | 492 else |
7361 | 493 AC_CHECK_PROGS(GNUPLOT, $gp_names) |
494 if test -z "$GNUPLOT"; then | |
5513 | 495 warn_gnuplot=yes |
3130 | 496 |
7361 | 497 GNUPLOT="$gp_default" |
5076 | 498 |
3130 | 499 ## If you change this text, be sure to also copy it to the set of |
500 ## warnings at the end of the script | |
501 | |
502 AC_MSG_WARN([I didn't find gnuplot. It isn't necessary to have gnuplot]) | |
503 AC_MSG_WARN([installed, but you won't be able to use any of Octave's]) | |
504 AC_MSG_WARN([plotting commands without it.]) | |
505 AC_MSG_WARN([]) | |
506 AC_MSG_WARN([If gnuplot is installed but it isn't in your path, you can]) | |
507 AC_MSG_WARN([tell Octave where to find it by typing the command]) | |
508 AC_MSG_WARN([]) | |
509 AC_MSG_WARN([gnuplot_binary = "/full/path/to/gnuplot/binary"]) | |
510 AC_MSG_WARN([]) | |
511 AC_MSG_WARN([at the Octave prompt.]) | |
5076 | 512 AC_MSG_WARN([]) |
7361 | 513 AC_MSG_WARN([Setting default value to $GNUPLOT]) |
3130 | 514 fi |
515 fi | |
7361 | 516 AC_SUBST(GNUPLOT) |
3130 | 517 ]) |
518 dnl | |
3673 | 519 dnl Is gperf installed? |
520 dnl | |
521 dnl OCTAVE_PROG_GPERF | |
3731 | 522 AC_DEFUN(OCTAVE_PROG_GPERF, [ |
6119 | 523 AC_CHECK_PROG(GPERF, gperf, gperf, []) |
3731 | 524 if test -n "$GPERF"; then |
525 if echo "%{ | |
4416 | 526 enum octave_kw_id { a_kw }; |
3731 | 527 %} |
4416 | 528 struct octave_kw { const char *name; int tok; octave_kw_id kw_id; }; |
3731 | 529 %% |
5094 | 530 foo" | $GPERF -t -C -D -E -G -L C++ -H octave_kw_hash -N octave_kw_lookup > /dev/null 2>&1; then |
3731 | 531 true |
532 else | |
533 GPERF="" | |
5094 | 534 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 | 535 AC_MSG_WARN($warn_gperf) |
536 fi | |
537 else | |
538 GPERF='$(top_srcdir)/missing gperf' | |
539 warn_gperf="I didn't find gperf, but it's only a problem if you need to reconstruct oct-gperf.h" | |
540 AC_MSG_WARN($warn_gperf) | |
541 fi | |
542 AC_SUBST(GPERF) | |
3673 | 543 ]) |
544 dnl | |
5934 | 545 dnl Is ghostscript installed? |
546 dnl | |
547 dnl OCTAVE_PROG_GHOSTSCRIPT | |
548 AC_DEFUN(OCTAVE_PROG_GHOSTSCRIPT, [ | |
6116 | 549 case "$canonical_host_type" in |
550 *-*-cygwin* | *-*-mingw32* | *-*-msdosmsvc) | |
551 gs_names="gs gswin32" | |
552 ;; | |
553 *) | |
554 gs_names=gs | |
555 ;; | |
556 esac | |
557 AC_CHECK_PROGS(GHOSTSCRIPT, $gs_names) | |
5934 | 558 if test -z "$GHOSTSCRIPT"; then |
559 GHOSTSCRIPT='$(top_srcdir)/missing gs' | |
560 warn_ghostscript="I didn't find ghostscript, but it's only a problem if you need to reconstruct figures for the manual" | |
561 AC_MSG_WARN($warn_ghostscript) | |
562 fi | |
563 AC_SUBST(GHOSTSCRIPT) | |
564 ]) | |
565 dnl | |
566 dnl Is makeinfo installed? | |
567 dnl | |
568 dnl OCTAVE_PROG_MAKEINFO | |
569 AC_DEFUN(OCTAVE_PROG_MAKEINFO, [ | |
6119 | 570 AC_CHECK_PROG(MAKEINFO, makeinfo, makeinfo, []) |
5934 | 571 if test -z "$MAKEINFO"; then |
572 MAKEINFO='$(top_srcdir)/missing makeinfo' | |
573 warn_makeinfo="I didn't find makeinfo, but it's only a problem if you need to reconstruct the Info version of the manual" | |
574 AC_MSG_WARN($warn_makeinfo) | |
575 fi | |
576 AC_SUBST(MAKEINFO) | |
577 ]) | |
578 dnl | |
579 dnl Is texi2dvi installed? | |
580 dnl | |
581 dnl OCTAVE_PROG_TEXI2DVI | |
582 AC_DEFUN(OCTAVE_PROG_TEXI2DVI, [ | |
6119 | 583 AC_CHECK_PROG(TEXI2DVI, texi2dvi, texi2dvi, []) |
5934 | 584 if test -z "$TEXI2DVI"; then |
585 TEXI2DVI='$(top_srcdir)/missing texi2dvi' | |
586 warn_texi2dvi="I didn't find texi2dvi, but it's only a problem if you need to reconstruct the DVI version of the manual" | |
587 AC_MSG_WARN($warn_texi2dvi) | |
588 fi | |
589 AC_SUBST(TEXI2DVI) | |
590 ]) | |
591 dnl | |
592 dnl Is texi2pdf installed? | |
593 dnl | |
594 dnl OCTAVE_PROG_TEXI2PDF | |
595 AC_DEFUN(OCTAVE_PROG_TEXI2PDF, [ | |
6116 | 596 AC_REQUIRE([OCTAVE_PROG_TEXI2DVI]) |
6119 | 597 AC_CHECK_PROG(TEXI2PDF, texi2pdf, texi2pdf, []) |
5934 | 598 if test -z "$TEXI2PDF"; then |
6116 | 599 missing=true; |
600 if test -n "$TEXI2DVI"; then | |
601 TEXI2PDF="$TEXI2DVI --pdf" | |
602 missing=false; | |
603 fi | |
604 else | |
605 missing=false; | |
606 fi | |
607 if $missing; then | |
5934 | 608 TEXI2PDF='$(top_srcdir)/missing texi2pdf' |
609 warn_texi2pdf="I didn't find texi2pdf, but it's only a problem if you need to reconstruct the PDF version of the manual" | |
610 AC_MSG_WARN($warn_texi2pdf) | |
611 fi | |
612 AC_SUBST(TEXI2PDF) | |
613 ]) | |
614 dnl | |
3769 | 615 dnl See if the C++ library is ISO compliant. |
616 dnl FIXME: This is obviously very simplistic, and trivially fooled. | |
617 dnl | |
618 dnl OCTAVE_CXX_ISO_COMPLIANT_LIBRARY | |
619 AC_DEFUN(OCTAVE_CXX_ISO_COMPLIANT_LIBRARY, [ | |
620 AC_REQUIRE([AC_PROG_CXX]) | |
621 AC_MSG_CHECKING([if C++ library is ISO compliant]) | |
622 AC_CACHE_VAL(octave_cv_cxx_iso_compliant_library, [ | |
3888 | 623 AC_LANG_PUSH(C++) |
3769 | 624 rm -f conftest.h |
3943 | 625 ### Omitting cwctype for now, since it is broken with gcc-3.0.x and |
626 ### possibly other versions... | |
3769 | 627 for inc in algorithm bitset cassert cctype cerrno cfloat ciso646 \ |
628 climits clocale cmath complex csetjmp csignal cstdarg cstddef \ | |
3943 | 629 cstdio cstdlib cstring ctime cwchar deque exception \ |
3769 | 630 fstream functional iomanip ios iosfwd iostream istream iterator \ |
631 limits list locale map memory new numeric ostream queue set \ | |
632 sstream stack stdexcept streambuf string strstream typeinfo \ | |
633 utility valarray vector; do | |
634 echo "#include <$inc>" >> conftest.h | |
635 done | |
5842 | 636 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include "conftest.h"]], |
637 [[std::bitset<50> flags; | |
3769 | 638 flags.set(); |
639 int digits = std::numeric_limits<unsigned long>::digits; | |
5842 | 640 digits = 0;]])], |
641 [octave_cv_cxx_iso_compliant_library=yes], | |
642 [octave_cv_cxx_iso_compliant_library=no]) | |
3888 | 643 AC_LANG_POP(C++) |
3769 | 644 ]) |
645 AC_MSG_RESULT($octave_cv_cxx_iso_compliant_library) | |
646 if test $octave_cv_cxx_iso_compliant_library = yes; then | |
3887 | 647 AC_DEFINE(CXX_ISO_COMPLIANT_LIBRARY, 1, [Define if your C++ runtime library is ISO compliant.]) |
3769 | 648 fi |
649 ]) | |
3822 | 650 dnl |
651 dnl Allow the user disable support for command line editing using GNU | |
652 dnl readline. | |
653 dnl | |
654 dnl OCTAVE_ENABLE_READLINE | |
655 AC_DEFUN(OCTAVE_ENABLE_READLINE, [ | |
656 USE_READLINE=true | |
4102 | 657 LIBREADLINE= |
3822 | 658 AC_ARG_ENABLE(readline, |
659 [ --enable-readline use readline library (default is yes)], | |
660 [if test "$enableval" = no; then | |
3824 | 661 USE_READLINE=false |
3825 | 662 warn_readline="command editing and history features require GNU Readline" |
3824 | 663 fi]) |
3822 | 664 if $USE_READLINE; then |
665 AC_CHECK_LIB(readline, rl_set_keyboard_input_timeout, [ | |
4102 | 666 LIBREADLINE="-lreadline" |
667 LIBS="$LIBREADLINE $LIBS" | |
3887 | 668 AC_DEFINE(USE_READLINE, 1, [Define to use the readline library.]) |
3822 | 669 ], [ |
3824 | 670 AC_MSG_WARN([I need GNU Readline 4.2 or later]) |
671 AC_MSG_ERROR([this is fatal unless you specify --disable-readline]) | |
3822 | 672 ]) |
673 fi | |
4102 | 674 AC_SUBST(LIBREADLINE) |
3822 | 675 ]) |
3842 | 676 dnl |
5854 | 677 dnl Check to see if C++ reintrepret cast works for function pointers. |
678 dnl | |
679 dnl OCTAVE_CXX_BROKEN_REINTERPRET_CAST | |
680 dnl | |
681 AC_DEFUN(OCTAVE_CXX_BROKEN_REINTERPRET_CAST, [ | |
682 AC_REQUIRE([AC_PROG_CXX]) | |
683 AC_LANG_PUSH(C++) | |
684 AC_CACHE_CHECK([for broken C++ reinterpret_cast], | |
685 octave_cv_cxx_broken_reinterpret_cast, [ | |
686 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <cmath>]], [[ | |
687 typedef double (*fptr) (double); | |
688 fptr psin = sin; | |
689 void *vptr = reinterpret_cast<void *> (psin); | |
690 psin = reinterpret_cast<fptr> (vptr);]])], | |
691 octave_cv_cxx_broken_reinterpret_cast=no, | |
692 octave_cv_cxx_broken_reinterpret_cast=yes)]) | |
693 if test $octave_cv_cxx_broken_reinterpret_cast = yes ; then | |
694 AC_DEFINE(CXX_BROKEN_REINTERPRET_CAST, 1, [Define if C++ reinterpret_cast fails for function pointers.]) | |
695 fi | |
696 AC_LANG_POP(C++)]) | |
697 dnl | |
4067 | 698 dnl Determine if mkdir accepts only one argument instead dnl of the usual 2. |
699 dnl | |
6104 | 700 AC_DEFUN(OCTAVE_MKDIR_TAKES_ONE_ARG, [ |
701 AC_LANG_PUSH(C++) | |
702 AC_CACHE_CHECK([if mkdir takes one argument], octave_cv_mkdir_takes_one_arg, | |
5844 | 703 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> |
4067 | 704 #ifdef HAVE_SYS_STAT_H |
705 # include <sys/stat.h> | |
706 #endif | |
707 #ifdef HAVE_UNISTD_H | |
708 # include <unistd.h> | |
709 #endif | |
710 #ifdef HAVE_DIRECT_H | |
711 # include <direct.h> | |
5844 | 712 #endif]], [[mkdir ("foo", 0);]])], |
4067 | 713 octave_cv_mkdir_takes_one_arg=no, octave_cv_mkdir_takes_one_arg=yes)]) |
6104 | 714 AC_LANG_POP(C++) |
4067 | 715 if test $octave_cv_mkdir_takes_one_arg = yes ; then |
716 AC_DEFINE(MKDIR_TAKES_ONE_ARG, 1, [Define if host mkdir takes a single argument.]) | |
717 fi | |
718 ]) | |
7244 | 719 dnl |
720 dnl Find find. | |
721 dnl | |
722 # Prefer GNU find if found. | |
723 AN_MAKEVAR([FIND], [OCTAVE_PROG_FIND]) | |
724 AN_PROGRAM([gfind], [OCTAVE_PROG_FIND]) | |
725 AN_PROGRAM([find], [OCTAVE_PROG_FIND]) | |
726 AC_DEFUN([OCTAVE_PROG_FIND], | |
727 [AC_CHECK_PROGS(FIND, gfind find, )]) | |
728 dnl | |
729 dnl Find sed. | |
730 dnl | |
4084 | 731 # Check for a fully-functional sed program, that truncates |
6955 | 732 # as few characters as possible and that supports "\(X\|Y\)" |
733 # style regular expression alternation. Prefer GNU sed if found. | |
4084 | 734 AC_DEFUN([OCTAVE_PROG_SED], |
6955 | 735 [AC_MSG_CHECKING([for a usable sed]) |
4084 | 736 if test -z "$SED"; then |
6822 | 737 AC_CACHE_VAL(ac_cv_path_sed, [ |
738 # Loop through the user's path and test for sed and gsed. | |
739 # Then use that list of sed's as ones to test for truncation. | |
740 _AS_PATH_WALK([$PATH], | |
741 [for ac_prog in sed gsed; do | |
742 for ac_exec_ext in '' $ac_executable_extensions; do | |
743 if AS_EXECUTABLE_P(["$as_dir/$ac_prog$ac_exec_ext"]); then | |
744 _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext" | |
745 fi | |
746 done | |
4084 | 747 done |
6822 | 748 ]) |
749 AS_TMPDIR(sed) | |
750 _max=0 | |
4084 | 751 _count=0 |
6822 | 752 # Add /usr/xpg4/bin/sed as it is typically found on Solaris |
753 # along with /bin/sed that truncates output. | |
754 for _sed in $_sed_list /usr/xpg4/bin/sed; do | |
755 test ! -f ${_sed} && break | |
756 cat /dev/null > "$tmp/sed.in" | |
757 _count=0 | |
758 echo $ECHO_N "0123456789$ECHO_C" >"$tmp/sed.in" | |
759 # Check for GNU sed and select it if it is found. | |
760 if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then | |
761 octave_cv_path_sed=${_sed} | |
762 break; | |
4084 | 763 fi |
6955 | 764 # Reject if RE alternation is not handled. |
765 if test "`echo 'this and that' | ${_sed} -n 's/\(this\|that\).*$/\1/p'`" != "this"; then | |
766 continue; | |
767 fi | |
6822 | 768 while true; do |
769 cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp" | |
770 mv "$tmp/sed.tmp" "$tmp/sed.in" | |
771 cp "$tmp/sed.in" "$tmp/sed.nl" | |
772 echo >>"$tmp/sed.nl" | |
773 ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break | |
774 cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break | |
775 # 10000 chars as input seems more than enough | |
776 test $_count -gt 10 && break | |
777 _count=`expr $_count + 1` | |
778 if test $_count -gt $_max; then | |
779 _max=$_count | |
780 octave_cv_path_sed=$_sed | |
781 fi | |
782 done | |
4084 | 783 done |
6822 | 784 rm -rf "$tmp" |
785 ]) | |
786 SED=$octave_cv_path_sed | |
8004
4363bc94171a
aclocal.m4 (OCTAVE_PROG_SED): fail if no usable sed is found
John W. Eaton <jwe@octave.org>
parents:
7996
diff
changeset
|
787 if test -z "$SED"; then |
4363bc94171a
aclocal.m4 (OCTAVE_PROG_SED): fail if no usable sed is found
John W. Eaton <jwe@octave.org>
parents:
7996
diff
changeset
|
788 AC_MSG_ERROR([no usable version of sed found]) |
4363bc94171a
aclocal.m4 (OCTAVE_PROG_SED): fail if no usable sed is found
John W. Eaton <jwe@octave.org>
parents:
7996
diff
changeset
|
789 fi |
4084 | 790 fi |
6822 | 791 AC_SUBST(SED) |
4084 | 792 AC_MSG_RESULT([$SED]) |
793 ]) | |
5465 | 794 dnl |
795 dnl Find Perl. | |
796 dnl | |
797 dnl OCTAVE_PROG_PERL | |
798 AC_DEFUN(OCTAVE_PROG_PERL, | |
6119 | 799 [AC_CHECK_PROG(PERL, perl, perl, []) |
5465 | 800 AC_SUBST(PERL) |
801 ]) | |
5468 | 802 dnl |
5495 | 803 dnl Find Python. |
804 dnl | |
805 dnl OCTAVE_PROG_PYTHON | |
806 AC_DEFUN(OCTAVE_PROG_PYTHON, | |
6119 | 807 [AC_CHECK_PROG(PYTHON, python, python, []) |
5495 | 808 AC_SUBST(PYTHON) |
809 ]) | |
810 dnl | |
5468 | 811 dnl Find desktop-file-install. |
812 dnl | |
813 dnl OCTAVE_PROG_DESKTOP_FILE_INSTALL | |
814 AC_DEFUN(OCTAVE_PROG_DESKTOP_FILE_INSTALL, | |
6119 | 815 [AC_CHECK_PROG(DESKTOP_FILE_INSTALL, desktop-file-install, desktop-file-install, []) |
5468 | 816 AC_SUBST(DESKTOP_FILE_INSTALL) |
817 ]) | |
818 dnl | |
819 dnl Check for IEEE 754 data format. | |
820 dnl | |
4853 | 821 AC_DEFUN([OCTAVE_IEEE754_DATA_FORMAT], |
822 [AC_MSG_CHECKING([for IEEE 754 data format]) | |
823 AC_CACHE_VAL(octave_cv_ieee754_data_format, | |
5844 | 824 [AC_RUN_IFELSE([AC_LANG_SOURCE([[ |
4853 | 825 int |
826 main (void) | |
827 { | |
828 typedef union { unsigned char c[8]; double d; } ieeebytes; | |
829 | |
830 ieeebytes l = {0x1c, 0xbc, 0x6e, 0xf2, 0x54, 0x8b, 0x11, 0x43}; | |
831 ieeebytes b = {0x43, 0x11, 0x8b, 0x54, 0xf2, 0x6e, 0xbc, 0x1c}; | |
832 | |
833 return l.d != 1234567891234567.0 && b.d != 1234567891234567.0; | |
5844 | 834 }]])], |
4853 | 835 octave_cv_ieee754_data_format=yes, |
836 octave_cv_ieee754_data_format=no, | |
837 octave_cv_ieee754_data_format=no)]) | |
838 if test "$cross_compiling" = yes; then | |
839 AC_MSG_RESULT([$octave_cv_ieee754_data_format assumed for cross compilation]) | |
840 else | |
841 AC_MSG_RESULT($octave_cv_ieee754_data_format) | |
842 fi | |
843 if test "$octave_cv_ieee754_data_format" = yes; then | |
844 AC_DEFINE(HAVE_IEEE754_DATA_FORMAT, 1, [Define if your system uses IEEE 754 data format.]) | |
845 fi | |
846 ]) | |
5505 | 847 dnl |
848 dnl Check for UMFPACK seperately split complex matrix and RHS. Note | |
849 dnl that as umfpack.h can be in three different places, rather than | |
850 dnl include it, just declare the functions needed. | |
851 dnl | |
5512 | 852 dnl Assumes that the check for umfpack has already been performed. |
5505 | 853 dnl |
854 AC_DEFUN([OCTAVE_UMFPACK_SEPERATE_SPLIT], | |
855 [AC_MSG_CHECKING([for UMFPACK seperate complex matrix and rhs split]) | |
856 AC_CACHE_VAL(octave_cv_umfpack_seperate_split, | |
5844 | 857 [AC_RUN_IFELSE([AC_LANG_SOURCE([[ |
5505 | 858 #include <stdlib.h> |
5512 | 859 #if defined (HAVE_UFSPARSE_UMFPACK_h) |
860 #include <ufsparse/umfpack.h> | |
861 #elif defined (HAVE_UMFPACK_UMFPACK_H) | |
862 #include <umfpack/umfpack.h> | |
863 #elif defined (HAVE_UMFPACK_H) | |
864 #include <umfpack.h> | |
865 #endif | |
5505 | 866 int n = 5; |
867 int Ap[] = {0, 2, 5, 9, 10, 12}; | |
868 int Ai[] = {0, 1, 0, 2, 4, 1, 2, 3, 4, 2, 1, 4}; | |
869 double Ax[] = {2., 0., 3., 0., 3., 0., -1., 0., 4., 0., 4., 0., | |
870 -3., 0., 1., 0., 2., 0., 2., 0., 6., 0., 1., 0.}; | |
871 double br[] = {8., 45., -3., 3., 19.}; | |
872 double bi[] = {0., 0., 0., 0., 0.}; | |
873 int main (void) | |
874 { | |
875 double *null = (double *) NULL ; | |
876 double *x = (double *)malloc (2 * n * sizeof(double)); | |
877 int i ; | |
878 void *Symbolic, *Numeric ; | |
879 (void) umfpack_zi_symbolic (n, n, Ap, Ai, Ax, null, &Symbolic, null, null) ; | |
880 (void) umfpack_zi_numeric (Ap, Ai, Ax, null, Symbolic, &Numeric, null, null) ; | |
881 umfpack_zi_free_symbolic (&Symbolic) ; | |
882 (void) umfpack_zi_solve (0, Ap, Ai, Ax, null, x, null, br, bi, | |
883 Numeric, null, null) ; | |
884 umfpack_zi_free_numeric (&Numeric) ; | |
885 for (i = 0; i < n; i++, x+=2) | |
886 if (fabs(*x - i - 1.) > 1.e-13) | |
887 return (1); | |
888 return (0) ; | |
889 } | |
5844 | 890 ]])], |
5505 | 891 octave_cv_umfpack_seperate_split=yes, |
892 octave_cv_umfpack_seperate_split=no, | |
893 octave_cv_umfpack_seperate_split=no)]) | |
894 if test "$cross_compiling" = yes; then | |
895 AC_MSG_RESULT([$octave_cv_umfpack_seperate_split assumed for cross compilation]) | |
896 else | |
897 AC_MSG_RESULT($octave_cv_umfpack_seperate_split) | |
898 fi | |
899 if test "$octave_cv_umfpack_seperate_split" = yes; then | |
900 AC_DEFINE(UMFPACK_SEPARATE_SPLIT, 1, [Define if the UMFPACK Complex solver allow matrix and RHS to be split independently]) | |
901 fi | |
902 ]) | |
6276 | 903 dnl |
904 dnl Check whether using HDF5 DLL under Windows. This is done by | |
905 dnl testing for a data symbol in the HDF5 library, which would | |
906 dnl requires the definition of _HDF5USEDL_ under MSVC compiler. | |
907 dnl | |
908 AC_DEFUN([OCTAVE_HDF5_DLL], [ | |
909 AC_CACHE_CHECK([if _HDF5USEDLL_ needs to be defined],octave_cv_hdf5_dll, [ | |
6724 | 910 AC_TRY_LINK([#include <hdf5.h>], [hid_t x = H5T_NATIVE_DOUBLE; return x], |
6276 | 911 octave_cv_hdf5_dll=no, [ |
912 CFLAGS_old=$CFLAGS | |
913 CFLAGS="$CFLAGS -DWIN32 -D_HDF5USEDLL_" | |
6724 | 914 AC_TRY_LINK([#include <hdf5.h>], [hid_t x = H5T_NATIVE_DOUBLE; return x], |
6276 | 915 octave_cv_hdf5_dll=yes, |
916 octave_cv_hdf5_dll=no) | |
917 CFLAGS=$CFLAGS_old])]) | |
918 if test "$octave_cv_hdf5_dll" = yes; then | |
919 AC_DEFINE(_HDF5USEDLL_, 1, [Define if using HDF5 dll (Win32)]) | |
920 fi]) | |
6823 | 921 dnl |
922 dnl Check for the QHull version. | |
923 dnl | |
924 AC_DEFUN(AC_CHECK_QHULL_VERSION, | |
925 [AC_MSG_CHECKING([for qh_qhull in -lqhull with qh_version]) | |
926 AC_CACHE_VAL(octave_cv_lib_qhull_version, [ | |
927 cat > conftest.c <<EOF | |
928 #include <stdio.h> | |
929 char *qh_version = "version"; | |
930 char qh_qhull(); | |
931 int | |
932 main(argc, argv) | |
933 int argc; | |
934 char **argv; | |
935 { | |
936 qh_qhull(); | |
937 return 0; | |
938 } | |
939 EOF | |
940 | |
941 octave_qhull_try="${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS conftest.c -o conftest -lqhull $LIBS" | |
7061 | 942 if (eval "$octave_qhull_try") 2>&AS_MESSAGE_LOG_FD && test -s conftest ; then |
6823 | 943 octave_cv_lib_qhull_version=yes |
944 else | |
945 octave_cv_lib_qhull_version=no | |
946 fi | |
947 rm -f conftest.c conftest.o conftest | |
948 ])dnl | |
949 if test "$octave_cv_lib_qhull_version" = "yes"; then | |
950 AC_MSG_RESULT(yes) | |
951 ifelse([$1], , , [$1]) | |
952 else | |
953 AC_MSG_RESULT(no) | |
954 ifelse([$2], , , [$2]) | |
955 fi | |
956 ]) | |
7825
13871b7de124
Import sources for OpenGL-based renderer.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7361
diff
changeset
|
957 dnl |
8659
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
958 dnl Check whether QHull works (does not crash) |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
959 dnl |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
960 AC_DEFUN(AC_CHECK_QHULL_OK, |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
961 [AC_MSG_CHECKING([whether the qhull library works]) |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
962 AC_CACHE_VAL(octave_cv_lib_qhull_ok, |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
963 [ |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
964 save_LIBS="$LIBS" |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
965 LIBS="$LIBS -lqhull -lm" |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
966 AC_RUN_IFELSE([AC_LANG_SOURCE([[ |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
967 #include <stdio.h> |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
968 #include <qhull/qhull.h> |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
969 |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
970 #ifdef NEED_QHULL_VERSION |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
971 char *qh_version = "version"; |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
972 #endif |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
973 int main() |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
974 { |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
975 int dim = 2, n = 4; |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
976 coordT points[8] = { -0.5, -0.5, -0.5, 0.5, 0.5, -0.5, 0.5, 0.5 }; |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
977 boolT ismalloc = 0; |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
978 |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
979 return qh_new_qhull (dim, n, points, ismalloc, "qhull ", 0, stderr); |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
980 } |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
981 ]])], |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
982 [octave_cv_lib_qhull_ok=yes], |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
983 [octave_cv_lib_qhull_ok=no], |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
984 [octave_cv_lib_qhull_ok=yes]) |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
985 LIBS="$save_LIBS" |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
986 ]) |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
987 if test "$octave_cv_lib_qhull_ok" = "yes"; then |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
988 AC_MSG_RESULT(yes) |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
989 ifelse([$1], , , [$1]) |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
990 else |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
991 AC_MSG_RESULT(no) |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
992 ifelse([$2], , , [$2]) |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
993 fi |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
994 ]) |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
995 dnl |
7825
13871b7de124
Import sources for OpenGL-based renderer.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7361
diff
changeset
|
996 dnl Check for OpenGL. If found, define OPENGL_LIBS |
13871b7de124
Import sources for OpenGL-based renderer.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7361
diff
changeset
|
997 dnl |
7863
2a62d45fa21d
added check for FTGL library
Shai Ayal <shaiay@users.sourceforge.net>
parents:
7834
diff
changeset
|
998 dnl FIXME -- add tests for apple |
2a62d45fa21d
added check for FTGL library
Shai Ayal <shaiay@users.sourceforge.net>
parents:
7834
diff
changeset
|
999 dnl |
7825
13871b7de124
Import sources for OpenGL-based renderer.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7361
diff
changeset
|
1000 AC_DEFUN([OCTAVE_OPENGL], [ |
13871b7de124
Import sources for OpenGL-based renderer.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7361
diff
changeset
|
1001 OPENGL_LIBS= |
13871b7de124
Import sources for OpenGL-based renderer.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7361
diff
changeset
|
1002 case $canonical_host_type in |
7993
80a715c4824d
aclocal.m4 (OCTAVE_OPENGL): Handle MinGW the same as MSVC
Tatsuro MATSUOKA
parents:
7954
diff
changeset
|
1003 *-*-mingw32* | *-*-msdosmsvc) |
7825
13871b7de124
Import sources for OpenGL-based renderer.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7361
diff
changeset
|
1004 AC_CHECK_HEADERS(windows.h) |
13871b7de124
Import sources for OpenGL-based renderer.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7361
diff
changeset
|
1005 ;; |
13871b7de124
Import sources for OpenGL-based renderer.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7361
diff
changeset
|
1006 esac |
13871b7de124
Import sources for OpenGL-based renderer.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7361
diff
changeset
|
1007 have_opengl_incs=no |
7954 | 1008 AC_CHECK_HEADERS([GL/gl.h OpenGL/gl.h], [ |
1009 AC_CHECK_HEADERS([GL/glu.h OpenGL/glu.h], [ | |
1010 have_opengl_incs=yes; break], [], [ | |
7825
13871b7de124
Import sources for OpenGL-based renderer.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7361
diff
changeset
|
1011 #ifdef HAVE_WINDOWS_H |
7954 | 1012 #include <windows.h> |
1013 #endif | |
1014 ]) | |
1015 break | |
1016 ], [], [ | |
7825
13871b7de124
Import sources for OpenGL-based renderer.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7361
diff
changeset
|
1017 #ifdef HAVE_WINDOWS_H |
7954 | 1018 #include <windows.h> |
1019 #endif | |
1020 ]) | |
7825
13871b7de124
Import sources for OpenGL-based renderer.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7361
diff
changeset
|
1021 if test "$have_opengl_incs" = "yes"; then |
13871b7de124
Import sources for OpenGL-based renderer.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7361
diff
changeset
|
1022 case $canonical_host_type in |
7993
80a715c4824d
aclocal.m4 (OCTAVE_OPENGL): Handle MinGW the same as MSVC
Tatsuro MATSUOKA
parents:
7954
diff
changeset
|
1023 *-*-mingw32* | *-*-msdosmsvc) |
7825
13871b7de124
Import sources for OpenGL-based renderer.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7361
diff
changeset
|
1024 save_LIBS="$LIBS" |
13871b7de124
Import sources for OpenGL-based renderer.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7361
diff
changeset
|
1025 LIBS="$LIBS -lopengl32" |
13871b7de124
Import sources for OpenGL-based renderer.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7361
diff
changeset
|
1026 AC_MSG_CHECKING([for glEnable in -lopengl32]) |
13871b7de124
Import sources for OpenGL-based renderer.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7361
diff
changeset
|
1027 AC_TRY_LINK([ |
13871b7de124
Import sources for OpenGL-based renderer.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7361
diff
changeset
|
1028 #if HAVE_WINDOWS_H |
7954 | 1029 #include <windows.h> |
7825
13871b7de124
Import sources for OpenGL-based renderer.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7361
diff
changeset
|
1030 #endif |
7954 | 1031 #if defined (HAVE_GL_GL_H) |
1032 #include <GL/gl.h> | |
1033 #elif defined (HAVE_OPENGL_GL_H) | |
1034 #include <OpenGL/gl.h> | |
1035 #endif | |
1036 ], [ | |
7825
13871b7de124
Import sources for OpenGL-based renderer.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7361
diff
changeset
|
1037 glEnable(GL_SMOOTH);], OPENGL_LIBS="-lopengl32 -lglu32") |
13871b7de124
Import sources for OpenGL-based renderer.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7361
diff
changeset
|
1038 LIBS="$save_LIBS" |
13871b7de124
Import sources for OpenGL-based renderer.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7361
diff
changeset
|
1039 if test "x$OPENGL_LIBS" != "x"; then |
13871b7de124
Import sources for OpenGL-based renderer.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7361
diff
changeset
|
1040 AC_MSG_RESULT(yes) |
13871b7de124
Import sources for OpenGL-based renderer.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7361
diff
changeset
|
1041 else |
13871b7de124
Import sources for OpenGL-based renderer.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7361
diff
changeset
|
1042 AC_MSG_RESULT(no) |
13871b7de124
Import sources for OpenGL-based renderer.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7361
diff
changeset
|
1043 fi |
13871b7de124
Import sources for OpenGL-based renderer.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7361
diff
changeset
|
1044 ;; |
13871b7de124
Import sources for OpenGL-based renderer.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7361
diff
changeset
|
1045 *) |
13871b7de124
Import sources for OpenGL-based renderer.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7361
diff
changeset
|
1046 save_LDFLAGS="$LDFLAGS" |
13871b7de124
Import sources for OpenGL-based renderer.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7361
diff
changeset
|
1047 LDFLAGS="$LDFLAGS -L/usr/X11R6/lib" |
13871b7de124
Import sources for OpenGL-based renderer.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7361
diff
changeset
|
1048 AC_CHECK_LIB(GL, glEnable, OPENGL_LIBS="-L/usr/X11R6/lib -lGL -lGLU") |
13871b7de124
Import sources for OpenGL-based renderer.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7361
diff
changeset
|
1049 LDFLAGS="$save_LDFLAGS" |
13871b7de124
Import sources for OpenGL-based renderer.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7361
diff
changeset
|
1050 ;; |
13871b7de124
Import sources for OpenGL-based renderer.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7361
diff
changeset
|
1051 esac |
13871b7de124
Import sources for OpenGL-based renderer.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7361
diff
changeset
|
1052 fi |
13871b7de124
Import sources for OpenGL-based renderer.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7361
diff
changeset
|
1053 AC_SUBST(OPENGL_LIBS) |
13871b7de124
Import sources for OpenGL-based renderer.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7361
diff
changeset
|
1054 ]) |
7834
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1055 dnl |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1056 dnl Configure paths for FreeType2 |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1057 dnl Marcelo Magallon 2001-10-26, based on gtk.m4 by Owen Taylor |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1058 dnl |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1059 dnl Copyright 2001, 2003 by |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1060 dnl David Turner, Robert Wilhelm, and Werner Lemberg. |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1061 dnl |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1062 dnl This file is part of the FreeType project, and may only be used, modified, |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1063 dnl and distributed under the terms of the FreeType project license, |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1064 dnl LICENSE.TXT. By continuing to use, modify, or distribute this file you |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1065 dnl indicate that you have read the license and understand and accept it |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1066 dnl fully. |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1067 dnl |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1068 dnl As a special exception to the FreeType project license, this file may be |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1069 dnl distributed as part of a program that contains a configuration script |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1070 dnl generated by Autoconf, under the same distribution terms as the rest of |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1071 dnl that program. |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1072 dnl |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1073 dnl serial 2 |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1074 dnl |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1075 dnl AC_CHECK_FT2([MINIMUM-VERSION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1076 dnl Test for FreeType 2, and define FT2_CFLAGS and FT2_LIBS. |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1077 dnl MINIMUM-VERSION is what libtool reports; the default is `7.0.1' (this is |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1078 dnl FreeType 2.0.4). |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1079 dnl |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1080 AC_DEFUN([AC_CHECK_FT2], |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1081 [dnl Get the cflags and libraries from the freetype-config script |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1082 dnl |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1083 AC_ARG_WITH([ft-prefix], |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1084 dnl don't quote AS_HELP_STRING! |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1085 AS_HELP_STRING([--with-ft-prefix=PREFIX], |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1086 [Prefix where FreeType is installed (optional)]), |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1087 [ft_config_prefix="$withval"], |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1088 [ft_config_prefix=""]) |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1089 |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1090 AC_ARG_WITH([ft-exec-prefix], |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1091 dnl don't quote AS_HELP_STRING! |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1092 AS_HELP_STRING([--with-ft-exec-prefix=PREFIX], |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1093 [Exec prefix where FreeType is installed (optional)]), |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1094 [ft_config_exec_prefix="$withval"], |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1095 [ft_config_exec_prefix=""]) |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1096 |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1097 AC_ARG_ENABLE([freetypetest], |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1098 dnl don't quote AS_HELP_STRING! |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1099 AS_HELP_STRING([--disable-freetypetest], |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1100 [Do not try to compile and run a test FreeType program]), |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1101 [], |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1102 [enable_fttest=yes]) |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1103 |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1104 if test x$ft_config_exec_prefix != x ; then |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1105 ft_config_args="$ft_config_args --exec-prefix=$ft_config_exec_prefix" |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1106 if test x${FT2_CONFIG+set} != xset ; then |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1107 FT2_CONFIG=$ft_config_exec_prefix/bin/freetype-config |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1108 fi |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1109 fi |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1110 |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1111 if test x$ft_config_prefix != x ; then |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1112 ft_config_args="$ft_config_args --prefix=$ft_config_prefix" |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1113 if test x${FT2_CONFIG+set} != xset ; then |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1114 FT2_CONFIG=$ft_config_prefix/bin/freetype-config |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1115 fi |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1116 fi |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1117 |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1118 AC_PATH_PROG([FT2_CONFIG], [freetype-config], [no]) |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1119 |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1120 min_ft_version=m4_if([$1], [], [7.0.1], [$1]) |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1121 AC_MSG_CHECKING([for FreeType -- version >= $min_ft_version]) |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1122 no_ft="" |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1123 if test "$FT2_CONFIG" = "no" ; then |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1124 no_ft=yes |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1125 else |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1126 FT2_CFLAGS=`$FT2_CONFIG $ft_config_args --cflags` |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1127 FT2_LIBS=`$FT2_CONFIG $ft_config_args --libs` |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1128 ft_config_major_version=`$FT2_CONFIG $ft_config_args --version | \ |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1129 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1130 ft_config_minor_version=`$FT2_CONFIG $ft_config_args --version | \ |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1131 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1132 ft_config_micro_version=`$FT2_CONFIG $ft_config_args --version | \ |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1133 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1134 ft_min_major_version=`echo $min_ft_version | \ |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1135 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1136 ft_min_minor_version=`echo $min_ft_version | \ |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1137 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1138 ft_min_micro_version=`echo $min_ft_version | \ |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1139 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1140 if test x$enable_fttest = xyes ; then |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1141 ft_config_is_lt="" |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1142 if test $ft_config_major_version -lt $ft_min_major_version ; then |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1143 ft_config_is_lt=yes |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1144 else |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1145 if test $ft_config_major_version -eq $ft_min_major_version ; then |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1146 if test $ft_config_minor_version -lt $ft_min_minor_version ; then |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1147 ft_config_is_lt=yes |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1148 else |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1149 if test $ft_config_minor_version -eq $ft_min_minor_version ; then |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1150 if test $ft_config_micro_version -lt $ft_min_micro_version ; then |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1151 ft_config_is_lt=yes |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1152 fi |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1153 fi |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1154 fi |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1155 fi |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1156 fi |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1157 if test x$ft_config_is_lt = xyes ; then |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1158 no_ft=yes |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1159 else |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1160 ac_save_CFLAGS="$CFLAGS" |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1161 ac_save_LIBS="$LIBS" |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1162 CFLAGS="$CFLAGS $FT2_CFLAGS" |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1163 LIBS="$FT2_LIBS $LIBS" |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1164 |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1165 dnl |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1166 dnl Sanity checks for the results of freetype-config to some extent. |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1167 dnl |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1168 AC_RUN_IFELSE([ |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1169 AC_LANG_SOURCE([[ |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1170 |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1171 #include <ft2build.h> |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1172 #include FT_FREETYPE_H |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1173 #include <stdio.h> |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1174 #include <stdlib.h> |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1175 |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1176 int |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1177 main() |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1178 { |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1179 FT_Library library; |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1180 FT_Error error; |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1181 |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1182 error = FT_Init_FreeType(&library); |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1183 |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1184 if (error) |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1185 return 1; |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1186 else |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1187 { |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1188 FT_Done_FreeType(library); |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1189 return 0; |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1190 } |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1191 } |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1192 |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1193 ]]) |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1194 ], |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1195 [], |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1196 [no_ft=yes], |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1197 [echo $ECHO_N "cross compiling; assuming OK... $ECHO_C"]) |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1198 |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1199 CFLAGS="$ac_save_CFLAGS" |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1200 LIBS="$ac_save_LIBS" |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1201 fi dnl test $ft_config_version -lt $ft_min_version |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1202 fi dnl test x$enable_fttest = xyes |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1203 fi dnl test "$FT2_CONFIG" = "no" |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1204 |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1205 if test x$no_ft = x ; then |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1206 AC_MSG_RESULT([yes]) |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1207 m4_if([$2], [], [:], [$2]) |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1208 else |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1209 AC_MSG_RESULT([no]) |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1210 if test "$FT2_CONFIG" = "no" ; then |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1211 AC_MSG_WARN([ |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1212 |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1213 The freetype-config script installed by FreeType 2 could not be found. |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1214 If FreeType 2 was installed in PREFIX, make sure PREFIX/bin is in |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1215 your path, or set the FT2_CONFIG environment variable to the |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1216 full path to freetype-config. |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1217 ]) |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1218 else |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1219 if test x$ft_config_is_lt = xyes ; then |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1220 AC_MSG_WARN([ |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1221 |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1222 Your installed version of the FreeType 2 library is too old. |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1223 If you have different versions of FreeType 2, make sure that |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1224 correct values for --with-ft-prefix or --with-ft-exec-prefix |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1225 are used, or set the FT2_CONFIG environment variable to the |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1226 full path to freetype-config. |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1227 ]) |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1228 else |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1229 AC_MSG_WARN([ |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1230 |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1231 The FreeType test program failed to run. If your system uses |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1232 shared libraries and they are installed outside the normal |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1233 system library path, make sure the variable LD_LIBRARY_PATH |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1234 (or whatever is appropiate for your system) is correctly set. |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1235 ]) |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1236 fi |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1237 fi |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1238 |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1239 FT2_CFLAGS="" |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1240 FT2_LIBS="" |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1241 m4_if([$3], [], [:], [$3]) |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1242 fi |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1243 |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1244 AC_SUBST([FT2_CFLAGS]) |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1245 AC_SUBST([FT2_LIBS])]) |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1246 dnl end of freetype2.m4 |
8169
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1247 |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1248 dnl Check whether fast signed integer arithmetics using bit tricks |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1249 dnl can be used in oct-inttypes.h. Defines HAVE_FAST_INT_OPS if |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1250 dnl the following conditions hold: |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1251 dnl 1. Signed numbers are represented by twos complement |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1252 dnl (see <http://en.wikipedia.org/wiki/Two%27s_complement>) |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1253 dnl 2. static_cast to unsigned int counterpart works like interpreting |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1254 dnl the signed bit pattern as unsigned (and is thus zero-cost). |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1255 dnl 3. Signed addition and subtraction yield the same bit results as unsigned. |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1256 dnl (We use casts to prevent optimization interference, so there is no |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1257 dnl need for things like -ftrapv). |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1258 dnl 4. Bit operations on signed integers work like on unsigned integers, |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1259 dnl except for the shifts. Shifts are arithmetic. |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1260 dnl |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1261 AC_DEFUN([OCTAVE_FAST_INT_OPS],[ |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1262 AC_MSG_CHECKING([whether fast integer arithmetics is usable]) |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1263 AC_LANG_PUSH(C++) |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1264 AC_RUN_IFELSE([AC_LANG_PROGRAM([[ |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1265 #include <limits> |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1266 template<class UT, class ST> |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1267 static bool |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1268 do_test (UT, ST) |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1269 { |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1270 volatile ST s = std::numeric_limits<ST>::min () / 3; |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1271 volatile UT u = static_cast<UT> (s); |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1272 if (*(reinterpret_cast<volatile ST *> (&u)) != s) return true; |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1273 |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1274 u = 0; u = ~u; |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1275 if (*(reinterpret_cast<volatile ST *> (&u)) != -1) return true; |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1276 |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1277 ST sx, sy; |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1278 sx = std::numeric_limits<ST>::max () / 2 + 1; |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1279 sy = std::numeric_limits<ST>::max () / 2 + 2; |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1280 if (static_cast<ST> (static_cast<UT> (sx) + static_cast<UT> (sy)) |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1281 != std::numeric_limits<ST>::min () + 1) return true; |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1282 if (static_cast<ST> (static_cast<UT> (sx) - static_cast<UT> (sy)) |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1283 != -1) return true; |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1284 |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1285 if ((sx & sy) != (static_cast<UT> (sx) & static_cast<UT> (sy))) |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1286 return true; |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1287 if ((sx | sy) != (static_cast<UT> (sx) | static_cast<UT> (sy))) |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1288 return true; |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1289 if ((sx ^ sy) != (static_cast<UT> (sx) ^ static_cast<UT> (sy))) |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1290 return true; |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1291 if ((-1 >> 1) != -1) return true; |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1292 return false; |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1293 } |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1294 |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1295 #define DO_TEST(T) \ |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1296 if (do_test (static_cast<unsigned T> (0), static_cast<signed T> (0))) \ |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1297 return sizeof (T); |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1298 ]],[[ |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1299 DO_TEST(char) |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1300 DO_TEST(short) |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1301 DO_TEST(int) |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1302 DO_TEST(long) |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1303 #if (defined(HAVE_LONG_LONG_INT) && defined(HAVE_UNSIGNED_LONG_LONG_INT)) |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1304 DO_TEST(long long) |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1305 #endif |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1306 ]])], |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1307 [AC_MSG_RESULT([yes]) |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1308 AC_DEFINE(HAVE_FAST_INT_OPS,1,[Define if signed integers use two's complement])], |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1309 [AC_MSG_RESULT([no])]) |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1310 AC_LANG_POP(C++)]) |
8595
dee5d60257e4
Use Carbon framework to determine ScreenSize on Mac.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8169
diff
changeset
|
1311 dnl |
dee5d60257e4
Use Carbon framework to determine ScreenSize on Mac.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8169
diff
changeset
|
1312 dnl Check to see if the compiler and the linker can handle the flags |
8635
bef8f001032f
Further improvements for OCTAVE_HAVE_FRAMEWORK and the test for the MacOSX Carbon framework.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8595
diff
changeset
|
1313 dnl "-framework $1" for the given prologue $2 and the given body $3 of |
bef8f001032f
Further improvements for OCTAVE_HAVE_FRAMEWORK and the test for the MacOSX Carbon framework.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8595
diff
changeset
|
1314 dnl a source file. Arguments 2 and 3 optionally can also be empty. |
bef8f001032f
Further improvements for OCTAVE_HAVE_FRAMEWORK and the test for the MacOSX Carbon framework.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8595
diff
changeset
|
1315 dnl Add options (lower case letters $1) "--with-framework-$1" and |
bef8f001032f
Further improvements for OCTAVE_HAVE_FRAMEWORK and the test for the MacOSX Carbon framework.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8595
diff
changeset
|
1316 dnl "--without-framework-$1". If this test is successful then perform |
bef8f001032f
Further improvements for OCTAVE_HAVE_FRAMEWORK and the test for the MacOSX Carbon framework.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8595
diff
changeset
|
1317 dnl $4, otherwise do $5. |
8595
dee5d60257e4
Use Carbon framework to determine ScreenSize on Mac.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8169
diff
changeset
|
1318 dnl |
dee5d60257e4
Use Carbon framework to determine ScreenSize on Mac.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8169
diff
changeset
|
1319 dnl OCTAVE_HAVE_FRAMEWORK |
dee5d60257e4
Use Carbon framework to determine ScreenSize on Mac.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8169
diff
changeset
|
1320 AC_DEFUN(OCTAVE_HAVE_FRAMEWORK, [ |
dee5d60257e4
Use Carbon framework to determine ScreenSize on Mac.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8169
diff
changeset
|
1321 AC_MSG_CHECKING(whether ${LD-ld} accepts -framework $1) |
8635
bef8f001032f
Further improvements for OCTAVE_HAVE_FRAMEWORK and the test for the MacOSX Carbon framework.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8595
diff
changeset
|
1322 AC_CACHE_VAL(octave_cv_framework_$1, [ |
8595
dee5d60257e4
Use Carbon framework to determine ScreenSize on Mac.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8169
diff
changeset
|
1323 XLDFLAGS="$LDFLAGS" |
dee5d60257e4
Use Carbon framework to determine ScreenSize on Mac.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8169
diff
changeset
|
1324 LDFLAGS="$LDFLAGS -framework $1" |
8635
bef8f001032f
Further improvements for OCTAVE_HAVE_FRAMEWORK and the test for the MacOSX Carbon framework.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8595
diff
changeset
|
1325 AC_LANG_PUSH(C++) |
8595
dee5d60257e4
Use Carbon framework to determine ScreenSize on Mac.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8169
diff
changeset
|
1326 AC_LINK_IFELSE([AC_LANG_PROGRAM([$2], [$3])], |
8635
bef8f001032f
Further improvements for OCTAVE_HAVE_FRAMEWORK and the test for the MacOSX Carbon framework.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8595
diff
changeset
|
1327 eval "octave_cv_framework_$1=yes", |
bef8f001032f
Further improvements for OCTAVE_HAVE_FRAMEWORK and the test for the MacOSX Carbon framework.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8595
diff
changeset
|
1328 eval "octave_cv_framework_$1=no") |
bef8f001032f
Further improvements for OCTAVE_HAVE_FRAMEWORK and the test for the MacOSX Carbon framework.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8595
diff
changeset
|
1329 AC_LANG_POP(C++) |
8595
dee5d60257e4
Use Carbon framework to determine ScreenSize on Mac.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8169
diff
changeset
|
1330 LDFLAGS="$XLDFLAGS" |
dee5d60257e4
Use Carbon framework to determine ScreenSize on Mac.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8169
diff
changeset
|
1331 ]) |
8635
bef8f001032f
Further improvements for OCTAVE_HAVE_FRAMEWORK and the test for the MacOSX Carbon framework.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8595
diff
changeset
|
1332 if test "$octave_cv_framework_$1" = "yes"; then |
8595
dee5d60257e4
Use Carbon framework to determine ScreenSize on Mac.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8169
diff
changeset
|
1333 AC_MSG_RESULT(yes) |
8635
bef8f001032f
Further improvements for OCTAVE_HAVE_FRAMEWORK and the test for the MacOSX Carbon framework.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8595
diff
changeset
|
1334 AC_ARG_WITH(framework-m4_tolower($1), |
bef8f001032f
Further improvements for OCTAVE_HAVE_FRAMEWORK and the test for the MacOSX Carbon framework.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8595
diff
changeset
|
1335 [AS_HELP_STRING([--without-framework-m4_tolower($1)], |
bef8f001032f
Further improvements for OCTAVE_HAVE_FRAMEWORK and the test for the MacOSX Carbon framework.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8595
diff
changeset
|
1336 [don't use framework $1])], |
bef8f001032f
Further improvements for OCTAVE_HAVE_FRAMEWORK and the test for the MacOSX Carbon framework.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8595
diff
changeset
|
1337 with_have_framework=$withval, with_have_framework="yes") |
bef8f001032f
Further improvements for OCTAVE_HAVE_FRAMEWORK and the test for the MacOSX Carbon framework.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8595
diff
changeset
|
1338 if test "$with_have_framework" = "yes"; then |
bef8f001032f
Further improvements for OCTAVE_HAVE_FRAMEWORK and the test for the MacOSX Carbon framework.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8595
diff
changeset
|
1339 [$4] |
bef8f001032f
Further improvements for OCTAVE_HAVE_FRAMEWORK and the test for the MacOSX Carbon framework.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8595
diff
changeset
|
1340 else |
bef8f001032f
Further improvements for OCTAVE_HAVE_FRAMEWORK and the test for the MacOSX Carbon framework.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8595
diff
changeset
|
1341 AC_MSG_NOTICE([framework rejected by --without-framework-m4_tolower($1)]) |
bef8f001032f
Further improvements for OCTAVE_HAVE_FRAMEWORK and the test for the MacOSX Carbon framework.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8595
diff
changeset
|
1342 [$5] |
bef8f001032f
Further improvements for OCTAVE_HAVE_FRAMEWORK and the test for the MacOSX Carbon framework.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8595
diff
changeset
|
1343 fi |
8595
dee5d60257e4
Use Carbon framework to determine ScreenSize on Mac.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8169
diff
changeset
|
1344 else |
dee5d60257e4
Use Carbon framework to determine ScreenSize on Mac.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8169
diff
changeset
|
1345 AC_MSG_RESULT(no) |
dee5d60257e4
Use Carbon framework to determine ScreenSize on Mac.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8169
diff
changeset
|
1346 [$5] |
dee5d60257e4
Use Carbon framework to determine ScreenSize on Mac.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8169
diff
changeset
|
1347 fi |
dee5d60257e4
Use Carbon framework to determine ScreenSize on Mac.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8169
diff
changeset
|
1348 ]) |