Commit Graph

5 Commits (fe2fe29049f2b2bc508edde9e98a254f721fa878)

Author SHA1 Message Date
Ozkan Sezer 86191351c0 acinclude & sdl2.m4 updates:
- acinclude/alsa.m4, esd.m4: Ran through autoupdate to replace several
  AC_TRY_[COMPILE|LINK|RUN] with corresponding AC_???_IFELSE , so that
  autoconf-2.70 doesn't warn.
- sdl2.m4: Ditto.
- test/acinclude.m4 (sdl2): Ditto.
2020-12-22 17:00:28 +03:00
Ozkan Sezer f117db5186 sdl2.m4 updates:
- remove HP/UX 9 (%@#!) support
- change fopen() mode from "a" to "w" in test code.
- bump its serial num to 2.
- test/acinclude.m4: same sdl2.m4 updates.
2020-12-22 17:00:11 +03:00
Sam Lantinga 55f18d3625 Fixed bug 4544 - SDL2.m4 SDL2.framework patch made it impossible to fail detection
Stian Skjelstad

check if $sdl_framework is set, before checking if directory exists

Patch that was merged here https://hg.libsdl.org/SDL/rev/ad4968de54ec made it impossible for the SDL2 detection to fail, since one of the if statements fails to check if a variable is set or not.

if test -d $sdl_framework; then

can evaluate to true in some shells. I guess it falls into undefined behaviour when looking at the POSIX standard.
2019-03-16 18:45:10 -07:00
Sam Lantinga 5f2e83a955 Fixed bug 3429 - Update AM_PATH_SDL2() to also check for SDL2.framework
neoaggelos

It is common for Mac OS X to use the SDL2.framework instead of the classic UNIX dynamic lib.

Therefore, it makes sense for AM_PATH_SDL2() to be able to locate it. Attached is a patched sdl2.m4 (updated for that purpose).

Changes:
* look for SDL2.framework ONLY if pkg-config and sdl2-config tests failed (this is to ensure compatibility with the old behaviour)

* adds option ('--disable-sdlframework') to retreat to the old behaviour

* adds variable 'SDL2_FRAMEWORK' for the user to specify the exact path to SDL2.framework (e.g. if it is installed in a non-standard location)

Open to suggestions for further improvements
2016-09-29 16:37:08 -07:00
Philipp Wiesemann 0e45984fa0 Fixed crash if initialization of EGL failed but was tried again later.
The internal function SDL_EGL_LoadLibrary() did not delete and remove a mostly
uninitialized data structure if loading the library first failed. A later try to
use EGL then skipped initialization and assumed it was previously successful
because the data structure now already existed. This led to at least one crash
in the internal function SDL_EGL_ChooseConfig() because a NULL pointer was
dereferenced to make a call to eglBindAPI().
2015-06-21 17:33:46 +02:00