Commit fae03617 authored by Gildas Bazin's avatar Gildas Bazin

* configure.ac.in: fixed ugly hack in sdl detection code (which also broke my build :p)

* include/configuration.h, include/modules_inner.h: proper fix for a bug that allowed gcc
to put things in the stack instead of the data segment.
parent 3ce3af29
......@@ -1776,17 +1776,19 @@ then
if test "x${SDL_CONFIG}" != "xno"
then
PLUGINS="${PLUGINS} vout_sdl aout_sdl"
CFLAGS_vout_sdl="${CFLAGS_vout_sdl} `${SDL_CONFIG} --cflags | sed 's,SDL,,'`"
CFLAGS_vout_sdl="${CFLAGS_vout_sdl} `${SDL_CONFIG} --cflags`"
LDFLAGS_vout_sdl="${LDFLAGS_vout_sdl} `${SDL_CONFIG} --libs | sed 's,-rdynamic,,'`"
CFLAGS_aout_sdl="${CFLAGS_aout_sdl} `${SDL_CONFIG} --cflags | sed 's,SDL,,'`"
CFLAGS_aout_sdl="${CFLAGS_aout_sdl} `${SDL_CONFIG} --cflags`"
LDFLAGS_aout_sdl="${LDFLAGS_aout_sdl} `${SDL_CONFIG} --libs | sed 's,-rdynamic,,'`"
CPPFLAGS="${CPPFLAGS_save} ${CFLAGS_vout_sdl}"
AC_CHECK_HEADERS(${SDL_HEADER}, AC_DEFINE_UNQUOTED(SDL_INCLUDE_FILE,
<${SDL_HEADER}>, Indicate whether we should use SDL/SDL.h or SDL11/SDL.h),
[ AC_CHECK_HEADERS(SDL.h, AC_DEFINE(SDL_INCLUDE_FILE, <SDL.h>,
As a last resort we also test for SDL.h presence),
[ AC_MSG_ERROR([The development package for SDL is not installed.
Please install it and try again. Alternatively you can also configure with
--disable-sdl.])
])
])])
CPPFLAGS="${CPPFLAGS_save}"
if expr 1.1.5 \> `${SDL_CONFIG} --version` >/dev/null
then
......
......@@ -4,7 +4,7 @@
* It includes functions allowing to declare, get or set configuration options.
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: configuration.h,v 1.20 2002/12/09 23:37:54 gbazin Exp $
* $Id: configuration.h,v 1.21 2002/12/10 12:46:35 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
......@@ -115,42 +115,42 @@ VLC_EXPORT( void, config_UnsetCallbacks, ( module_config_t * ) );
*****************************************************************************/
#define add_category_hint( text, longtext ) \
{ module_config_t tmp = { CONFIG_HINT_CATEGORY, NULL, NULL, '\0', text, longtext }; p_config[ i_config ] = tmp; } i_config++
{ static module_config_t tmp = { CONFIG_HINT_CATEGORY, NULL, NULL, '\0', text, longtext }; p_config[ i_config ] = tmp; } i_config++
#define add_subcategory_hint( text, longtext ) \
{ module_config_t tmp = { CONFIG_HINT_SUBCATEGORY, NULL, NULL, '\0', text, longtext }; p_config[ i_config ] = tmp; } i_config++
{ static module_config_t tmp = { CONFIG_HINT_SUBCATEGORY, NULL, NULL, '\0', text, longtext }; p_config[ i_config ] = tmp; } i_config++
#define end_subcategory_hint \
{ module_config_t tmp = { CONFIG_HINT_SUBCATEGORY_END, NULL, NULL, '\0' }; p_config[ i_config ] = tmp; } i_config++
{ static module_config_t tmp = { CONFIG_HINT_SUBCATEGORY_END, NULL, NULL, '\0' }; p_config[ i_config ] = tmp; } i_config++
#define add_usage_hint( text ) \
{ module_config_t tmp = { CONFIG_HINT_USAGE, NULL, NULL, '\0', text }; p_config[ i_config ] = tmp; } i_config++
{ static module_config_t tmp = { CONFIG_HINT_USAGE, NULL, NULL, '\0', text }; p_config[ i_config ] = tmp; } i_config++
#define add_string( name, psz_value, p_callback, text, longtext ) \
{ module_config_t tmp = { CONFIG_ITEM_STRING, NULL, name, '\0', text, longtext, psz_value, 0, 0, p_callback }; p_config[ i_config ] = tmp; } i_config++
{ static module_config_t tmp = { CONFIG_ITEM_STRING, NULL, name, '\0', text, longtext, psz_value, 0, 0, p_callback }; p_config[ i_config ] = tmp; } i_config++
#define add_string_from_list( name, psz_value, ppsz_list, p_callback, text, \
longtext ) \
{ module_config_t tmp = { CONFIG_ITEM_STRING, NULL, name, '\0', text, longtext, psz_value, 0, 0, p_callback, ppsz_list }; p_config[ i_config ] = tmp; } i_config++
{ static module_config_t tmp = { CONFIG_ITEM_STRING, NULL, name, '\0', text, longtext, psz_value, 0, 0, p_callback, ppsz_list }; p_config[ i_config ] = tmp; } i_config++
#define add_file( name, psz_value, p_callback, text, longtext ) \
{ module_config_t tmp = { CONFIG_ITEM_FILE, NULL, name, '\0', text, longtext, psz_value, 0, 0, p_callback }; p_config[ i_config ] = tmp; } i_config++
{ static module_config_t tmp = { CONFIG_ITEM_FILE, NULL, name, '\0', text, longtext, psz_value, 0, 0, p_callback }; p_config[ i_config ] = tmp; } i_config++
#define add_module( name, psz_caps, psz_value, p_callback, text, longtext ) \
{ module_config_t tmp = { CONFIG_ITEM_MODULE, psz_caps, name, '\0', text, longtext, psz_value, 0, 0, p_callback }; p_config[ i_config ] = tmp; } i_config++
{ static module_config_t tmp = { CONFIG_ITEM_MODULE, psz_caps, name, '\0', text, longtext, psz_value, 0, 0, p_callback }; p_config[ i_config ] = tmp; } i_config++
#define add_integer( name, i_value, p_callback, text, longtext ) \
{ module_config_t tmp = { CONFIG_ITEM_INTEGER, NULL, name, '\0', text, longtext, NULL, i_value, 0, p_callback }; p_config[ i_config ] = tmp; } i_config++
{ static module_config_t tmp = { CONFIG_ITEM_INTEGER, NULL, name, '\0', text, longtext, NULL, i_value, 0, p_callback }; p_config[ i_config ] = tmp; } i_config++
#define add_float( name, f_value, p_callback, text, longtext ) \
{ module_config_t tmp = { CONFIG_ITEM_FLOAT, NULL, name, '\0', text, longtext, NULL, 0, f_value, p_callback }; p_config[ i_config ] = tmp; } i_config++
{ static module_config_t tmp = { CONFIG_ITEM_FLOAT, NULL, name, '\0', text, longtext, NULL, 0, f_value, p_callback }; p_config[ i_config ] = tmp; } i_config++
#define add_bool( name, b_value, p_callback, text, longtext ) \
{ module_config_t tmp = { CONFIG_ITEM_BOOL, NULL, name, '\0', text, longtext, NULL, b_value, 0, p_callback }; p_config[ i_config ] = tmp; } i_config++
{ static module_config_t tmp = { CONFIG_ITEM_BOOL, NULL, name, '\0', text, longtext, NULL, b_value, 0, p_callback }; p_config[ i_config ] = tmp; } i_config++
/* These should be seldom used. They were added just to provide easy shortcuts
* for the command line interface */
#define add_string_with_short( name, ch, psz_value, p_callback, text, ltext ) \
{ module_config_t tmp = { CONFIG_ITEM_STRING, NULL, name, ch, text, ltext, psz_value, 0, 0, p_callback }; p_config[ i_config ] = tmp; } i_config++
{ static module_config_t tmp = { CONFIG_ITEM_STRING, NULL, name, ch, text, ltext, psz_value, 0, 0, p_callback }; p_config[ i_config ] = tmp; } i_config++
#define add_file_with_short( name, ch, psz_value, p_callback, text, ltext ) \
{ module_config_t tmp = { CONFIG_ITEM_FILE, NULL, name, ch, text, ltext, psz_value, 0, 0, p_callback }; p_config[ i_config ] = tmp; } i_config++
{ static module_config_t tmp = { CONFIG_ITEM_FILE, NULL, name, ch, text, ltext, psz_value, 0, 0, p_callback }; p_config[ i_config ] = tmp; } i_config++
#define add_module_with_short( name, ch, psz_caps, psz_value, p_callback, \
text, ltext) \
{ module_config_t tmp = { CONFIG_ITEM_MODULE, psz_caps, name, ch, text, ltext, psz_value, 0, 0, p_callback }; p_config[ i_config ] = tmp; } i_config++
{ static module_config_t tmp = { CONFIG_ITEM_MODULE, psz_caps, name, ch, text, ltext, psz_value, 0, 0, p_callback }; p_config[ i_config ] = tmp; } i_config++
#define add_integer_with_short( name, ch, i_value, p_callback, text, ltext ) \
{ module_config_t tmp = { CONFIG_ITEM_INTEGER, NULL, name, ch, text, ltext, NULL, i_value, 0, p_callback }; p_config[ i_config ] = tmp; } i_config++
{ static module_config_t tmp = { CONFIG_ITEM_INTEGER, NULL, name, ch, text, ltext, NULL, i_value, 0, p_callback }; p_config[ i_config ] = tmp; } i_config++
#define add_float_with_short( name, ch, f_value, p_callback, text, ltext ) \
{ module_config_t tmp = { CONFIG_ITEM_FLOAT, NULL, name, ch, text, ltext, NULL, 0, f_value, p_callback }; p_config[ i_config ] = tmp; } i_config++
{ static module_config_t tmp = { CONFIG_ITEM_FLOAT, NULL, name, ch, text, ltext, NULL, 0, f_value, p_callback }; p_config[ i_config ] = tmp; } i_config++
#define add_bool_with_short( name, ch, b_value, p_callback, text, ltext ) \
{ module_config_t tmp = { CONFIG_ITEM_BOOL, NULL, name, ch, text, ltext, NULL, b_value, 0, p_callback }; p_config[ i_config ] = tmp; } i_config++
{ static module_config_t tmp = { CONFIG_ITEM_BOOL, NULL, name, ch, text, ltext, NULL, b_value, 0, p_callback }; p_config[ i_config ] = tmp; } i_config++
......@@ -2,7 +2,7 @@
* modules_inner.h : Macros used from within a module.
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: modules_inner.h,v 1.34 2002/12/06 10:10:40 sam Exp $
* $Id: modules_inner.h,v 1.35 2002/12/10 12:46:35 gbazin Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -113,9 +113,9 @@
p_submodule->pp_shortcuts[ i_shortcut ] = NULL; \
} \
{ \
module_config_t tmp = { CONFIG_HINT_END, NULL, NULL, '\0', \
NULL, NULL, NULL, 0, 0.0, NULL, \
NULL, NULL, VLC_FALSE }; \
static module_config_t tmp = { CONFIG_HINT_END, NULL, NULL, '\0', \
NULL, NULL, NULL, 0, 0.0, NULL, \
NULL, NULL, VLC_FALSE }; \
p_config[ i_config ] = tmp; \
} \
config_Duplicate( p_module, p_config ); \
......
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