2 # Helps bootstrapping 'aMule' when checked out from CVS.
3 # Requires GNU autoconf, GNU automake and GNU which.
5 export WANT_AUTOMAKE
="1.7"
6 (autoconf
--version) >/dev
/null
2>/dev
/null ||
(echo "You need GNU autoconf to install from CVS (ftp://ftp.gnu.org/gnu/autoconf/)"; exit 1) ||
exit 1
7 (automake
--version) >/dev
/null
2>/dev
/null ||
(echo "You need GNU automake 1.7 to install from CVS (ftp://ftp.gnu.org/gnu/automake/)"; exit 1) ||
exit 1
11 if [ ! -e src
/SharedFileList.h
]; then
12 echo "Run ./autogen.sh from the base directory of aMule."
16 # Determine the version of automake.
17 automake_version
=`automake --version | head -n 1 | sed -e 's/[^12]*\([12]\.[0-9]+[^ ]*\).*/\1/'`
19 # Require automake 1.7.
20 if expr "1.7" \
> "$automake_version" >/dev
/null
; then
21 automake
--version |
head -n 1
22 echo "Fatal error: automake version 1.7 or higher is required."
26 # Determine version of gettext.
27 gettext_version
=`gettext --version | head -n 1 | sed -e 's/[^0]*\(0\.[0-9][^ ]*\).*/\1/'`
28 confver
=`cat configure.in | grep '^AM_GNU_GETTEXT_VERSION(' | sed -e 's/^AM_GNU_GETTEXT_VERSION(\([^()]*\))/\1/p' | sed -e 's/^\[\(.*\)\]$/\1/' | sed -e 1q`
30 # Require version as specified in configure.in.
31 if expr "$confver" \
> "$gettext_version" >/dev
/null
; then
32 gettext --version |
head -n 1
33 echo "Fatal error: gettext version "$confver" or higher is required."
37 # Force intl regenration to get last update from installed gettext templates
39 #if [ ! -d intl ]; then
40 echo "Setting up internationalization files."
42 if grep -q datarootdir po
/Makefile.
in.
in; then
43 echo autopoint honors dataroot variable
, not patching.
45 echo autopoint does not honor dataroot variable
, patching.
46 sed -e 's/^datadir *=\(.*\)/datarootdir = @datarootdir@\ndatadir = @datadir@/g' po
/Makefile.
in.
in > po
/Makefile.
in.
in.tmp
&& mv -f po
/Makefile.
in.
in.tmp po
/Makefile.
in.
in
47 sed -e 's/^datadir *=\(.*\)/datarootdir = @datarootdir@\ndatadir = @datadir@/g' intl
/Makefile.
in > intl
/Makefile.
in.tmp
&& mv -f intl
/Makefile.
in.tmp intl
/Makefile.
in
49 # if [ -f Makefile -a -x config.status ]; then
50 # CONFIG_FILES=intl/Makefile CONFIG_HEADERS= /bin/sh ./config.status
52 # gettextize --intl -f --no-changelog
53 # echo "restoring Makefile.am and configure.in"
54 # cp -f Makefile.am~ Makefile.am
55 # cp -f configure.in~ configure.in
58 echo "Running aclocal -I m4"
61 echo "Running autoheader"
64 echo "Running autoconf"
67 echo "Creating pixmaps Makefile.am"
68 pushd $
(pwd) > /dev
/null
69 cd src
/pixmaps
/flags_xpm
73 echo "Running automake --foreign -a -c -f"
74 automake
--foreign -a -c -f