annotate acinclude.m4 @ 528:61a317171ef0 stable-1.0

Merge r536:537 from trunk: Speex bogus data check.
author Ryan C. Gordon <icculus@icculus.org>
date Fri, 11 Apr 2008 19:55:10 +0000
parents b4e9fb8ef9f6
children
rev   line source
68
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
1 dnl AM_PATH_SDL([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
2 dnl Test for SDL, and define SDL_CFLAGS and SDL_LIBS
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
3 dnl
499
b4e9fb8ef9f6 Backport from devbranch:
Ryan C. Gordon <icculus@icculus.org>
parents: 466
diff changeset
4 AC_DEFUN([AM_PATH_SDL],
68
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
5 [dnl
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
6 dnl Get the cflags and libraries from the sdl-config script
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
7 dnl
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
8 AC_ARG_WITH(sdl-prefix,[ --with-sdl-prefix=PFX Prefix where SDL is installed (optional)],
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
9 sdl_prefix="$withval", sdl_prefix="")
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
10 AC_ARG_WITH(sdl-exec-prefix,[ --with-sdl-exec-prefix=PFX Exec prefix where SDL is installed (optional)],
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
11 sdl_exec_prefix="$withval", sdl_exec_prefix="")
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
12 AC_ARG_ENABLE(sdltest, [ --disable-sdltest Do not try to compile and run a test SDL program],
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
13 , enable_sdltest=yes)
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
14
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
15 if test x$sdl_exec_prefix != x ; then
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
16 sdl_args="$sdl_args --exec-prefix=$sdl_exec_prefix"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
17 if test x${SDL_CONFIG+set} != xset ; then
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
18 SDL_CONFIG=$sdl_exec_prefix/bin/sdl-config
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
19 fi
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
20 fi
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
21 if test x$sdl_prefix != x ; then
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
22 sdl_args="$sdl_args --prefix=$sdl_prefix"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
23 if test x${SDL_CONFIG+set} != xset ; then
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
24 SDL_CONFIG=$sdl_prefix/bin/sdl-config
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
25 fi
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
26 fi
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
27
499
b4e9fb8ef9f6 Backport from devbranch:
Ryan C. Gordon <icculus@icculus.org>
parents: 466
diff changeset
28 AC_REQUIRE([AC_CANONICAL_TARGET])
b4e9fb8ef9f6 Backport from devbranch:
Ryan C. Gordon <icculus@icculus.org>
parents: 466
diff changeset
29 PATH="$prefix/bin:$prefix/usr/bin:$PATH"
b4e9fb8ef9f6 Backport from devbranch:
Ryan C. Gordon <icculus@icculus.org>
parents: 466
diff changeset
30 AC_PATH_PROG(SDL_CONFIG, sdl-config, no, [$PATH])
68
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
31 min_sdl_version=ifelse([$1], ,0.11.0,$1)
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
32 AC_MSG_CHECKING(for SDL - version >= $min_sdl_version)
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
33 no_sdl=""
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
34 if test "$SDL_CONFIG" = "no" ; then
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
35 no_sdl=yes
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
36 else
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
37 SDL_CFLAGS=`$SDL_CONFIG $sdlconf_args --cflags`
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
38 SDL_LIBS=`$SDL_CONFIG $sdlconf_args --libs`
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
39
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
40 sdl_major_version=`$SDL_CONFIG $sdl_args --version | \
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
41 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
42 sdl_minor_version=`$SDL_CONFIG $sdl_args --version | \
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
43 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
44 sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
45 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
46 if test "x$enable_sdltest" = "xyes" ; then
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
47 ac_save_CFLAGS="$CFLAGS"
499
b4e9fb8ef9f6 Backport from devbranch:
Ryan C. Gordon <icculus@icculus.org>
parents: 466
diff changeset
48 ac_save_CXXFLAGS="$CXXFLAGS"
68
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
49 ac_save_LIBS="$LIBS"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
50 CFLAGS="$CFLAGS $SDL_CFLAGS"
499
b4e9fb8ef9f6 Backport from devbranch:
Ryan C. Gordon <icculus@icculus.org>
parents: 466
diff changeset
51 CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
68
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
52 LIBS="$LIBS $SDL_LIBS"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
53 dnl
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
54 dnl Now check if the installed SDL is sufficiently new. (Also sanity
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
55 dnl checks the results of sdl-config to some extent
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
56 dnl
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
57 rm -f conf.sdltest
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
58 AC_TRY_RUN([
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
59 #include <stdio.h>
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
60 #include <stdlib.h>
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
61 #include <string.h>
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
62 #include "SDL.h"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
63
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
64 char*
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
65 my_strdup (char *str)
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
66 {
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
67 char *new_str;
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
68
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
69 if (str)
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
70 {
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
71 new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char));
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
72 strcpy (new_str, str);
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
73 }
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
74 else
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
75 new_str = NULL;
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
76
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
77 return new_str;
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
78 }
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
79
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
80 int main (int argc, char *argv[])
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
81 {
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
82 int major, minor, micro;
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
83 char *tmp_version;
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
84
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
85 /* This hangs on some systems (?)
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
86 system ("touch conf.sdltest");
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
87 */
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
88 { FILE *fp = fopen("conf.sdltest", "a"); if ( fp ) fclose(fp); }
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
89
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
90 /* HP/UX 9 (%@#!) writes to sscanf strings */
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
91 tmp_version = my_strdup("$min_sdl_version");
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
92 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
93 printf("%s, bad version string\n", "$min_sdl_version");
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
94 exit(1);
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
95 }
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
96
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
97 if (($sdl_major_version > major) ||
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
98 (($sdl_major_version == major) && ($sdl_minor_version > minor)) ||
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
99 (($sdl_major_version == major) && ($sdl_minor_version == minor) && ($sdl_micro_version >= micro)))
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
100 {
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
101 return 0;
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
102 }
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
103 else
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
104 {
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
105 printf("\n*** 'sdl-config --version' returned %d.%d.%d, but the minimum version\n", $sdl_major_version, $sdl_minor_version, $sdl_micro_version);
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
106 printf("*** of SDL required is %d.%d.%d. If sdl-config is correct, then it is\n", major, minor, micro);
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
107 printf("*** best to upgrade to the required version.\n");
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
108 printf("*** If sdl-config was wrong, set the environment variable SDL_CONFIG\n");
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
109 printf("*** to point to the correct copy of sdl-config, and remove the file\n");
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
110 printf("*** config.cache before re-running configure\n");
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
111 return 1;
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
112 }
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
113 }
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
114
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
115 ],, no_sdl=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
116 CFLAGS="$ac_save_CFLAGS"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
117 LIBS="$ac_save_LIBS"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
118 fi
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
119 fi
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
120 if test "x$no_sdl" = x ; then
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
121 AC_MSG_RESULT(yes)
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
122 ifelse([$2], , :, [$2])
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
123 else
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
124 AC_MSG_RESULT(no)
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
125 if test "$SDL_CONFIG" = "no" ; then
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
126 echo "*** The sdl-config script installed by SDL could not be found"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
127 echo "*** If SDL was installed in PREFIX, make sure PREFIX/bin is in"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
128 echo "*** your path, or set the SDL_CONFIG environment variable to the"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
129 echo "*** full path to sdl-config."
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
130 else
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
131 if test -f conf.sdltest ; then
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
132 :
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
133 else
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
134 echo "*** Could not run SDL test program, checking why..."
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
135 CFLAGS="$CFLAGS $SDL_CFLAGS"
499
b4e9fb8ef9f6 Backport from devbranch:
Ryan C. Gordon <icculus@icculus.org>
parents: 466
diff changeset
136 CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
68
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
137 LIBS="$LIBS $SDL_LIBS"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
138 AC_TRY_LINK([
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
139 #include <stdio.h>
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
140 #include "SDL.h"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
141
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
142 int main(int argc, char *argv[])
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
143 { return 0; }
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
144 #undef main
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
145 #define main K_and_R_C_main
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
146 ], [ return 0; ],
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
147 [ echo "*** The test program compiled, but did not run. This usually means"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
148 echo "*** that the run-time linker is not finding SDL or finding the wrong"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
149 echo "*** version of SDL. If it is not finding SDL, you'll need to set your"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
150 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
151 echo "*** to the installed location Also, make sure you have run ldconfig if that"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
152 echo "*** is required on your system"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
153 echo "***"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
154 echo "*** If you have an old version installed, it is best to remove it, although"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
155 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
156 [ echo "*** The test program failed to compile or link. See the file config.log for the"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
157 echo "*** exact error that occured. This usually means SDL was incorrectly installed"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
158 echo "*** or that you have moved SDL since it was installed. In the latter case, you"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
159 echo "*** may want to edit the sdl-config script: $SDL_CONFIG" ])
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
160 CFLAGS="$ac_save_CFLAGS"
499
b4e9fb8ef9f6 Backport from devbranch:
Ryan C. Gordon <icculus@icculus.org>
parents: 466
diff changeset
161 CXXFLAGS="$ac_save_CXXFLAGS"
68
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
162 LIBS="$ac_save_LIBS"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
163 fi
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
164 fi
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
165 SDL_CFLAGS=""
499
b4e9fb8ef9f6 Backport from devbranch:
Ryan C. Gordon <icculus@icculus.org>
parents: 466
diff changeset
166 SDL_CXXFLAGS=""
68
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
167 SDL_LIBS=""
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
168 ifelse([$3], , :, [$3])
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
169 fi
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
170 AC_SUBST(SDL_CFLAGS)
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
171 AC_SUBST(SDL_LIBS)
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
172 rm -f conf.sdltest
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
173 ])