encoder: h264: generate new SPS only when codec config changed.
[platform/upstream/gstreamer-vaapi.git] / autogen.sh
1 #!/bin/sh
2
3 PROJECT="gstreamer-vaapi"
4
5 test -n "$srcdir" || srcdir="`dirname \"$0\"`"
6 test -n "$srcdir" || srcdir=.
7
8 if ! test -f "$srcdir/configure.ac"; then
9     echo "Failed to find the top-level $PROJECT directory"
10     exit 1
11 fi
12
13 olddir="`pwd`"
14 cd "$srcdir"
15
16 mkdir -p m4
17
18 GIT=`which git`
19 if test -z "$GIT"; then
20     echo "*** No git found ***"
21     exit 1
22 else
23     submodule_init="no"
24     for ext_module in codecparsers videoutils; do
25         if test ! -f ext/${ext_module}/autogen.sh; then
26             submodule_init="yes"
27         fi
28     done
29     [ -f ext/libvpx/upstream/configure ] || submodule_init="yes"
30     if test "$submodule_init" = "yes"; then
31         $GIT submodule init
32     fi
33     $GIT submodule update
34 fi
35
36 GTKDOCIZE=`which gtkdocize`
37 if test -z "$GTKDOCIZE"; then
38     echo "*** No gtk-doc support ***"
39     echo "EXTRA_DIST =" > gtk-doc.make
40 else
41     gtkdocize || exit $?
42 fi
43
44 AUTORECONF=`which autoreconf`
45 if test -z "$AUTORECONF"; then
46     echo "*** No autoreconf found ***"
47     exit 1
48 else
49     autoreconf -v --install || exit $?
50 fi
51
52 cd "$olddir"
53
54 if test -z "$NO_CONFIGURE"; then
55     $srcdir/configure "$@" && echo "Now type 'make' to compile $PROJECT."
56 fi