summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGwenole Beauchesne <gbeauchesne@splitted-desktop.com>2009-07-08 07:48:10 +0000
committerAustin Yuan <shengquan.yuan@intel.com>2009-07-08 17:42:05 +0800
commit4f1b4898eb71b07397095fb22122182bc4f7191d (patch)
treef67bfa1fc954d7681997617eb3b2a5394aad9d09
parent31d02ddc2acb7276f4031c1db310f6aeafadd10f (diff)
downloadlibva-4f1b4898eb71b07397095fb22122182bc4f7191d.tar.gz
Install drivers into pkglibdir/va/.
Signed-off-by: Austin Yuan <shengquan.yuan@intel.com>
-rw-r--r--configure.ac7
-rw-r--r--dummy_drv_video/Makefile.am2
-rw-r--r--i965_drv_video/Makefile.am2
-rw-r--r--libva.pc.in1
-rw-r--r--src/Makefile.am3
-rw-r--r--src/va.c3
6 files changed, 13 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac
index a3a32e7..5d53059 100644
--- a/configure.ac
+++ b/configure.ac
@@ -27,6 +27,13 @@ AM_INIT_AUTOMAKE([dist-bzip2])
AM_CONFIG_HEADER([config.h])
+AC_ARG_WITH(drivers-path,
+ [AC_HELP_STRING([--with-drivers-path=[[path]]], [drivers path])],,
+ [with_drivers_path="$libdir/va/drivers"])
+
+LIBVA_DRIVERS_PATH="$with_drivers_path"
+AC_SUBST(LIBVA_DRIVERS_PATH)
+
AC_DISABLE_STATIC
AC_PROG_LIBTOOL
AC_PROG_CC
diff --git a/dummy_drv_video/Makefile.am b/dummy_drv_video/Makefile.am
index f782c71..53041eb 100644
--- a/dummy_drv_video/Makefile.am
+++ b/dummy_drv_video/Makefile.am
@@ -21,7 +21,7 @@
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
dummy_drv_video_la_LTLIBRARIES = dummy_drv_video.la
-dummy_drv_video_ladir = /usr/lib/dri
+dummy_drv_video_ladir = @LIBVA_DRIVERS_PATH@
dummy_drv_video_la_LDFLAGS = -module -avoid-version -no-undefined -Wl,--no-undefined
dummy_drv_video_la_LIBADD = ../src/libva.la
diff --git a/i965_drv_video/Makefile.am b/i965_drv_video/Makefile.am
index 83fb8f1..c0117c9 100644
--- a/i965_drv_video/Makefile.am
+++ b/i965_drv_video/Makefile.am
@@ -25,7 +25,7 @@ SUBDIRS = shaders
AM_CFLAGS = -Wall -I$(top_srcdir)/src -I$(top_srcdir)/src/x11 @DRM_CFLAGS@ -DIN_LIBVA
i965_drv_video_la_LTLIBRARIES = i965_drv_video.la
-i965_drv_video_ladir = $(libdir)/dri
+i965_drv_video_ladir = @LIBVA_DRIVERS_PATH@
i965_drv_video_la_LDFLAGS = -module -avoid-version -no-undefined -Wl,--no-undefined @DRM_LIBS@ -ldrm_intel
i965_drv_video_la_LIBADD = ../src/libva.la -lpthread
diff --git a/libva.pc.in b/libva.pc.in
index 16fb6aa..60f1483 100644
--- a/libva.pc.in
+++ b/libva.pc.in
@@ -2,6 +2,7 @@ prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
+driverdir=@LIBVA_DRIVERS_PATH@
Name: libva
Description: Userspace Video Acceleration (VA) core interface
diff --git a/src/Makefile.am b/src/Makefile.am
index e990979..65cca77 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -22,7 +22,8 @@
INCLUDES = \
$(LIBVA_CFLAGS) -I$(top_srcdir)/src/x11 \
- -DIN_LIBVA
+ -DIN_LIBVA \
+ -DVA_DRIVERS_PATH="\"$(LIBVA_DRIVERS_PATH)\""
libva_la_LTLIBRARIES = libva.la
libva_ladir = $(libdir)
diff --git a/src/va.c b/src/va.c
index 3c07386..ce6961a 100644
--- a/src/va.c
+++ b/src/va.c
@@ -47,7 +47,6 @@
#define VA_MINOR_VERSION 30
#define DRIVER_INIT_FUNC "__vaDriverInit_0_30"
-#define DEFAULT_DRIVER_DIR "/usr/lib/dri/"
#define DRIVER_EXTENSION "_drv_video.so"
#define CTX(dpy) (((VADisplayContextP)dpy)->pDriverContext)
@@ -153,7 +152,7 @@ static VAStatus va_openDriver(VADisplay dpy, char *driver_name)
}
if (!search_path)
{
- search_path = DEFAULT_DRIVER_DIR;
+ search_path = VA_DRIVERS_PATH;
}
search_path = strdup((const char *)search_path);