summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in22
1 files changed, 17 insertions, 5 deletions
diff --git a/configure.in b/configure.in
index bf2a2c75..43e3438f 100644
--- a/configure.in
+++ b/configure.in
@@ -7,7 +7,6 @@ orig_CFLAGS="$CFLAGS"
AC_PROG_CC
AC_PROG_RANLIB
AC_CHECK_PROG(HAVE_PYTHON, python, true, false)
-AC_CHECK_FUNCS(mmap)
OPT_LEVEL=2
@@ -25,24 +24,37 @@ then
CFLAGS="-O$OPT_LEVEL -g -Wall $orig_CFLAGS"
fi
-AC_CHECK_HEADERS([linux/kd.h dev/isa/spkrio.h dev/speaker/speaker.h])
+dnl Search for SDL ...
AM_PATH_SDL(1.1.3)
+# Add the SDL compiler flags to the default compiler flag variables.
+# It is important to do this now, before checking for headers and
+# library functions. The reason being that on Windows, sdl-config
+# sets the -mno-cygwin compiler option in order to generate MinGW
+# executables. If we don't do this now, we might end up discovering
+# header files that are not actually available to us when we come
+# to compile.
+
+CFLAGS="$CFLAGS $SDL_CFLAGS"
+LDFLAGS="$LDFLAGS $SDL_LIBS"
+
AC_CHECK_LIB(SDL_mixer,Mix_LoadMUS,[
-dnl AC_DEFINE(HAVE_LIBSDL_MIXER)
SDLMIXER_LIBS="$SDLMIXER_LIBS -lSDL_mixer"
],[
echo "*** Could not find SDL_mixer. Please install it."
exit -1
-],$SDL_LIBS $SDLMIXER_LIBS)
+])
AC_CHECK_LIB(SDL_net,SDLNet_UDP_Send,[
SDLNET_LIBS="$SDLNET_LIBS -lSDL_net"
],[
echo "*** Could not find SDL_net. Please install it."
exit -1
-] ,$SDL_LIBS $SDLNET_LIBS)
+])
+
+AC_CHECK_HEADERS([linux/kd.h dev/isa/spkrio.h dev/speaker/speaker.h])
+AC_CHECK_FUNCS(mmap)
# DWF 2008-02-10: FIXME
AC_CHECK_LIB(samplerate, src_new)