autogen: fix check for gtkdocize and autoreconf.
[vaapi: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 GTKDOCIZE=`which gtkdocize`
19 if test -z "$GTKDOCIZE"; then
20     echo "*** No gtk-doc support ***"
21     echo "EXTRA_DIST =" > gtk-doc.make
22 else
23     gtkdocize || exit $?
24 fi
25
26 AUTORECONF=`which autoreconf`
27 if test -z "$AUTORECONF"; then
28     echo "*** No autoreconf found ***"
29     exit 1
30 else
31     autoreconf -v --install || exit $?
32 fi
33
34 cd "$olddir"
35
36 if test -z "$NO_CONFIGURE"; then
37     $srcdir/configure "$@" && echo "Now type 'make' to compile $PROJECT."
38 fi