Commit 7a9a6f5b authored by Christophe Massiot's avatar Christophe Massiot

Now use sdl-config for SDL.

parent 715fae63
This diff is collapsed.
...@@ -457,26 +457,41 @@ AC_ARG_WITH(ggi, ...@@ -457,26 +457,41 @@ AC_ARG_WITH(ggi,
dnl dnl
dnl SDL module dnl SDL module
dnl dnl
AC_ARG_WITH(sdl, AC_ARG_ENABLE(sdl,
[ --with-sdl[=name] SDL support (default enabled)], [ --disable-sdl SDL support (default enabled)])
[ if test "x$withval" != "xno"; if test "x$withval" != "xno";
then then
PLUGINS="${PLUGINS} sdl"; AC_DEFINE(HAVE_SDL_SDL_H, 0, Define if you have SDL/SDL.h)
if test "x$withval" != "xyes"; AC_DEFINE(HAVE_SDL11_SDL_H, 0, Define if you have SDL/SDL11.h)
then AC_DEFINE(HAVE_SDL12_SDL_H, 0, Define if you have SDL/SDL12.h)
LIB_SDL="${LIB_SDL} -L/usr/X11R6/lib -L"$withval"/lib -lSDL" AC_PATH_PROG(SDL_CONFIG, sdl-config, no)
CFLAGS_SDL="-I"$withval"/include" SDL_HEADER="SDL/SDL.h"
else if test x${SDL_CONFIG} = xno; then
AC_CHECK_HEADERS(SDL/SDL.h, , [echo "Cannot find SDL headers !"; exit]) AC_PATH_PROG(SDL_CONFIG, sdl11-config, no)
LIB_SDL="${LIB_SDL} -L/usr/X11R6/lib -lSDL" SDL_HEADER="SDL11/SDL.h"
fi fi
fi ]) if test x${SDL_CONFIG} = xno; then
if test "x$withval" = "x"; AC_PATH_PROG(SDL_CONFIG, sdl12-config, no)
then SDL_HEADER="SDL12/SDL.h"
AC_CHECK_HEADERS(SDL/SDL.h, fi
[PLUGINS="${PLUGINS} sdl" if test x${SDL_CONFIG} != xno; then
LIB_SDL="${LIB_SDL} -L/usr/X11R6/lib -lSDL"]) AC_CHECK_HEADERS($SDL_HEADER, [],
[ echo "The development package for SDL is not installed. Please install it"
echo "and try again."
exit ])
if expr 1.1.7 \> $($SDL_CONFIG --version); then
echo "You need SDL version 1.1.7 or later."
exit
fi fi
PLUGINS="${PLUGINS} sdl"
CFLAGS_SDL="`${SDL_CONFIG} --cflags`"
LIB_SDL="`${SDL_CONFIG} --libs | sed 's,-rdynamic,,'`"
elif test "x$withval" = "xyes"; then
echo "I couldn't find the SDL package. You can download libSDL from"
echo "http://www.libsdl.org/."
exit
fi
fi
dnl dnl
dnl Windows DirectX module dnl Windows DirectX module
......
...@@ -64,9 +64,6 @@ ...@@ -64,9 +64,6 @@
/* Define if you have the <Ph.h> header file. */ /* Define if you have the <Ph.h> header file. */
#undef HAVE_PH_H #undef HAVE_PH_H
/* Define if you have the <SDL/SDL.h> header file. */
#undef HAVE_SDL_SDL_H
/* Define if you have the <X11/Xlib.h> header file. */ /* Define if you have the <X11/Xlib.h> header file. */
#undef HAVE_X11_XLIB_H #undef HAVE_X11_XLIB_H
...@@ -196,3 +193,12 @@ ...@@ -196,3 +193,12 @@
/* Define if you want DVD CSS decryption. */ /* Define if you want DVD CSS decryption. */
#undef HAVE_CSS #undef HAVE_CSS
/* Define if you have SDL/SDL.h */
#undef HAVE_SDL_SDL_H
/* Define if you have SDL/SDL11.h */
#undef HAVE_SDL11_SDL_H
/* Define if you have SDL/SDL12.h */
#undef HAVE_SDL12_SDL_H
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* aout_sdl.c : audio sdl functions library * aout_sdl.c : audio sdl functions library
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN * Copyright (C) 1999, 2000 VideoLAN
* $Id: aout_sdl.c,v 1.15 2001/07/25 08:41:21 gbazin Exp $ * $Id: aout_sdl.c,v 1.16 2001/07/25 19:14:06 massiot Exp $
* *
* Authors: Michel Kaempf <maxx@via.ecp.fr> * Authors: Michel Kaempf <maxx@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org> * Samuel Hocevar <sam@zoy.org>
...@@ -38,7 +38,15 @@ ...@@ -38,7 +38,15 @@
#include <stdio.h> /* "intf_msg.h" */ #include <stdio.h> /* "intf_msg.h" */
#include <stdlib.h> /* calloc(), malloc(), free() */ #include <stdlib.h> /* calloc(), malloc(), free() */
#include <SDL/SDL.h> /* SDL base include */ #ifdef HAVE_SDL_SDL_H
# include <SDL/SDL.h>
#elif defined(HAVE_SDL11_SDL_H)
# include <SDL11/SDL.h>
#elif defined(HAVE_SDL12_SDL_H)
# include <SDL12/SDL.h>
#else
# error
#endif
#include "config.h" #include "config.h"
#include "common.h" /* boolean_t, byte_t */ #include "common.h" /* boolean_t, byte_t */
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* vout_sdl.c: SDL video output display method * vout_sdl.c: SDL video output display method
***************************************************************************** *****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN * Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: vout_sdl.c,v 1.58 2001/07/16 14:33:40 massiot Exp $ * $Id: vout_sdl.c,v 1.59 2001/07/25 19:14:06 massiot Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* Pierre Baillet <oct@zoy.org> * Pierre Baillet <oct@zoy.org>
...@@ -40,7 +40,15 @@ ...@@ -40,7 +40,15 @@
# include <netinet/in.h> /* BSD: struct in_addr */ # include <netinet/in.h> /* BSD: struct in_addr */
#endif #endif
#include <SDL/SDL.h> #ifdef HAVE_SDL_SDL_H
# include <SDL/SDL.h>
#elif defined(HAVE_SDL11_SDL_H)
# include <SDL11/SDL.h>
#elif defined(HAVE_SDL12_SDL_H)
# include <SDL12/SDL.h>
#else
# error
#endif
#include "config.h" #include "config.h"
#include "common.h" #include "common.h"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment