From: Loïc Minier Date: Sat, 8 Jun 2002 01:41:22 +0000 (+0000) Subject: * ./configure.in: checking for the header should be enough in most cases X-Git-Tag: 0.5.0~1314 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=2e8031b40a29bcf650782ab93a007da7be5556aa;p=vlc * ./configure.in: checking for the header should be enough in most cases * ./plugins/xosd/xosd.c: configuration options --- diff --git a/configure b/configure index 6b3c003266..345129b759 100755 --- a/configure +++ b/configure @@ -8282,48 +8282,8 @@ fi rm -f conftest* fi 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 <&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 have_xosd="true" -else - echo "$ac_t""no" 1>&6 -have_xosd="false" -fi - else echo "$ac_t""no" 1>&6 have_xosd="false" @@ -8346,17 +8306,17 @@ if test x$enable_lirc = xyes then ac_safe=`echo "lirc/lirc_client.h" | sed 'y%./+-%__p_%'` 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 echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF 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}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8373,7 +8333,7 @@ fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 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_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8381,7 +8341,7 @@ else ac_save_LIBS="$LIBS" LIBS="-llirc_client $LIBS" cat > conftest.$ac_ext <&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* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8447,7 +8407,7 @@ fi ;; *) 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 echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8529,7 +8489,7 @@ if test "${enable_pth+set}" = set; then enableval="$enable_pth" if test "x$enable_pth" = "xyes"; then 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_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8537,7 +8497,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpth $LIBS" cat > conftest.$ac_ext <&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* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8576,7 +8536,7 @@ else fi cat > conftest.$ac_ext < EOF @@ -8602,7 +8562,7 @@ if test "${enable_st+set}" = set; then enableval="$enable_st" if test "x$enable_st" = "xyes"; then 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_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8610,7 +8570,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lst $LIBS" cat > conftest.$ac_ext <&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* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8649,7 +8609,7 @@ else fi cat > conftest.$ac_ext < EOF diff --git a/configure.in b/configure.in index 35c76b9a41..23e3afa05c 100644 --- a/configure.in +++ b/configure.in @@ -1503,7 +1503,7 @@ AC_ARG_ENABLE(xosd, [ --enable-xosd xosd interface support (default disabled)]) if test x$enable_xosd = xyes 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 then PLUGINS="${PLUGINS} xosd" diff --git a/plugins/xosd/xosd.c b/plugins/xosd/xosd.c index 77ada9103f..06058c68b7 100644 --- a/plugins/xosd/xosd.c +++ b/plugins/xosd/xosd.c @@ -2,7 +2,7 @@ * xosd.c : X On Screen Display interface ***************************************************************************** * 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: Loïc Minier * @@ -58,7 +58,22 @@ static void intf_Run ( intf_thread_t *p_intf ); /***************************************************************************** * 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 +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_INIT_START @@ -87,7 +102,7 @@ static void intf_getfunctions( function_list_t * p_function_list ) /***************************************************************************** * 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 */ 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 ) /* Initialize library */ p_intf->p_sys->p_osd = - xosd_init( "-*-lucidatypewriter-medium-r-normal-*-*-250-*-*-*-*-*-*", - "LawnGreen", 3, XOSD_top, 0, 1 ); + xosd_init( "fixed", "LawnGreen", 3, XOSD_top, 0, 1 ); /* Initialize to NULL */ p_intf->p_sys->psz_source = NULL; xosd_display( p_intf->p_sys->p_osd, - 0, XOSD_string, "xosd interface initialized" ); + 0, + XOSD_string, + "xosd interface initialized" ); return( 0 ); } @@ -160,9 +176,18 @@ static void intf_Run( intf_thread_t *p_intf ) p_intf->p_sys->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 ); - printf("douze %s\n", p_intf->p_sys->psz_source); } }