Changed launcher to not have S3D_SERVER #defined to allow visible dialog messages
[scorched3d.git] / configure-sdl.m4
blob4495d5d957b9d10e53ccaafe95be32779e1361ed
1 dnl Checking for SDL
2 AC_MSG_CHECKING(for SDL)
3 SDL_VERSION=1.2.5
4 AM_PATH_SDL($SDL_VERSION,
5             :,
6             AC_MSG_ERROR([*** SDL version $SDL_VERSION not found. Try http://www.libsdl.org/])
9 dnl checking for SDL_net
10 AC_MSG_CHECKING(for SDL_net lib)
11 have_SDLnet=yes
12 if test "x$enable_sdltest" = "xyes" ; then
14         ac_save_CFLAGS="$CFLAGS"
15         ac_save_LIBS="$LIBS"
16         CFLAGS="$CFLAGS $SDL_CFLAGS"
17         LIBS="$SDL_LIBS $LIBS"
19         AC_TRY_COMPILE([
20                 #include <SDL/SDL.h>
21 #ifdef __DARWIN__
22                 #include <SDL_net/SDL_net.h>
23 #else
24                 #include <SDL/SDL_net.h>
25 #endif
27                 int main(int argc, char *argv[])
28                 { return 0; }
29 #undef  main
30 #define main K_and_R_C_main
31                 ],[
32                 ],[
33                 have_SDLnet=yes
34                 ],[
35                 have_SDLnet=no
36                 ])
38         CFLAGS="$ac_save_CFLAGS"
39         LIBS="$ac_save_LIBS"
42 AC_MSG_RESULT($have_SDLnet)
43 if test x$have_SDLnet != xyes; then
44     AC_MSG_ERROR([*** Can't find the SDL_net library Try: http://www.libsdl.org/projects/SDL_net])
47 if test `uname` == Darwin; then
48 SDL_LIBS="$SDL_LIBS -framework SDL_net"
49 else
50 SDL_LIBS="$SDL_LIBS -lSDL_net"