Mercurial > sdl-ios-xcode
annotate test/configure.in @ 1544:ab1e4c41ab71
Fixed bug #33
Mike Frysinger wrote:
> with libsdl-1.2.9, some games (like bomberclone) started
> segfaulting in Gentoo
[...snip...]
> the last change in the last hunk:
[...snip...]
> if i change the statement to read:
> (table[which].blit_features & GetBlitFeatures()) == GetBlitFeatures()
> bomberclone no longer segfaults on my box
Alex Volkov wrote:
> The test "(table[which].blit_features & GetBlitFeatures()) ==
> table[which].blit_features)" is correct, and the previous
> "(table[which].cpu_mmx == SDL_HasMMX())" was actually broken.
I think there is potentially a slightly different cause of the above problem.
During the introduction of the Altivec code, the blit_table struct field
'alpha' got changed from a straightforward enum to a bitmask, which makes
perfect sense by itself. However, now the table driven blitter selection code
in SDL_CalculateBlitN() can choose the wrong blitters when searching for a
NO_ALPHA blitter because of the following code:
int a_need = 0;
...
(a_need & table[which].alpha) == a_need &&
When searching through the normal_blit_2[] table, a SET_ALPHA blitter (like
Blit_RGB565_ARGB8888) can now be selected instead of a NO_ALPHA one, causing
alpha channel bits to appear in a non-alpha destination surface. I suppose this
could theoretically be an indirect cause of the segfault mentioned above.
I *think* this can be fixed by changing to
int a_need = NO_ALPHA;
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Wed, 15 Mar 2006 15:47:49 +0000 |
parents | 835c1831f903 |
children | 31c2b8e4885e |
rev | line source |
---|---|
0 | 1 dnl Process this file with autoconf to produce a configure script. |
2 AC_INIT(README) | |
3 | |
4 dnl Detect the canonical host and target build environment | |
1380
d94b080ff6ce
Completely removed dependency on automake
Sam Lantinga <slouken@libsdl.org>
parents:
1367
diff
changeset
|
5 AC_CONFIG_AUX_DIRS($srcdir/../build-scripts) |
978
3b1ba22f5a28
Add support for OpenGL on Atari using OSMesa, the offscreen rendering driver from Mesa
Patrice Mandin <patmandin@gmail.com>
parents:
796
diff
changeset
|
6 AC_CANONICAL_SYSTEM |
0 | 7 |
8 dnl Check for tools | |
9 | |
10 AC_PROG_CC | |
11 | |
12 dnl Check for compiler environment | |
13 | |
14 AC_C_CONST | |
15 | |
16 dnl Figure out which math library to use | |
17 case "$target" in | |
18 *-*-cygwin* | *-*-mingw32*) | |
1380
d94b080ff6ce
Completely removed dependency on automake
Sam Lantinga <slouken@libsdl.org>
parents:
1367
diff
changeset
|
19 EXE=".exe" |
0 | 20 MATHLIB="" |
21 SYS_GL_LIBS="-lopengl32" | |
22 ;; | |
23 *-*-beos*) | |
1380
d94b080ff6ce
Completely removed dependency on automake
Sam Lantinga <slouken@libsdl.org>
parents:
1367
diff
changeset
|
24 EXE="" |
0 | 25 MATHLIB="" |
26 SYS_GL_LIBS="-lGL" | |
27 ;; | |
991
12b13601a544
Final touches to OSMesa OpenGL support on Atari, using loadable libraries. Hope SDL 1.2.8 is out soon.
Patrice Mandin <patmandin@gmail.com>
parents:
981
diff
changeset
|
28 *-*-darwin* ) |
1380
d94b080ff6ce
Completely removed dependency on automake
Sam Lantinga <slouken@libsdl.org>
parents:
1367
diff
changeset
|
29 EXE="" |
0 | 30 MATHLIB="" |
31 SYS_GL_LIBS="" | |
32 ;; | |
33 *-*-aix*) | |
1380
d94b080ff6ce
Completely removed dependency on automake
Sam Lantinga <slouken@libsdl.org>
parents:
1367
diff
changeset
|
34 EXE="" |
0 | 35 if test x$ac_cv_prog_gcc = xyes; then |
36 CFLAGS="-mthreads" | |
978
3b1ba22f5a28
Add support for OpenGL on Atari using OSMesa, the offscreen rendering driver from Mesa
Patrice Mandin <patmandin@gmail.com>
parents:
796
diff
changeset
|
37 fi |
0 | 38 SYS_GL_LIBS="" |
39 ;; | |
991
12b13601a544
Final touches to OSMesa OpenGL support on Atari, using loadable libraries. Hope SDL 1.2.8 is out soon.
Patrice Mandin <patmandin@gmail.com>
parents:
981
diff
changeset
|
40 *-*-mint*) |
1380
d94b080ff6ce
Completely removed dependency on automake
Sam Lantinga <slouken@libsdl.org>
parents:
1367
diff
changeset
|
41 EXE="" |
991
12b13601a544
Final touches to OSMesa OpenGL support on Atari, using loadable libraries. Hope SDL 1.2.8 is out soon.
Patrice Mandin <patmandin@gmail.com>
parents:
981
diff
changeset
|
42 MATHLIB="" |
12b13601a544
Final touches to OSMesa OpenGL support on Atari, using loadable libraries. Hope SDL 1.2.8 is out soon.
Patrice Mandin <patmandin@gmail.com>
parents:
981
diff
changeset
|
43 AC_PATH_PROG(OSMESA_CONFIG, osmesa-config, no) |
12b13601a544
Final touches to OSMesa OpenGL support on Atari, using loadable libraries. Hope SDL 1.2.8 is out soon.
Patrice Mandin <patmandin@gmail.com>
parents:
981
diff
changeset
|
44 if test "x$OSMESA_CONFIG" = "xyes"; then |
12b13601a544
Final touches to OSMesa OpenGL support on Atari, using loadable libraries. Hope SDL 1.2.8 is out soon.
Patrice Mandin <patmandin@gmail.com>
parents:
981
diff
changeset
|
45 OSMESA_CFLAGS=`$OSMESA_CONFIG --cflags` |
12b13601a544
Final touches to OSMesa OpenGL support on Atari, using loadable libraries. Hope SDL 1.2.8 is out soon.
Patrice Mandin <patmandin@gmail.com>
parents:
981
diff
changeset
|
46 OSMESA_LIBS=`$OSMESA_CONFIG --libs` |
12b13601a544
Final touches to OSMesa OpenGL support on Atari, using loadable libraries. Hope SDL 1.2.8 is out soon.
Patrice Mandin <patmandin@gmail.com>
parents:
981
diff
changeset
|
47 CFLAGS="$CFLAGS $OSMESA_CFLAGS" |
12b13601a544
Final touches to OSMesa OpenGL support on Atari, using loadable libraries. Hope SDL 1.2.8 is out soon.
Patrice Mandin <patmandin@gmail.com>
parents:
981
diff
changeset
|
48 SYS_GL_LIBS="$OSMESA_LIBS" |
12b13601a544
Final touches to OSMesa OpenGL support on Atari, using loadable libraries. Hope SDL 1.2.8 is out soon.
Patrice Mandin <patmandin@gmail.com>
parents:
981
diff
changeset
|
49 else |
12b13601a544
Final touches to OSMesa OpenGL support on Atari, using loadable libraries. Hope SDL 1.2.8 is out soon.
Patrice Mandin <patmandin@gmail.com>
parents:
981
diff
changeset
|
50 SYS_GL_LIBS="-lOSMesa" |
12b13601a544
Final touches to OSMesa OpenGL support on Atari, using loadable libraries. Hope SDL 1.2.8 is out soon.
Patrice Mandin <patmandin@gmail.com>
parents:
981
diff
changeset
|
51 fi |
12b13601a544
Final touches to OSMesa OpenGL support on Atari, using loadable libraries. Hope SDL 1.2.8 is out soon.
Patrice Mandin <patmandin@gmail.com>
parents:
981
diff
changeset
|
52 ;; |
0 | 53 *) |
1380
d94b080ff6ce
Completely removed dependency on automake
Sam Lantinga <slouken@libsdl.org>
parents:
1367
diff
changeset
|
54 EXE="" |
0 | 55 MATHLIB="-lm" |
1380
d94b080ff6ce
Completely removed dependency on automake
Sam Lantinga <slouken@libsdl.org>
parents:
1367
diff
changeset
|
56 SYS_GL_LIBS="-lGL" |
0 | 57 ;; |
58 esac | |
1380
d94b080ff6ce
Completely removed dependency on automake
Sam Lantinga <slouken@libsdl.org>
parents:
1367
diff
changeset
|
59 AC_SUBST(EXE) |
0 | 60 AC_SUBST(MATHLIB) |
61 | |
62 dnl Check for SDL | |
1387
835c1831f903
Tests require SDL 1.2.10
Sam Lantinga <slouken@libsdl.org>
parents:
1380
diff
changeset
|
63 SDL_VERSION=1.2.10 |
0 | 64 AM_PATH_SDL($SDL_VERSION, |
65 :, | |
66 AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!]) | |
67 ) | |
68 CFLAGS="$CFLAGS $SDL_CFLAGS" | |
69 LIBS="$LIBS $SDL_LIBS" | |
70 | |
71 dnl Check for OpenGL | |
72 AC_MSG_CHECKING(for OpenGL support) | |
73 have_opengl=no | |
74 AC_TRY_COMPILE([ | |
292
eadc0746dfaf
Added SDL_LockRect() and SDL_UnlockRect()
Sam Lantinga <slouken@libsdl.org>
parents:
214
diff
changeset
|
75 #include "SDL_opengl.h" |
0 | 76 ],[ |
77 ],[ | |
78 have_opengl=yes | |
79 ]) | |
80 AC_MSG_RESULT($have_opengl) | |
81 if test x$have_opengl = xyes; then | |
82 CFLAGS="$CFLAGS -DHAVE_OPENGL" | |
1380
d94b080ff6ce
Completely removed dependency on automake
Sam Lantinga <slouken@libsdl.org>
parents:
1367
diff
changeset
|
83 GLLIB="$SYS_GL_LIBS" |
0 | 84 else |
1380
d94b080ff6ce
Completely removed dependency on automake
Sam Lantinga <slouken@libsdl.org>
parents:
1367
diff
changeset
|
85 GLLIB="" |
0 | 86 fi |
1380
d94b080ff6ce
Completely removed dependency on automake
Sam Lantinga <slouken@libsdl.org>
parents:
1367
diff
changeset
|
87 AC_SUBST(GLLIB) |
0 | 88 |
1380
d94b080ff6ce
Completely removed dependency on automake
Sam Lantinga <slouken@libsdl.org>
parents:
1367
diff
changeset
|
89 dnl Finally create all the generated files |
0 | 90 AC_OUTPUT([Makefile]) |