Commit 2e8031b4 authored by Loïc Minier's avatar Loïc Minier

* ./configure.in: checking for the header should be enough in most cases

  * ./plugins/xosd/xosd.c: configuration options
parent a5e3711f
...@@ -8282,48 +8282,8 @@ fi ...@@ -8282,48 +8282,8 @@ fi
rm -f conftest* rm -f conftest*
fi fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for xosd_init in -lxosd""... $ac_c" 1>&6
echo "configure:8288: checking for xosd_init in -lxosd" >&5
ac_lib_var=`echo xosd'_'xosd_init | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
LIBS="-lxosd $LIBS"
cat > conftest.$ac_ext <<EOF
#line 8296 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char xosd_init();
int main() {
xosd_init()
; return 0; }
EOF
if { (eval echo configure:8307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6 echo "$ac_t""yes" 1>&6
have_xosd="true" have_xosd="true"
else
echo "$ac_t""no" 1>&6
have_xosd="false"
fi
else else
echo "$ac_t""no" 1>&6 echo "$ac_t""no" 1>&6
have_xosd="false" have_xosd="false"
...@@ -8346,17 +8306,17 @@ if test x$enable_lirc = xyes ...@@ -8346,17 +8306,17 @@ if test x$enable_lirc = xyes
then then
ac_safe=`echo "lirc/lirc_client.h" | sed 'y%./+-%__p_%'` ac_safe=`echo "lirc/lirc_client.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for lirc/lirc_client.h""... $ac_c" 1>&6 echo $ac_n "checking for lirc/lirc_client.h""... $ac_c" 1>&6
echo "configure:8350: checking for lirc/lirc_client.h" >&5 echo "configure:8310: checking for lirc/lirc_client.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 8355 "configure" #line 8315 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <lirc/lirc_client.h> #include <lirc/lirc_client.h>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:8360: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:8320: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
...@@ -8373,7 +8333,7 @@ fi ...@@ -8373,7 +8333,7 @@ fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6 echo "$ac_t""yes" 1>&6
echo $ac_n "checking for lirc_init in -llirc_client""... $ac_c" 1>&6 echo $ac_n "checking for lirc_init in -llirc_client""... $ac_c" 1>&6
echo "configure:8377: checking for lirc_init in -llirc_client" >&5 echo "configure:8337: checking for lirc_init in -llirc_client" >&5
ac_lib_var=`echo lirc_client'_'lirc_init | sed 'y%./+-%__p_%'` ac_lib_var=`echo lirc_client'_'lirc_init | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
...@@ -8381,7 +8341,7 @@ else ...@@ -8381,7 +8341,7 @@ else
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="-llirc_client $LIBS" LIBS="-llirc_client $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 8385 "configure" #line 8345 "configure"
#include "confdefs.h" #include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */ /* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2 /* We use char because int might match the return type of a gcc2
...@@ -8392,7 +8352,7 @@ int main() { ...@@ -8392,7 +8352,7 @@ int main() {
lirc_init() lirc_init()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:8396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:8356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes" eval "ac_cv_lib_$ac_lib_var=yes"
else else
...@@ -8447,7 +8407,7 @@ fi ...@@ -8447,7 +8407,7 @@ fi
;; ;;
*) *)
echo $ac_n "checking whether the byte order is big-endian""... $ac_c" 1>&6 echo $ac_n "checking whether the byte order is big-endian""... $ac_c" 1>&6
echo "configure:8451: checking whether the byte order is big-endian" >&5 echo "configure:8411: checking whether the byte order is big-endian" >&5
if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -8529,7 +8489,7 @@ if test "${enable_pth+set}" = set; then ...@@ -8529,7 +8489,7 @@ if test "${enable_pth+set}" = set; then
enableval="$enable_pth" enableval="$enable_pth"
if test "x$enable_pth" = "xyes"; then if test "x$enable_pth" = "xyes"; then
echo $ac_n "checking for pth_init in -lpth""... $ac_c" 1>&6 echo $ac_n "checking for pth_init in -lpth""... $ac_c" 1>&6
echo "configure:8533: checking for pth_init in -lpth" >&5 echo "configure:8493: checking for pth_init in -lpth" >&5
ac_lib_var=`echo pth'_'pth_init | sed 'y%./+-%__p_%'` ac_lib_var=`echo pth'_'pth_init | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
...@@ -8537,7 +8497,7 @@ else ...@@ -8537,7 +8497,7 @@ else
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="-lpth $LIBS" LIBS="-lpth $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 8541 "configure" #line 8501 "configure"
#include "confdefs.h" #include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */ /* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2 /* We use char because int might match the return type of a gcc2
...@@ -8548,7 +8508,7 @@ int main() { ...@@ -8548,7 +8508,7 @@ int main() {
pth_init() pth_init()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:8552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:8512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes" eval "ac_cv_lib_$ac_lib_var=yes"
else else
...@@ -8576,7 +8536,7 @@ else ...@@ -8576,7 +8536,7 @@ else
fi fi
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 8580 "configure" #line 8540 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <pth.h> #include <pth.h>
EOF EOF
...@@ -8602,7 +8562,7 @@ if test "${enable_st+set}" = set; then ...@@ -8602,7 +8562,7 @@ if test "${enable_st+set}" = set; then
enableval="$enable_st" enableval="$enable_st"
if test "x$enable_st" = "xyes"; then if test "x$enable_st" = "xyes"; then
echo $ac_n "checking for st_init in -lst""... $ac_c" 1>&6 echo $ac_n "checking for st_init in -lst""... $ac_c" 1>&6
echo "configure:8606: checking for st_init in -lst" >&5 echo "configure:8566: checking for st_init in -lst" >&5
ac_lib_var=`echo st'_'st_init | sed 'y%./+-%__p_%'` ac_lib_var=`echo st'_'st_init | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
...@@ -8610,7 +8570,7 @@ else ...@@ -8610,7 +8570,7 @@ else
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="-lst $LIBS" LIBS="-lst $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 8614 "configure" #line 8574 "configure"
#include "confdefs.h" #include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */ /* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2 /* We use char because int might match the return type of a gcc2
...@@ -8621,7 +8581,7 @@ int main() { ...@@ -8621,7 +8581,7 @@ int main() {
st_init() st_init()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:8625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:8585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes" eval "ac_cv_lib_$ac_lib_var=yes"
else else
...@@ -8649,7 +8609,7 @@ else ...@@ -8649,7 +8609,7 @@ else
fi fi
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 8653 "configure" #line 8613 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <st.h> #include <st.h>
EOF EOF
......
...@@ -1503,7 +1503,7 @@ AC_ARG_ENABLE(xosd, ...@@ -1503,7 +1503,7 @@ AC_ARG_ENABLE(xosd,
[ --enable-xosd xosd interface support (default disabled)]) [ --enable-xosd xosd interface support (default disabled)])
if test x$enable_xosd = xyes if test x$enable_xosd = xyes
then then
AC_CHECK_HEADER(xosd.h, AC_CHECK_LIB(xosd, xosd_init, have_xosd="true", have_xosd="false"),have_xosd="false") AC_CHECK_HEADER(xosd.h, have_xosd="true", have_xosd="false")
if test x$have_xosd = xtrue if test x$have_xosd = xtrue
then then
PLUGINS="${PLUGINS} xosd" PLUGINS="${PLUGINS} xosd"
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* xosd.c : X On Screen Display interface * xosd.c : X On Screen Display interface
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: xosd.c,v 1.1 2002/06/07 22:41:50 lool Exp $ * $Id: xosd.c,v 1.2 2002/06/08 01:41:22 lool Exp $
* *
* Authors: Loc Minier <lool@videolan.org> * Authors: Loc Minier <lool@videolan.org>
* *
...@@ -58,7 +58,22 @@ static void intf_Run ( intf_thread_t *p_intf ); ...@@ -58,7 +58,22 @@ static void intf_Run ( intf_thread_t *p_intf );
/***************************************************************************** /*****************************************************************************
* Build configuration tree. * Build configuration tree.
*****************************************************************************/ *****************************************************************************/
#define POSITION_TEXT N_("flip vertical position")
#define POSITION_LONGTEXT N_("Display xosd output on the bottom of the " \
"screen instead of the top")
#define OFFSET_TEXT N_("vertical offset")
#define OFFSET_LONGTEXT N_("Vertical position offset of the text " \
"displayed in pixels")
#define FONT_TEXT N_("font")
#define FONT_LONGTEXT N_("Font used to display text in the xosd output")
MODULE_CONFIG_START MODULE_CONFIG_START
ADD_CATEGORY_HINT( N_("Miscellaneous"), NULL )
ADD_BOOL( "xosd-position", 0, NULL, POSITION_TEXT, POSITION_LONGTEXT )
ADD_INTEGER( "xosd-text-offset", 0, NULL, OFFSET_TEXT, OFFSET_LONGTEXT )
ADD_STRING( "xosd-font", "fixed", NULL, FONT_TEXT, FONT_LONGTEXT )
MODULE_CONFIG_STOP MODULE_CONFIG_STOP
MODULE_INIT_START MODULE_INIT_START
...@@ -87,7 +102,7 @@ static void intf_getfunctions( function_list_t * p_function_list ) ...@@ -87,7 +102,7 @@ static void intf_getfunctions( function_list_t * p_function_list )
/***************************************************************************** /*****************************************************************************
* intf_Open: initialize and create stuff * intf_Open: initialize and create stuff
*****************************************************************************/ *****************************************************************************/
static int intf_Open( intf_thread_t *p_intf ) static int intf_Open( intf_thread_t * p_intf )
{ {
/* Allocate instance and initialize some members */ /* Allocate instance and initialize some members */
p_intf->p_sys = (intf_sys_t *)malloc( sizeof( intf_sys_t ) ); p_intf->p_sys = (intf_sys_t *)malloc( sizeof( intf_sys_t ) );
...@@ -99,14 +114,15 @@ static int intf_Open( intf_thread_t *p_intf ) ...@@ -99,14 +114,15 @@ static int intf_Open( intf_thread_t *p_intf )
/* Initialize library */ /* Initialize library */
p_intf->p_sys->p_osd = p_intf->p_sys->p_osd =
xosd_init( "-*-lucidatypewriter-medium-r-normal-*-*-250-*-*-*-*-*-*", xosd_init( "fixed", "LawnGreen", 3, XOSD_top, 0, 1 );
"LawnGreen", 3, XOSD_top, 0, 1 );
/* Initialize to NULL */ /* Initialize to NULL */
p_intf->p_sys->psz_source = NULL; p_intf->p_sys->psz_source = NULL;
xosd_display( p_intf->p_sys->p_osd, xosd_display( p_intf->p_sys->p_osd,
0, XOSD_string, "xosd interface initialized" ); 0,
XOSD_string,
"xosd interface initialized" );
return( 0 ); return( 0 );
} }
...@@ -160,9 +176,18 @@ static void intf_Run( intf_thread_t *p_intf ) ...@@ -160,9 +176,18 @@ static void intf_Run( intf_thread_t *p_intf )
p_intf->p_sys->psz_source = p_intf->p_sys->psz_source =
strdup( p_intf->p_sys->p_input->psz_source ); strdup( p_intf->p_sys->p_input->psz_source );
xosd_display( p_intf->p_sys->p_osd, 0, XOSD_string, /* Set user preferences */
xosd_set_font( p_intf->p_sys->p_osd,
config_GetPsz( p_intf, "xosd-font" ) );
xosd_set_offset( p_intf->p_sys->p_osd,
config_GetInt( p_intf, "xosd-text-offset" ) );
xosd_set_pos( p_intf->p_sys->p_osd, config_GetInt( p_intf, "xosd-position" ) ? XOSD_bottom : XOSD_top );
/* Display */
xosd_display( p_intf->p_sys->p_osd,
0, /* first line */
XOSD_string,
p_intf->p_sys->psz_source ); p_intf->p_sys->psz_source );
printf("douze %s\n", p_intf->p_sys->psz_source);
} }
} }
......
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