7f9a198ddba92931ad60d499cc171ab7d135f55a
[profile/ivi/gstreamer-vaapi.git] / autogen.sh
1 #!/bin/sh
2
3 srcdir=`dirname $0`
4 test -z "$srcdir" && srcdir=.
5
6 PROJECT=gstreamer-vaapi
7 TEST_TYPE=-d
8 FILE=gst-libs
9
10 test $TEST_TYPE $FILE || {
11     echo "You must run this script in the top-level $PROJECT directory"
12     exit 1
13 }
14
15 mkdir -p m4
16
17 GTKDOCIZE=`which gtkdocize`
18 if test -z $GTKDOCIZE; then
19     echo "*** No gtk-doc support ***"
20     echo "EXTRA_DIST =" > gtk-doc.make
21 else
22     gtkdocize || exit $?
23     # we need to patch gtk-doc.make to support pretty output with
24     # libtool 1.x.  Should be fixed in the next version of gtk-doc.
25     # To be more resilient with the various versions of gtk-doc one
26     # can find, just sed gkt-doc.make rather than patch it.
27     sed -e 's#) --mode=compile#) --tag=CC --mode=compile#' gtk-doc.make > gtk-doc.temp \
28         && mv gtk-doc.temp gtk-doc.make
29     sed -e 's#) --mode=link#) --tag=CC --mode=link#' gtk-doc.make > gtk-doc.temp \
30         && mv gtk-doc.temp gtk-doc.make
31 fi
32
33 AUTORECONF=`which autoreconf`
34 if test -z $AUTORECONF; then
35     echo "*** No autoreconf found ***"
36     exit 1
37 else
38     autoreconf -v --install || exit $?
39 fi
40
41 if test -z "$NO_CONFIGURE"; then
42     ./configure "$@" && echo "Now type 'make' to compile $PROJECT."
43 fi