Mercurial > octave-antonio
annotate aclocal.m4 @ 9515:eee9b3150446
more configure tweaks
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 11 Aug 2009 19:30:37 -0400 |
parents | 4af6e29449c1 |
children | ee99f9f37505 |
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, |
8920 | 4 dnl 2003, 2004, 2005, 2006, 2007, 2008, 2009 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 | |
9515 | 644 READLINE_LIBS= |
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 |
9515 | 652 save_LIBS="$LIBS" |
653 LIBS="$TERM_LIBS" | |
3822 | 654 AC_CHECK_LIB(readline, rl_set_keyboard_input_timeout, [ |
9515 | 655 READLINE_LIBS="-lreadline" |
3887 | 656 AC_DEFINE(USE_READLINE, 1, [Define to use the readline library.]) |
3822 | 657 ], [ |
3824 | 658 AC_MSG_WARN([I need GNU Readline 4.2 or later]) |
659 AC_MSG_ERROR([this is fatal unless you specify --disable-readline]) | |
3822 | 660 ]) |
9515 | 661 LIBS="$save_LIBS" |
3822 | 662 fi |
9515 | 663 AC_SUBST(READLINE_LIBS) |
3822 | 664 ]) |
3842 | 665 dnl |
5854 | 666 dnl Check to see if C++ reintrepret cast works for function pointers. |
667 dnl | |
668 dnl OCTAVE_CXX_BROKEN_REINTERPRET_CAST | |
669 dnl | |
670 AC_DEFUN(OCTAVE_CXX_BROKEN_REINTERPRET_CAST, [ | |
671 AC_REQUIRE([AC_PROG_CXX]) | |
672 AC_LANG_PUSH(C++) | |
673 AC_CACHE_CHECK([for broken C++ reinterpret_cast], | |
674 octave_cv_cxx_broken_reinterpret_cast, [ | |
675 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <cmath>]], [[ | |
676 typedef double (*fptr) (double); | |
677 fptr psin = sin; | |
678 void *vptr = reinterpret_cast<void *> (psin); | |
679 psin = reinterpret_cast<fptr> (vptr);]])], | |
680 octave_cv_cxx_broken_reinterpret_cast=no, | |
681 octave_cv_cxx_broken_reinterpret_cast=yes)]) | |
682 if test $octave_cv_cxx_broken_reinterpret_cast = yes ; then | |
683 AC_DEFINE(CXX_BROKEN_REINTERPRET_CAST, 1, [Define if C++ reinterpret_cast fails for function pointers.]) | |
684 fi | |
685 AC_LANG_POP(C++)]) | |
686 dnl | |
4067 | 687 dnl Determine if mkdir accepts only one argument instead dnl of the usual 2. |
688 dnl | |
6104 | 689 AC_DEFUN(OCTAVE_MKDIR_TAKES_ONE_ARG, [ |
690 AC_LANG_PUSH(C++) | |
691 AC_CACHE_CHECK([if mkdir takes one argument], octave_cv_mkdir_takes_one_arg, | |
5844 | 692 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> |
4067 | 693 #ifdef HAVE_SYS_STAT_H |
694 # include <sys/stat.h> | |
695 #endif | |
696 #ifdef HAVE_UNISTD_H | |
697 # include <unistd.h> | |
698 #endif | |
699 #ifdef HAVE_DIRECT_H | |
700 # include <direct.h> | |
5844 | 701 #endif]], [[mkdir ("foo", 0);]])], |
4067 | 702 octave_cv_mkdir_takes_one_arg=no, octave_cv_mkdir_takes_one_arg=yes)]) |
6104 | 703 AC_LANG_POP(C++) |
4067 | 704 if test $octave_cv_mkdir_takes_one_arg = yes ; then |
705 AC_DEFINE(MKDIR_TAKES_ONE_ARG, 1, [Define if host mkdir takes a single argument.]) | |
706 fi | |
707 ]) | |
7244 | 708 dnl |
709 dnl Find find. | |
710 dnl | |
711 # Prefer GNU find if found. | |
712 AN_MAKEVAR([FIND], [OCTAVE_PROG_FIND]) | |
713 AN_PROGRAM([gfind], [OCTAVE_PROG_FIND]) | |
714 AN_PROGRAM([find], [OCTAVE_PROG_FIND]) | |
715 AC_DEFUN([OCTAVE_PROG_FIND], | |
716 [AC_CHECK_PROGS(FIND, gfind find, )]) | |
717 dnl | |
718 dnl Find sed. | |
719 dnl | |
4084 | 720 # Check for a fully-functional sed program, that truncates |
6955 | 721 # as few characters as possible and that supports "\(X\|Y\)" |
722 # style regular expression alternation. Prefer GNU sed if found. | |
4084 | 723 AC_DEFUN([OCTAVE_PROG_SED], |
6955 | 724 [AC_MSG_CHECKING([for a usable sed]) |
4084 | 725 if test -z "$SED"; then |
6822 | 726 AC_CACHE_VAL(ac_cv_path_sed, [ |
727 # Loop through the user's path and test for sed and gsed. | |
728 # Then use that list of sed's as ones to test for truncation. | |
729 _AS_PATH_WALK([$PATH], | |
730 [for ac_prog in sed gsed; do | |
731 for ac_exec_ext in '' $ac_executable_extensions; do | |
732 if AS_EXECUTABLE_P(["$as_dir/$ac_prog$ac_exec_ext"]); then | |
733 _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext" | |
734 fi | |
735 done | |
4084 | 736 done |
6822 | 737 ]) |
738 AS_TMPDIR(sed) | |
739 _max=0 | |
4084 | 740 _count=0 |
6822 | 741 # Add /usr/xpg4/bin/sed as it is typically found on Solaris |
742 # along with /bin/sed that truncates output. | |
743 for _sed in $_sed_list /usr/xpg4/bin/sed; do | |
744 test ! -f ${_sed} && break | |
745 cat /dev/null > "$tmp/sed.in" | |
746 _count=0 | |
747 echo $ECHO_N "0123456789$ECHO_C" >"$tmp/sed.in" | |
748 # Check for GNU sed and select it if it is found. | |
749 if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then | |
750 octave_cv_path_sed=${_sed} | |
751 break; | |
4084 | 752 fi |
6955 | 753 # Reject if RE alternation is not handled. |
754 if test "`echo 'this and that' | ${_sed} -n 's/\(this\|that\).*$/\1/p'`" != "this"; then | |
755 continue; | |
756 fi | |
6822 | 757 while true; do |
758 cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp" | |
759 mv "$tmp/sed.tmp" "$tmp/sed.in" | |
760 cp "$tmp/sed.in" "$tmp/sed.nl" | |
761 echo >>"$tmp/sed.nl" | |
762 ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break | |
763 cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break | |
764 # 10000 chars as input seems more than enough | |
765 test $_count -gt 10 && break | |
766 _count=`expr $_count + 1` | |
767 if test $_count -gt $_max; then | |
768 _max=$_count | |
769 octave_cv_path_sed=$_sed | |
770 fi | |
771 done | |
4084 | 772 done |
6822 | 773 rm -rf "$tmp" |
774 ]) | |
775 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
|
776 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
|
777 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
|
778 fi |
4084 | 779 fi |
6822 | 780 AC_SUBST(SED) |
4084 | 781 AC_MSG_RESULT([$SED]) |
782 ]) | |
5465 | 783 dnl |
784 dnl Find Perl. | |
785 dnl | |
786 dnl OCTAVE_PROG_PERL | |
787 AC_DEFUN(OCTAVE_PROG_PERL, | |
6119 | 788 [AC_CHECK_PROG(PERL, perl, perl, []) |
5465 | 789 AC_SUBST(PERL) |
790 ]) | |
5468 | 791 dnl |
5495 | 792 dnl Find Python. |
793 dnl | |
794 dnl OCTAVE_PROG_PYTHON | |
795 AC_DEFUN(OCTAVE_PROG_PYTHON, | |
6119 | 796 [AC_CHECK_PROG(PYTHON, python, python, []) |
5495 | 797 AC_SUBST(PYTHON) |
798 ]) | |
799 dnl | |
5468 | 800 dnl Find desktop-file-install. |
801 dnl | |
802 dnl OCTAVE_PROG_DESKTOP_FILE_INSTALL | |
803 AC_DEFUN(OCTAVE_PROG_DESKTOP_FILE_INSTALL, | |
6119 | 804 [AC_CHECK_PROG(DESKTOP_FILE_INSTALL, desktop-file-install, desktop-file-install, []) |
5468 | 805 AC_SUBST(DESKTOP_FILE_INSTALL) |
806 ]) | |
807 dnl | |
808 dnl Check for IEEE 754 data format. | |
809 dnl | |
4853 | 810 AC_DEFUN([OCTAVE_IEEE754_DATA_FORMAT], |
811 [AC_MSG_CHECKING([for IEEE 754 data format]) | |
812 AC_CACHE_VAL(octave_cv_ieee754_data_format, | |
5844 | 813 [AC_RUN_IFELSE([AC_LANG_SOURCE([[ |
4853 | 814 int |
815 main (void) | |
816 { | |
817 typedef union { unsigned char c[8]; double d; } ieeebytes; | |
818 | |
819 ieeebytes l = {0x1c, 0xbc, 0x6e, 0xf2, 0x54, 0x8b, 0x11, 0x43}; | |
820 ieeebytes b = {0x43, 0x11, 0x8b, 0x54, 0xf2, 0x6e, 0xbc, 0x1c}; | |
821 | |
822 return l.d != 1234567891234567.0 && b.d != 1234567891234567.0; | |
5844 | 823 }]])], |
4853 | 824 octave_cv_ieee754_data_format=yes, |
825 octave_cv_ieee754_data_format=no, | |
826 octave_cv_ieee754_data_format=no)]) | |
827 if test "$cross_compiling" = yes; then | |
828 AC_MSG_RESULT([$octave_cv_ieee754_data_format assumed for cross compilation]) | |
829 else | |
830 AC_MSG_RESULT($octave_cv_ieee754_data_format) | |
831 fi | |
832 if test "$octave_cv_ieee754_data_format" = yes; then | |
833 AC_DEFINE(HAVE_IEEE754_DATA_FORMAT, 1, [Define if your system uses IEEE 754 data format.]) | |
834 fi | |
835 ]) | |
5505 | 836 dnl |
837 dnl Check for UMFPACK seperately split complex matrix and RHS. Note | |
838 dnl that as umfpack.h can be in three different places, rather than | |
839 dnl include it, just declare the functions needed. | |
840 dnl | |
5512 | 841 dnl Assumes that the check for umfpack has already been performed. |
5505 | 842 dnl |
843 AC_DEFUN([OCTAVE_UMFPACK_SEPERATE_SPLIT], | |
844 [AC_MSG_CHECKING([for UMFPACK seperate complex matrix and rhs split]) | |
845 AC_CACHE_VAL(octave_cv_umfpack_seperate_split, | |
5844 | 846 [AC_RUN_IFELSE([AC_LANG_SOURCE([[ |
5505 | 847 #include <stdlib.h> |
5512 | 848 #if defined (HAVE_UFSPARSE_UMFPACK_h) |
849 #include <ufsparse/umfpack.h> | |
850 #elif defined (HAVE_UMFPACK_UMFPACK_H) | |
851 #include <umfpack/umfpack.h> | |
852 #elif defined (HAVE_UMFPACK_H) | |
853 #include <umfpack.h> | |
854 #endif | |
5505 | 855 int n = 5; |
856 int Ap[] = {0, 2, 5, 9, 10, 12}; | |
857 int Ai[] = {0, 1, 0, 2, 4, 1, 2, 3, 4, 2, 1, 4}; | |
858 double Ax[] = {2., 0., 3., 0., 3., 0., -1., 0., 4., 0., 4., 0., | |
859 -3., 0., 1., 0., 2., 0., 2., 0., 6., 0., 1., 0.}; | |
860 double br[] = {8., 45., -3., 3., 19.}; | |
861 double bi[] = {0., 0., 0., 0., 0.}; | |
862 int main (void) | |
863 { | |
864 double *null = (double *) NULL ; | |
865 double *x = (double *)malloc (2 * n * sizeof(double)); | |
866 int i ; | |
867 void *Symbolic, *Numeric ; | |
868 (void) umfpack_zi_symbolic (n, n, Ap, Ai, Ax, null, &Symbolic, null, null) ; | |
869 (void) umfpack_zi_numeric (Ap, Ai, Ax, null, Symbolic, &Numeric, null, null) ; | |
870 umfpack_zi_free_symbolic (&Symbolic) ; | |
871 (void) umfpack_zi_solve (0, Ap, Ai, Ax, null, x, null, br, bi, | |
872 Numeric, null, null) ; | |
873 umfpack_zi_free_numeric (&Numeric) ; | |
874 for (i = 0; i < n; i++, x+=2) | |
875 if (fabs(*x - i - 1.) > 1.e-13) | |
876 return (1); | |
877 return (0) ; | |
878 } | |
5844 | 879 ]])], |
5505 | 880 octave_cv_umfpack_seperate_split=yes, |
881 octave_cv_umfpack_seperate_split=no, | |
882 octave_cv_umfpack_seperate_split=no)]) | |
883 if test "$cross_compiling" = yes; then | |
884 AC_MSG_RESULT([$octave_cv_umfpack_seperate_split assumed for cross compilation]) | |
885 else | |
886 AC_MSG_RESULT($octave_cv_umfpack_seperate_split) | |
887 fi | |
888 if test "$octave_cv_umfpack_seperate_split" = yes; then | |
889 AC_DEFINE(UMFPACK_SEPARATE_SPLIT, 1, [Define if the UMFPACK Complex solver allow matrix and RHS to be split independently]) | |
890 fi | |
891 ]) | |
6276 | 892 dnl |
893 dnl Check whether using HDF5 DLL under Windows. This is done by | |
894 dnl testing for a data symbol in the HDF5 library, which would | |
895 dnl requires the definition of _HDF5USEDL_ under MSVC compiler. | |
896 dnl | |
897 AC_DEFUN([OCTAVE_HDF5_DLL], [ | |
898 AC_CACHE_CHECK([if _HDF5USEDLL_ needs to be defined],octave_cv_hdf5_dll, [ | |
6724 | 899 AC_TRY_LINK([#include <hdf5.h>], [hid_t x = H5T_NATIVE_DOUBLE; return x], |
6276 | 900 octave_cv_hdf5_dll=no, [ |
901 CFLAGS_old=$CFLAGS | |
902 CFLAGS="$CFLAGS -DWIN32 -D_HDF5USEDLL_" | |
6724 | 903 AC_TRY_LINK([#include <hdf5.h>], [hid_t x = H5T_NATIVE_DOUBLE; return x], |
6276 | 904 octave_cv_hdf5_dll=yes, |
905 octave_cv_hdf5_dll=no) | |
906 CFLAGS=$CFLAGS_old])]) | |
907 if test "$octave_cv_hdf5_dll" = yes; then | |
908 AC_DEFINE(_HDF5USEDLL_, 1, [Define if using HDF5 dll (Win32)]) | |
909 fi]) | |
6823 | 910 dnl |
8676 | 911 dnl Check whether HDF5 library has version 1.6 API functions. |
912 dnl | |
913 AC_DEFUN([OCTAVE_HDF5_HAS_REQUIRED_API], [ | |
914 AC_CACHE_CHECK([whether HDF5 library has required API], | |
915 octave_cv_hdf5_has_required_api, [ | |
916 AC_TRY_LINK([ | |
917 #define H5_USE_16_API 1 | |
918 #include <hdf5.h> | |
919 ], [ | |
920 H5Eset_auto (0, 0);], [ | |
921 octave_cv_hdf5_has_required_api=yes], [ | |
922 octave_cv_hdf5_has_required_api=no])]) | |
923 if test "$octave_cv_hdf5_has_required_api" = "no"; then | |
924 WITH_HDF5=false | |
925 warn_hdf5="HDF5 library does not provide the version 1.6 API. Octave will not be able to save or load HDF5 data files." | |
926 AC_MSG_WARN($warn_hdf5) | |
927 fi | |
928 ]) | |
929 dnl | |
6823 | 930 dnl Check for the QHull version. |
931 dnl | |
932 AC_DEFUN(AC_CHECK_QHULL_VERSION, | |
933 [AC_MSG_CHECKING([for qh_qhull in -lqhull with qh_version]) | |
934 AC_CACHE_VAL(octave_cv_lib_qhull_version, [ | |
935 cat > conftest.c <<EOF | |
936 #include <stdio.h> | |
937 char *qh_version = "version"; | |
938 char qh_qhull(); | |
939 int | |
940 main(argc, argv) | |
941 int argc; | |
942 char **argv; | |
943 { | |
944 qh_qhull(); | |
945 return 0; | |
946 } | |
947 EOF | |
948 | |
949 octave_qhull_try="${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS conftest.c -o conftest -lqhull $LIBS" | |
7061 | 950 if (eval "$octave_qhull_try") 2>&AS_MESSAGE_LOG_FD && test -s conftest ; then |
6823 | 951 octave_cv_lib_qhull_version=yes |
952 else | |
953 octave_cv_lib_qhull_version=no | |
954 fi | |
955 rm -f conftest.c conftest.o conftest | |
956 ])dnl | |
957 if test "$octave_cv_lib_qhull_version" = "yes"; then | |
958 AC_MSG_RESULT(yes) | |
959 ifelse([$1], , , [$1]) | |
960 else | |
961 AC_MSG_RESULT(no) | |
962 ifelse([$2], , , [$2]) | |
963 fi | |
964 ]) | |
7825
13871b7de124
Import sources for OpenGL-based renderer.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7361
diff
changeset
|
965 dnl |
8659
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
966 dnl Check whether QHull works (does not crash) |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
967 dnl |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
968 AC_DEFUN(AC_CHECK_QHULL_OK, |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
969 [AC_MSG_CHECKING([whether the qhull library works]) |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
970 AC_CACHE_VAL(octave_cv_lib_qhull_ok, |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
971 [ |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
972 save_LIBS="$LIBS" |
9231
8a5a04b6c46b
Fixes confgure script for QHULL detection and add dependency on user32 [Win32]
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9173
diff
changeset
|
973 LIBS="$LIBS -lqhull" |
8a5a04b6c46b
Fixes confgure script for QHULL detection and add dependency on user32 [Win32]
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9173
diff
changeset
|
974 case $host in |
8a5a04b6c46b
Fixes confgure script for QHULL detection and add dependency on user32 [Win32]
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9173
diff
changeset
|
975 *-mingw*|*-msdosmsvc*) ;; |
8a5a04b6c46b
Fixes confgure script for QHULL detection and add dependency on user32 [Win32]
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9173
diff
changeset
|
976 *) LIBS="$LIBS -lm" ;; |
8a5a04b6c46b
Fixes confgure script for QHULL detection and add dependency on user32 [Win32]
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9173
diff
changeset
|
977 esac |
8659
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
978 AC_RUN_IFELSE([AC_LANG_SOURCE([[ |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
979 #include <stdio.h> |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
980 #include <qhull/qhull.h> |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
981 |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
982 #ifdef NEED_QHULL_VERSION |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
983 char *qh_version = "version"; |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
984 #endif |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
985 int main() |
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 int dim = 2, n = 4; |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
988 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
|
989 boolT ismalloc = 0; |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
990 |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
991 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
|
992 } |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
993 ]])], |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
994 [octave_cv_lib_qhull_ok=yes], |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
995 [octave_cv_lib_qhull_ok=no], |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
996 [octave_cv_lib_qhull_ok=yes]) |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
997 LIBS="$save_LIBS" |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
998 ]) |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
999 if test "$octave_cv_lib_qhull_ok" = "yes"; then |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
1000 AC_MSG_RESULT(yes) |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
1001 ifelse([$1], , , [$1]) |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
1002 else |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
1003 AC_MSG_RESULT(no) |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
1004 ifelse([$2], , , [$2]) |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
1005 fi |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
1006 ]) |
9792c26bffc7
configure: check whether qhull works
Jaroslav Hajek <highegg@gmail.com>
parents:
8635
diff
changeset
|
1007 dnl |
7825
13871b7de124
Import sources for OpenGL-based renderer.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7361
diff
changeset
|
1008 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
|
1009 dnl |
13871b7de124
Import sources for OpenGL-based renderer.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7361
diff
changeset
|
1010 AC_DEFUN([OCTAVE_OPENGL], [ |
13871b7de124
Import sources for OpenGL-based renderer.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7361
diff
changeset
|
1011 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
|
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 ### 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
|
1014 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
|
1015 #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
|
1016 #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
|
1017 [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
|
1018 |
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 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
|
1020 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
|
1021 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
|
1022 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
|
1023 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
|
1024 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
|
1025 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
|
1026 *-*-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
|
1027 AC_CHECK_HEADERS(windows.h) |
7825
13871b7de124
Import sources for OpenGL-based renderer.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7361
diff
changeset
|
1028 ;; |
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
|
1029 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
|
1030 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
|
1031 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
|
1032 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
|
1033 have_opengl_incs=yes; break], [], [ |
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 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
|
1039 ], [], [ |
7825
13871b7de124
Import sources for OpenGL-based renderer.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7361
diff
changeset
|
1040 #ifdef HAVE_WINDOWS_H |
7954 | 1041 #include <windows.h> |
1042 #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
|
1043 ]) |
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 |
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 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
|
1046 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
|
1047 *-*-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
|
1048 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
|
1049 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
|
1050 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
|
1051 AC_TRY_LINK([ |
7825
13871b7de124
Import sources for OpenGL-based renderer.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7361
diff
changeset
|
1052 #if HAVE_WINDOWS_H |
7954 | 1053 #include <windows.h> |
7825
13871b7de124
Import sources for OpenGL-based renderer.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7361
diff
changeset
|
1054 #endif |
7954 | 1055 #if defined (HAVE_GL_GL_H) |
1056 #include <GL/gl.h> | |
1057 #elif defined (HAVE_OPENGL_GL_H) | |
1058 #include <OpenGL/gl.h> | |
1059 #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
|
1060 ], [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
|
1061 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
|
1062 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
|
1063 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
|
1064 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
|
1065 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
|
1066 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
|
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 *) |
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 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
|
1070 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
|
1071 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
|
1072 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
|
1073 ;; |
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 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
|
1075 fi |
7825
13871b7de124
Import sources for OpenGL-based renderer.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7361
diff
changeset
|
1076 fi |
13871b7de124
Import sources for OpenGL-based renderer.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7361
diff
changeset
|
1077 AC_SUBST(OPENGL_LIBS) |
13871b7de124
Import sources for OpenGL-based renderer.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7361
diff
changeset
|
1078 ]) |
7834
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1079 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
|
1080 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
|
1081 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
|
1082 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
|
1083 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
|
1084 [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
|
1085 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
|
1086 [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
|
1087 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
|
1088 #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
|
1089 #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
|
1090 #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
|
1091 #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
|
1092 #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
|
1093 [[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
|
1094 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
|
1095 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
|
1096 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
|
1097 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
|
1098 [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
|
1099 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
|
1100 ]) |
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
|
1101 dnl |
7834
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1102 dnl Configure paths for FreeType2 |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1103 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
|
1104 dnl |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1105 dnl Copyright 2001, 2003 by |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1106 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
|
1107 dnl |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1108 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
|
1109 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
|
1110 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
|
1111 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
|
1112 dnl fully. |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1113 dnl |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1114 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
|
1115 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
|
1116 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
|
1117 dnl that program. |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1118 dnl |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1119 dnl serial 2 |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1120 dnl |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1121 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
|
1122 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
|
1123 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
|
1124 dnl FreeType 2.0.4). |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1125 dnl |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1126 AC_DEFUN([AC_CHECK_FT2], |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1127 [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
|
1128 dnl |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1129 AC_ARG_WITH([ft-prefix], |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1130 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
|
1131 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
|
1132 [Prefix where FreeType is installed (optional)]), |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1133 [ft_config_prefix="$withval"], |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1134 [ft_config_prefix=""]) |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1135 |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1136 AC_ARG_WITH([ft-exec-prefix], |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1137 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
|
1138 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
|
1139 [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
|
1140 [ft_config_exec_prefix="$withval"], |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1141 [ft_config_exec_prefix=""]) |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1142 |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1143 AC_ARG_ENABLE([freetypetest], |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1144 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
|
1145 AS_HELP_STRING([--disable-freetypetest], |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1146 [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
|
1147 [], |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1148 [enable_fttest=yes]) |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1149 |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1150 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
|
1151 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
|
1152 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
|
1153 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
|
1154 fi |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1155 fi |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1156 |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1157 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
|
1158 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
|
1159 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
|
1160 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
|
1161 fi |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1162 fi |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1163 |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1164 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
|
1165 |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1166 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
|
1167 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
|
1168 no_ft="" |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1169 if test "$FT2_CONFIG" = "no" ; then |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1170 no_ft=yes |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1171 else |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1172 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
|
1173 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
|
1174 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
|
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_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
|
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_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
|
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 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
|
1181 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
|
1182 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
|
1183 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
|
1184 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
|
1185 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
|
1186 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
|
1187 ft_config_is_lt="" |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1188 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
|
1189 ft_config_is_lt=yes |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1190 else |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1191 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
|
1192 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
|
1193 ft_config_is_lt=yes |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1194 else |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1195 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
|
1196 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
|
1197 ft_config_is_lt=yes |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1198 fi |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1199 fi |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1200 fi |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1201 fi |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1202 fi |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1203 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
|
1204 no_ft=yes |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1205 else |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1206 ac_save_CFLAGS="$CFLAGS" |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1207 ac_save_LIBS="$LIBS" |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1208 CFLAGS="$CFLAGS $FT2_CFLAGS" |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1209 LIBS="$FT2_LIBS $LIBS" |
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 dnl |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1212 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
|
1213 dnl |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1214 AC_RUN_IFELSE([ |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1215 AC_LANG_SOURCE([[ |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1216 |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1217 #include <ft2build.h> |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1218 #include FT_FREETYPE_H |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1219 #include <stdio.h> |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1220 #include <stdlib.h> |
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 int |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1223 main() |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1224 { |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1225 FT_Library library; |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1226 FT_Error error; |
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 error = FT_Init_FreeType(&library); |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1229 |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1230 if (error) |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1231 return 1; |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1232 else |
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 FT_Done_FreeType(library); |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1235 return 0; |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1236 } |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1237 } |
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 ]]) |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1240 ], |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1241 [], |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1242 [no_ft=yes], |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1243 [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
|
1244 |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1245 CFLAGS="$ac_save_CFLAGS" |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1246 LIBS="$ac_save_LIBS" |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1247 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
|
1248 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
|
1249 fi dnl test "$FT2_CONFIG" = "no" |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1250 |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1251 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
|
1252 AC_MSG_RESULT([yes]) |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1253 m4_if([$2], [], [:], [$2]) |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1254 else |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1255 AC_MSG_RESULT([no]) |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1256 if test "$FT2_CONFIG" = "no" ; then |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1257 AC_MSG_WARN([ |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1258 |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1259 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
|
1260 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
|
1261 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
|
1262 full path to freetype-config. |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1263 ]) |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1264 else |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1265 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
|
1266 AC_MSG_WARN([ |
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 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
|
1269 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
|
1270 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
|
1271 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
|
1272 full path to freetype-config. |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1273 ]) |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1274 else |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1275 AC_MSG_WARN([ |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1276 |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1277 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
|
1278 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
|
1279 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
|
1280 (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
|
1281 ]) |
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 fi |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1284 |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1285 FT2_CFLAGS="" |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1286 FT2_LIBS="" |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1287 m4_if([$3], [], [:], [$3]) |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1288 fi |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1289 |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1290 AC_SUBST([FT2_CFLAGS]) |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1291 AC_SUBST([FT2_LIBS])]) |
caab78e7e377
added checks for fltk & freetype in configure script
Shai Ayal <shaiay@sourceforge.net>
parents:
7825
diff
changeset
|
1292 dnl end of freetype2.m4 |
8169
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1293 |
8998
a48fba01e4ac
optimize isnan/isinf/isfinite mappers
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
1294 dnl Check whether a math mapper function is available in <cmath>. |
a48fba01e4ac
optimize isnan/isinf/isfinite mappers
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
1295 dnl Will define HAVE_CMATH_FUNC if there is a double variant and |
a48fba01e4ac
optimize isnan/isinf/isfinite mappers
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
1296 dnl HAVE_CMATH_FUNCF if there is a float variant. |
a48fba01e4ac
optimize isnan/isinf/isfinite mappers
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
1297 dnl Currently capable of checking for functions with single |
a48fba01e4ac
optimize isnan/isinf/isfinite mappers
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
1298 dnl argument and returning bool/int/real. |
a48fba01e4ac
optimize isnan/isinf/isfinite mappers
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
1299 AC_DEFUN([OCTAVE_CMATH_FUNC],[ |
a48fba01e4ac
optimize isnan/isinf/isfinite mappers
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
1300 AC_MSG_CHECKING([for std::$1 in <cmath>]) |
a48fba01e4ac
optimize isnan/isinf/isfinite mappers
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
1301 AC_LANG_PUSH(C++) |
a48fba01e4ac
optimize isnan/isinf/isfinite mappers
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
1302 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ |
a48fba01e4ac
optimize isnan/isinf/isfinite mappers
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
1303 #include <cmath> |
a48fba01e4ac
optimize isnan/isinf/isfinite mappers
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
1304 void take_func (bool (*func) (double x)); |
a48fba01e4ac
optimize isnan/isinf/isfinite mappers
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
1305 void take_func (int (*func) (double x)); |
a48fba01e4ac
optimize isnan/isinf/isfinite mappers
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
1306 void take_func (double (*func) (double x)); |
a48fba01e4ac
optimize isnan/isinf/isfinite mappers
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
1307 ]], |
a48fba01e4ac
optimize isnan/isinf/isfinite mappers
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
1308 [[ |
a48fba01e4ac
optimize isnan/isinf/isfinite mappers
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
1309 take_func(std::$1); |
a48fba01e4ac
optimize isnan/isinf/isfinite mappers
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
1310 ]])], |
a48fba01e4ac
optimize isnan/isinf/isfinite mappers
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
1311 [AC_MSG_RESULT([yes]) |
a48fba01e4ac
optimize isnan/isinf/isfinite mappers
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
1312 AC_DEFINE(HAVE_CMATH_[]AS_TR_CPP($1),1,[Define if <cmath> provides $1])], |
a48fba01e4ac
optimize isnan/isinf/isfinite mappers
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
1313 [AC_MSG_RESULT([no])]) |
a48fba01e4ac
optimize isnan/isinf/isfinite mappers
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
1314 AC_MSG_CHECKING([for std::$1 (float variant) in <cmath>]) |
a48fba01e4ac
optimize isnan/isinf/isfinite mappers
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
1315 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ |
a48fba01e4ac
optimize isnan/isinf/isfinite mappers
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
1316 #include <cmath> |
a48fba01e4ac
optimize isnan/isinf/isfinite mappers
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
1317 void take_func (bool (*func) (float x)); |
a48fba01e4ac
optimize isnan/isinf/isfinite mappers
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
1318 void take_func (int (*func) (float x)); |
a48fba01e4ac
optimize isnan/isinf/isfinite mappers
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
1319 void take_func (float (*func) (float x)); |
a48fba01e4ac
optimize isnan/isinf/isfinite mappers
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
1320 ]], |
a48fba01e4ac
optimize isnan/isinf/isfinite mappers
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
1321 [[ |
a48fba01e4ac
optimize isnan/isinf/isfinite mappers
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
1322 take_func(std::$1); |
a48fba01e4ac
optimize isnan/isinf/isfinite mappers
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
1323 ]])], |
a48fba01e4ac
optimize isnan/isinf/isfinite mappers
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
1324 [AC_MSG_RESULT([yes]) |
a48fba01e4ac
optimize isnan/isinf/isfinite mappers
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
1325 AC_DEFINE(HAVE_CMATH_[]AS_TR_CPP($1)F,1,[Define if <cmath> provides float variant of $1])], |
a48fba01e4ac
optimize isnan/isinf/isfinite mappers
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
1326 [AC_MSG_RESULT([no])]) |
9049 | 1327 AC_LANG_POP(C++) |
8998
a48fba01e4ac
optimize isnan/isinf/isfinite mappers
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
1328 ]) |
a48fba01e4ac
optimize isnan/isinf/isfinite mappers
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
1329 |
8169
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1330 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
|
1331 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
|
1332 dnl the following conditions hold: |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1333 dnl 1. Signed numbers are represented by twos complement |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1334 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
|
1335 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
|
1336 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
|
1337 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
|
1338 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
|
1339 dnl need for things like -ftrapv). |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1340 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
|
1341 dnl except for the shifts. Shifts are arithmetic. |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1342 dnl |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1343 AC_DEFUN([OCTAVE_FAST_INT_OPS],[ |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1344 AC_MSG_CHECKING([whether fast integer arithmetics is usable]) |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1345 AC_LANG_PUSH(C++) |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1346 AC_RUN_IFELSE([AC_LANG_PROGRAM([[ |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1347 #include <limits> |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1348 template<class UT, class ST> |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1349 static bool |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1350 do_test (UT, ST) |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1351 { |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1352 volatile ST s = std::numeric_limits<ST>::min () / 3; |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1353 volatile UT u = static_cast<UT> (s); |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1354 if (*(reinterpret_cast<volatile ST *> (&u)) != s) return true; |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1355 |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1356 u = 0; u = ~u; |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1357 if (*(reinterpret_cast<volatile ST *> (&u)) != -1) return true; |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1358 |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1359 ST sx, sy; |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1360 sx = std::numeric_limits<ST>::max () / 2 + 1; |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1361 sy = std::numeric_limits<ST>::max () / 2 + 2; |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1362 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
|
1363 != std::numeric_limits<ST>::min () + 1) return true; |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1364 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
|
1365 != -1) return true; |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1366 |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1367 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
|
1368 return true; |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1369 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
|
1370 return true; |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1371 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
|
1372 return true; |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1373 if ((-1 >> 1) != -1) return true; |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1374 return false; |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1375 } |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1376 |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1377 #define DO_TEST(T) \ |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1378 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
|
1379 return sizeof (T); |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1380 ]],[[ |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1381 DO_TEST(char) |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1382 DO_TEST(short) |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1383 DO_TEST(int) |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1384 DO_TEST(long) |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1385 #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
|
1386 DO_TEST(long long) |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1387 #endif |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1388 ]])], |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1389 [AC_MSG_RESULT([yes]) |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1390 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
|
1391 [AC_MSG_RESULT([no])]) |
66bc6f9b4f72
rewrite integer arithmetics and conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8019
diff
changeset
|
1392 AC_LANG_POP(C++)]) |
8595
dee5d60257e4
Use Carbon framework to determine ScreenSize on Mac.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8169
diff
changeset
|
1393 dnl |
dee5d60257e4
Use Carbon framework to determine ScreenSize on Mac.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8169
diff
changeset
|
1394 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
|
1395 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
|
1396 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
|
1397 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
|
1398 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
|
1399 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
|
1400 dnl |
dee5d60257e4
Use Carbon framework to determine ScreenSize on Mac.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8169
diff
changeset
|
1401 dnl OCTAVE_HAVE_FRAMEWORK |
dee5d60257e4
Use Carbon framework to determine ScreenSize on Mac.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8169
diff
changeset
|
1402 AC_DEFUN(OCTAVE_HAVE_FRAMEWORK, [ |
dee5d60257e4
Use Carbon framework to determine ScreenSize on Mac.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8169
diff
changeset
|
1403 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
|
1404 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
|
1405 XLDFLAGS="$LDFLAGS" |
dee5d60257e4
Use Carbon framework to determine ScreenSize on Mac.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8169
diff
changeset
|
1406 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
|
1407 AC_LANG_PUSH(C++) |
8595
dee5d60257e4
Use Carbon framework to determine ScreenSize on Mac.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8169
diff
changeset
|
1408 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
|
1409 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
|
1410 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
|
1411 AC_LANG_POP(C++) |
8595
dee5d60257e4
Use Carbon framework to determine ScreenSize on Mac.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8169
diff
changeset
|
1412 LDFLAGS="$XLDFLAGS" |
dee5d60257e4
Use Carbon framework to determine ScreenSize on Mac.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8169
diff
changeset
|
1413 ]) |
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
|
1414 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
|
1415 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
|
1416 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
|
1417 [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
|
1418 [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
|
1419 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
|
1420 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
|
1421 [$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
|
1422 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
|
1423 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
|
1424 [$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
|
1425 fi |
8595
dee5d60257e4
Use Carbon framework to determine ScreenSize on Mac.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8169
diff
changeset
|
1426 else |
dee5d60257e4
Use Carbon framework to determine ScreenSize on Mac.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8169
diff
changeset
|
1427 AC_MSG_RESULT(no) |
dee5d60257e4
Use Carbon framework to determine ScreenSize on Mac.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8169
diff
changeset
|
1428 [$5] |
dee5d60257e4
Use Carbon framework to determine ScreenSize on Mac.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8169
diff
changeset
|
1429 fi |
dee5d60257e4
Use Carbon framework to determine ScreenSize on Mac.
Thomas Treichl <Thomas.Treichl@gmx.net>
parents:
8169
diff
changeset
|
1430 ]) |
9173
224634b2e6e3
configure.in, aclocal.m4: check for c99 vsnprintf
Peter O'Gorman <pogma@thewrittenword.com>
parents:
9049
diff
changeset
|
1431 dnl |
224634b2e6e3
configure.in, aclocal.m4: check for c99 vsnprintf
Peter O'Gorman <pogma@thewrittenword.com>
parents:
9049
diff
changeset
|
1432 dnl Do we have a working c99 vsnprintf function? |
224634b2e6e3
configure.in, aclocal.m4: check for c99 vsnprintf
Peter O'Gorman <pogma@thewrittenword.com>
parents:
9049
diff
changeset
|
1433 dnl |
224634b2e6e3
configure.in, aclocal.m4: check for c99 vsnprintf
Peter O'Gorman <pogma@thewrittenword.com>
parents:
9049
diff
changeset
|
1434 dnl OCTAVE_HAVE_C99_VSNPRINTF |
224634b2e6e3
configure.in, aclocal.m4: check for c99 vsnprintf
Peter O'Gorman <pogma@thewrittenword.com>
parents:
9049
diff
changeset
|
1435 AC_DEFUN(OCTAVE_HAVE_C99_VSNPRINTF, [ |
224634b2e6e3
configure.in, aclocal.m4: check for c99 vsnprintf
Peter O'Gorman <pogma@thewrittenword.com>
parents:
9049
diff
changeset
|
1436 AC_CACHE_CHECK([for c99 vsnprintf], [oct_cv_c99_vsnprintf], |
224634b2e6e3
configure.in, aclocal.m4: check for c99 vsnprintf
Peter O'Gorman <pogma@thewrittenword.com>
parents:
9049
diff
changeset
|
1437 [AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h> |
224634b2e6e3
configure.in, aclocal.m4: check for c99 vsnprintf
Peter O'Gorman <pogma@thewrittenword.com>
parents:
9049
diff
changeset
|
1438 #include <stdarg.h> |
224634b2e6e3
configure.in, aclocal.m4: check for c99 vsnprintf
Peter O'Gorman <pogma@thewrittenword.com>
parents:
9049
diff
changeset
|
1439 #include <stdlib.h> |
224634b2e6e3
configure.in, aclocal.m4: check for c99 vsnprintf
Peter O'Gorman <pogma@thewrittenword.com>
parents:
9049
diff
changeset
|
1440 |
224634b2e6e3
configure.in, aclocal.m4: check for c99 vsnprintf
Peter O'Gorman <pogma@thewrittenword.com>
parents:
9049
diff
changeset
|
1441 int |
224634b2e6e3
configure.in, aclocal.m4: check for c99 vsnprintf
Peter O'Gorman <pogma@thewrittenword.com>
parents:
9049
diff
changeset
|
1442 doit(char * s, ...) |
224634b2e6e3
configure.in, aclocal.m4: check for c99 vsnprintf
Peter O'Gorman <pogma@thewrittenword.com>
parents:
9049
diff
changeset
|
1443 { |
224634b2e6e3
configure.in, aclocal.m4: check for c99 vsnprintf
Peter O'Gorman <pogma@thewrittenword.com>
parents:
9049
diff
changeset
|
1444 char buffer[32]; |
224634b2e6e3
configure.in, aclocal.m4: check for c99 vsnprintf
Peter O'Gorman <pogma@thewrittenword.com>
parents:
9049
diff
changeset
|
1445 va_list args; |
224634b2e6e3
configure.in, aclocal.m4: check for c99 vsnprintf
Peter O'Gorman <pogma@thewrittenword.com>
parents:
9049
diff
changeset
|
1446 int r; |
224634b2e6e3
configure.in, aclocal.m4: check for c99 vsnprintf
Peter O'Gorman <pogma@thewrittenword.com>
parents:
9049
diff
changeset
|
1447 |
224634b2e6e3
configure.in, aclocal.m4: check for c99 vsnprintf
Peter O'Gorman <pogma@thewrittenword.com>
parents:
9049
diff
changeset
|
1448 va_start(args, s); |
224634b2e6e3
configure.in, aclocal.m4: check for c99 vsnprintf
Peter O'Gorman <pogma@thewrittenword.com>
parents:
9049
diff
changeset
|
1449 r = vsnprintf(buffer, 5, s, args); |
224634b2e6e3
configure.in, aclocal.m4: check for c99 vsnprintf
Peter O'Gorman <pogma@thewrittenword.com>
parents:
9049
diff
changeset
|
1450 va_end(args); |
224634b2e6e3
configure.in, aclocal.m4: check for c99 vsnprintf
Peter O'Gorman <pogma@thewrittenword.com>
parents:
9049
diff
changeset
|
1451 |
224634b2e6e3
configure.in, aclocal.m4: check for c99 vsnprintf
Peter O'Gorman <pogma@thewrittenword.com>
parents:
9049
diff
changeset
|
1452 if (r != 7) |
224634b2e6e3
configure.in, aclocal.m4: check for c99 vsnprintf
Peter O'Gorman <pogma@thewrittenword.com>
parents:
9049
diff
changeset
|
1453 exit(1); |
224634b2e6e3
configure.in, aclocal.m4: check for c99 vsnprintf
Peter O'Gorman <pogma@thewrittenword.com>
parents:
9049
diff
changeset
|
1454 |
224634b2e6e3
configure.in, aclocal.m4: check for c99 vsnprintf
Peter O'Gorman <pogma@thewrittenword.com>
parents:
9049
diff
changeset
|
1455 exit(0); |
224634b2e6e3
configure.in, aclocal.m4: check for c99 vsnprintf
Peter O'Gorman <pogma@thewrittenword.com>
parents:
9049
diff
changeset
|
1456 } |
224634b2e6e3
configure.in, aclocal.m4: check for c99 vsnprintf
Peter O'Gorman <pogma@thewrittenword.com>
parents:
9049
diff
changeset
|
1457 ]],[ |
224634b2e6e3
configure.in, aclocal.m4: check for c99 vsnprintf
Peter O'Gorman <pogma@thewrittenword.com>
parents:
9049
diff
changeset
|
1458 doit("1234567");])], |
224634b2e6e3
configure.in, aclocal.m4: check for c99 vsnprintf
Peter O'Gorman <pogma@thewrittenword.com>
parents:
9049
diff
changeset
|
1459 [oct_cv_c99_vsnprintf=yes], |
224634b2e6e3
configure.in, aclocal.m4: check for c99 vsnprintf
Peter O'Gorman <pogma@thewrittenword.com>
parents:
9049
diff
changeset
|
1460 [oct_cv_c99_vsnprintf=no], |
224634b2e6e3
configure.in, aclocal.m4: check for c99 vsnprintf
Peter O'Gorman <pogma@thewrittenword.com>
parents:
9049
diff
changeset
|
1461 [oct_cv_c99_vsnprintf="guessing no"])]) |
224634b2e6e3
configure.in, aclocal.m4: check for c99 vsnprintf
Peter O'Gorman <pogma@thewrittenword.com>
parents:
9049
diff
changeset
|
1462 |
224634b2e6e3
configure.in, aclocal.m4: check for c99 vsnprintf
Peter O'Gorman <pogma@thewrittenword.com>
parents:
9049
diff
changeset
|
1463 case $oct_cv_c99_vsnprintf in |
224634b2e6e3
configure.in, aclocal.m4: check for c99 vsnprintf
Peter O'Gorman <pogma@thewrittenword.com>
parents:
9049
diff
changeset
|
1464 yes) |
224634b2e6e3
configure.in, aclocal.m4: check for c99 vsnprintf
Peter O'Gorman <pogma@thewrittenword.com>
parents:
9049
diff
changeset
|
1465 AC_DEFINE([HAVE_C99_VSNPRINTF], [1], [Define if you have a c99 vsnprintf]) |
224634b2e6e3
configure.in, aclocal.m4: check for c99 vsnprintf
Peter O'Gorman <pogma@thewrittenword.com>
parents:
9049
diff
changeset
|
1466 ;; |
224634b2e6e3
configure.in, aclocal.m4: check for c99 vsnprintf
Peter O'Gorman <pogma@thewrittenword.com>
parents:
9049
diff
changeset
|
1467 esac |
224634b2e6e3
configure.in, aclocal.m4: check for c99 vsnprintf
Peter O'Gorman <pogma@thewrittenword.com>
parents:
9049
diff
changeset
|
1468 ]) |
9403
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1469 |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1470 ############################################################################## |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1471 ############################################################################## |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1472 |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1473 # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1474 # |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1475 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>. |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1476 # |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1477 # This program is free software; you can redistribute it and/or modify |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1478 # it under the terms of the GNU General Public License as published by |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1479 # the Free Software Foundation; either version 2 of the License, or |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1480 # (at your option) any later version. |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1481 # |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1482 # This program is distributed in the hope that it will be useful, but |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1483 # WITHOUT ANY WARRANTY; without even the implied warranty of |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1484 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1485 # General Public License for more details. |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1486 # |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1487 # You should have received a copy of the GNU General Public License |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1488 # along with this program; if not, write to the Free Software |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1489 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1490 # |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1491 # As a special exception to the GNU General Public License, if you |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1492 # distribute this file as part of a program that contains a |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1493 # configuration script generated by Autoconf, you may include it under |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1494 # the same distribution terms that you use for the rest of that program. |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1495 |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1496 # PKG_PROG_PKG_CONFIG([MIN-VERSION]) |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1497 # ---------------------------------- |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1498 AC_DEFUN([PKG_PROG_PKG_CONFIG], |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1499 [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1500 m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1501 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1502 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1503 AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1504 fi |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1505 if test -n "$PKG_CONFIG"; then |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1506 _pkg_min_version=m4_default([$1], [0.9.0]) |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1507 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1508 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1509 AC_MSG_RESULT([yes]) |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1510 else |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1511 AC_MSG_RESULT([no]) |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1512 PKG_CONFIG="" |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1513 fi |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1514 |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1515 fi[]dnl |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1516 ])# PKG_PROG_PKG_CONFIG |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1517 |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1518 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1519 # |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1520 # Check to see whether a particular set of modules exists. Similar |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1521 # to PKG_CHECK_MODULES(), but does not set variables or print errors. |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1522 # |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1523 # |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1524 # Similar to PKG_CHECK_MODULES, make sure that the first instance of |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1525 # this or PKG_CHECK_MODULES is called, or make sure to call |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1526 # PKG_CHECK_EXISTS manually |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1527 # -------------------------------------------------------------- |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1528 AC_DEFUN([PKG_CHECK_EXISTS], |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1529 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1530 if test -n "$PKG_CONFIG" && \ |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1531 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1532 m4_ifval([$2], [$2], [:]) |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1533 m4_ifvaln([$3], [else |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1534 $3])dnl |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1535 fi]) |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1536 |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1537 |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1538 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1539 # --------------------------------------------- |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1540 m4_define([_PKG_CONFIG], |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1541 [if test -n "$PKG_CONFIG"; then |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1542 if test -n "$$1"; then |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1543 pkg_cv_[]$1="$$1" |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1544 else |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1545 PKG_CHECK_EXISTS([$3], |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1546 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1547 [pkg_failed=yes]) |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1548 fi |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1549 else |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1550 pkg_failed=untried |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1551 fi[]dnl |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1552 ])# _PKG_CONFIG |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1553 |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1554 # _PKG_SHORT_ERRORS_SUPPORTED |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1555 # ----------------------------- |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1556 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1557 [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1558 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1559 _pkg_short_errors_supported=yes |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1560 else |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1561 _pkg_short_errors_supported=no |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1562 fi[]dnl |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1563 ])# _PKG_SHORT_ERRORS_SUPPORTED |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1564 |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1565 |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1566 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1567 # [ACTION-IF-NOT-FOUND]) |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1568 # |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1569 # |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1570 # Note that if there is a possibility the first call to |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1571 # PKG_CHECK_MODULES might not happen, you should be sure to include an |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1572 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1573 # |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1574 # |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1575 # -------------------------------------------------------------- |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1576 AC_DEFUN([PKG_CHECK_MODULES], |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1577 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1578 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1579 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1580 |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1581 pkg_failed=no |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1582 AC_MSG_CHECKING([for $1]) |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1583 |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1584 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1585 _PKG_CONFIG([$1][_LIBS], [libs], [$2]) |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1586 |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1587 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1588 and $1[]_LIBS to avoid the need to call pkg-config. |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1589 See the pkg-config man page for more details.]) |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1590 |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1591 if test $pkg_failed = yes; then |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1592 _PKG_SHORT_ERRORS_SUPPORTED |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1593 if test $_pkg_short_errors_supported = yes; then |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1594 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1595 else |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1596 $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1597 fi |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1598 # Put the nasty error message in config.log where it belongs |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1599 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1600 |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1601 ifelse([$4], , [AC_MSG_ERROR(dnl |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1602 [Package requirements ($2) were not met: |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1603 |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1604 $$1_PKG_ERRORS |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1605 |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1606 Consider adjusting the PKG_CONFIG_PATH environment variable if you |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1607 installed software in a non-standard prefix. |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1608 |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1609 _PKG_TEXT |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1610 ])], |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1611 [AC_MSG_RESULT([no]) |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1612 $4]) |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1613 elif test $pkg_failed = untried; then |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1614 ifelse([$4], , [AC_MSG_FAILURE(dnl |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1615 [The pkg-config script could not be found or is too old. Make sure it |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1616 is in your PATH or set the PKG_CONFIG environment variable to the full |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1617 path to pkg-config. |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1618 |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1619 _PKG_TEXT |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1620 |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1621 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])], |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1622 [$4]) |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1623 else |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1624 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1625 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1626 AC_MSG_RESULT([yes]) |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1627 ifelse([$3], , :, [$3]) |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1628 fi[]dnl |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1629 ])# PKG_CHECK_MODULES |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1630 |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1631 ############################################################################## |
4af6e29449c1
[mq]: graphics_text_engine
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9231
diff
changeset
|
1632 ############################################################################## |