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