~ubuntu-branches/ubuntu/vivid/libmtp/vivid

« back to all changes in this revision

Viewing changes to autogen.sh

  • Committer: Package Import Robot
  • Author(s): Alessio Treglia
  • Date: 2012-06-21 10:44:53 UTC
  • mfrom: (16.2.12 experimental)
  • Revision ID: package-import@ubuntu.com-20120621104453-e9xhmt1aambphgfv
Tags: 1.1.3-24-g9aca343-3
Upload to unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
#set -e
 
3
 
 
4
srcdir=`dirname $0`
 
5
 
 
6
ACLOCAL_FLAGS="-I ${srcdir}/m4 ${ACLOCAL_FLAGS}"
 
7
 
 
8
fail() {
 
9
    status=$?
 
10
    echo "Last command failed with status $status in directory $(pwd)."
 
11
    echo "Aborting"
 
12
    exit $status
 
13
}
 
14
 
 
15
# Refresh GNU autotools toolchain: libtool
 
16
echo "Removing libtool cruft"
 
17
rm -f ltmain.sh config.guess config.sub
 
18
echo "Running libtoolize"
 
19
libtoolize --copy --force || fail
 
20
 
 
21
# Refresh GNU autotools toolchain: aclocal autoheader
 
22
echo "Removing aclocal cruft"
 
23
rm -f aclocal.m4
 
24
echo "Running aclocal $ACLOCAL_FLAGS"
 
25
aclocal $ACLOCAL_FLAGS || fail
 
26
echo "Removing autoheader cruft"
 
27
rm -f config.h.in src/config.h.in
 
28
echo "Running autoheader"
 
29
autoheader || fail
 
30
 
 
31
# Refresh GNU autotools toolchain: automake
 
32
echo "Removing automake cruft"
 
33
rm -f depcomp install-sh missing mkinstalldirs
 
34
rm -f stamp-h*
 
35
echo "Running automake"
 
36
touch config.rpath
 
37
automake --add-missing --gnu || fail
 
38
 
 
39
# Refresh GNU autotools toolchain: autoconf
 
40
echo "Removing autoconf cruft"
 
41
rm -f configure
 
42
rm -rf autom4te*.cache/
 
43
echo "Running autoconf"
 
44
autoconf
 
45
 
 
46
# Autoupdate config.sub and config.guess 
 
47
# from GNU CVS
 
48
WGET=`which wget`
 
49
if [ "x$WGET" != "x" ]; then
 
50
    echo "Autoupdate config.sub and config.guess (y/n)?"
 
51
    read IN
 
52
    if [ "$IN" = "y" ] || [ "$IN" = "Y" ]; then
 
53
        wget -O tmpfile http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
 
54
        mv tmpfile config.guess
 
55
        wget -O tmpfile http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
 
56
        mv tmpfile config.sub
 
57
    fi
 
58
else
 
59
    echo "Could not autoupdate config.sub and config.guess"
 
60
fi
 
61
 
 
62
echo "Finished!"
 
63