11#! /bin/sh
22# Run this to set up the build system: configure, makefiles, etc.
3- # (based on the version in enlightenment's cvs)
3+ set -e
44
5- package=" icecast"
6-
7- olddir=` pwd`
85srcdir=` 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- if command libtoolize --version 2> /dev/null; then
74- USE_GLIBTOOLIZE=0
75- else
76- if command glibtoolize --version 2> /dev/null; then
77- USE_GLIBTOOLIZE=1
78- else
79- echo
80- echo " You must have libtool installed to compile $package ."
81- echo " Download the appropriate package for your system,"
82- echo " or get the source from one of the GNU ftp sites"
83- echo " listed in http://www.gnu.org/order/ftp.html"
84- DIE=1
85- fi
86- fi
87-
88- if test " $DIE " -eq 1; then
89- exit 1
90- fi
91-
92- echo " Generating configuration files for $package , please wait...."
93-
94- ACLOCAL_FLAGS=" $ACLOCAL_FLAGS -I m4"
95- if test -n " $ACLOCAL " ; then
96- echo " $ACLOCAL $ACLOCAL_FLAGS "
97- $ACLOCAL $ACLOCAL_FLAGS
98- fi
99-
100- echo " autoheader"
101- autoheader
102-
103- if test " $USE_GLIBTOOLIZE " -eq 0; then
104- echo " libtoolize --automake"
105- libtoolize --automake
106- else
107- echo " glibtoolize --automake"
108- glibtoolize --automake
109- fi
110-
111- if test -n " $AUTOMAKE " ; then
112- echo " $AUTOMAKE --add-missing"
113- $AUTOMAKE --add-missing
114- fi
6+ test -n " $srcdir " && cd " $srcdir "
1157
116- echo " autoconf"
117- autoconf
8+ echo " Updating build configuration files for Icecast, please wait...."
1189
119- if test -z " $* " ; then
120- echo " I am going to run ./configure with no arguments - if you wish "
121- echo " to pass any to it, please specify them on the $0 command line."
122- fi
123- cd $olddir
124- $srcdir /configure " $@ " && echo
10+ autoreconf -isf
0 commit comments