diff options
-rw-r--r-- | configure.ac | 6 | ||||
-rw-r--r-- | src/xine-utils/Makefile.am | 10 | ||||
-rw-r--r-- | src/xine-utils/xine_check.c | 23 |
3 files changed, 32 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac index e1654ab81..b7519bcd0 100644 --- a/configure.ac +++ b/configure.ac @@ -395,9 +395,12 @@ AC_CHECK_LIB(Xv, XvShmCreateImage, [ AC_MSG_CHECKING(for $xv_lib location) if test -f "$xv_path/$xv_lib"; then AC_MSG_RESULT(found in $xv_path) - XV_LIB="-lXv" + XV_LIB="-L$xv_path -lXv" AC_DEFINE(HAVE_XV,1,[Define this if you have libXv installed]) ac_have_xv="yes" + if test x$xv_lib = "xlibXv.a" ; then + AC_DEFINE(HAVE_XV_STATIC,1,[Define this if you have libXv.a]) + fi else AC_MSG_RESULT(not found in $xv_path) echo @@ -411,6 +414,7 @@ AC_CHECK_LIB(Xv, XvShmCreateImage, echo fi ],, [$X_LIBS $X_PRE_LIBS -lXext $X_EXTRA_LIBS]) AM_CONDITIONAL(HAVE_XV, test x$ac_have_xv = "xyes") +AM_CONDITIONAL(HAVE_XV_STATIC, test x$ac_have_xv = "xyes" -a x$xv_lib = "xlibXv.a") dnl dnl xine_check use Xv functions API. dnl diff --git a/src/xine-utils/Makefile.am b/src/xine-utils/Makefile.am index bc5835c6b..2464ba20b 100644 --- a/src/xine-utils/Makefile.am +++ b/src/xine-utils/Makefile.am @@ -10,7 +10,11 @@ if PPC_ARCH pppc_files = ppcasm_string.S endif -AM_CFLAGS = $(THREAD_CFLAGS) @ANSI_FLAGS@ +if HAVE_XV_STATIC +xv_libs = $(XV_LIB) +endif + +AM_CFLAGS = $(THREAD_CFLAGS) $(X_CFLAGS) @ANSI_FLAGS@ libxineutils_la_SOURCES = $(pppc_files) \ cpu_accel.c \ @@ -25,7 +29,7 @@ libxineutils_la_SOURCES = $(pppc_files) \ xmlparser.c \ xine_buffer.c -libxineutils_la_LIBADD = $(THREAD_LIBS) +libxineutils_la_LIBADD = $(THREAD_LIBS) $(xv_libs) include_HEADERS = attributes.h \ compat.h \ @@ -37,7 +41,7 @@ include_HEADERS = attributes.h \ xine_buffer.h debug: - @$(MAKE) CFLAGS="$(DEBUG_CFLAGS) $(THREAD_CFLAGS)" + @$(MAKE) CFLAGS="$(DEBUG_CFLAGS) $(THREAD_CFLAGS) $(X_CFLAGS)" install-debug: debug @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am diff --git a/src/xine-utils/xine_check.c b/src/xine-utils/xine_check.c index fa6b90782..88b6bff79 100644 --- a/src/xine-utils/xine_check.c +++ b/src/xine-utils/xine_check.c @@ -331,7 +331,10 @@ xine_health_check_t* xine_health_check_xv (xine_health_check_t* hc) { Display *dpy; unsigned int ver, rev, eventB, reqB, errorB; char *disname = NULL; - void *x11_handle, *xv_handle; + void *x11_handle; +#ifndef HAVE_XV_STATIC + void *xv_handle; +#endif Display *(*xopendisplay)(char*); char *(*xdisplayname)(char*); int (*xvqueryextension)(Display*, unsigned int*, unsigned int*, unsigned int*, unsigned int*, unsigned int*); @@ -374,6 +377,7 @@ xine_health_check_t* xine_health_check_xv (xine_health_check_t* hc) { return hc; } +#ifndef HAVE_XV_STATIC dlerror(); /* clear error code */ xv_handle = dlopen("libXv.so", RTLD_LAZY); if(!xv_handle) { @@ -412,6 +416,11 @@ xine_health_check_t* xine_health_check_xv (xine_health_check_t* hc) { dlclose(xv_handle); return hc; } +#else + xvqueryextension = XvQueryExtension; + xvqueryadaptors = XvQueryAdaptors; + xvlistimageformats = XvListImageFormats; +#endif if(!(dpy = (*xopendisplay)(disname))) { @@ -420,7 +429,9 @@ xine_health_check_t* xine_health_check_xv (xine_health_check_t* hc) { } set_hc_result (hc, XINE_HEALTH_CHECK_FAIL, "Unable to open display: %s\n", disname); dlclose(x11_handle); +#ifndef HAVE_XV_STATIC dlclose(xv_handle); +#endif return hc; } @@ -430,7 +441,9 @@ xine_health_check_t* xine_health_check_xv (xine_health_check_t* hc) { } set_hc_result (hc, XINE_HEALTH_CHECK_FAIL, "Unable to open display: %s\n",disname); dlclose(x11_handle); +#ifndef HAVE_XV_STATIC dlclose(xv_handle); +#endif return hc; } else { @@ -445,7 +458,9 @@ xine_health_check_t* xine_health_check_xv (xine_health_check_t* hc) { &adaptors,&adaptor_info)) { set_hc_result (hc, XINE_HEALTH_CHECK_FAIL, "video_out_xv: XvQueryAdaptors failed.\n"); dlclose(x11_handle); +#ifndef HAVE_XV_STATIC dlclose(xv_handle); +#endif return hc; } @@ -467,7 +482,9 @@ xine_health_check_t* xine_health_check_xv (xine_health_check_t* hc) { } dlclose(x11_handle); +#ifndef HAVE_XV_STATIC dlclose(xv_handle); +#endif return hc; #else @@ -475,7 +492,7 @@ xine_health_check_t* xine_health_check_xv (xine_health_check_t* hc) { hc->explanation = "You can improve performance by installing an X11\n" "driver that supports the Xv protocol extentsion."; - set_hc_result(hc, XINE_HEALTH_CHECK_FAIL, "No X-Video Extension"); + set_hc_result(hc, XINE_HEALTH_CHECK_FAIL, "No X-Video Extension was present at compile time"); return hc; #endif /* ! HAVE_HV */ #else @@ -483,7 +500,7 @@ xine_health_check_t* xine_health_check_xv (xine_health_check_t* hc) { hc->explanation = "You can improve performance by installing an X11\n" "driver that supports the Xv protocol extentsion."; - set_hc_result(hc, XINE_HEALTH_CHECK_FAIL, "No X11 windowing system"); + set_hc_result(hc, XINE_HEALTH_CHECK_FAIL, "No X11 windowing system was present at compile time"); return hc; #endif /* ! HAVE_X11 */ } |