Clarify usage of ov_raw_tell a little bit.
[xiph/unicode.git] / theora-tools / autogen.sh
blob0170972171214c4828ca14fd9ade2eeeee47995d
1 #!/bin/sh
2 # Run this to set up the build system: configure, makefiles, etc.
3 # (based on the version in enlightenment's cvs)
5 package="theora-tools"
7 olddir=`pwd`
8 srcdir=`dirname $0`
9 test -z "$srcdir" && srcdir=.
11 cd "$srcdir"
12 DIE=0
14 (autoconf --version) < /dev/null > /dev/null 2>&1 || {
15 echo
16 echo "You must have autoconf installed to compile $package."
17 echo "Download the appropriate package for your distribution,"
18 echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
19 DIE=1
22 (automake --version) < /dev/null > /dev/null 2>&1 || {
23 echo
24 echo "You must have automake installed to compile $package."
25 echo "Download the appropriate package for your system,"
26 echo "or get the source from one of the GNU ftp sites"
27 echo "listed in http://www.gnu.org/order/ftp.html"
28 DIE=1
31 (libtoolize --version) < /dev/null > /dev/null 2>&1 || {
32 echo
33 echo "You must have libtool installed to compile $package."
34 echo "Download the appropriate package for your system,"
35 echo "or get the source from one of the GNU ftp sites"
36 echo "listed in http://www.gnu.org/order/ftp.html"
37 DIE=1
40 if test "$DIE" -eq 1; then
41 exit 1
44 if test -z "$*"; then
45 echo "I am going to run ./configure with no arguments - if you wish "
46 echo "to pass any to it, please specify them on the $0 command line."
49 echo "Generating configuration files for $package, please wait...."
51 test -f aclocal.m4 && rm aclocal.m4
52 echo -n "looking for our m4 macros... "
53 aclocaldirs="$srcdir `aclocal --print-ac-dir` \
54 /usr/local/share/aclocal* /usr/local/aclocal* \
55 /sw/share/aclocal* /usr/share/aclocal*"
56 for dir in $aclocaldirs; do
57 test -d "$dir" && if ! test -z "`ls $dir | grep .m4`"; then
58 if test ! -z "`fgrep XIPH_PATH_OGG $dir/*.m4`"; then
59 echo $dir
60 ACLOCAL_FLAGS="-I $dir $ACLOCAL_FLAGS"
61 break
64 done
65 if test -z "$ACLOCAL_FLAGS"; then
66 echo "nope."
67 echo
68 echo "Please install the ogg and vorbis libraries, or add the"
69 echo "location of ogg.m4 to ACLOCAL_FLAGS in the environment."
70 echo
71 exit 1
75 echo " aclocal $ACLOCAL_FLAGS"
76 aclocal $ACLOCAL_FLAGS
77 echo " autoheader"
78 autoheader
79 echo " libtoolize --automake"
80 libtoolize --automake
81 echo " automake --add-missing $AUTOMAKE_FLAGS"
82 automake --add-missing $AUTOMAKE_FLAGS
83 echo " autoconf"
84 autoconf
86 cd $olddir
87 $srcdir/configure "$@" && echo