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,
dnl
dnl SDL module
dnl
AC_ARG_WITH(sdl,
[ --with-sdl[=name] SDL support (default enabled)],
[ if test "x$withval" != "xno";
then
PLUGINS="${PLUGINS} sdl";
if test "x$withval" != "xyes";
then
LIB_SDL="${LIB_SDL} -L/usr/X11R6/lib -L"$withval"/lib -lSDL"
CFLAGS_SDL="-I"$withval"/include"
else
AC_CHECK_HEADERS(SDL/SDL.h, , [echo "Cannot find SDL headers !"; exit])
LIB_SDL="${LIB_SDL} -L/usr/X11R6/lib -lSDL"
AC_ARG_ENABLE(sdl,
[ --disable-sdl SDL support (default enabled)])
if test "x$withval" != "xno";
then
AC_DEFINE(HAVE_SDL_SDL_H, 0, Define if you have SDL/SDL.h)
AC_DEFINE(HAVE_SDL11_SDL_H, 0, Define if you have SDL/SDL11.h)
AC_DEFINE(HAVE_SDL12_SDL_H, 0, Define if you have SDL/SDL12.h)
AC_PATH_PROG(SDL_CONFIG, sdl-config, no)
SDL_HEADER="SDL/SDL.h"
if test x${SDL_CONFIG} = xno; then
AC_PATH_PROG(SDL_CONFIG, sdl11-config, no)
SDL_HEADER="SDL11/SDL.h"
fi
fi ])
if test "x$withval" = "x";
then
AC_CHECK_HEADERS(SDL/SDL.h,
[PLUGINS="${PLUGINS} sdl"
LIB_SDL="${LIB_SDL} -L/usr/X11R6/lib -lSDL"])
if test x${SDL_CONFIG} = xno; then
AC_PATH_PROG(SDL_CONFIG, sdl12-config, no)
SDL_HEADER="SDL12/SDL.h"
fi
if test x${SDL_CONFIG} != xno; then
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
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 Windows DirectX module
......
......@@ -64,9 +64,6 @@
/* Define if you have the <Ph.h> header file. */
#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. */
#undef HAVE_X11_XLIB_H
......@@ -196,3 +193,12 @@
/* Define if you want DVD CSS decryption. */
#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 @@
* aout_sdl.c : audio sdl functions library
*****************************************************************************
* 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>
* Samuel Hocevar <sam@zoy.org>
......@@ -38,7 +38,15 @@
#include <stdio.h> /* "intf_msg.h" */
#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 "common.h" /* boolean_t, byte_t */
......
......@@ -2,7 +2,7 @@
* vout_sdl.c: SDL video output display method
*****************************************************************************
* 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>
* Pierre Baillet <oct@zoy.org>
......@@ -40,7 +40,15 @@
# include <netinet/in.h> /* BSD: struct in_addr */
#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 "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