annotate test/configure.in @ 1629:ef4a796e7f24

Fixed bug #55 From Christian Walther: When writing my patch for #12, I ended up doing all sorts of changes to the way application/window activating/deactivating is handled in the Quartz backend, resulting in the attached patch. It does make the code a bit cleaner IMHO, but as it might be regarded as a case of "if it ain't broken, don't fix it" I'd like to hear other people's opinion about it. Please shout if some change strikes you as unnecessary or wrong, and I'll explain the reasons behind it. As far as I tested it, it does not introduce any new bugs, but I may well have missed some. - The most fundamental change (that triggered most of the others) is irrelevant for the usual single-window SDL applications, it only affects the people who are crazy enough to display other Cocoa windows alongside the SDL window (I'm actually doing this currently, although the additional window only displays debugging info and won't be present in the final product): Before, some things were done on the application becoming active, some on the window becoming key, and some on the window becoming main. Conceptually, all these actions belong to the window becoming key, so that's what I implemented. However, since in a single-window application these three events always happen together, the previous implementation "ain't broken". - This slightly changed the meaning of the SDL_APPMOUSEFOCUS flag from SDL_GetAppState(): Before, it meant "window is main and mouse is inside window (or mode is fullscreen)". Now, it means "window is key and mouse is inside window (or mode is fullscreen)". It makes more sense to me that way. (See http://developer.apple.com/documentation/Cocoa/Conceptual/WinPanel/Concepts/ChangingMainKeyWindow.html for a discussion of what key and main windows are.) The other two flags are unchanged: SDL_APPACTIVE = application is not hidden and window is not minimized, SDL_APPINPUTFOCUS = window is key (or mode is fullscreen). - As a side effect, the reorganization fixes the following two issues (and maybe others) (but they could also be fixed in less invasive ways): * A regression that was introduced in revision 1.42 of SDL_QuartzVideo.m (http://libsdl.org/cgi/cvsweb.cgi/SDL12/src/video/quartz/SDL_QuartzVideo.m.diff?r1=1.41&r2=1.42) (from half-desirable to undesirable behavior): Situation: While in windowed mode, hide the cursor using SDL_ShowCursor(SDL_DISABLE), move the mouse outside of the window so that the cursor becomes visible again, and SDL_SetVideoMode() to a fullscreen mode. What happened before revision 1.42: The cursor is visible, but becomes invisible as soon as the mouse is moved (half-desirable). What happens in revision 1.42 and after (including current CVS): The cursor is visible and stays visible (undesirable). What happens after my patch: The cursor is invisible from the beginning (desirable). * When the cursor is hidden and grabbed, switch away from the application using cmd-tab (which ungrabs and makes the cursor visible), move the cursor outside of the SDL window, then cmd-tab back to the application. In 1.2.8 and in the current CVS, the cursor is re-grabbed, but it stays visible (immovable in the middle of the window). With my patch, the cursor is correctly re-grabbed and hidden. (For some reason, it still doesn't work correctly if you switch back to the application using the dock instead of cmd-tab. I haven't been able to figure out why. I can step over [NSCursor hide] being called in the debugger, but it seems to have no effect.) - The patch includes my patch for #12 (it was easier to obtain using cvs diff that way). If you apply both of them, you will end up with 6 duplicate lines in SDL_QuartzEvents.m.
author Sam Lantinga <slouken@libsdl.org>
date Thu, 13 Apr 2006 14:17:48 +0000
parents 31c2b8e4885e
children 0a53c90a37f9 a7cda692b681
rev   line source
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1 dnl Process this file with autoconf to produce a configure script.
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
2 AC_INIT(README)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
3
1550
31c2b8e4885e Fixed bug #166
Sam Lantinga <slouken@libsdl.org>
parents: 1387
diff changeset
4 dnl Detect the canonical build and host environments
1380
d94b080ff6ce Completely removed dependency on automake
Sam Lantinga <slouken@libsdl.org>
parents: 1367
diff changeset
5 AC_CONFIG_AUX_DIRS($srcdir/../build-scripts)
1550
31c2b8e4885e Fixed bug #166
Sam Lantinga <slouken@libsdl.org>
parents: 1387
diff changeset
6 AC_CANONICAL_HOST
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
7
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
8 dnl Check for tools
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
9
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
10 AC_PROG_CC
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
11
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
12 dnl Check for compiler environment
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
13
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
14 AC_C_CONST
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
15
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
16 dnl Figure out which math library to use
1550
31c2b8e4885e Fixed bug #166
Sam Lantinga <slouken@libsdl.org>
parents: 1387
diff changeset
17 case "$host" in
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
18 *-*-cygwin* | *-*-mingw32*)
1380
d94b080ff6ce Completely removed dependency on automake
Sam Lantinga <slouken@libsdl.org>
parents: 1367
diff changeset
19 EXE=".exe"
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
20 MATHLIB=""
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
21 SYS_GL_LIBS="-lopengl32"
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
22 ;;
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
23 *-*-beos*)
1380
d94b080ff6ce Completely removed dependency on automake
Sam Lantinga <slouken@libsdl.org>
parents: 1367
diff changeset
24 EXE=""
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
25 MATHLIB=""
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
26 SYS_GL_LIBS="-lGL"
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
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
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
30 MATHLIB=""
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
31 SYS_GL_LIBS=""
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
32 ;;
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
33 *-*-aix*)
1380
d94b080ff6ce Completely removed dependency on automake
Sam Lantinga <slouken@libsdl.org>
parents: 1367
diff changeset
34 EXE=""
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
35 if test x$ac_cv_prog_gcc = xyes; then
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
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
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
38 SYS_GL_LIBS=""
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
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
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
53 *)
1380
d94b080ff6ce Completely removed dependency on automake
Sam Lantinga <slouken@libsdl.org>
parents: 1367
diff changeset
54 EXE=""
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
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
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
57 ;;
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
58 esac
1380
d94b080ff6ce Completely removed dependency on automake
Sam Lantinga <slouken@libsdl.org>
parents: 1367
diff changeset
59 AC_SUBST(EXE)
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
60 AC_SUBST(MATHLIB)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
61
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
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
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
64 AM_PATH_SDL($SDL_VERSION,
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
65 :,
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
66 AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
67 )
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
68 CFLAGS="$CFLAGS $SDL_CFLAGS"
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
69 LIBS="$LIBS $SDL_LIBS"
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
70
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
71 dnl Check for OpenGL
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
72 AC_MSG_CHECKING(for OpenGL support)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
73 have_opengl=no
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
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
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
76 ],[
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
77 ],[
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
78 have_opengl=yes
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
79 ])
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
80 AC_MSG_RESULT($have_opengl)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
81 if test x$have_opengl = xyes; then
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
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
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
84 else
1380
d94b080ff6ce Completely removed dependency on automake
Sam Lantinga <slouken@libsdl.org>
parents: 1367
diff changeset
85 GLLIB=""
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
86 fi
1380
d94b080ff6ce Completely removed dependency on automake
Sam Lantinga <slouken@libsdl.org>
parents: 1367
diff changeset
87 AC_SUBST(GLLIB)
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
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
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
90 AC_OUTPUT([Makefile])