[Libva] [PATCH 2/3] Make libva.conf directory dependent on build variable
Lukasz Anaczkowski
lukasz.anaczkowski at intel.com
Mon Feb 11 06:47:14 PST 2013
Change-Id: I2eb2c130ffe610510be865a2c6e74cbe0563393f
Signed-off-by: Lukasz Anaczkowski <lukasz.anaczkowski at intel.com>
---
configure.ac | 3 +++
va/Android.mk | 2 ++
va/Makefile.am | 3 ++-
va/va.c | 2 +-
4 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index 257964d..6e8cfac 100644
--- a/configure.ac
+++ b/configure.ac
@@ -161,6 +161,8 @@ AC_ARG_WITH(drivers-path,
LIBVA_DRIVERS_PATH="$with_drivers_path"
AC_SUBST(LIBVA_DRIVERS_PATH)
+LIBVA_CONFIG_DIR="/etc"
+AC_SUBST(LIBVA_CONFIG_DIR)
AC_DISABLE_STATIC
AC_PROG_LIBTOOL
@@ -348,6 +350,7 @@ echo "libva - ${LIBVA_VERSION} (VA-API ${VA_API_VERSION})"
echo
echo Installation prefix .............. : $prefix
echo Default driver path .............. : $LIBVA_DRIVERS_PATH
+echo Default config dir ............... : $LIBVA_CONFIG_DIR
echo Extra window systems ............. : $BACKENDS
echo Build dummy driver ............... : $enable_dummy_driver
echo Build documentation .............. : $enable_docs
diff --git a/va/Android.mk b/va/Android.mk
index 88f1e80..c294c53 100755
--- a/va/Android.mk
+++ b/va/Android.mk
@@ -26,6 +26,7 @@
LOCAL_PATH:= $(call my-dir)
LIBVA_DRIVERS_PATH = /system/lib
+LIBVA_CONFIG_DIR = /system/etc
# Version set to Android Jelly Bean
ALOG_VERSION_REQ := 4.1
@@ -45,6 +46,7 @@ LOCAL_SRC_FILES := \
LOCAL_CFLAGS += \
-DANDROID \
-DVA_DRIVERS_PATH="\"$(LIBVA_DRIVERS_PATH)\"" \
+ -DVA_CONFIG_DIR="\"$(LIBVA_CONFIG_DIR)\"" \
-DLOG_TAG=\"libva\"
# Android Jelly Bean defined ALOGx, older versions use LOGx
diff --git a/va/Makefile.am b/va/Makefile.am
index a3bfe06..ecf78f5 100644
--- a/va/Makefile.am
+++ b/va/Makefile.am
@@ -24,7 +24,8 @@ SUBDIRS =
INCLUDES = \
-I$(top_srcdir) \
- -DVA_DRIVERS_PATH="\"$(LIBVA_DRIVERS_PATH)\""
+ -DVA_DRIVERS_PATH="\"$(LIBVA_DRIVERS_PATH)\"" \
+ -DVA_CONFIG_DIR="\"$(LIBVA_CONFIG_DIR)\""
LDADD = \
$(LIBVA_LT_LDFLAGS)
diff --git a/va/va.c b/va/va.c
index 03f86e7..a3fa96f 100644
--- a/va/va.c
+++ b/va/va.c
@@ -62,7 +62,7 @@ int va_parseConfig(char *env, char *env_value)
if (env == NULL)
return 1;
- fp = fopen("/etc/libva.conf", "r");
+ fp = fopen(VA_CONFIG_DIR"/libva.conf", "r");
while (fp && (fgets(oneline, 1024, fp) != NULL)) {
if (strlen(oneline) == 1)
continue;
--
1.7.9.5
---------------------------------------------------------------------
Intel Technology Poland sp. z o.o.
z siedziba w Gdansku
ul. Slowackiego 173
80-298 Gdansk
Sad Rejonowy Gdansk Polnoc w Gdansku,
VII Wydzial Gospodarczy Krajowego Rejestru Sadowego,
numer KRS 101882
NIP 957-07-52-316
Kapital zakladowy 200.000 zl
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
More information about the Libva
mailing list