Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100755 114 lines (99 sloc) 3.364 kB
76a7569 first commit
karl Heyes authored
1 #!/bin/sh
2 # Run this to set up the build system: configure, makefiles, etc.
3 # (based on the version in enlightenment's cvs)
4
5 package="icecast"
6
7 olddir=`pwd`
8 srcdir=`dirname $0`
9 test -z "$srcdir" && srcdir=.
10
11 cd "$srcdir"
12 DIE=0
13
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
20 }
21 VERSIONGREP="sed -e s/.*[^0-9\.]\([0-9]\.[0-9]\).*/\1/"
22
23 # do we need automake?
24 if test -r Makefile.am; then
25 echo Checking for automake version
26 options=`fgrep AUTOMAKE_OPTIONS Makefile.am`
27 AM_NEEDED=`echo "$options" | $VERSIONGREP`
28 AM_PROGS=automake
29 AC_PROGS=aclocal
30 if test -n "$AM_NEEDED" && test "x$AM_NEEDED" != "x$options"
31 then
32 AM_PROGS="automake-$AM_NEEDED automake$AM_NEEDED $AM_PROGS"
33 AC_PROGS="aclocal-$AM_NEEDED aclocal$AM_NEEDED $AC_PROGS"
34 else
35 AM_NEEDED=""
36 fi
37 AM_PROGS="$AUTOMAKE $AM_PROGS"
38 AC_PROGS="$ACLOCAL $AC_PROGS"
39 for am in $AM_PROGS; do
40 ($am --version > /dev/null 2>&1) 2>/dev/null || continue
41 ver=`$am --version | head -1 | $VERSIONGREP`
42 AWK_RES=`echo $ver $AM_NEEDED | awk '{ if ( $1 >= $2 ) print "yes"; else print "no" }'`
43 if test "$AWK_RES" = "yes"; then
44 AUTOMAKE=$am
45 echo " found $AUTOMAKE"
46 break
47 fi
48 done
49 for ac in $AC_PROGS; do
50 ($ac --version > /dev/null 2>&1) 2>/dev/null || continue
51 ver=`$ac --version < /dev/null | head -1 | $VERSIONGREP`
52 AWK_RES=`echo $ver $AM_NEEDED | awk '{ if ( $1 >= $2 ) print "yes"; else print "no" }'`
53 if test "$AWK_RES" = "yes"; then
54 ACLOCAL=$ac
55 echo " found $ACLOCAL"
56 break
57 fi
58 done
59 test -z $AUTOMAKE || test -z $ACLOCAL && {
60 echo
61 if test -n "$AM_NEEDED"; then
62 echo "You must have automake version $AM_NEEDED installed"
63 echo "to compile $package."
64 else
65 echo "You must have automake installed to compile $package."
66 fi
67 echo "Download the appropriate package for your distribution,"
68 echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
69 DIE=1
70 }
71 fi
72
73 (libtoolize --version) > /dev/null 2>&1 || {
74 echo
75 echo "You must have libtool installed to compile $package."
76 echo "Download the appropriate package for your system,"
77 echo "or get the source from one of the GNU ftp sites"
78 echo "listed in http://www.gnu.org/order/ftp.html"
79 DIE=1
80 }
81
82 if test "$DIE" -eq 1; then
83 exit 1
84 fi
85
86 echo "Generating configuration files for $package, please wait...."
87
88 ACLOCAL_FLAGS="$ACLOCAL_FLAGS -I m4"
89 if test -n "$ACLOCAL"; then
90 echo " $ACLOCAL $ACLOCAL_FLAGS"
91 $ACLOCAL $ACLOCAL_FLAGS
92 fi
93
94 echo " autoheader"
95 autoheader
96
0f1dfb5 @karlheyes make sure we have files and not symlinks
authored
97 echo " libtoolize"
98 libtoolize --automake --copy
76a7569 first commit
karl Heyes authored
99
100 if test -n "$AUTOMAKE"; then
0f1dfb5 @karlheyes make sure we have files and not symlinks
authored
101 echo " $AUTOMAKE"
102 $AUTOMAKE --add-missing --copy
76a7569 first commit
karl Heyes authored
103 fi
104
105 echo " autoconf"
106 autoconf
107
108 if test -z "$*"; then
109 echo "I am going to run ./configure with no arguments - if you wish "
110 echo "to pass any to it, please specify them on the $0 command line."
111 fi
112 cd $olddir
113 $srcdir/configure "$@" && echo
Something went wrong with that request. Please try again.