vaapidecode: fix auto-plugging of vaapisink element.
[platform/upstream/gstreamer-vaapi.git] / autogen.sh
index 920e77e..d7213af 100755 (executable)
@@ -15,8 +15,26 @@ cd "$srcdir"
 
 mkdir -p m4
 
+GIT=`which git`
+if test -z "$GIT"; then
+    echo "*** No git found ***"
+    exit 1
+else
+    submodule_init="no"
+    for ext_module in codecparsers videoutils; do
+        if test ! -f ext/${ext_module}/autogen.sh; then
+            submodule_init="yes"
+        fi
+    done
+    [ -f ext/libvpx/upstream/configure ] || submodule_init="yes"
+    if test "$submodule_init" = "yes"; then
+        $GIT submodule init
+    fi
+    $GIT submodule update
+fi
+
 GTKDOCIZE=`which gtkdocize`
-if test -z $GTKDOCIZE; then
+if test -z "$GTKDOCIZE"; then
     echo "*** No gtk-doc support ***"
     echo "EXTRA_DIST =" > gtk-doc.make
 else
@@ -24,7 +42,7 @@ else
 fi
 
 AUTORECONF=`which autoreconf`
-if test -z $AUTORECONF; then
+if test -z "$AUTORECONF"; then
     echo "*** No autoreconf found ***"
     exit 1
 else