summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac4
-rw-r--r--m4/xv.m415
2 files changed, 15 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index 1e6934173..cca03bb5c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -524,7 +524,7 @@ fi
case "$host_or_hostalias" in
hppa*)
- if test "$XV_LIB" = "libXv.a"; then
+ if test x$ac_have_xv_static = "xyes"; then
echo "warning: hppa linker - disabling static libXv"
XV_LIB="libXv.so"
fi
@@ -2456,7 +2456,7 @@ if test x"$no_x" != "xyes"; then
fi
dnl Xv
if test x$ac_have_xv = "xyes"; then
- if test x$XV_LIB="xlibXv.a"; then
+ if test x$ac_have_xv_static = "xyes"; then
echo " - Xv (XVideo *static*)"
else
echo " - Xv (XVideo *shared*)"
diff --git a/m4/xv.m4 b/m4/xv.m4
index 2326daad5..5a0de42a5 100644
--- a/m4/xv.m4
+++ b/m4/xv.m4
@@ -25,11 +25,13 @@ AC_DEFUN([AC_TEST_LIBXV],
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])
-
+ ac_have_xv_static="yes"
+ XV_LIB="$xv_path/$XV_LIB"
+
fi],
,
[$X_LIBS $X_PRE_LIBS -lXext $X_EXTRA_LIBS])
@@ -66,6 +68,15 @@ AC_DEFUN([AC_FIND_LIBXV],
else
AC_PATH_LIBXV_IMPL([libXv.a])
fi
+
+ # Try the other lib if prefered failed
+ if test -z $XV_LIB; then
+ if ! test "x$xv_prefer_shared" = "xyes"; then
+ AC_PATH_LIBXV_IMPL([libXv.so])
+ else
+ AC_PATH_LIBXV_IMPL([libXv.a])
+ fi
+ fi
if ! test -z $XV_LIB; then
AC_TEST_LIBXV