author | sheepluva |
Fri, 25 Jan 2013 12:54:24 +0100 | |
changeset 8432 | f2d57e987ba9 |
parent 7849 | a12155461b34 |
permissions | -rw-r--r-- |
5170
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
1 |
#!/bin/sh |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
2 |
# Run this to set up the build system: configure, makefiles, etc. |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
3 |
# (based on the version in enlightenment's cvs) |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
4 |
|
7849
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
5 |
package="vorbisdec" |
5170
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
6 |
|
7849
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
7 |
olddir=`pwd` |
5170
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
8 |
srcdir=`dirname $0` |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
9 |
test -z "$srcdir" && srcdir=. |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
10 |
|
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
11 |
cd "$srcdir" |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
12 |
DIE=0 |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
13 |
|
7849
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
14 |
echo "checking for autoconf... " |
5170
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
15 |
(autoconf --version) < /dev/null > /dev/null 2>&1 || { |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
16 |
echo |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
17 |
echo "You must have autoconf installed to compile $package." |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
18 |
echo "Download the appropriate package for your distribution," |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
19 |
echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/" |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
20 |
DIE=1 |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
21 |
} |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
22 |
|
7849
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
23 |
VERSIONGREP="sed -e s/.*[^0-9\.]\([0-9]\.[0-9]\).*/\1/" |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
24 |
VERSIONMKINT="sed -e s/[^0-9]//" |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
25 |
|
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
26 |
# do we need automake? |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
27 |
if test -r Makefile.am; then |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
28 |
AM_OPTIONS=`fgrep AUTOMAKE_OPTIONS Makefile.am` |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
29 |
AM_NEEDED=`echo $AM_OPTIONS | $VERSIONGREP` |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
30 |
if test x"$AM_NEEDED" = "x$AM_OPTIONS"; then |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
31 |
AM_NEEDED="" |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
32 |
fi |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
33 |
if test -z $AM_NEEDED; then |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
34 |
echo -n "checking for automake... " |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
35 |
AUTOMAKE=automake |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
36 |
ACLOCAL=aclocal |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
37 |
if ($AUTOMAKE --version < /dev/null > /dev/null 2>&1); then |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
38 |
echo "yes" |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
39 |
else |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
40 |
echo "no" |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
41 |
AUTOMAKE= |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
42 |
fi |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
43 |
else |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
44 |
echo -n "checking for automake $AM_NEEDED or later... " |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
45 |
for am in automake-$AM_NEEDED automake$AM_NEEDED automake; do |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
46 |
($am --version < /dev/null > /dev/null 2>&1) || continue |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
47 |
ver=`$am --version < /dev/null | head -n 1 | $VERSIONGREP | $VERSIONMKINT` |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
48 |
verneeded=`echo $AM_NEEDED | $VERSIONMKINT` |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
49 |
if test $ver -ge $verneeded; then |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
50 |
AUTOMAKE=$am |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
51 |
echo $AUTOMAKE |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
52 |
break |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
53 |
fi |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
54 |
done |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
55 |
test -z $AUTOMAKE && echo "no" |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
56 |
echo -n "checking for aclocal $AM_NEEDED or later... " |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
57 |
for ac in aclocal-$AM_NEEDED aclocal$AM_NEEDED aclocal; do |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
58 |
($ac --version < /dev/null > /dev/null 2>&1) || continue |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
59 |
ver=`$ac --version < /dev/null | head -n 1 | $VERSIONGREP | $VERSIONMKINT` |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
60 |
verneeded=`echo $AM_NEEDED | $VERSIONMKINT` |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
61 |
if test $ver -ge $verneeded; then |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
62 |
ACLOCAL=$ac |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
63 |
echo $ACLOCAL |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
64 |
break |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
65 |
fi |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
66 |
done |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
67 |
test -z $ACLOCAL && echo "no" |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
68 |
fi |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
69 |
test -z $AUTOMAKE || test -z $ACLOCAL && { |
5170
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
70 |
echo |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
71 |
echo "You must have automake installed to compile $package." |
7849
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
72 |
echo "Download the appropriate package for your distribution," |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
73 |
echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/" |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
74 |
exit 1 |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
75 |
} |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
76 |
fi |
5170
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
77 |
|
7849
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
78 |
echo -n "checking for libtool... " |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
79 |
for LIBTOOLIZE in libtoolize glibtoolize nope; do |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
80 |
($LIBTOOLIZE --version) < /dev/null > /dev/null 2>&1 && break |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
81 |
done |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
82 |
if test x$LIBTOOLIZE = xnope; then |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
83 |
echo "nope." |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
84 |
LIBTOOLIZE=libtoolize |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
85 |
else |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
86 |
echo $LIBTOOLIZE |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
87 |
fi |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
88 |
($LIBTOOLIZE --version) < /dev/null > /dev/null 2>&1 || { |
5170
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
89 |
echo |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
90 |
echo "You must have libtool installed to compile $package." |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
91 |
echo "Download the appropriate package for your system," |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
92 |
echo "or get the source from one of the GNU ftp sites" |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
93 |
echo "listed in http://www.gnu.org/order/ftp.html" |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
94 |
DIE=1 |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
95 |
} |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
96 |
|
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
97 |
if test "$DIE" -eq 1; then |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
98 |
exit 1 |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
99 |
fi |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
100 |
|
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
101 |
if test -z "$*"; then |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
102 |
echo "I am going to run ./configure with no arguments - if you wish " |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
103 |
echo "to pass any to it, please specify them on the $0 command line." |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
104 |
fi |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
105 |
|
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
106 |
echo "Generating configuration files for $package, please wait...." |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
107 |
|
7849
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
108 |
echo " $ACLOCAL $ACLOCAL_FLAGS" |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
109 |
$ACLOCAL $ACLOCAL_FLAGS || exit 1 |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
110 |
echo " $LIBTOOLIZE --automake" |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
111 |
$LIBTOOLIZE --automake || exit 1 |
5170
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
112 |
echo " autoheader" |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
113 |
autoheader || exit 1 |
7849
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
114 |
echo " $AUTOMAKE --add-missing $AUTOMAKE_FLAGS" |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
115 |
$AUTOMAKE --add-missing $AUTOMAKE_FLAGS || exit 1 |
5170
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
116 |
echo " autoconf" |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
117 |
autoconf || exit 1 |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
118 |
|
7849
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
119 |
cd $olddir |
a12155461b34
revert r767d3c4153a1 this tremor implementation is buggy
koda
parents:
7697
diff
changeset
|
120 |
$srcdir/configure --enable-maintainer-mode "$@" && echo |