File: acinclude.m4

package info (click to toggle)
gengameng 4.1-7
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 1,468 kB
  • ctags: 177
  • sloc: sh: 8,342; cpp: 935; makefile: 110
file content (41 lines) | stat: -rw-r--r-- 837 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
dnl Reproduced by me (Daniel Burrows) here since the macro isn't available
dnl on my computer.

AC_DEFUN([AM_TRY_LINK_SDL_IMAGE],
[
	AC_MSG_CHECKING([for SDL_image library (>= 1.2.0)])

	old_CFLAGS="$CFLAGS"
	CFLAGS="$SDL_CFLAGS"
	old_LDFLAGS="$LDFLAGS"
	LDFLAGS="$SDL_LDFLAGS"
	old_LIBS="$LIBS"
	LIBS="$SDL_LIBS -lSDL_image"
	# echo "{Using CFLAGS='$CFLAGS' LDFLAGS='$LDFLAGS' LIBS='$LIBS'}"

	AC_TRY_LINK(
	[
		#include <SDL_image.h>
	],
	[
		/* Not a runnable program. */
		SDL_Surface *image = IMG_LoadXPM_RW((SDL_RWops *) 0);
		return image != image;
	],
	[
	    AC_MSG_RESULT([found])
	],
	[
	    AC_MSG_ERROR([could not link with SDL_image.
You can get it at http://www.libsdl.org/projects/SDL_image/])
	])

	CFLAGS="$old_CFLAGS"
	unset old_CFLAGS
	LDFLAGS="$old_LDFLAGS"
	unset old_LDFLAGS
	LIBS="$old_LIBS"
	unset old_LIBS
]
)