annotate m4/sdl.m4 @ 1761:70caa62ead63 trunk

[svn] - fix for "bmp_rcfile_write_string: assertion `value != NULL' failed"
author yaz
date Thu, 28 Sep 2006 08:39:14 -0700
parents b252f73213dc
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
73
44f427e01956 [svn] Added the SDL M4 Macro.
msameer
parents:
diff changeset
1 # Configure paths for SDL
44f427e01956 [svn] Added the SDL M4 Macro.
msameer
parents:
diff changeset
2 # Sam Lantinga 9/21/99
44f427e01956 [svn] Added the SDL M4 Macro.
msameer
parents:
diff changeset
3 # stolen from Manish Singh
44f427e01956 [svn] Added the SDL M4 Macro.
msameer
parents:
diff changeset
4 # stolen back from Frank Belew
44f427e01956 [svn] Added the SDL M4 Macro.
msameer
parents:
diff changeset
5 # stolen from Manish Singh
44f427e01956 [svn] Added the SDL M4 Macro.
msameer
parents:
diff changeset
6 # Shamelessly stolen from Owen Taylor
44f427e01956 [svn] Added the SDL M4 Macro.
msameer
parents:
diff changeset
7
44f427e01956 [svn] Added the SDL M4 Macro.
msameer
parents:
diff changeset
8 dnl AM_PATH_SDL([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
44f427e01956 [svn] Added the SDL M4 Macro.
msameer
parents:
diff changeset
9 dnl Test for SDL, and define SDL_CFLAGS and SDL_LIBS
44f427e01956 [svn] Added the SDL M4 Macro.
msameer
parents:
diff changeset
10 dnl
44f427e01956 [svn] Added the SDL M4 Macro.
msameer
parents:
diff changeset
11 AC_DEFUN([AM_PATH_SDL],
44f427e01956 [svn] Added the SDL M4 Macro.
msameer
parents:
diff changeset
12 [dnl
44f427e01956 [svn] Added the SDL M4 Macro.
msameer
parents:
diff changeset
13 dnl Get the cflags and libraries from the sdl-config script
44f427e01956 [svn] Added the SDL M4 Macro.
msameer
parents:
diff changeset
14 dnl
44f427e01956 [svn] Added the SDL M4 Macro.
msameer
parents:
diff changeset
15 AC_ARG_WITH(sdl-prefix,[ --with-sdl-prefix=PFX Prefix where SDL is installed (optional)],
44f427e01956 [svn] Added the SDL M4 Macro.
msameer
parents:
diff changeset
16 sdl_prefix="$withval", sdl_prefix="")
44f427e01956 [svn] Added the SDL M4 Macro.
msameer
parents:
diff changeset
17 AC_ARG_WITH(sdl-exec-prefix,[ --with-sdl-exec-prefix=PFX Exec prefix where SDL is installed (optional)],
44f427e01956 [svn] Added the SDL M4 Macro.
msameer
parents:
diff changeset
18 sdl_exec_prefix="$withval", sdl_exec_prefix="")
44f427e01956 [svn] Added the SDL M4 Macro.
msameer
parents:
diff changeset
19
44f427e01956 [svn] Added the SDL M4 Macro.
msameer
parents:
diff changeset
20 if test x$sdl_exec_prefix != x ; then
44f427e01956 [svn] Added the SDL M4 Macro.
msameer
parents:
diff changeset
21 sdl_args="$sdl_args --exec-prefix=$sdl_exec_prefix"
44f427e01956 [svn] Added the SDL M4 Macro.
msameer
parents:
diff changeset
22 if test x${SDL_CONFIG+set} != xset ; then
44f427e01956 [svn] Added the SDL M4 Macro.
msameer
parents:
diff changeset
23 SDL_CONFIG=$sdl_exec_prefix/bin/sdl-config
44f427e01956 [svn] Added the SDL M4 Macro.
msameer
parents:
diff changeset
24 fi
44f427e01956 [svn] Added the SDL M4 Macro.
msameer
parents:
diff changeset
25 fi
44f427e01956 [svn] Added the SDL M4 Macro.
msameer
parents:
diff changeset
26 if test x$sdl_prefix != x ; then
44f427e01956 [svn] Added the SDL M4 Macro.
msameer
parents:
diff changeset
27 sdl_args="$sdl_args --prefix=$sdl_prefix"
44f427e01956 [svn] Added the SDL M4 Macro.
msameer
parents:
diff changeset
28 if test x${SDL_CONFIG+set} != xset ; then
44f427e01956 [svn] Added the SDL M4 Macro.
msameer
parents:
diff changeset
29 SDL_CONFIG=$sdl_prefix/bin/sdl-config
44f427e01956 [svn] Added the SDL M4 Macro.
msameer
parents:
diff changeset
30 fi
44f427e01956 [svn] Added the SDL M4 Macro.
msameer
parents:
diff changeset
31 fi
44f427e01956 [svn] Added the SDL M4 Macro.
msameer
parents:
diff changeset
32
44f427e01956 [svn] Added the SDL M4 Macro.
msameer
parents:
diff changeset
33 AC_REQUIRE([AC_CANONICAL_TARGET])
44f427e01956 [svn] Added the SDL M4 Macro.
msameer
parents:
diff changeset
34 PATH="$prefix/bin:$prefix/usr/bin:$PATH"
44f427e01956 [svn] Added the SDL M4 Macro.
msameer
parents:
diff changeset
35 AC_PATH_PROG(SDL_CONFIG, sdl-config, no, [$PATH])
44f427e01956 [svn] Added the SDL M4 Macro.
msameer
parents:
diff changeset
36 min_sdl_version=ifelse([$1], ,0.11.0,$1)
44f427e01956 [svn] Added the SDL M4 Macro.
msameer
parents:
diff changeset
37 AC_MSG_CHECKING(for SDL - version >= $min_sdl_version)
44f427e01956 [svn] Added the SDL M4 Macro.
msameer
parents:
diff changeset
38 no_sdl=""
44f427e01956 [svn] Added the SDL M4 Macro.
msameer
parents:
diff changeset
39 if test "$SDL_CONFIG" = "no" ; then
44f427e01956 [svn] Added the SDL M4 Macro.
msameer
parents:
diff changeset
40 no_sdl=yes
44f427e01956 [svn] Added the SDL M4 Macro.
msameer
parents:
diff changeset
41 else
44f427e01956 [svn] Added the SDL M4 Macro.
msameer
parents:
diff changeset
42 SDL_CFLAGS=`$SDL_CONFIG $sdlconf_args --cflags`
44f427e01956 [svn] Added the SDL M4 Macro.
msameer
parents:
diff changeset
43 SDL_LIBS=`$SDL_CONFIG $sdlconf_args --libs`
44f427e01956 [svn] Added the SDL M4 Macro.
msameer
parents:
diff changeset
44
44f427e01956 [svn] Added the SDL M4 Macro.
msameer
parents:
diff changeset
45 sdl_major_version=`$SDL_CONFIG $sdl_args --version | \
44f427e01956 [svn] Added the SDL M4 Macro.
msameer
parents:
diff changeset
46 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
44f427e01956 [svn] Added the SDL M4 Macro.
msameer
parents:
diff changeset
47 sdl_minor_version=`$SDL_CONFIG $sdl_args --version | \
44f427e01956 [svn] Added the SDL M4 Macro.
msameer
parents:
diff changeset
48 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
44f427e01956 [svn] Added the SDL M4 Macro.
msameer
parents:
diff changeset
49 sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \
44f427e01956 [svn] Added the SDL M4 Macro.
msameer
parents:
diff changeset
50 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
44f427e01956 [svn] Added the SDL M4 Macro.
msameer
parents:
diff changeset
51 fi
44f427e01956 [svn] Added the SDL M4 Macro.
msameer
parents:
diff changeset
52 if test "x$no_sdl" = x ; then
44f427e01956 [svn] Added the SDL M4 Macro.
msameer
parents:
diff changeset
53 AC_MSG_RESULT(yes)
44f427e01956 [svn] Added the SDL M4 Macro.
msameer
parents:
diff changeset
54 ifelse([$2], , :, [$2])
44f427e01956 [svn] Added the SDL M4 Macro.
msameer
parents:
diff changeset
55 else
44f427e01956 [svn] Added the SDL M4 Macro.
msameer
parents:
diff changeset
56 AC_MSG_RESULT(no)
44f427e01956 [svn] Added the SDL M4 Macro.
msameer
parents:
diff changeset
57 if test "$SDL_CONFIG" = "no" ; then
44f427e01956 [svn] Added the SDL M4 Macro.
msameer
parents:
diff changeset
58 echo "*** The sdl-config script installed by SDL could not be found"
44f427e01956 [svn] Added the SDL M4 Macro.
msameer
parents:
diff changeset
59 echo "*** If SDL was installed in PREFIX, make sure PREFIX/bin is in"
44f427e01956 [svn] Added the SDL M4 Macro.
msameer
parents:
diff changeset
60 echo "*** your path, or set the SDL_CONFIG environment variable to the"
44f427e01956 [svn] Added the SDL M4 Macro.
msameer
parents:
diff changeset
61 echo "*** full path to sdl-config."
44f427e01956 [svn] Added the SDL M4 Macro.
msameer
parents:
diff changeset
62 fi
44f427e01956 [svn] Added the SDL M4 Macro.
msameer
parents:
diff changeset
63 SDL_CFLAGS=""
44f427e01956 [svn] Added the SDL M4 Macro.
msameer
parents:
diff changeset
64 SDL_LIBS=""
44f427e01956 [svn] Added the SDL M4 Macro.
msameer
parents:
diff changeset
65 ifelse([$3], , :, [$3])
44f427e01956 [svn] Added the SDL M4 Macro.
msameer
parents:
diff changeset
66 fi
44f427e01956 [svn] Added the SDL M4 Macro.
msameer
parents:
diff changeset
67 AC_SUBST(SDL_CFLAGS)
44f427e01956 [svn] Added the SDL M4 Macro.
msameer
parents:
diff changeset
68 AC_SUBST(SDL_LIBS)
44f427e01956 [svn] Added the SDL M4 Macro.
msameer
parents:
diff changeset
69 rm -f conf.sdltest
44f427e01956 [svn] Added the SDL M4 Macro.
msameer
parents:
diff changeset
70 ])