[Mesa-dev,3/4] configure: ask vdpau.pc for the default location of the vdpau drivers

Submitted by Emil Velikov on Sept. 22, 2014, 7:17 p.m.

Details

Message ID 1411413473-8020-3-git-send-email-emil.l.velikov@gmail.com
State Accepted
Headers show

Not browsing as part of any series.

Commit Message

Emil Velikov Sept. 22, 2014, 7:17 p.m.
Rather than using hardcoded values honor the value set at libvdpau
build time - i.e. the moduledir variable from vdpau.pc

Update the omx description to match reality while we're here.

Cc: Christian K├Ânig <deathsimple@vodafone.de>
Cc: Alexandre Demers <alexandre.f.demers@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=80615
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
 configure.ac | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

Patch hide | download patch | download mbox

diff --git a/configure.ac b/configure.ac
index b111732..e8db8be 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1797,12 +1797,17 @@  if test "x$enable_gallium_loader" = xyes; then
     GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS pipe-loader"
 fi
 
+VDPAU_LIB_INSTALL_DIR_DEFAULT=''
+if test "x$enable_vdpau" = xyes; then
+    VDPAU_LIB_INSTALL_DIR_DEFAULT=`$PKG_CONFIG --variable=moduledir vdpau`
+fi
+
 dnl Directory for VDPAU libs
 AC_ARG_WITH([vdpau-libdir],
     [AS_HELP_STRING([--with-vdpau-libdir=DIR],
-        [directory for the VDPAU libraries @<:@default=${libdir}/vdpau@:>@])],
+        [directory for the VDPAU libraries @<:@default=`pkg-config --variable=moduledir vdpau`@:>@])],
     [VDPAU_LIB_INSTALL_DIR="$withval"],
-    [VDPAU_LIB_INSTALL_DIR='${libdir}/vdpau'])
+    [VDPAU_LIB_INSTALL_DIR="$VDPAU_LIB_INSTALL_DIR_DEFAULT"])
 AC_SUBST([VDPAU_LIB_INSTALL_DIR])
 
 OMX_LIB_INSTALL_DIR_DEFAULT=''
@@ -1812,7 +1817,7 @@  fi
 
 AC_ARG_WITH([omx-libdir],
     [AS_HELP_STRING([--with-omx-libdir=DIR],
-        [directory for the OMX libraries])],
+        [directory for the OMX libraries @<:@default=`pkg-config --variable=pluginsdir libomxil-bellagio`@:>@])],
     [OMX_LIB_INSTALL_DIR="$withval"],
     [OMX_LIB_INSTALL_DIR="$OMX_LIB_INSTALL_DIR_DEFAULT"])
 AC_SUBST([OMX_LIB_INSTALL_DIR])