*** empty log message ***
authorSam Lantinga <slouken@libsdl.org>
Fri, 02 Nov 2001 18:12:52 +0000
changeset 22150620ec9c86a
parent 220 7861d904fb77
child 222 0a98dba2c700
*** empty log message ***
README.MacOSX
sdl-config.in
sdl.m4
src/joystick/linux/SDL_sysjoystick.c
src/main/Makefile.am
src/main/macosx/SDLMain.h
src/main/macosx/SDLMain.m
test/acinclude.m4
test/testgl.c
     1.1 --- a/README.MacOSX	Thu Nov 01 16:45:40 2001 +0000
     1.2 +++ b/README.MacOSX	Fri Nov 02 18:12:52 2001 +0000
     1.3 @@ -25,79 +25,52 @@
     1.4  Using the Simple DirectMedia Layer with a traditional Makefile
     1.5  ==============================================================================
     1.6  
     1.7 -In the following, it will be mostly assumed that you are using autoconf and
     1.8 -automake to setup your SDL project, and furthermore that you use the AM_PATH_SDL
     1.9 -macro provided by SDL in sdl.m4. If you are not using these tools, you can
    1.10 -still use SDL but it will be somewhat hard to get running.
    1.11 +An existing autoconf/automake build system for your SDL app has good chances
    1.12 +to work almost unchanged on OS X. However, to produce a "real" MacOS X binary
    1.13 +that you can distribute to users, you need to put the generated binary into a
    1.14 +so called "bundle", which basically is a fancy folder with a name like
    1.15 +"MyCoolGame.app".
    1.16  
    1.17 -Only step 1) is really required to get started, but for full OS X support you
    1.18 -will want to do the other steps, too.
    1.19 -
    1.20 -1) Update your acinclude.m4 file in case you have copied an older version of
    1.21 -   sdl.m4 into it. This is essential as AM_PATH_SDL now performs some additional
    1.22 -   tasks when used on MacOS X
    1.23 -
    1.24 -   Rationale: AM_PATH_SDL copies /usr/local/share/sdl/Info.plist and the folder
    1.25 -   /usr/local/share/sdl/SDL_main.nib/ into the directory where configure is invoked.
    1.26 -   This is essential for the configure script to be able to run the test code
    1.27 -   that detects SDL.
    1.28 -
    1.29 -2) Copy SDL's Info.plist.in file (from src/main/macosx) into your project's main
    1.30 -   folder (the same spot that your configure.in sits), and edit it to suite your
    1.31 -   needs. Then add it to your AC_OUTPUT list in configure.in
    1.32 -
    1.33 -   Rationale: The Info.plist file can be used to specify an icon file for
    1.34 -   your app, and also to provide a human readable version/copyright string
    1.35 -   and other meta-information to the user via the Finder's Get Info dialog.
    1.36 -
    1.37 -3) Add something like the following rule to your Makefile.am:
    1.38 +To get this build automatically, add something like the following rule to
    1.39 +your Makefile.am:
    1.40  
    1.41  bundle_contents = APP_NAME.app/Contents
    1.42  APP_NAME_bundle: EXE_NAME
    1.43  	mkdir -p $(bundle_contents)/MacOS
    1.44  	mkdir -p $(bundle_contents)/Resources
    1.45 -	mkdir -p $(bundle_contents)/Resources/SDL_main.nib
    1.46  	echo "APPL????" > $(bundle_contents)/PkgInfo
    1.47 -	$(INSTALL_DATA) Info.plist $(bundle_contents)/
    1.48 -	$(INSTALL_DATA) SDL_main.nib/*.nib $(bundle_contents)/Resources/SDLMain.nib
    1.49  	$(INSTALL_PROGRAM) $< $(bundle_contents)/MacOS/
    1.50  
    1.51 -   You should replace EXE_NAME with the name of the executable. APP_NAME is what
    1.52 -   will be visible to the user in the Finder. Usually it will be the same
    1.53 -   as EXE_NAME but capitalized. E.g. if EXE_NAME is "testgame" then APP_NAME 
    1.54 -   usually is "TestGame". You might also want to use @PACKAGE@ to use the package
    1.55 -   name as specified in your configure.in file.
    1.56 +You should replace EXE_NAME with the name of the executable. APP_NAME is what
    1.57 +will be visible to the user in the Finder. Usually it will be the same
    1.58 +as EXE_NAME but capitalized. E.g. if EXE_NAME is "testgame" then APP_NAME 
    1.59 +usually is "TestGame". You might also want to use @PACKAGE@ to use the package
    1.60 +name as specified in your configure.in file.
    1.61  
    1.62 -   If your project builds more than one application, you will have to do a bit more.
    1.63 -   For each of your target applications, you need a seperate rule. Furthermore, each
    1.64 -   needs its own Info.plist file, since that has to contain the exact name of the 
    1.65 -   executable (i.e. EXE_NAME above). One way to do that is to use sed in your make rules
    1.66 -   and modify a single master Info.plist.
    1.67 +If your project builds more than one application, you will have to do a bit
    1.68 +more.  For each of your target applications, you need a seperate rule.
    1.69  
    1.70 -   Rationale: on Mac OS X, executables have to be put into so-called "bundles".
    1.71 -   The make rule given above will construct such a bundle around the executable
    1.72 -   for you. You need to make a copy of it for each target application.
    1.73 -
    1.74 -4) If you want the create bundles to be installed, you may want to add this
    1.75 -   rule to your Makefile.am:
    1.76 +If you want the created bundles to be installed, you may want to add this
    1.77 +rule to your Makefile.am:
    1.78  
    1.79  install-exec-hook: APP_NAME_bundle
    1.80  	rm -rf $(DESTDIR)$(prefix)/Applications/APP_NAME.app
    1.81  	mkdir -p $(DESTDIR)$(prefix)/Applications/
    1.82  	cp -r $< /$(DESTDIR)$(prefix)Applications/
    1.83  
    1.84 -   This rule takes the Bundle created by the rule from step 3 and installs them
    1.85 -   into $(DESTDIR)$(prefix)/Applications/.
    1.86 +This rule takes the Bundle created by the rule from step 3 and installs them
    1.87 +into $(DESTDIR)$(prefix)/Applications/.
    1.88  
    1.89 -   Again, if you want to install multiple applications, you will have to augment
    1.90 -   the make rule accordingly.
    1.91 +Again, if you want to install multiple applications, you will have to augment
    1.92 +the make rule accordingly.
    1.93  
    1.94  
    1.95  ==============================================================================
    1.96  Using the Simple DirectMedia Layer with Project Builder
    1.97  ==============================================================================
    1.98  
    1.99 -These instructions are for using Apple's Project Builder IDE to build SDL applications.
   1.100 +These instructions are for using Apple's Project Builder IDE to build SDL
   1.101 +applications.
   1.102  
   1.103  - First steps
   1.104  
     2.1 --- a/sdl-config.in	Thu Nov 01 16:45:40 2001 +0000
     2.2 +++ b/sdl-config.in	Fri Nov 02 18:12:52 2001 +0000
     2.3 @@ -56,12 +56,6 @@
     2.4  @ENABLE_STATIC_TRUE@      libdirs="-L@libdir@ @SDL_RLD_FLAGS@"
     2.5  @ENABLE_STATIC_TRUE@      echo $libdirs @SDL_LIBS@ @SYSTEM_LIBS@
     2.6  @ENABLE_STATIC_TRUE@      ;;
     2.7 -@TARGET_MACOSX_TRUE@    --nib)
     2.8 -@TARGET_MACOSX_TRUE@      echo @datadir@/sdl/SDLMain.nib
     2.9 -@TARGET_MACOSX_TRUE@      ;;
    2.10 -@TARGET_MACOSX_TRUE@    --plist)
    2.11 -@TARGET_MACOSX_TRUE@      echo @datadir@/sdl/Info.plist
    2.12 -@TARGET_MACOSX_TRUE@      ;;
    2.13      *)
    2.14        echo "${usage}" 1>&2
    2.15        exit 1
     3.1 --- a/sdl.m4	Thu Nov 01 16:45:40 2001 +0000
     3.2 +++ b/sdl.m4	Fri Nov 02 18:12:52 2001 +0000
     3.3 @@ -59,17 +59,6 @@
     3.4  dnl checks the results of sdl-config to some extent
     3.5  dnl
     3.6        rm -f conf.sdltest
     3.7 -      case "$target" in
     3.8 -          *-*-darwin*)
     3.9 -            cp -r `$SDL_CONFIG --nib` .
    3.10 -            dnl create an Info.plist file, unless one exists
    3.11 -            if test -f Info.plist ; then
    3.12 -             :
    3.13 -            else
    3.14 -             cp `$SDL_CONFIG --plist` .
    3.15 -            fi
    3.16 -              ;;
    3.17 -      esac
    3.18        AC_TRY_RUN([
    3.19  #include <stdio.h>
    3.20  #include <stdlib.h>
     4.1 --- a/src/joystick/linux/SDL_sysjoystick.c	Thu Nov 01 16:45:40 2001 +0000
     4.2 +++ b/src/joystick/linux/SDL_sysjoystick.c	Fri Nov 02 18:12:52 2001 +0000
     4.3 @@ -61,9 +61,10 @@
     4.4  	"'Microsoft SideWinder Dual Strike USB version 1.0' 2 1 0",
     4.5  	"'WingMan Interceptor' 3 3 0",
     4.6  	/* WingMan Extreme Analog - not recognized by default
     4.7 -	"'Analog 3-axis 4-button joystick' 2 1",
     4.8 +	"'Analog 3-axis 4-button joystick' 2 1 0",
     4.9  	*/
    4.10  	"'WingMan Extreme Digital 3D' 4 1 0",
    4.11 +	"'Analog 2-axis 4-button 1-hat FCS joystick' 2 1 0",
    4.12  	NULL
    4.13  };
    4.14  #else
     5.1 --- a/src/main/Makefile.am	Thu Nov 01 16:45:40 2001 +0000
     5.2 +++ b/src/main/Makefile.am	Fri Nov 02 18:12:52 2001 +0000
     5.3 @@ -4,12 +4,11 @@
     5.4  # This is necessary because some platforms have special program
     5.5  # entry points, which require special application initialization.
     5.6  
     5.7 -SUBDIRS = macosx
     5.8 -
     5.9  ARCH_SUBDIRS = $(srcdir)/beos \
    5.10                 $(srcdir)/epoc \
    5.11                 $(srcdir)/linux \
    5.12                 $(srcdir)/macos \
    5.13 +               $(srcdir)/macosx \
    5.14                 $(srcdir)/win32
    5.15  
    5.16  # Build a separate library containing the main() entry point.
     6.1 --- a/src/main/macosx/SDLMain.h	Thu Nov 01 16:45:40 2001 +0000
     6.2 +++ b/src/main/macosx/SDLMain.h	Fri Nov 02 18:12:52 2001 +0000
     6.3 @@ -1,5 +1,6 @@
     6.4 -/*   SDLMain.h - main entry point for our Cocoa-ized SDL app
     6.5 -       Darrell Walisser - dwaliss1@purdue.edu
     6.6 +/*   SDLMain.m - main entry point for our Cocoa-ized SDL app
     6.7 +       Initial Version: Darrell Walisser <dwaliss1@purdue.edu>
     6.8 +       Non-NIB-Code & other changes: Max Horn <max@quendi.de>
     6.9  
    6.10      Feel free to customize this file to suit your needs
    6.11  */
    6.12 @@ -7,9 +8,4 @@
    6.13  #import <Cocoa/Cocoa.h>
    6.14  
    6.15  @interface SDLMain : NSObject
    6.16 -{
    6.17 -}
    6.18 -- (IBAction)quit:(id)sender;
    6.19 -- (IBAction)makeFullscreen:(id)sender;
    6.20 -- (void)applicationDidFinishLaunching:(NSNotification *)aNotification;
    6.21  @end
     7.1 --- a/src/main/macosx/SDLMain.m	Thu Nov 01 16:45:40 2001 +0000
     7.2 +++ b/src/main/macosx/SDLMain.m	Fri Nov 02 18:12:52 2001 +0000
     7.3 @@ -1,5 +1,6 @@
     7.4  /*   SDLMain.m - main entry point for our Cocoa-ized SDL app
     7.5 -       Darrell Walisser - dwaliss1@purdue.edu
     7.6 +       Initial Version: Darrell Walisser <dwaliss1@purdue.edu>
     7.7 +       Non-NIB-Code & other changes: Max Horn <max@quendi.de>
     7.8  
     7.9      Feel free to customize this file to suit your needs
    7.10  */
    7.11 @@ -9,32 +10,43 @@
    7.12  #import <sys/param.h> /* for MAXPATHLEN */
    7.13  #import <unistd.h>
    7.14  
    7.15 +/* Use this flag to determine whether we use SDLMain.nib or not */
    7.16 +#define		SDL_USE_NIB_FILE	0
    7.17 +
    7.18 +
    7.19  static int    gArgc;
    7.20  static char  **gArgv;
    7.21 -static NSString *gAppName = 0;
    7.22  static BOOL   gFinderLaunch;
    7.23  
    7.24 +#if SDL_USE_NIB_FILE
    7.25 +/* A helper category for NSString */
    7.26  @interface NSString (ReplaceSubString)
    7.27  - (NSString *)stringByReplacingRange:(NSRange)aRange with:(NSString *)aString;
    7.28  @end
    7.29 +#else
    7.30 +/* An internal Apple class used to setup Apple menus */
    7.31 +@interface NSAppleMenuController:NSObject {}
    7.32 +- (void)controlMenu:(NSMenu *)aMenu;
    7.33 +@end
    7.34 +#endif
    7.35  
    7.36 +@interface SDLApplication : NSApplication
    7.37 +@end
    7.38  
    7.39 -/* The main class of the application, the application's delegate */
    7.40 -@implementation SDLMain
    7.41 -
    7.42 +@implementation SDLApplication
    7.43  /* Invoked from the Quit menu item */
    7.44 -- (void) quit:(id)sender
    7.45 +- (void)terminate:(id)sender
    7.46  {
    7.47 +    /* Post a SDL_QUIT event */
    7.48      SDL_Event event;
    7.49      event.type = SDL_QUIT;
    7.50      SDL_PushEvent(&event);
    7.51  }
    7.52 +@end
    7.53  
    7.54 -/* Invoked from the Make Full-Screen menu item */
    7.55 -- (void) makeFullscreen:(id)sender
    7.56 -{
    7.57 -    /* TODO */
    7.58 -}
    7.59 +
    7.60 +/* The main class of the application, the application's delegate */
    7.61 +@implementation SDLMain
    7.62  
    7.63  /* Set the working directory to the .app's parent directory */
    7.64  - (void) setupWorkingDirectory:(BOOL)shouldChdir
    7.65 @@ -58,11 +70,12 @@
    7.66        assert ( chdir (parentdir) == 0 );   /* chdir to the binary app's parent */
    7.67        assert ( chdir ("../../../") == 0 ); /* chdir to the .app's parent */
    7.68      }
    7.69 -    /* gAppName = [ NSString stringWithCString: c ]; */
    7.70  }
    7.71  
    7.72 +#if SDL_USE_NIB_FILE
    7.73 +
    7.74  /* Fix menu to contain the real app name instead of "SDL App" */
    7.75 -- (void) fixMenu:(NSMenu *)aMenu
    7.76 +- (void)fixMenu:(NSMenu *)aMenu withAppName:(NSString *)appName
    7.77  {
    7.78      NSRange aRange;
    7.79      NSEnumerator *enumerator;
    7.80 @@ -70,31 +83,114 @@
    7.81  
    7.82      aRange = [[aMenu title] rangeOfString:@"SDL App"];
    7.83      if (aRange.length != 0)
    7.84 -        [aMenu setTitle: [[aMenu title] stringByReplacingRange:aRange with:gAppName]];
    7.85 +        [aMenu setTitle: [[aMenu title] stringByReplacingRange:aRange with:appName]];
    7.86  
    7.87      enumerator = [[aMenu itemArray] objectEnumerator];
    7.88      while ((menuItem = [enumerator nextObject]))
    7.89      {
    7.90          aRange = [[menuItem title] rangeOfString:@"SDL App"];
    7.91          if (aRange.length != 0)
    7.92 -            [menuItem setTitle: [[menuItem title] stringByReplacingRange:aRange with:gAppName]];
    7.93 +            [menuItem setTitle: [[menuItem title] stringByReplacingRange:aRange with:appName]];
    7.94          if ([menuItem hasSubmenu])
    7.95 -            [self fixMenu: [menuItem submenu]];
    7.96 +            [self fixMenu:[menuItem submenu] withAppName:appName];
    7.97      }
    7.98      [ aMenu sizeToFit ];
    7.99  }
   7.100  
   7.101 +#else
   7.102 +
   7.103 +void setupAppleMenu(void)
   7.104 +{
   7.105 +    /* warning: this code is very odd */
   7.106 +    NSAppleMenuController *appleMenuController;
   7.107 +    NSMenu *appleMenu;
   7.108 +    NSMenuItem *appleMenuItem;
   7.109 +
   7.110 +    appleMenuController = [[NSAppleMenuController alloc] init];
   7.111 +    appleMenu = [[NSMenu alloc] initWithTitle:@""];
   7.112 +    appleMenuItem = [[NSMenuItem alloc] initWithTitle:@"" action:nil keyEquivalent:@""];
   7.113 +    
   7.114 +    [appleMenuItem setSubmenu:appleMenu];
   7.115 +
   7.116 +    /* yes, we do need to add it and then remove it --
   7.117 +       if you don't add it, it doesn't get displayed
   7.118 +       if you don't remove it, you have an extra, titleless item in the menubar
   7.119 +       when you remove it, it appears to stick around
   7.120 +       very, very odd */
   7.121 +    [[NSApp mainMenu] addItem:appleMenuItem];
   7.122 +    [appleMenuController controlMenu:appleMenu];
   7.123 +    [[NSApp mainMenu] removeItem:appleMenuItem];
   7.124 +    [appleMenu release];
   7.125 +    [appleMenuItem release];
   7.126 +}
   7.127 +
   7.128 +/* Create a window menu */
   7.129 +void setupWindowMenu(void)
   7.130 +{
   7.131 +    NSMenu		*windowMenu;
   7.132 +    NSMenuItem	*windowMenuItem;
   7.133 +    NSMenuItem	*menuItem;
   7.134 +
   7.135 +
   7.136 +    windowMenu = [[NSMenu alloc] initWithTitle:@"Window"];
   7.137 +    
   7.138 +    /* "Minimize" item */
   7.139 +    menuItem = [[NSMenuItem alloc] initWithTitle:@"Minimize" action:@selector(performMiniaturize:) keyEquivalent:@"m"];
   7.140 +    [windowMenu addItem:menuItem];
   7.141 +    [menuItem release];
   7.142 +    
   7.143 +    /* Put menu into the menubar */
   7.144 +    windowMenuItem = [[NSMenuItem alloc] initWithTitle:@"Window" action:nil keyEquivalent:@""];
   7.145 +    [windowMenuItem setSubmenu:windowMenu];
   7.146 +    [[NSApp mainMenu] addItem:windowMenuItem];
   7.147 +    
   7.148 +    /* Tell the application object that this is now the window menu */
   7.149 +    [NSApp setWindowsMenu:windowMenu];
   7.150 +
   7.151 +    /* Finally give up our references to the objects */
   7.152 +    [windowMenu release];
   7.153 +    [windowMenuItem release];
   7.154 +}
   7.155 +
   7.156 +/* Replacement for NSApplicationMain */
   7.157 +void CustomApplicationMain (argc, argv)
   7.158 +{
   7.159 +    NSAutoreleasePool	*pool = [[NSAutoreleasePool alloc] init];
   7.160 +    SDLMain				*sdlMain;
   7.161 +
   7.162 +    /* Ensure the application object is initialised */
   7.163 +    [SDLApplication sharedApplication];
   7.164 +    
   7.165 +    /* Set up the menubar */
   7.166 +    [NSApp setMainMenu:[[NSMenu alloc] init]];
   7.167 +    setupAppleMenu();
   7.168 +    setupWindowMenu();
   7.169 +    
   7.170 +    /* Create SDLMain and make it the app delegate */
   7.171 +    sdlMain = [[SDLMain alloc] init];
   7.172 +    [NSApp setDelegate:sdlMain];
   7.173 +    
   7.174 +    /* Start the main event loop */
   7.175 +    [NSApp run];
   7.176 +    
   7.177 +    [sdlMain release];
   7.178 +    [pool release];
   7.179 +}
   7.180 +
   7.181 +#endif
   7.182 +
   7.183  /* Called when the internal event loop has just started running */
   7.184  - (void) applicationDidFinishLaunching: (NSNotification *) note
   7.185  {
   7.186      int status;
   7.187  
   7.188      /* Set the working directory to the .app's parent directory */
   7.189 -    [ self setupWorkingDirectory: gFinderLaunch ];
   7.190 +    [self setupWorkingDirectory:gFinderLaunch];
   7.191  
   7.192 +#if SDL_USE_NIB_FILE
   7.193      /* Set the main menu to contain the real app name instead of "SDL App" */
   7.194 -    gAppName = [ [ NSBundle mainBundle ] bundleIdentifier ];
   7.195 -    [ self fixMenu: [ NSApp mainMenu ] ];
   7.196 +    [self fixMenu:[NSApp mainMenu] withAppName:[[NSProcessInfo processInfo] processName]];
   7.197 +#endif
   7.198  
   7.199      /* Hand off to main application code */
   7.200      status = SDL_main (gArgc, gArgv);
   7.201 @@ -119,22 +215,22 @@
   7.202      bufferSize = selfLen + aStringLen - aRange.length;
   7.203      buffer = NSAllocateMemoryPages(bufferSize*sizeof(unichar));
   7.204      
   7.205 -    // Get first part into buffer
   7.206 +    /* Get first part into buffer */
   7.207      localRange.location = 0;
   7.208      localRange.length = aRange.location;
   7.209      [self getCharacters:buffer range:localRange];
   7.210      
   7.211 -    // Get middle part into buffer
   7.212 +    /* Get middle part into buffer */
   7.213      localRange.location = 0;
   7.214      localRange.length = aStringLen;
   7.215      [aString getCharacters:(buffer+aRange.location) range:localRange];
   7.216       
   7.217 -    // Get last part into buffer
   7.218 +    /* Get last part into buffer */
   7.219      localRange.location = aRange.location + aRange.length;
   7.220      localRange.length = selfLen - localRange.location;
   7.221      [self getCharacters:(buffer+aRange.location+aStringLen) range:localRange];
   7.222      
   7.223 -    // Build output string
   7.224 +    /* Build output string */
   7.225      result = [NSString stringWithCharacters:buffer length:bufferSize];
   7.226      
   7.227      NSDeallocateMemoryPages(buffer, bufferSize);
   7.228 @@ -145,12 +241,15 @@
   7.229  @end
   7.230  
   7.231  
   7.232 +
   7.233  #ifdef main
   7.234  #  undef main
   7.235  #endif
   7.236  
   7.237 -/* Main entry point to executible - should *not* be SDL_main! */
   7.238 -int main (int argc, char **argv) {
   7.239 +
   7.240 +/* Main entry point to executable - should *not* be SDL_main! */
   7.241 +int main (int argc, char **argv)
   7.242 +{
   7.243  
   7.244      /* Copy the arguments into a global variable */
   7.245      int i;
   7.246 @@ -165,11 +264,15 @@
   7.247      }
   7.248      gArgv = (char**) malloc (sizeof(*gArgv) * (gArgc+1));
   7.249      assert (gArgv != NULL);
   7.250 -    for (i = 0; i < gArgc; i++) {
   7.251 +    for (i = 0; i < gArgc; i++)
   7.252          gArgv[i] = argv[i];
   7.253 -    }
   7.254      gArgv[i] = NULL;
   7.255  
   7.256 +#if SDL_USE_NIB_FILE
   7.257 +    [SDLApplication poseAsClass:[NSApplication class]];
   7.258      NSApplicationMain (argc, argv);
   7.259 +#else
   7.260 +    CustomApplicationMain (argc, argv);
   7.261 +#endif
   7.262      return 0;
   7.263  }
     8.1 --- a/test/acinclude.m4	Thu Nov 01 16:45:40 2001 +0000
     8.2 +++ b/test/acinclude.m4	Fri Nov 02 18:12:52 2001 +0000
     8.3 @@ -59,17 +59,6 @@
     8.4  dnl checks the results of sdl-config to some extent
     8.5  dnl
     8.6        rm -f conf.sdltest
     8.7 -      case "$target" in
     8.8 -          *-*-darwin*)
     8.9 -            cp -r `$SDL_CONFIG --nib` .
    8.10 -            dnl create an Info.plist file, unless one exists
    8.11 -            if test -f Info.plist ; then
    8.12 -             :
    8.13 -            else
    8.14 -             cp `$SDL_CONFIG --plist` .
    8.15 -            fi
    8.16 -              ;;
    8.17 -      esac
    8.18        AC_TRY_RUN([
    8.19  #include <stdio.h>
    8.20  #include <stdlib.h>
     9.1 --- a/test/testgl.c	Thu Nov 01 16:45:40 2001 +0000
     9.2 +++ b/test/testgl.c	Fri Nov 02 18:12:52 2001 +0000
     9.3 @@ -7,7 +7,6 @@
     9.4  
     9.5  #ifdef HAVE_OPENGL
     9.6  #include "SDL_opengl.h"
     9.7 -#endif
     9.8  
     9.9  #define SHADED_CUBE
    9.10