Mercurial > hg > octave-nkf
annotate aclocal.m4 @ 8874:bd1b1fe9c6e9 ss-3-1-53
bump version info for snapshot
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 25 Feb 2009 18:35:47 -0500 |
parents | a2a9dc5e8565 |
children | eb63fbe60fab |
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, []) |
8775
a2a9dc5e8565
octave.gperf: eliminate whitespace to allow gperf 2.7.2 to work
John W. Eaton <jwe@octave.org>
parents:
8724
diff
changeset
|
524 if test -z "$GPERF"; then |
3731 | 525 GPERF='$(top_srcdir)/missing gperf' |
526 warn_gperf="I didn't find gperf, but it's only a problem if you need to reconstruct oct-gperf.h" | |
527 AC_MSG_WARN($warn_gperf) | |
528 fi | |
529 AC_SUBST(GPERF) | |
3673 | 530 ]) |
531 dnl | |
5934 | 532 dnl Is ghostscript installed? |
533 dnl | |
534 dnl OCTAVE_PROG_GHOSTSCRIPT | |
535 AC_DEFUN(OCTAVE_PROG_GHOSTSCRIPT, [ | |
6116 | 536 case "$canonical_host_type" in |
537 *-*-cygwin* | *-*-mingw32* | *-*-msdosmsvc) | |
538 gs_names="gs gswin32" | |
539 ;; | |
540 *) | |
541 gs_names=gs | |
542 ;; | |
543 esac | |
544 AC_CHECK_PROGS(GHOSTSCRIPT, $gs_names) | |
5934 | 545 if test -z "$GHOSTSCRIPT"; then |
546 GHOSTSCRIPT='$(top_srcdir)/missing gs' | |
547 warn_ghostscript="I didn't find ghostscript, but it's only a problem if you need to reconstruct figures for the manual" | |
548 AC_MSG_WARN($warn_ghostscript) | |
549 fi | |
550 AC_SUBST(GHOSTSCRIPT) | |
551 ]) | |
552 dnl | |
553 dnl Is makeinfo installed? | |
554 dnl | |
555 dnl OCTAVE_PROG_MAKEINFO | |
556 AC_DEFUN(OCTAVE_PROG_MAKEINFO, [ | |
6119 | 557 AC_CHECK_PROG(MAKEINFO, makeinfo, makeinfo, []) |
5934 | 558 if test -z "$MAKEINFO"; then |
559 MAKEINFO='$(top_srcdir)/missing makeinfo' | |
560 warn_makeinfo="I didn't find makeinfo, but it's only a problem if you need to reconstruct the Info version of the manual" | |
561 AC_MSG_WARN($warn_makeinfo) | |
562 fi | |
563 AC_SUBST(MAKEINFO) | |
564 ]) | |
565 dnl | |
566 dnl Is texi2dvi installed? | |
567 dnl | |
568 dnl OCTAVE_PROG_TEXI2DVI | |
569 AC_DEFUN(OCTAVE_PROG_TEXI2DVI, [ | |
6119 | 570 AC_CHECK_PROG(TEXI2DVI, texi2dvi, texi2dvi, []) |
5934 | 571 if test -z "$TEXI2DVI"; then |
572 TEXI2DVI='$(top_srcdir)/missing texi2dvi' | |
573 warn_texi2dvi="I didn't find texi2dvi, but it's only a problem if you need to reconstruct the DVI version of the manual" | |
574 AC_MSG_WARN($warn_texi2dvi) | |
575 fi | |
576 AC_SUBST(TEXI2DVI) | |
577 ]) | |
578 dnl | |
579 dnl Is texi2pdf installed? | |
580 dnl | |
581 dnl OCTAVE_PROG_TEXI2PDF | |
582 AC_DEFUN(OCTAVE_PROG_TEXI2PDF, [ | |
6116 | 583 AC_REQUIRE([OCTAVE_PROG_TEXI2DVI]) |
6119 | 584 AC_CHECK_PROG(TEXI2PDF, texi2pdf, texi2pdf, []) |
5934 | 585 if test -z "$TEXI2PDF"; then |
6116 | 586 missing=true; |
587 if test -n "$TEXI2DVI"; then | |
588 TEXI2PDF="$TEXI2DVI --pdf" | |
589 missing=false; | |
590 fi | |
591 else | |
592 missing=false; | |
593 fi | |
594 if $missing; then | |
5934 | 595 TEXI2PDF='$(top_srcdir)/missing texi2pdf' |
596 warn_texi2pdf="I didn't find texi2pdf, but it's only a problem if you need to reconstruct the PDF version of the manual" | |
597 AC_MSG_WARN($warn_texi2pdf) | |
598 fi | |
599 AC_SUBST(TEXI2PDF) | |
600 ]) | |
601 dnl | |
3769 | 602 dnl See if the C++ library is ISO compliant. |
603 dnl FIXME: This is obviously very simplistic, and trivially fooled. | |
604 dnl | |
605 dnl OCTAVE_CXX_ISO_COMPLIANT_LIBRARY | |
606 AC_DEFUN(OCTAVE_CXX_ISO_COMPLIANT_LIBRARY, [ | |
607 AC_REQUIRE([AC_PROG_CXX]) | |
608 AC_MSG_CHECKING([if C++ library is ISO compliant]) | |
609 AC_CACHE_VAL(octave_cv_cxx_iso_compliant_library, [ | |
3888 | 610 AC_LANG_PUSH(C++) |
3769 | 611 rm -f conftest.h |
3943 | 612 ### Omitting cwctype for now, since it is broken with gcc-3.0.x and |
613 ### possibly other versions... | |
3769 | 614 for inc in algorithm bitset cassert cctype cerrno cfloat ciso646 \ |
615 climits clocale cmath complex csetjmp csignal cstdarg cstddef \ | |
3943 | 616 cstdio cstdlib cstring ctime cwchar deque exception \ |
3769 | 617 fstream functional iomanip ios iosfwd iostream istream iterator \ |
618 limits list locale map memory new numeric ostream queue set \ | |
619 sstream stack stdexcept streambuf string strstream typeinfo \ | |
620 utility valarray vector; do | |
621 echo "#include <$inc>" >> conftest.h | |
622 done | |
5842 | 623 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include "conftest.h"]], |
624 [[std::bitset<50> flags; | |
3769 | 625 flags.set(); |
626 int digits = std::numeric_limits<unsigned long>::digits; | |
5842 | 627 digits = 0;]])], |
628 [octave_cv_cxx_iso_compliant_library=yes], | |
629 [octave_cv_cxx_iso_compliant_library=no]) | |
3888 | 630 AC_LANG_POP(C++) |
3769 | 631 ]) |
632 AC_MSG_RESULT($octave_cv_cxx_iso_compliant_library) | |
633 if test $octave_cv_cxx_iso_compliant_library = yes; then | |
3887 | 634 AC_DEFINE(CXX_ISO_COMPLIANT_LIBRARY, 1, [Define if your C++ runtime library is ISO compliant.]) |
3769 | 635 fi |
636 ]) | |
3822 | 637 dnl |
638 dnl Allow the user disable support for command line editing using GNU | |
639 dnl readline. | |
640 dnl | |
641 dnl OCTAVE_ENABLE_READLINE | |
642 AC_DEFUN(OCTAVE_ENABLE_READLINE, [ | |
643 USE_READLINE=true | |
4102 | 644 LIBREADLINE= |
3822 | 645 AC_ARG_ENABLE(readline, |
646 [ --enable-readline use readline library (default is yes)], | |
647 [if test "$enableval" = no; then | |
3824 | 648 USE_READLINE=false |
3825 | 649 warn_readline="command editing and history features require GNU Readline" |
3824 | 650 fi]) |
3822 | 651 if $USE_READLINE; then |
652 AC_CHECK_LIB(readline, rl_set_keyboard_input_timeout, [ | |
4102 | 653 LIBREADLINE="-lreadline" |
654 LIBS="$LIBREADLINE $LIBS" | |
3887 | 655 AC_DEFINE(USE_READLINE, 1, [Define to use the readline library.]) |
3822 | 656 ], [ |
3824 | 657 AC_MSG_WARN([I need GNU Readline 4.2 or later]) |
658 AC_MSG_ERROR([this is fatal unless you specify --disable-readline]) | |
3822 | 659 ]) |
660 fi | |
4102 | 661 AC_SUBST(LIBREADLINE) |
3822 | 662 ]) |
3842 | 663 dnl |
5854 | 664 dnl Check to see if C++ reintrepret cast works for function pointers. |
665 dnl | |
666 dnl OCTAVE_CXX_BROKEN_REINTERPRET_CAST | |
667 dnl | |
668 AC_DEFUN(OCTAVE_CXX_BROKEN_REINTERPRET_CAST, [ | |
669 AC_REQUIRE([AC_PROG_CXX]) | |
670 AC_LANG_PUSH(C++) | |
671 AC_CACHE_CHECK([for broken C++ reinterpret_cast], | |
672 octave_cv_cxx_broken_reinterpret_cast, [ | |
673 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <cmath>]], [[ | |
674 typedef double (*fptr) (double); | |
675 fptr psin = sin; | |
676 void *vptr = reinterpret_cast<void *> (psin); | |
677 psin = reinterpret_cast<fptr> (vptr);]])], | |
678 octave_cv_cxx_broken_reinterpret_cast=no, | |
679 octave_cv_cxx_broken_reinterpret_cast=yes)]) | |
680 if test $octave_cv_cxx_broken_reinterpret_cast = yes ; then | |
681 AC_DEFINE(CXX_BROKEN_REINTERPRET_CAST, 1, [Define if C++ reinterpret_cast fails for function pointers.]) | |
682 fi | |
683 AC_LANG_POP(C++)]) | |
684 dnl | |
4067 | 685 dnl Determine if mkdir accepts only one argument instead dnl of the usual 2. |
686 dnl | |
6104 | 687 AC_DEFUN(OCTAVE_MKDIR_TAKES_ONE_ARG, [ |
688 AC_LANG_PUSH(C++) | |
689 AC_CACHE_CHECK([if mkdir takes one argument], octave_cv_mkdir_takes_one_arg, | |
5844 | 690 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> |
4067 | 691 #ifdef HAVE_SYS_STAT_H |
692 # include <sys/stat.h> | |
693 #endif | |
694 #ifdef HAVE_UNISTD_H | |
695 # include <unistd.h> | |
696 #endif | |
697 #ifdef HAVE_DIRECT_H | |
698 # include <direct.h> | |
5844 | 699 #endif]], [[mkdir ("foo", 0);]])], |
4067 | 700 octave_cv_mkdir_takes_one_arg=no, octave_cv_mkdir_takes_one_arg=yes)]) |
6104 | 701 AC_LANG_POP(C++) |
4067 | 702 if test $octave_cv_mkdir_takes_one_arg = yes ; then |
703 AC_DEFINE(MKDIR_TAKES_ONE_ARG, 1, [Define if host mkdir takes a single argument.]) | |
704 fi | |
705 ]) | |
7244 | 706 dnl |
707 dnl Find find. | |
708 dnl | |
709 # Prefer GNU find if found. | |
710 AN_MAKEVAR([FIND], [OCTAVE_PROG_FIND]) | |
711 AN_PROGRAM([gfind], [OCTAVE_PROG_FIND]) | |
712 AN_PROGRAM([find], [OCTAVE_PROG_FIND]) | |
713 AC_DEFUN([OCTAVE_PROG_FIND], | |
714 [AC_CHECK_PROGS(FIND, gfind find, )]) | |
715 dnl | |
716 dnl Find sed. | |
717 dnl | |
4084 | 718 # Check for a fully-functional sed program, that truncates |
6955 | 719 # as few characters as possible and that supports "\(X\|Y\)" |
720 # style regular expression alternation. Prefer GNU sed if found. | |
4084 | 721 AC_DEFUN([OCTAVE_PROG_SED], |
6955 | 722 [AC_MSG_CHECKING([for a usable sed]) |
4084 | 723 if test -z "$SED"; then |
6822 | 724 AC_CACHE_VAL(ac_cv_path_sed, [ |
725 # Loop through the user's path and test for sed and gsed. | |
726 # Then use that list of sed's as ones to test for truncation. | |
727 _AS_PATH_WALK([$PATH], | |
728 [for ac_prog in sed gsed; do | |
729 for ac_exec_ext in '' $ac_executable_extensions; do | |
730 if AS_EXECUTABLE_P(["$as_dir/$ac_prog$ac_exec_ext"]); then | |
731 _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext" | |
732 fi | |
733 done | |
4084 | 734 done |
6822 | 735 ]) |
736 AS_TMPDIR(sed) | |
737 _max=0 | |
4084 | 738 _count=0 |
6822 | 739 # Add /usr/xpg4/bin/sed as it is typically found on Solaris |
740 # along with /bin/sed that truncates output. | |
741 for _sed in $_sed_list /usr/xpg4/bin/sed; do | |
742 test ! -f ${_sed} && break | |
743 cat /dev/null > "$tmp/sed.in" | |
744 _count=0 | |
745 echo $ECHO_N "0123456789$ECHO_C" >"$tmp/sed.in" | |
746 # Check for GNU sed and select it if it is found. | |
747 if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then | |
748 octave_cv_path_sed=${_sed} | |
749 break; | |
4084 | 750 fi |
6955 | 751 # Reject if RE alternation is not handled. |
752 if test "`echo 'this and that' | ${_sed} -n 's/\(this\|that\).*$/\1/p'`" != "this"; then | |
753 continue; | |
754 fi | |
6822 | 755 while true; do |
756 cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp" | |
757 mv "$tmp/sed.tmp" "$tmp/sed.in" | |
758 cp "$tmp/sed.in" "$tmp/sed.nl" | |
759 echo >>"$tmp/sed.nl" | |
760 ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break | |
761 cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break | |
762 # 10000 chars as input seems more than enough | |
763 test $_count -gt 10 && break | |
764 _count=`expr $_count + 1` | |
765 if test $_count -gt $_max; then | |
766 _max=$_count | |
767 octave_cv_path_sed=$_sed | |
768 fi | |
769 done | |
4084 | 770 done |
6822 | 771 rm -rf "$tmp" |
772 ]) | |
773 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
|
774 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
|
775 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
|
776 fi |
4084 | 777 fi |
6822 | 778 AC_SUBST(SED) |
4084 | 779 AC_MSG_RESULT([$SED]) |
780 ]) | |
5465 | 781 dnl |
782 dnl Find Perl. | |
783 dnl | |
784 dnl OCTAVE_PROG_PERL | |
785 AC_DEFUN(OCTAVE_PROG_PERL, | |
6119 | 786 [AC_CHECK_PROG(PERL, perl, perl, []) |
5465 | 787 AC_SUBST(PERL) |
788 ]) | |
5468 | 789 dnl |
5495 | 790 dnl Find Python. |
791 dnl | |
792 dnl OCTAVE_PROG_PYTHON | |
793 AC_DEFUN(OCTAVE_PROG_PYTHON, | |
6119 | 794 [AC_CHECK_PROG(PYTHON, python, python, []) |
5495 | 795 AC_SUBST(PYTHON) |
796 ]) | |
797 dnl | |
5468 | 798 dnl Find desktop-file-install. |
799 dnl | |
800 dnl OCTAVE_PROG_DESKTOP_FILE_INSTALL | |
801 AC_DEFUN(OCTAVE_PROG_DESKTOP_FILE_INSTALL, | |
6119 | 802 [AC_CHECK_PROG(DESKTOP_FILE_INSTALL, desktop-file-install, desktop-file-install, []) |
5468 | 803 AC_SUBST(DESKTOP_FILE_INSTALL) |
804 ]) | |
805 dnl | |
806 dnl Check for IEEE 754 data format. | |
807 dnl | |
4853 | 808 AC_DEFUN([OCTAVE_IEEE754_DATA_FORMAT], |
809 [AC_MSG_CHECKING([for IEEE 754 data format]) | |
810 AC_CACHE_VAL(octave_cv_ieee754_data_format, | |
5844 | 811 [AC_RUN_IFELSE([AC_LANG_SOURCE([[ |
4853 | 812 int |
813 main (void) | |
814 { | |
815 typedef union { unsigned char c[8]; double d; } ieeebytes; | |
816 | |
817 ieeebytes l = {0x1c, 0xbc, 0x6e, 0xf2, 0x54, 0x8b, 0x11, 0x43}; | |
818 ieeebytes b = {0x43, 0x11, 0x8b, 0x54, 0xf2, 0x6e, 0xbc, 0x1c}; | |
819 | |
820 return l.d != 1234567891234567.0 && b.d != 1234567891234567.0; | |
5844 | 821 }]])], |
4853 | 822 octave_cv_ieee754_data_format=yes, |
823 octave_cv_ieee754_data_format=no, | |
824 octave_cv_ieee754_data_format=no)]) | |
825 if test "$cross_compiling" = yes; then | |
826 AC_MSG_RESULT([$octave_cv_ieee754_data_format assumed for cross compilation]) | |
827 else | |
828 AC_MSG_RESULT($octave_cv_ieee754_data_format) | |
829 fi | |
830 if test "$octave_cv_ieee754_data_format" = yes; then | |
831 AC_DEFINE(HAVE_IEEE754_DATA_FORMAT, 1, [Define if your system uses IEEE 754 data format.]) | |
832 fi | |
833 ]) | |
5505 | 834 dnl |
835 dnl Check for UMFPACK seperately split complex matrix and RHS. Note | |
836 dnl that as umfpack.h can be in three different places, rather than | |
837 dnl include it, just declare the functions needed. | |
838 dnl | |
5512 | 839 dnl Assumes that the check for umfpack has already been performed. |
5505 | 840 dnl |
841 AC_DEFUN([OCTAVE_UMFPACK_SEPERATE_SPLIT], | |
842 [AC_MSG_CHECKING([for UMFPACK seperate complex matrix and rhs split]) | |
843 AC_CACHE_VAL(octave_cv_umfpack_seperate_split, | |
5844 | 844 [AC_RUN_IFELSE([AC_LANG_SOURCE([[ |
5505 | 845 #include <stdlib.h> |
5512 | 846 #if defined (HAVE_UFSPARSE_UMFPACK_h) |
847 #include <ufsparse/umfpack.h> | |
848 #elif defined (HAVE_UMFPACK_UMFPACK_H) | |
849 #include <umfpack/umfpack.h> | |
850 #elif defined (HAVE_UMFPACK_H) | |
851 #include <umfpack.h> | |
852 #endif | |
5505 | 853 int n = 5; |
854 int Ap[] = {0, 2, 5, 9, 10, 12}; | |
855 int Ai[] = {0, 1, 0, 2, 4, 1, 2, 3, 4, 2, 1, 4}; | |
856 double Ax[] = {2., 0., 3., 0., 3., 0., -1., 0., 4., 0., 4., 0., | |
857 -3., 0., 1., 0., 2., 0., 2., 0., 6., 0., 1., 0.}; | |
858 double br[] = {8., 45., -3., 3., 19.}; | |
859 double bi[] = {0., 0., 0., 0., 0.}; | |
860 int main (void) | |
861 { | |
862 double *null = (double *) NULL ; | |
863 double *x = (double *)malloc (2 * n * sizeof(double)); | |
864 int i ; | |
865 void *Symbolic, *Numeric ; | |
866 (void) umfpack_zi_symbolic (n, n, Ap, Ai, Ax, null, &Symbolic, null, null) ; | |
867 (void) umfpack_zi_numeric (Ap, Ai, Ax, null, Symbolic, &Numeric, null, null) ; | |
868 umfpack_zi_free_symbolic (&Symbolic) ; | |
869 (void) umfpack_zi_solve (0, Ap, Ai, Ax, null, x, null, br, bi, | |
870 Numeric, null, null) ; | |
871 umfpack_zi_free_numeric (&Numeric) ; | |
872 for (i = 0; i < n; i++, x+=2) | |
873 if (fabs(*x - i - 1.) > 1.e-13) | |
874 return (1); | |
875 return (0) ; | |
876 } | |
5844 | 877 ]])], |
5505 | 878 octave_cv_umfpack_seperate_split=yes, |
879 octave_cv_umfpack_seperate_split=no, | |
880 octave_cv_umfpack_seperate_split=no)]) | |
881 if test "$cross_compiling" = yes; then | |
882 AC_MSG_RESULT([$octave_cv_umfpack_seperate_split assumed for cross compilation]) | |
883 else | |
884 AC_MSG_RESULT($octave_cv_umfpack_seperate_split) | |
885 fi | |
886 if test "$octave_cv_umfpack_seperate_split" = yes; then | |
887 AC_DEFINE(UMFPACK_SEPARATE_SPLIT, 1, [Define if the UMFPACK Complex solver allow matrix and RHS to be split independently]) | |
888 fi | |
889 ]) | |
6276 | 890 dnl |
891 dnl Check whether using HDF5 DLL under Windows. This is done by | |
892 dnl testing for a data symbol in the HDF5 library, which would | |
893 dnl requires the definition of _HDF5USEDL_ under MSVC compiler. | |
894 dnl | |
895 AC_DEFUN([OCTAVE_HDF5_DLL], [ | |
896 AC_CACHE_CHECK([if _HDF5USEDLL_ needs to be defined],octave_cv_hdf5_dll, [ | |
6724 | 897 AC_TRY_LINK([#include <hdf5.h>], [hid_t x = H5T_NATIVE_DOUBLE; return x], |
6276 | 898 octave_cv_hdf5_dll=no, [ |
899 CFLAGS_old=$CFLAGS | |
900 CFLAGS="$CFLAGS -DWIN32 -D_HDF5USEDLL_" | |
6724 | 901 AC_TRY_LINK([#include <hdf5.h>], [hid_t x = H5T_NATIVE_DOUBLE; return x], |
6276 | 902 octave_cv_hdf5_dll=yes, |
903 octave_cv_hdf5_dll=no) | |
904 CFLAGS=$CFLAGS_old])]) | |
905 if test "$octave_cv_hdf5_dll" = yes; then | |
906 AC_DEFINE(_HDF5USEDLL_, 1, [Define if using HDF5 dll (Win32)]) | |
907 fi]) | |
6823 | 908 dnl |
8676 | 909 dnl Check whether HDF5 library has version 1.6 API functions. |
910 dnl | |
911 AC_DEFUN([OCTAVE_HDF5_HAS_REQUIRED_API], [ | |
912 AC_CACHE_CHECK([whether HDF5 library has required API], | |
913 octave_cv_hdf5_has_required_api, [ | |
914 AC_TRY_LINK([ | |
915 #define H5_USE_16_API 1 | |
916 #include <hdf5.h> | |
917 ], [ | |
918 H5Eset_auto (0, 0);], [ | |
919 octave_cv_hdf5_has_required_api=yes], [ | |
920 octave_cv_hdf5_has_required_api=no])]) | |
921 if test "$octave_cv_hdf5_has_required_api" = "no"; then | |
922 WITH_HDF5=false | |
923 warn_hdf5="HDF5 library does not provide the version 1.6 API. Octave will not be able to save or load HDF5 data files." | |
924 AC_MSG_WARN($warn_hdf5) | |
925 fi | |
926 ]) | |
927 dnl | |
6823 | 928 dnl Check for the QHull version. |
929 dnl | |
930 AC_DEFUN(AC_CHECK_QHULL_VERSION, | |
931 [AC_MSG_CHECKING([for qh_qhull in -lqhull with qh_version]) | |
932 AC_CACHE_VAL(octave_cv_lib_qhull_version, [ | |
933 cat > conftest.c <<EOF | |
934 #include <stdio.h> | |
935 char *qh_version = "version"; | |
936 char qh_qhull(); | |
937 int | |
938 main(argc, argv) | |
939 int argc; | |
940 char **argv; | |
941 { | |
942 qh_qhull(); | |
943 return 0; | |
944 } | |
945 EOF | |
946 | |
947 octave_qhull_try="${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS conftest.c -o conftest -lqhull $LIBS" | |
7061 | 948 if (eval "$octave_qhull_try") 2>&AS_MESSAGE_LOG_FD && test -s conftest ; then |
6823 | 949 octave_cv_lib_qhull_version=yes |
950 else | |
951 octave_cv_lib_qhull_version=no | |
952 fi | |
953 rm -f conftest.c conftest.o conftest | |
954 ])dnl | |
955 if test "$octave_cv_lib_qhull_version" = "yes"; then | |
956 AC_MSG_RESULT(yes) | |
957 ifelse([$1], , , [$1]) | |
958 else | |
959 AC_MSG_RESULT(no) | |
960 ifelse([$2], , , [$2]) | |
961 fi | |
962 ]) | |
7825
13871b7de124
Import sources for OpenGL-based renderer.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7361
diff
changeset
|
963 dnl |
8659
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
964 dnl Check whether QHull works (does not crash) |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
965 dnl |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
966 AC_DEFUN(AC_CHECK_QHULL_OK, |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
967 [AC_MSG_CHECKING([whether the qhull library works]) |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
968 AC_CACHE_VAL(octave_cv_lib_qhull_ok, |
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 save_LIBS="$LIBS" |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
971 LIBS="$LIBS -lqhull -lm" |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
972 AC_RUN_IFELSE([AC_LANG_SOURCE([[ |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
973 #include <stdio.h> |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
974 #include <qhull/qhull.h> |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
975 |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
976 #ifdef NEED_QHULL_VERSION |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
977 char *qh_version = "version"; |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
978 #endif |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
979 int main() |
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 int dim = 2, n = 4; |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
982 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
|
983 boolT ismalloc = 0; |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
984 |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
985 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
|
986 } |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
987 ]])], |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
988 [octave_cv_lib_qhull_ok=yes], |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
989 [octave_cv_lib_qhull_ok=no], |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
990 [octave_cv_lib_qhull_ok=yes]) |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
991 LIBS="$save_LIBS" |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
992 ]) |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
993 if test "$octave_cv_lib_qhull_ok" = "yes"; then |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
994 AC_MSG_RESULT(yes) |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
995 ifelse([$1], , , [$1]) |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
996 else |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
997 AC_MSG_RESULT(no) |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
998 ifelse([$2], , , [$2]) |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
999 fi |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
1000 ]) |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
1001 dnl |
7825
13871b7de124
Import sources for OpenGL-based renderer.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7361
diff
changeset
|
1002 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
|
1003 dnl |
13871b7de124
Import sources for OpenGL-based renderer.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7361
diff
changeset
|
1004 AC_DEFUN([OCTAVE_OPENGL], [ |
13871b7de124
Import sources for OpenGL-based renderer.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7361
diff
changeset
|
1005 OPENGL_LIBS= |
8724
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1006 |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1007 ### On MacOSX systems the OpenGL framework can be used |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1008 OCTAVE_HAVE_FRAMEWORK(OpenGL, [ |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1009 #include <OpenGL/gl.h> |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1010 #include <OpenGL/glu.h> ], [GLint par; glGetIntegerv (GL_VIEWPORT, &par);], |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1011 [have_framework_opengl="yes"], [have_framework_opengl="no"]) |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1012 |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1013 if test $have_framework_opengl = "yes"; then |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1014 AC_DEFINE(HAVE_FRAMEWORK_OPENGL, 1, [Define if framework OPENGL is available.]) |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1015 OPENGL_LIBS="-Wl,-framework -Wl,OpenGL" |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1016 AC_MSG_NOTICE([adding -Wl,-framework -Wl,OpenGL to OPENGL_LIBS]) |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1017 OCTAVE_GLUTESSCALLBACK_THREEDOTS |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1018 else |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1019 case $canonical_host_type in |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1020 *-*-mingw32* | *-*-msdosmsvc) |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1021 AC_CHECK_HEADERS(windows.h) |
7825
13871b7de124
Import sources for OpenGL-based renderer.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7361
diff
changeset
|
1022 ;; |
8724
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1023 esac |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1024 have_opengl_incs=no |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1025 AC_CHECK_HEADERS([GL/gl.h OpenGL/gl.h], [ |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1026 AC_CHECK_HEADERS([GL/glu.h OpenGL/glu.h], [ |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1027 have_opengl_incs=yes; break], [], [ |
7825
13871b7de124
Import sources for OpenGL-based renderer.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7361
diff
changeset
|
1028 #ifdef HAVE_WINDOWS_H |
7954 | 1029 #include <windows.h> |
1030 #endif | |
8724
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1031 ]) |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1032 break |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1033 ], [], [ |
7825
13871b7de124
Import sources for OpenGL-based renderer.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7361
diff
changeset
|
1034 #ifdef HAVE_WINDOWS_H |
7954 | 1035 #include <windows.h> |
1036 #endif | |
8724
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1037 ]) |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1038 |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1039 if test "$have_opengl_incs" = "yes"; then |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1040 case $canonical_host_type in |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1041 *-*-mingw32* | *-*-msdosmsvc) |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1042 save_LIBS="$LIBS" |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1043 LIBS="$LIBS -lopengl32" |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1044 AC_MSG_CHECKING([for glEnable in -lopengl32]) |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1045 AC_TRY_LINK([ |
7825
13871b7de124
Import sources for OpenGL-based renderer.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7361
diff
changeset
|
1046 #if HAVE_WINDOWS_H |
7954 | 1047 #include <windows.h> |
7825
13871b7de124
Import sources for OpenGL-based renderer.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7361
diff
changeset
|
1048 #endif |
7954 | 1049 #if defined (HAVE_GL_GL_H) |
1050 #include <GL/gl.h> | |
1051 #elif defined (HAVE_OPENGL_GL_H) | |
1052 #include <OpenGL/gl.h> | |
1053 #endif | |
8724
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1054 ], [glEnable(GL_SMOOTH);], OPENGL_LIBS="-lopengl32 -lglu32") |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1055 LIBS="$save_LIBS" |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1056 if test "x$OPENGL_LIBS" != "x"; then |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1057 AC_MSG_RESULT(yes) |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1058 else |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1059 AC_MSG_RESULT(no) |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1060 fi |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1061 ;; |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1062 *) |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1063 save_LDFLAGS="$LDFLAGS" |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1064 LDFLAGS="$LDFLAGS -L/usr/X11R6/lib" |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1065 AC_CHECK_LIB(GL, glEnable, OPENGL_LIBS="-L/usr/X11R6/lib -lGL -lGLU") |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1066 LDFLAGS="$save_LDFLAGS" |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1067 ;; |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1068 esac |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1069 fi |
7825
13871b7de124
Import sources for OpenGL-based renderer.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7361
diff
changeset
|
1070 fi |
13871b7de124
Import sources for OpenGL-based renderer.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7361
diff
changeset
|
1071 AC_SUBST(OPENGL_LIBS) |
13871b7de124
Import sources for OpenGL-based renderer.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7361
diff
changeset
|
1072 ]) |
7834
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1073 dnl |
8724
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1074 dnl See if function gluTessCallback is called with "(...)" |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1075 dnl |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1076 dnl OCTAVE_GLUTESSCALLBACK_THREEDOTS |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1077 AC_DEFUN(OCTAVE_GLUTESSCALLBACK_THREEDOTS, |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1078 [AC_CACHE_CHECK([whether gluTessCallback is called with "(...)"], |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1079 octave_cv_glutesscallback_threedots, |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1080 [AC_LANG_PUSH(C++) |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1081 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1082 #ifdef HAVE_GL_GLU_H |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1083 #include <GL/glu.h> |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1084 #elif defined HAVE_OPENGL_GLU_H || defined HAVE_FRAMEWORK_OPENGL |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1085 #include <OpenGL/glu.h> |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1086 #endif]], |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1087 [[GLvoid (*func)(...); gluTessCallback(0, 0, func);]])], |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1088 octave_cv_glutesscallback_threedots="yes", octave_cv_glutesscallback_threedots="no")]) |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1089 AC_LANG_POP(C++) |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1090 if test $octave_cv_glutesscallback_threedots = "yes"; then |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1091 AC_DEFINE(HAVE_GLUTESSCALLBACK_THREEDOTS, 1, |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1092 [Define if gluTessCallback is called with (...)]) |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1093 fi |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1094 ]) |
a50228129dba
Introduce new macro OCTAVE_GLUTESSCALLBACK_THREEDOTS. Use definitions HAVE_FRAMEWORK_OPENGL and HAVE_GLUTESSCALLBACK_THREEDOTS for Mac's framework OpenGL implementation.
Ben Abbott <bpabbott@mac.com>
parents:
8676
diff
changeset
|
1095 dnl |
7834
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1096 dnl Configure paths for FreeType2 |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1097 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
|
1098 dnl |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1099 dnl Copyright 2001, 2003 by |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1100 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
|
1101 dnl |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1102 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
|
1103 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
|
1104 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
|
1105 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
|
1106 dnl fully. |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1107 dnl |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1108 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
|
1109 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
|
1110 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
|
1111 dnl that program. |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1112 dnl |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1113 dnl serial 2 |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1114 dnl |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1115 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
|
1116 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
|
1117 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
|
1118 dnl FreeType 2.0.4). |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1119 dnl |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1120 AC_DEFUN([AC_CHECK_FT2], |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1121 [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
|
1122 dnl |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1123 AC_ARG_WITH([ft-prefix], |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1124 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
|
1125 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
|
1126 [Prefix where FreeType is installed (optional)]), |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1127 [ft_config_prefix="$withval"], |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1128 [ft_config_prefix=""]) |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1129 |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1130 AC_ARG_WITH([ft-exec-prefix], |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1131 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
|
1132 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
|
1133 [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
|
1134 [ft_config_exec_prefix="$withval"], |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1135 [ft_config_exec_prefix=""]) |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1136 |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1137 AC_ARG_ENABLE([freetypetest], |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1138 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
|
1139 AS_HELP_STRING([--disable-freetypetest], |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1140 [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
|
1141 [], |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1142 [enable_fttest=yes]) |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1143 |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1144 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
|
1145 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
|
1146 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
|
1147 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
|
1148 fi |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1149 fi |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1150 |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1151 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
|
1152 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
|
1153 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
|
1154 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
|
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 |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1158 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
|
1159 |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1160 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
|
1161 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
|
1162 no_ft="" |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1163 if test "$FT2_CONFIG" = "no" ; then |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1164 no_ft=yes |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1165 else |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1166 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
|
1167 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
|
1168 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
|
1169 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
|
1170 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
|
1171 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
|
1172 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
|
1173 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
|
1174 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
|
1175 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
|
1176 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
|
1177 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
|
1178 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
|
1179 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
|
1180 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
|
1181 ft_config_is_lt="" |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1182 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
|
1183 ft_config_is_lt=yes |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1184 else |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1185 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
|
1186 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
|
1187 ft_config_is_lt=yes |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1188 else |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1189 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
|
1190 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
|
1191 ft_config_is_lt=yes |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1192 fi |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1193 fi |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1194 fi |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1195 fi |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1196 fi |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1197 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
|
1198 no_ft=yes |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1199 else |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1200 ac_save_CFLAGS="$CFLAGS" |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1201 ac_save_LIBS="$LIBS" |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1202 CFLAGS="$CFLAGS $FT2_CFLAGS" |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1203 LIBS="$FT2_LIBS $LIBS" |
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 dnl |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1206 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
|
1207 dnl |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1208 AC_RUN_IFELSE([ |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1209 AC_LANG_SOURCE([[ |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1210 |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1211 #include <ft2build.h> |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1212 #include FT_FREETYPE_H |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1213 #include <stdio.h> |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1214 #include <stdlib.h> |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1215 |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1216 int |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1217 main() |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1218 { |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1219 FT_Library library; |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1220 FT_Error error; |
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 error = FT_Init_FreeType(&library); |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1223 |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1224 if (error) |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1225 return 1; |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1226 else |
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 FT_Done_FreeType(library); |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1229 return 0; |
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 } |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1232 |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1233 ]]) |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1234 ], |
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 [no_ft=yes], |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1237 [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
|
1238 |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1239 CFLAGS="$ac_save_CFLAGS" |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1240 LIBS="$ac_save_LIBS" |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1241 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
|
1242 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
|
1243 fi dnl test "$FT2_CONFIG" = "no" |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1244 |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1245 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
|
1246 AC_MSG_RESULT([yes]) |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1247 m4_if([$2], [], [:], [$2]) |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1248 else |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1249 AC_MSG_RESULT([no]) |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1250 if test "$FT2_CONFIG" = "no" ; then |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1251 AC_MSG_WARN([ |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1252 |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1253 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
|
1254 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
|
1255 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
|
1256 full path to freetype-config. |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1257 ]) |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1258 else |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1259 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
|
1260 AC_MSG_WARN([ |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1261 |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1262 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
|
1263 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
|
1264 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
|
1265 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
|
1266 full path to freetype-config. |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1267 ]) |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1268 else |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1269 AC_MSG_WARN([ |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1270 |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1271 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
|
1272 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
|
1273 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
|
1274 (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
|
1275 ]) |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1276 fi |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1277 fi |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1278 |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1279 FT2_CFLAGS="" |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1280 FT2_LIBS="" |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1281 m4_if([$3], [], [:], [$3]) |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1282 fi |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1283 |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1284 AC_SUBST([FT2_CFLAGS]) |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1285 AC_SUBST([FT2_LIBS])]) |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1286 dnl end of freetype2.m4 |
8169
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1287 |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1288 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
|
1289 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
|
1290 dnl the following conditions hold: |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1291 dnl 1. Signed numbers are represented by twos complement |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1292 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
|
1293 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
|
1294 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
|
1295 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
|
1296 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
|
1297 dnl need for things like -ftrapv). |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1298 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
|
1299 dnl except for the shifts. Shifts are arithmetic. |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1300 dnl |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1301 AC_DEFUN([OCTAVE_FAST_INT_OPS],[ |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1302 AC_MSG_CHECKING([whether fast integer arithmetics is usable]) |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1303 AC_LANG_PUSH(C++) |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1304 AC_RUN_IFELSE([AC_LANG_PROGRAM([[ |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1305 #include <limits> |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1306 template<class UT, class ST> |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1307 static bool |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1308 do_test (UT, ST) |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1309 { |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1310 volatile ST s = std::numeric_limits<ST>::min () / 3; |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1311 volatile UT u = static_cast<UT> (s); |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1312 if (*(reinterpret_cast<volatile ST *> (&u)) != s) return true; |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1313 |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1314 u = 0; u = ~u; |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1315 if (*(reinterpret_cast<volatile ST *> (&u)) != -1) return true; |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1316 |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1317 ST sx, sy; |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1318 sx = std::numeric_limits<ST>::max () / 2 + 1; |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1319 sy = std::numeric_limits<ST>::max () / 2 + 2; |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1320 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
|
1321 != std::numeric_limits<ST>::min () + 1) return true; |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1322 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
|
1323 != -1) return true; |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1324 |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1325 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
|
1326 return true; |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1327 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
|
1328 return true; |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1329 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
|
1330 return true; |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1331 if ((-1 >> 1) != -1) return true; |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1332 return false; |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1333 } |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1334 |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1335 #define DO_TEST(T) \ |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1336 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
|
1337 return sizeof (T); |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1338 ]],[[ |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1339 DO_TEST(char) |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1340 DO_TEST(short) |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1341 DO_TEST(int) |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1342 DO_TEST(long) |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1343 #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
|
1344 DO_TEST(long long) |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1345 #endif |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1346 ]])], |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1347 [AC_MSG_RESULT([yes]) |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1348 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
|
1349 [AC_MSG_RESULT([no])]) |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1350 AC_LANG_POP(C++)]) |
8595
dee5d60257e4
Use Carbon framework to determine ScreenSize on Mac.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8169
diff
changeset
|
1351 dnl |
dee5d60257e4
Use Carbon framework to determine ScreenSize on Mac.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8169
diff
changeset
|
1352 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
|
1353 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
|
1354 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
|
1355 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
|
1356 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
|
1357 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
|
1358 dnl |
dee5d60257e4
Use Carbon framework to determine ScreenSize on Mac.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8169
diff
changeset
|
1359 dnl OCTAVE_HAVE_FRAMEWORK |
dee5d60257e4
Use Carbon framework to determine ScreenSize on Mac.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8169
diff
changeset
|
1360 AC_DEFUN(OCTAVE_HAVE_FRAMEWORK, [ |
dee5d60257e4
Use Carbon framework to determine ScreenSize on Mac.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8169
diff
changeset
|
1361 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
|
1362 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
|
1363 XLDFLAGS="$LDFLAGS" |
dee5d60257e4
Use Carbon framework to determine ScreenSize on Mac.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8169
diff
changeset
|
1364 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
|
1365 AC_LANG_PUSH(C++) |
8595
dee5d60257e4
Use Carbon framework to determine ScreenSize on Mac.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8169
diff
changeset
|
1366 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
|
1367 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
|
1368 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
|
1369 AC_LANG_POP(C++) |
8595
dee5d60257e4
Use Carbon framework to determine ScreenSize on Mac.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8169
diff
changeset
|
1370 LDFLAGS="$XLDFLAGS" |
dee5d60257e4
Use Carbon framework to determine ScreenSize on Mac.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8169
diff
changeset
|
1371 ]) |
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
|
1372 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
|
1373 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
|
1374 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
|
1375 [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
|
1376 [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
|
1377 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
|
1378 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
|
1379 [$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
|
1380 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
|
1381 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
|
1382 [$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
|
1383 fi |
8595
dee5d60257e4
Use Carbon framework to determine ScreenSize on Mac.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8169
diff
changeset
|
1384 else |
dee5d60257e4
Use Carbon framework to determine ScreenSize on Mac.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8169
diff
changeset
|
1385 AC_MSG_RESULT(no) |
dee5d60257e4
Use Carbon framework to determine ScreenSize on Mac.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8169
diff
changeset
|
1386 [$5] |
dee5d60257e4
Use Carbon framework to determine ScreenSize on Mac.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8169
diff
changeset
|
1387 fi |
dee5d60257e4
Use Carbon framework to determine ScreenSize on Mac.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8169
diff
changeset
|
1388 ]) |