File: autogen.sh

package info (click to toggle)
amule 1%3A2.3.3-3.2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 26,632 kB
  • sloc: cpp: 115,463; ansic: 8,603; sh: 6,244; makefile: 1,695; php: 1,680; perl: 958; yacc: 820; ruby: 729; objc: 692; lex: 626; java: 413; xml: 27; python: 26; awk: 21; sed: 16
file content (84 lines) | stat: -rwxr-xr-x 3,052 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#!/bin/sh
# Helps bootstrapping 'aMule' when checked out from the source control system.
# Requires GNU autoconf, GNU automake and GNU which.

WANT_AUTOMAKE="1.9"
export WANT_AUTOMAKE
(autoconf --version) >/dev/null 2>/dev/null || (echo "You need GNU autoconf to install from sources (ftp://ftp.gnu.org/gnu/autoconf/)"; exit 1) || exit 1
(automake --version) >/dev/null 2>/dev/null || (echo "You need GNU automake $WANT_AUTOMAKE to install from sources (ftp://ftp.gnu.org/gnu/automake/)"; exit 1) || exit 1

# Do sanity checks.
# Directory check.
if [ ! -e src/SharedFileList.h ]; then
    echo "Run ./autogen.sh from the base directory of aMule."
    exit 1
fi

# Determine the version of automake.
automake_version=`automake --version | head -n 1 | sed -e 's/[^12]*\([12]\.[0-9]+[^ ]*\).*/\1/'`

# Require automake version at least $WANT_AUTOMAKE
if expr "$WANT_AUTOMAKE" \> "$automake_version" >/dev/null; then
  automake --version | head -n 1
  echo "Fatal error: automake version $WANT_AUTOMAKE or higher is required."
  exit 1
fi

# Determine version of gettext.
gettext_version=`gettext --version | head -n 1 | sed -e 's/[^0]*\(0\.[0-9][^ ]*\).*/\1/'`
confver=`cat configure.ac | grep '^AM_GNU_GETTEXT_VERSION(' | sed -e 's/^AM_GNU_GETTEXT_VERSION(\([^()]*\))/\1/p' | sed -e 's/^\[\(.*\)\]$/\1/' | sed -e 1q`

# Require version as specified in configure.ac.
if expr "$confver" \> "$gettext_version" >/dev/null; then
  gettext --version | head -n 1
  echo "Fatal error: gettext version "$confver" or higher is required."
  exit 1
fi

# Force intl regenration to get last update from installed gettext templates
rm -rf intl/*
#if [ ! -d intl ]; then
    echo "Setting up internationalization files."
    autopoint --force
    if grep -q datarootdir po/Makefile.in.in; then
        echo autopoint honors dataroot variable, not patching.
    else
	echo autopoint does not honor dataroot variable, patching.
        sed -e '/^datadir *=/a\
datarootdir = @datarootdir@' po/Makefile.in.in > po/Makefile.in.in.tmp && mv -f po/Makefile.in.in.tmp po/Makefile.in.in
        sed -e '/^datadir *=/a\
datarootdir = @datarootdir@' intl/Makefile.in > intl/Makefile.in.tmp && mv -f intl/Makefile.in.tmp intl/Makefile.in
    fi
UNAME=`uname`
if [ x$UNAME = x"Darwin" ]; then
    echo Not patching po/Makefile.in.in - sed is too old.
else
    sed -e '/^clean:/a\
	rm -f *.gmo' po/Makefile.in.in > po/Makefile.in.in.tmp && mv -f po/Makefile.in.in.tmp po/Makefile.in.in
fi
#    if [ -f Makefile -a -x config.status ]; then
#        CONFIG_FILES=intl/Makefile CONFIG_HEADERS= /bin/sh ./config.status
#    fi
#   gettextize --intl -f --no-changelog
#   echo "restoring Makefile.am and configure.ac"
#   cp -f Makefile.am~ Makefile.am
#   cp -f configure.ac~ configure.ac
#fi

echo "Running aclocal -I m4"
aclocal -I m4

echo "Running autoheader"
autoheader

echo "Running autoconf"
autoconf

echo "Creating pixmaps Makefile.am"
OLDPWD="`pwd`"
cd src/pixmaps/flags_xpm
./makeflags.sh
cd "$OLDPWD"

echo "Running automake --foreign -a -c -f"
automake --foreign -a -c -f