]> git.sesse.net Git - vlc/commitdiff
* ./configure.in: checking for the header should be enough in most cases
authorLoïc Minier <lool@videolan.org>
Sat, 8 Jun 2002 01:41:22 +0000 (01:41 +0000)
committerLoïc Minier <lool@videolan.org>
Sat, 8 Jun 2002 01:41:22 +0000 (01:41 +0000)
  * ./plugins/xosd/xosd.c: configuration options

configure
configure.in
plugins/xosd/xosd.c

index 6b3c0032667754d48b93e88db4cbbf516b67fc9f..345129b759f775ca50d2d76ce85008977195c057 100755 (executable)
--- 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 <<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
   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
-#line 8355 "configure"
+#line 8315 "configure"
 #include "confdefs.h"
 #include <lirc/lirc_client.h>
 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 <<EOF
-#line 8385 "configure"
+#line 8345 "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
@@ -8392,7 +8352,7 @@ int main() {
 lirc_init()
 ; return 0; }
 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*
   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 <<EOF
-#line 8541 "configure"
+#line 8501 "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
@@ -8548,7 +8508,7 @@ int main() {
 pth_init()
 ; return 0; }
 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*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -8576,7 +8536,7 @@ else
 fi
 
     cat > conftest.$ac_ext <<EOF
-#line 8580 "configure"
+#line 8540 "configure"
 #include "confdefs.h"
 #include <pth.h>
 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 <<EOF
-#line 8614 "configure"
+#line 8574 "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
@@ -8621,7 +8581,7 @@ int main() {
 st_init()
 ; return 0; }
 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*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -8649,7 +8609,7 @@ else
 fi
 
     cat > conftest.$ac_ext <<EOF
-#line 8653 "configure"
+#line 8613 "configure"
 #include "confdefs.h"
 #include <st.h>
 EOF
index 35c76b9a41952019d0ef1226a47f4aade8ba21e9..23e3afa05cb811c5a989861233664c022a872244 100644 (file)
@@ -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"
index 77ada9103f41417b5a7e52037b9568569f89f0ba..06058c68b74601120c8d11f30c1e15aa79cd94ea 100644 (file)
@@ -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 <lool@videolan.org>
  *
@@ -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);
             }
         }