Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/libvorbis-1.2.0/autogen.sh @ 62

Last change on this file since 62 was 16, checked in by landauf, 17 years ago

added libvorbis

  • Property svn:executable set to *
File size: 3.8 KB
Line 
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
5package="vorbis"
6
7olddir=`pwd`
8srcdir=`dirname $0`
9test -z "$srcdir" && srcdir=.
10
11cd "$srcdir"
12DIE=0
13
14echo "checking for autoconf... "
15(autoconf --version) < /dev/null > /dev/null 2>&1 || {
16        echo
17        echo "You must have autoconf installed to compile $package."
18        echo "Download the appropriate package for your distribution,"
19        echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
20        DIE=1
21}
22
23VERSIONGREP="sed -e s/.*[^0-9\.]\([0-9][0-9]*\.[0-9][0-9]*\).*/\1/"
24VERSIONMKMAJ="sed -e s/\([0-9][0-9]*\)[^0-9].*/\\1/"
25VERSIONMKMIN="sed -e s/.*[0-9][0-9]*\.//"
26
27# do we need automake?
28if test -r Makefile.am; then
29  AM_OPTIONS=`fgrep AUTOMAKE_OPTIONS Makefile.am`
30  AM_NEEDED=`echo $AM_OPTIONS | $VERSIONGREP`
31  if test x"$AM_NEEDED" = "x$AM_OPTIONS"; then
32    AM_NEEDED=""
33  fi
34  if test -z $AM_NEEDED; then
35    echo -n "checking for automake... "
36    AUTOMAKE=automake
37    ACLOCAL=aclocal
38    if ($AUTOMAKE --version < /dev/null > /dev/null 2>&1); then
39      echo "yes"
40    else
41      echo "no"
42      AUTOMAKE=
43    fi
44  else
45    echo -n "checking for automake $AM_NEEDED or later... "
46    majneeded=`echo $AM_NEEDED | $VERSIONMKMAJ`
47    minneeded=`echo $AM_NEEDED | $VERSIONMKMIN`
48    for am in automake-$AM_NEEDED automake$AM_NEEDED \
49        automake automake-1.7 automake-1.8 automake-1.9 automake-1.10; do
50      ($am --version < /dev/null > /dev/null 2>&1) || continue
51      ver=`$am --version < /dev/null | head -n 1 | $VERSIONGREP`
52      maj=`echo $ver | $VERSIONMKMAJ`
53      min=`echo $ver | $VERSIONMKMIN`
54      if test $maj -eq $majneeded -a $min -ge $minneeded; then
55        AUTOMAKE=$am
56        echo $AUTOMAKE
57        break
58      fi
59    done
60    test -z $AUTOMAKE &&  echo "no"
61    echo -n "checking for aclocal $AM_NEEDED or later... "
62    for ac in aclocal-$AM_NEEDED aclocal$AM_NEEDED \
63        aclocal aclocal-1.7 aclocal-1.8 aclocal-1.9 aclocal-1.10; do
64      ($ac --version < /dev/null > /dev/null 2>&1) || continue
65      ver=`$ac --version < /dev/null | head -n 1 | $VERSIONGREP`
66      maj=`echo $ver | $VERSIONMKMAJ`
67      min=`echo $ver | $VERSIONMKMIN`
68      if test $maj -eq $majneeded -a $min -ge $minneeded; then
69        ACLOCAL=$ac
70        echo $ACLOCAL
71        break
72      fi
73    done
74    test -z $ACLOCAL && echo "no"
75  fi
76  test -z $AUTOMAKE || test -z $ACLOCAL && {
77        echo
78        echo "You must have automake installed to compile $package."
79        echo "Download the appropriate package for your distribution,"
80        echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
81        exit 1
82  }
83fi
84
85echo -n "checking for libtool... "
86for LIBTOOLIZE in libtoolize glibtoolize nope; do
87  ($LIBTOOLIZE --version) < /dev/null > /dev/null 2>&1 && break
88done
89if test x$LIBTOOLIZE = xnope; then
90  echo "nope."
91  LIBTOOLIZE=libtoolize
92else
93  echo $LIBTOOLIZE
94fi
95($LIBTOOLIZE --version) < /dev/null > /dev/null 2>&1 || {
96        echo
97        echo "You must have libtool installed to compile $package."
98        echo "Download the appropriate package for your system,"
99        echo "or get the source from one of the GNU ftp sites"
100        echo "listed in http://www.gnu.org/order/ftp.html"
101        DIE=1
102}
103
104if test "$DIE" -eq 1; then
105        exit 1
106fi
107
108if 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."
111fi
112
113echo "Generating configuration files for $package, please wait...."
114
115echo $ACLOCAL $ACLOCAL_FLAGS"
116$ACLOCAL $ACLOCAL_FLAGS || exit 1
117echo $LIBTOOLIZE --automake"
118$LIBTOOLIZE --automake || exit 1
119echo "  autoheader"
120autoheader || exit 1
121echo $AUTOMAKE --add-missing $AUTOMAKE_FLAGS"
122$AUTOMAKE --add-missing $AUTOMAKE_FLAGS || exit 1
123echo "  autoconf"
124autoconf || exit 1
125
126cd $olddir
127$srcdir/configure --enable-maintainer-mode "$@" && echo
Note: See TracBrowser for help on using the repository browser.