Mercurial > otakunoraifu
comparison aclocal.m4 @ 0:223b71206888
Initial import
author | thib |
---|---|
date | Fri, 01 Aug 2008 16:32:45 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:223b71206888 |
---|---|
1 # generated automatically by aclocal 1.9.5 -*- Autoconf -*- | |
2 | |
3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, | |
4 # 2005 Free Software Foundation, Inc. | |
5 # This file is free software; the Free Software Foundation | |
6 # gives unlimited permission to copy and/or distribute it, | |
7 # with or without modifications, as long as this notice is preserved. | |
8 | |
9 # This program is distributed in the hope that it will be useful, | |
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without | |
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A | |
12 # PARTICULAR PURPOSE. | |
13 | |
14 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 | |
15 # Free Software Foundation, Inc. | |
16 # | |
17 # This file is free software; the Free Software Foundation | |
18 # gives unlimited permission to copy and/or distribute it, | |
19 # with or without modifications, as long as this notice is preserved. | |
20 | |
21 # serial 8 | |
22 | |
23 # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. | |
24 AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) | |
25 | |
26 # Configure paths for FreeType2 | |
27 # Marcelo Magallon 2001-10-26, based on gtk.m4 by Owen Taylor | |
28 # | |
29 # Copyright 2001, 2003 by | |
30 # David Turner, Robert Wilhelm, and Werner Lemberg. | |
31 # | |
32 # This file is part of the FreeType project, and may only be used, modified, | |
33 # and distributed under the terms of the FreeType project license, | |
34 # LICENSE.TXT. By continuing to use, modify, or distribute this file you | |
35 # indicate that you have read the license and understand and accept it | |
36 # fully. | |
37 # | |
38 # serial 2 | |
39 | |
40 # AC_CHECK_FT2([MINIMUM-VERSION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) | |
41 # Test for FreeType 2, and define FT2_CFLAGS and FT2_LIBS. | |
42 # MINIMUM-VERSION is what libtool reports; the default is `7.0.1' (this is | |
43 # FreeType 2.0.4). | |
44 # | |
45 AC_DEFUN([AC_CHECK_FT2], | |
46 [# Get the cflags and libraries from the freetype-config script | |
47 # | |
48 AC_ARG_WITH([ft-prefix], | |
49 dnl don't quote AS_HELP_STRING! | |
50 AS_HELP_STRING([--with-ft-prefix=PREFIX], | |
51 [Prefix where FreeType is installed (optional)]), | |
52 [ft_config_prefix="$withval"], | |
53 [ft_config_prefix=""]) | |
54 | |
55 AC_ARG_WITH([ft-exec-prefix], | |
56 dnl don't quote AS_HELP_STRING! | |
57 AS_HELP_STRING([--with-ft-exec-prefix=PREFIX], | |
58 [Exec prefix where FreeType is installed (optional)]), | |
59 [ft_config_exec_prefix="$withval"], | |
60 [ft_config_exec_prefix=""]) | |
61 | |
62 AC_ARG_ENABLE([freetypetest], | |
63 dnl don't quote AS_HELP_STRING! | |
64 AS_HELP_STRING([--disable-freetypetest], | |
65 [Do not try to compile and run a test FreeType program]), | |
66 [], | |
67 [enable_fttest=yes]) | |
68 | |
69 if test x$ft_config_exec_prefix != x ; then | |
70 ft_config_args="$ft_config_args --exec-prefix=$ft_config_exec_prefix" | |
71 if test x${FT2_CONFIG+set} != xset ; then | |
72 FT2_CONFIG=$ft_config_exec_prefix/bin/freetype-config | |
73 fi | |
74 fi | |
75 | |
76 if test x$ft_config_prefix != x ; then | |
77 ft_config_args="$ft_config_args --prefix=$ft_config_prefix" | |
78 if test x${FT2_CONFIG+set} != xset ; then | |
79 FT2_CONFIG=$ft_config_prefix/bin/freetype-config | |
80 fi | |
81 fi | |
82 | |
83 AC_PATH_PROG([FT2_CONFIG], [freetype-config], [no]) | |
84 | |
85 min_ft_version=m4_if([$1], [], [7.0.1], [$1]) | |
86 AC_MSG_CHECKING([for FreeType -- version >= $min_ft_version]) | |
87 no_ft="" | |
88 if test "$FT2_CONFIG" = "no" ; then | |
89 no_ft=yes | |
90 else | |
91 FT2_CFLAGS=`$FT2_CONFIG $ft_config_args --cflags` | |
92 FT2_LIBS=`$FT2_CONFIG $ft_config_args --libs` | |
93 ft_config_major_version=`$FT2_CONFIG $ft_config_args --version | \ | |
94 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` | |
95 ft_config_minor_version=`$FT2_CONFIG $ft_config_args --version | \ | |
96 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` | |
97 ft_config_micro_version=`$FT2_CONFIG $ft_config_args --version | \ | |
98 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` | |
99 ft_min_major_version=`echo $min_ft_version | \ | |
100 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` | |
101 ft_min_minor_version=`echo $min_ft_version | \ | |
102 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` | |
103 ft_min_micro_version=`echo $min_ft_version | \ | |
104 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` | |
105 if test x$enable_fttest = xyes ; then | |
106 ft_config_is_lt="" | |
107 if test $ft_config_major_version -lt $ft_min_major_version ; then | |
108 ft_config_is_lt=yes | |
109 else | |
110 if test $ft_config_major_version -eq $ft_min_major_version ; then | |
111 if test $ft_config_minor_version -lt $ft_min_minor_version ; then | |
112 ft_config_is_lt=yes | |
113 else | |
114 if test $ft_config_minor_version -eq $ft_min_minor_version ; then | |
115 if test $ft_config_micro_version -lt $ft_min_micro_version ; then | |
116 ft_config_is_lt=yes | |
117 fi | |
118 fi | |
119 fi | |
120 fi | |
121 fi | |
122 if test x$ft_config_is_lt = xyes ; then | |
123 no_ft=yes | |
124 else | |
125 ac_save_CFLAGS="$CFLAGS" | |
126 ac_save_LIBS="$LIBS" | |
127 CFLAGS="$CFLAGS $FT2_CFLAGS" | |
128 LIBS="$FT2_LIBS $LIBS" | |
129 | |
130 # | |
131 # Sanity checks for the results of freetype-config to some extent. | |
132 # | |
133 AC_RUN_IFELSE([ | |
134 AC_LANG_SOURCE([[ | |
135 | |
136 #include <ft2build.h> | |
137 #include FT_FREETYPE_H | |
138 #include <stdio.h> | |
139 #include <stdlib.h> | |
140 | |
141 int | |
142 main() | |
143 { | |
144 FT_Library library; | |
145 FT_Error error; | |
146 | |
147 error = FT_Init_FreeType(&library); | |
148 | |
149 if (error) | |
150 return 1; | |
151 else | |
152 { | |
153 FT_Done_FreeType(library); | |
154 return 0; | |
155 } | |
156 } | |
157 | |
158 ]]) | |
159 ], | |
160 [], | |
161 [no_ft=yes], | |
162 [echo $ECHO_N "cross compiling; assuming OK... $ECHO_C"]) | |
163 | |
164 CFLAGS="$ac_save_CFLAGS" | |
165 LIBS="$ac_save_LIBS" | |
166 fi # test $ft_config_version -lt $ft_min_version | |
167 fi # test x$enable_fttest = xyes | |
168 fi # test "$FT2_CONFIG" = "no" | |
169 | |
170 if test x$no_ft = x ; then | |
171 AC_MSG_RESULT([yes]) | |
172 m4_if([$2], [], [:], [$2]) | |
173 else | |
174 AC_MSG_RESULT([no]) | |
175 if test "$FT2_CONFIG" = "no" ; then | |
176 AC_MSG_WARN([ | |
177 | |
178 The freetype-config script installed by FreeType 2 could not be found. | |
179 If FreeType 2 was installed in PREFIX, make sure PREFIX/bin is in | |
180 your path, or set the FT2_CONFIG environment variable to the | |
181 full path to freetype-config. | |
182 ]) | |
183 else | |
184 if test x$ft_config_is_lt = xyes ; then | |
185 AC_MSG_WARN([ | |
186 | |
187 Your installed version of the FreeType 2 library is too old. | |
188 If you have different versions of FreeType 2, make sure that | |
189 correct values for --with-ft-prefix or --with-ft-exec-prefix | |
190 are used, or set the FT2_CONFIG environment variable to the | |
191 full path to freetype-config. | |
192 ]) | |
193 else | |
194 AC_MSG_WARN([ | |
195 | |
196 The FreeType test program failed to run. If your system uses | |
197 shared libraries and they are installed outside the normal | |
198 system library path, make sure the variable LD_LIBRARY_PATH | |
199 (or whatever is appropiate for your system) is correctly set. | |
200 ]) | |
201 fi | |
202 fi | |
203 | |
204 FT2_CFLAGS="" | |
205 FT2_LIBS="" | |
206 m4_if([$3], [], [:], [$3]) | |
207 fi | |
208 | |
209 AC_SUBST([FT2_CFLAGS]) | |
210 AC_SUBST([FT2_LIBS])]) | |
211 | |
212 # end of freetype2.m4 | |
213 | |
214 # Configure paths for SDL | |
215 # Sam Lantinga 9/21/99 | |
216 # stolen from Manish Singh | |
217 # stolen back from Frank Belew | |
218 # stolen from Manish Singh | |
219 # Shamelessly stolen from Owen Taylor | |
220 | |
221 dnl AM_PATH_SDL([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) | |
222 dnl Test for SDL, and define SDL_CFLAGS and SDL_LIBS | |
223 dnl | |
224 AC_DEFUN([AM_PATH_SDL], | |
225 [dnl | |
226 dnl Get the cflags and libraries from the sdl-config script | |
227 dnl | |
228 AC_ARG_WITH(sdl-prefix,[ --with-sdl-prefix=PFX Prefix where SDL is installed (optional)], | |
229 sdl_prefix="$withval", sdl_prefix="") | |
230 AC_ARG_WITH(sdl-exec-prefix,[ --with-sdl-exec-prefix=PFX Exec prefix where SDL is installed (optional)], | |
231 sdl_exec_prefix="$withval", sdl_exec_prefix="") | |
232 AC_ARG_ENABLE(sdltest, [ --disable-sdltest Do not try to compile and run a test SDL program], | |
233 , enable_sdltest=yes) | |
234 | |
235 if test x$sdl_exec_prefix != x ; then | |
236 sdl_args="$sdl_args --exec-prefix=$sdl_exec_prefix" | |
237 if test x${SDL_CONFIG+set} != xset ; then | |
238 SDL_CONFIG=$sdl_exec_prefix/bin/sdl-config | |
239 fi | |
240 fi | |
241 if test x$sdl_prefix != x ; then | |
242 sdl_args="$sdl_args --prefix=$sdl_prefix" | |
243 if test x${SDL_CONFIG+set} != xset ; then | |
244 SDL_CONFIG=$sdl_prefix/bin/sdl-config | |
245 fi | |
246 fi | |
247 | |
248 AC_REQUIRE([AC_CANONICAL_TARGET]) | |
249 PATH="$prefix/bin:$prefix/usr/bin:$PATH" | |
250 AC_PATH_PROG(SDL_CONFIG, sdl-config, no, [$PATH]) | |
251 min_sdl_version=ifelse([$1], ,0.11.0,$1) | |
252 AC_MSG_CHECKING(for SDL - version >= $min_sdl_version) | |
253 no_sdl="" | |
254 if test "$SDL_CONFIG" = "no" ; then | |
255 no_sdl=yes | |
256 else | |
257 SDL_CFLAGS=`$SDL_CONFIG $sdlconf_args --cflags` | |
258 SDL_LIBS=`$SDL_CONFIG $sdlconf_args --libs` | |
259 | |
260 sdl_major_version=`$SDL_CONFIG $sdl_args --version | \ | |
261 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` | |
262 sdl_minor_version=`$SDL_CONFIG $sdl_args --version | \ | |
263 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` | |
264 sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \ | |
265 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` | |
266 if test "x$enable_sdltest" = "xyes" ; then | |
267 ac_save_CFLAGS="$CFLAGS" | |
268 ac_save_LIBS="$LIBS" | |
269 CFLAGS="$CFLAGS $SDL_CFLAGS" | |
270 LIBS="$LIBS $SDL_LIBS" | |
271 dnl | |
272 dnl Now check if the installed SDL is sufficiently new. (Also sanity | |
273 dnl checks the results of sdl-config to some extent | |
274 dnl | |
275 rm -f conf.sdltest | |
276 AC_TRY_RUN([ | |
277 #include <stdio.h> | |
278 #include <stdlib.h> | |
279 #include <string.h> | |
280 #include "SDL.h" | |
281 | |
282 char* | |
283 my_strdup (char *str) | |
284 { | |
285 char *new_str; | |
286 | |
287 if (str) | |
288 { | |
289 new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char)); | |
290 strcpy (new_str, str); | |
291 } | |
292 else | |
293 new_str = NULL; | |
294 | |
295 return new_str; | |
296 } | |
297 | |
298 int main (int argc, char *argv[]) | |
299 { | |
300 int major, minor, micro; | |
301 char *tmp_version; | |
302 | |
303 /* This hangs on some systems (?) | |
304 system ("touch conf.sdltest"); | |
305 */ | |
306 { FILE *fp = fopen("conf.sdltest", "a"); if ( fp ) fclose(fp); } | |
307 | |
308 /* HP/UX 9 (%@#!) writes to sscanf strings */ | |
309 tmp_version = my_strdup("$min_sdl_version"); | |
310 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { | |
311 printf("%s, bad version string\n", "$min_sdl_version"); | |
312 exit(1); | |
313 } | |
314 | |
315 if (($sdl_major_version > major) || | |
316 (($sdl_major_version == major) && ($sdl_minor_version > minor)) || | |
317 (($sdl_major_version == major) && ($sdl_minor_version == minor) && ($sdl_micro_version >= micro))) | |
318 { | |
319 return 0; | |
320 } | |
321 else | |
322 { | |
323 printf("\n*** 'sdl-config --version' returned %d.%d.%d, but the minimum version\n", $sdl_major_version, $sdl_minor_version, $sdl_micro_version); | |
324 printf("*** of SDL required is %d.%d.%d. If sdl-config is correct, then it is\n", major, minor, micro); | |
325 printf("*** best to upgrade to the required version.\n"); | |
326 printf("*** If sdl-config was wrong, set the environment variable SDL_CONFIG\n"); | |
327 printf("*** to point to the correct copy of sdl-config, and remove the file\n"); | |
328 printf("*** config.cache before re-running configure\n"); | |
329 return 1; | |
330 } | |
331 } | |
332 | |
333 ],, no_sdl=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) | |
334 CFLAGS="$ac_save_CFLAGS" | |
335 LIBS="$ac_save_LIBS" | |
336 fi | |
337 fi | |
338 if test "x$no_sdl" = x ; then | |
339 AC_MSG_RESULT(yes) | |
340 ifelse([$2], , :, [$2]) | |
341 else | |
342 AC_MSG_RESULT(no) | |
343 if test "$SDL_CONFIG" = "no" ; then | |
344 echo "*** The sdl-config script installed by SDL could not be found" | |
345 echo "*** If SDL was installed in PREFIX, make sure PREFIX/bin is in" | |
346 echo "*** your path, or set the SDL_CONFIG environment variable to the" | |
347 echo "*** full path to sdl-config." | |
348 else | |
349 if test -f conf.sdltest ; then | |
350 : | |
351 else | |
352 echo "*** Could not run SDL test program, checking why..." | |
353 CFLAGS="$CFLAGS $SDL_CFLAGS" | |
354 LIBS="$LIBS $SDL_LIBS" | |
355 AC_TRY_LINK([ | |
356 #include <stdio.h> | |
357 #include "SDL.h" | |
358 | |
359 int main(int argc, char *argv[]) | |
360 { return 0; } | |
361 #undef main | |
362 #define main K_and_R_C_main | |
363 ], [ return 0; ], | |
364 [ echo "*** The test program compiled, but did not run. This usually means" | |
365 echo "*** that the run-time linker is not finding SDL or finding the wrong" | |
366 echo "*** version of SDL. If it is not finding SDL, you'll need to set your" | |
367 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" | |
368 echo "*** to the installed location Also, make sure you have run ldconfig if that" | |
369 echo "*** is required on your system" | |
370 echo "***" | |
371 echo "*** If you have an old version installed, it is best to remove it, although" | |
372 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"], | |
373 [ echo "*** The test program failed to compile or link. See the file config.log for the" | |
374 echo "*** exact error that occured. This usually means SDL was incorrectly installed" | |
375 echo "*** or that you have moved SDL since it was installed. In the latter case, you" | |
376 echo "*** may want to edit the sdl-config script: $SDL_CONFIG" ]) | |
377 CFLAGS="$ac_save_CFLAGS" | |
378 LIBS="$ac_save_LIBS" | |
379 fi | |
380 fi | |
381 SDL_CFLAGS="" | |
382 SDL_LIBS="" | |
383 ifelse([$3], , :, [$3]) | |
384 fi | |
385 AC_SUBST(SDL_CFLAGS) | |
386 AC_SUBST(SDL_LIBS) | |
387 rm -f conf.sdltest | |
388 ]) | |
389 | |
390 # Configure paths for SMPEG | |
391 # Nicolas Vignal 11/19/2000 | |
392 # stolen from Sam Lantinga | |
393 # stolen from Manish Singh | |
394 # stolen back from Frank Belew | |
395 # stolen from Manish Singh | |
396 # Shamelessly stolen from Owen Taylor | |
397 | |
398 dnl AM_PATH_SMPEG([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) | |
399 dnl Test for SMPEG, and define SMPEG_CFLAGS and SMPEG_LIBS | |
400 dnl | |
401 AC_DEFUN(AM_PATH_SMPEG, | |
402 [dnl | |
403 dnl Get the cflags and libraries from the smpeg-config script | |
404 dnl | |
405 AC_ARG_WITH(smpeg-prefix,[ --with-smpeg-prefix=PFX Prefix where SMPEG is installed (optional)], | |
406 smpeg_prefix="$withval", smpeg_prefix="") | |
407 AC_ARG_WITH(smpeg-exec-prefix,[ --with-smpeg-exec-prefix=PFX Exec prefix where SMPEG is installed (optional)], | |
408 smpeg_exec_prefix="$withval", smpeg_exec_prefix="") | |
409 AC_ARG_ENABLE(smpegtest, [ --disable-smpegtest Do not try to compile and run a test SMPEG program], | |
410 , enable_smpegtest=yes) | |
411 | |
412 if test x$smpeg_exec_prefix != x ; then | |
413 smpeg_args="$smpeg_args --exec-prefix=$smpeg_exec_prefix" | |
414 if test x${SMPEG_CONFIG+set} != xset ; then | |
415 SMPEG_CONFIG=$smpeg_exec_prefix/bin/smpeg-config | |
416 fi | |
417 fi | |
418 if test x$smpeg_prefix != x ; then | |
419 smpeg_args="$smpeg_args --prefix=$smpeg_prefix" | |
420 if test x${SMPEG_CONFIG+set} != xset ; then | |
421 SMPEG_CONFIG=$smpeg_prefix/bin/smpeg-config | |
422 fi | |
423 fi | |
424 | |
425 AC_PATH_PROG(SMPEG_CONFIG, smpeg-config, no) | |
426 min_smpeg_version=ifelse([$1], ,0.2.7,$1) | |
427 AC_MSG_CHECKING(for SMPEG - version >= $min_smpeg_version) | |
428 no_smpeg="" | |
429 if test "$SMPEG_CONFIG" = "no" ; then | |
430 no_smpeg=yes | |
431 else | |
432 SMPEG_CFLAGS=`$SMPEG_CONFIG $smpegconf_args --cflags` | |
433 SMPEG_LIBS=`$SMPEG_CONFIG $smpegconf_args --libs` | |
434 | |
435 smpeg_major_version=`$SMPEG_CONFIG $smpeg_args --version | \ | |
436 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` | |
437 smpeg_minor_version=`$SMPEG_CONFIG $smpeg_args --version | \ | |
438 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` | |
439 smpeg_micro_version=`$SMPEG_CONFIG $smpeg_config_args --version | \ | |
440 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` | |
441 if test "x$enable_smpegtest" = "xyes" ; then | |
442 ac_save_CFLAGS="$CFLAGS" | |
443 ac_save_LIBS="$LIBS" | |
444 CFLAGS="$CFLAGS $SMPEG_CFLAGS $SDL_CFLAGS" | |
445 LIBS="$LIBS $SMPEG_LIBS $SDL_LIBS" | |
446 dnl | |
447 dnl Now check if the installed SMPEG is sufficiently new. (Also sanity | |
448 dnl checks the results of smpeg-config to some extent | |
449 dnl | |
450 rm -f conf.smpegtest | |
451 AC_TRY_RUN([ | |
452 #include <stdio.h> | |
453 #include <stdlib.h> | |
454 #include <string.h> | |
455 #include "smpeg.h" | |
456 | |
457 char* | |
458 my_strdup (char *str) | |
459 { | |
460 char *new_str; | |
461 | |
462 if (str) | |
463 { | |
464 new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char)); | |
465 strcpy (new_str, str); | |
466 } | |
467 else | |
468 new_str = NULL; | |
469 | |
470 return new_str; | |
471 } | |
472 | |
473 int main (int argc, char *argv[]) | |
474 { | |
475 int major, minor, micro; | |
476 char *tmp_version; | |
477 | |
478 /* This hangs on some systems (?) | |
479 system ("touch conf.smpegtest"); | |
480 */ | |
481 { FILE *fp = fopen("conf.smpegtest", "a"); if ( fp ) fclose(fp); } | |
482 | |
483 /* HP/UX 9 (%@#!) writes to sscanf strings */ | |
484 tmp_version = my_strdup("$min_smpeg_version"); | |
485 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { | |
486 printf("%s, bad version string\n", "$min_smpeg_version"); | |
487 exit(1); | |
488 } | |
489 | |
490 if (($smpeg_major_version > major) || | |
491 (($smpeg_major_version == major) && ($smpeg_minor_version > minor)) || | |
492 (($smpeg_major_version == major) && ($smpeg_minor_version == minor) | |
493 && ($smpeg_micro_version >= micro))) | |
494 { | |
495 return 0; | |
496 } | |
497 else | |
498 { | |
499 printf("\n*** 'smpeg-config --version' returned %d.%d.%d, but the minimum version\n", $smpeg_major_version, $smpeg_minor_version, | |
500 $smpeg_micro_version); | |
501 printf("*** of SMPEG required is %d.%d.%d. If smpeg-config is correct, then it is\n", major, minor, micro); | |
502 printf("*** best to upgrade to the required version.\n"); | |
503 printf("*** If smpeg-config was wrong, set the environment variable SMPEG_CONFIG\n"); | |
504 printf("*** to point to the correct copy of smpeg-config, and remove the file\n"); | |
505 printf("*** config.cache before re-running configure\n"); | |
506 return 1; | |
507 } | |
508 } | |
509 | |
510 ],, no_smpeg=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) | |
511 CFLAGS="$ac_save_CFLAGS" | |
512 LIBS="$ac_save_LIBS" | |
513 fi | |
514 fi | |
515 if test "x$no_smpeg" = x ; then | |
516 AC_MSG_RESULT(yes) | |
517 ifelse([$2], , :, [$2]) | |
518 else | |
519 AC_MSG_RESULT(no) | |
520 if test "$SMPEG_CONFIG" = "no" ; then | |
521 echo "*** The smpeg-config script installed by SMPEG could not be found" | |
522 echo "*** If SMPEG was installed in PREFIX, make sure PREFIX/bin is in" | |
523 echo "*** your path, or set the SMPEG_CONFIG environment variable to the" | |
524 echo "*** full path to smpeg-config." | |
525 else | |
526 if test -f conf.smpegtest ; then | |
527 : | |
528 else | |
529 echo "*** Could not run SMPEG test program, checking why..." | |
530 CFLAGS="$CFLAGS $SMPEG_CFLAGS $SDL_CFLAGS" | |
531 LIBS="$LIBS $SMPEG_LIBS $SDL_LIBS" | |
532 AC_TRY_LINK([ | |
533 #include <stdio.h> | |
534 #include "smpeg.h" | |
535 ], [ return 0; ], | |
536 [ echo "*** The test program compiled, but did not run. This usually means" | |
537 echo "*** that the run-time linker is not finding SMPEG or finding the wrong" | |
538 echo "*** version of SMPEG. If it is not finding SMPEG, you'll need to set your" | |
539 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" | |
540 echo "*** to the installed location Also, make sure you have run ldconfig if that" | |
541 echo "*** is required on your system" | |
542 echo "***" | |
543 echo "*** If you have an old version installed, it is best to remove it, although" | |
544 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"], | |
545 [ echo "*** The test program failed to compile or link. See the file config.log for the" | |
546 echo "*** exact error that occured. This usually means SMPEG was incorrectly installed" | |
547 echo "*** or that you have moved SMPEG since it was installed. In the latter case, you" | |
548 echo "*** may want to edit the smpeg-config script: $SMPEG_CONFIG" ]) | |
549 CFLAGS="$ac_save_CFLAGS" | |
550 LIBS="$ac_save_LIBS" | |
551 fi | |
552 fi | |
553 SMPEG_CFLAGS="" | |
554 SMPEG_LIBS="" | |
555 ifelse([$3], , :, [$3]) | |
556 fi | |
557 AC_SUBST(SMPEG_CFLAGS) | |
558 AC_SUBST(SMPEG_LIBS) | |
559 rm -f conf.smpegtest | |
560 ]) | |
561 |