configure: improve configure for libav, vaapi and dxva2. 17/34217/3
authorKitae Kim <kt920.kim@samsung.com>
Thu, 22 Jan 2015 06:18:19 +0000 (15:18 +0900)
committerSeokYeon Hwang <syeon.hwang@samsung.com>
Mon, 26 Jan 2015 06:31:49 +0000 (22:31 -0800)
Change-Id: I90a263de5dfa78d179c5bcd374de0ad1b5468c6b
Signed-off-by: Kitae Kim <kt920.kim@samsung.com>
configure

index 8ad78b8..3123b9a 100755 (executable)
--- a/configure
+++ b/configure
@@ -333,10 +333,10 @@ seccomp=""
 # for TIZEN-maru
 maru="no"
 shm="no"
-libav="no"
+libav=""
 libpng="no"
-dxva2="no"
-vaapi="no"
+dxva2=""
+vaapi=""
 qt="no"
 qtabi="5.0"
 #
@@ -1144,8 +1144,12 @@ for opt do
   ;;
   --enable-dxva2) dxva2="yes"
   ;;
+  --disable-dxva2) dxva2="no"
+  ;;
   --enable-vaapi) vaapi="yes"
   ;;
+  --disable-vaapi) vaapi="no"
+  ;;
   --disable-qt) qt="no"
   ;;
   --enable-qt) qt="yes"
@@ -1486,7 +1490,9 @@ TIZEN-maru options:
   --disable-libav          disable libav library
   --enable-libpng          enable png library
   --enable-dxva2           enable dxva2 support
-  --enable-vaapi           enable vaapi support
+  --disable-dxva2          disable dxva2 support
+  --ensable-vaapi          enable vaapi support
+  --disable-vaapi          disable vaapi support
 
 NOTE: The object files are built at the place where configure is launched
 EOF
@@ -4211,8 +4217,8 @@ fi
 
 }
 
-if test "$dxva2" != "no" ; then
-       if test "$mingw32" != "no" ; then
+if test "$dxva2" = "yes" ; then
+       if test "$mingw32" = "yes" ; then
                check_dxva2
                if test "$dxva2" != "yes" ; then
                        feature_not_found "dxva2"
@@ -4221,7 +4227,9 @@ if test "$dxva2" != "no" ; then
                error_exit "DXVA2 is supported only on Windows"
        fi
 else
-       check_dxva2
+       if test "$dxva2" != "no" ; then
+               check_dxva2
+       fi
 fi
 
 ########################################
@@ -4248,8 +4256,8 @@ fi
 
 }
 
-if test "$vaapi" != "no" ; then
-       if test "$linux" != "no" ; then
+if test "$vaapi" = "yes" ; then
+       if test "$linux" = "yes" ; then
                check_vaapi
                if test "$vaapi" != "yes" ; then
                        feature_not_found "vaapi"
@@ -4258,7 +4266,9 @@ if test "$vaapi" != "no" ; then
                error_exit "VAAPI is supported only on Linux"
        fi
 else
-       check_vappi
+       if test "$vaapi" != "no" ; then
+               check_vaapi
+       fi
 fi
 
 ##########################################
@@ -4274,7 +4284,7 @@ libavresample_package="libavresample"
 libavresample_version="1.0.1"
 
 check_libav() {
-echo "check $1"
+echo "check $1"
 
 if $pkg_config --exists "$1 >= $2" ; then
        libav_cflags=`$pkg_config --cflags $1`
@@ -4287,7 +4297,7 @@ fi
 
 }
 
-if test "$libav" != "no"; then
+if test "$libav" = "yes"; then
        check_libav $libavcodec_package $libavcodec_version
        if test "$libav" != "yes"; then
                feature_not_found "libav"
@@ -4308,13 +4318,15 @@ if test "$libav" != "no"; then
                feature_not_found "libav"
        fi
 else
-       check_libav $libavcodec_package $libavcodec_version
+       if test "$libav" != "no"; then
+               check_libav $libavcodec_package $libavcodec_version
 
-       check_libav $libavformat_package $libavformat_version
+               check_libav $libavformat_package $libavformat_version
 
-       check_libav $libavutil_package $libavutil_version
+               check_libav $libavutil_package $libavutil_version
 
-       check_libav $libavresample_package $libavresample_version
+               check_libav $libavresample_package $libavresample_version
+       fi
 fi
 
 ##########################################