Skip to content

Commit

Permalink
Date: Wed, 17 Aug 2005 11:23:40 -0400
Browse files Browse the repository at this point in the history
From: Matt L <prometheus.uw@gmail.com>
To: "Ryan C. Gordon" <icculus@clutteredmind.org>
Subject: SDL Patch

Hio,

I saw your last call on the mailing list. Here's a patch which I
submitted about two weeks ago which hasn't made it in.

In the current sdl.m4, there's a bug where if your configure.ac, you
have AC_LANG(C++) specified, it won't properly compile and link the SDL
test program when you run the configure script. This is because only the
default CFLAGS is overriden in sdl.m4, and in the patch below, I've
fixed it so it overrides CXXFLAGS as well, allowing it to work with g++.
  • Loading branch information
icculus committed Aug 18, 2005
1 parent b05dabd commit 2809f4c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions sdl.m4
Expand Up @@ -52,8 +52,10 @@ AC_ARG_ENABLE(sdltest, [ --disable-sdltest Do not try to compile and run
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
if test "x$enable_sdltest" = "xyes" ; then
ac_save_CFLAGS="$CFLAGS"
ac_save_CXXFLAGS="$CXXFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $SDL_CFLAGS"
CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
LIBS="$LIBS $SDL_LIBS"
dnl
dnl Now check if the installed SDL is sufficiently new. (Also sanity
Expand Down Expand Up @@ -138,6 +140,7 @@ int main (int argc, char *argv[])
else
echo "*** Could not run SDL test program, checking why..."
CFLAGS="$CFLAGS $SDL_CFLAGS"
CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
LIBS="$LIBS $SDL_LIBS"
AC_TRY_LINK([
#include <stdio.h>
Expand All @@ -162,10 +165,12 @@ int main(int argc, char *argv[])
echo "*** or that you have moved SDL since it was installed. In the latter case, you"
echo "*** may want to edit the sdl-config script: $SDL_CONFIG" ])
CFLAGS="$ac_save_CFLAGS"
CXXFLAGS="$ac_save_CXXFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
SDL_CFLAGS=""
SDL_CXXFLAGS=""
SDL_LIBS=""
ifelse([$3], , :, [$3])
fi
Expand Down

0 comments on commit 2809f4c

Please sign in to comment.