From a1aa892c8a62fca89274e2d489b5516d5f8d0142 Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Tue, 30 May 2006 23:30:26 +0000 Subject: Fix up health check to find libX11 and libXv shared objects even if devel packages aren't installed (where appropriate). (Ubuntu 47357) CVS patchset: 7999 CVS date: 2006/05/30 23:30:26 --- ChangeLog | 2 ++ configure.ac | 10 ++++++++++ src/xine-utils/xine_check.c | 4 ++-- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6b2f2b1ff..0c918526a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -21,6 +21,8 @@ xine-lib (1.1.2) * Coverity fixes * Add ATSC support to the DVB plugin * Make various structures and arrays constant. + * Fix up health check to find libX11 and libXv shared objects even if + devel packages aren't installed (where appropriate). (Ubuntu 47357) xine-lib (1.1.1) * Improve sound quality when using alsa 1.0.9 or above. diff --git a/configure.ac b/configure.ac index 5ed32fee5..9bfbc5ded 100644 --- a/configure.ac +++ b/configure.ac @@ -445,6 +445,16 @@ fi AM_CONDITIONAL(HAVE_X11, [test x"$no_x" != "xyes"]) +dnl --------------------------------------------- +dnl Locate libraries needed for X health check +dnl --------------------------------------------- + +x_lib_location="`ls "$x_libraries/libX11.so"* | sed -e '/[0-9]$/! d; s%^.*/%%; t q; b; :q q'`" +AC_DEFINE([LIBX11_SO], [${x_lib_location:-libX11.so}]) +x_lib_location="`ls "$x_libraries/libXv.so"* | sed -e '/[0-9]$/! d; s%^.*/%%; t q; b; :q q'`" +AC_DEFINE([LIBXV_SO], [${x_lib_location:-libXv.so}]) + + dnl --------------------------------------------- dnl socket library dnl --------------------------------------------- diff --git a/src/xine-utils/xine_check.c b/src/xine-utils/xine_check.c index a27052d1a..6e4d0c882 100644 --- a/src/xine-utils/xine_check.c +++ b/src/xine-utils/xine_check.c @@ -373,7 +373,7 @@ xine_health_check_t* _x_health_check_xv (xine_health_check_t* hc) { /* Majority of thi code was taken from or inspired by the xvinfo.c file of XFree86 */ dlerror(); /* clear error code */ - x11_handle = dlopen("libX11.so", RTLD_LAZY); + x11_handle = dlopen(LIBX11_SO, RTLD_LAZY); if(!x11_handle) { hc->msg = dlerror(); hc->status = XINE_HEALTH_CHECK_FAIL; @@ -399,7 +399,7 @@ xine_health_check_t* _x_health_check_xv (xine_health_check_t* hc) { } dlerror(); /* clear error code */ - xv_handle = dlopen("libXv.so", RTLD_LAZY); + xv_handle = dlopen(LIBXV_SO, RTLD_LAZY); if(!xv_handle) { hc->msg = dlerror(); /* Xv might still work when linked statically into the output plugin, -- cgit v1.2.3