2 # Helps bootstrapping 'aMule' when checked out from the source control system.
3 # Requires GNU autoconf, GNU automake and GNU which.
7 (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
8 (automake
--version) >/dev
/null
2>/dev
/null ||
(echo "You need GNU automake 1.7 to install from sources (ftp://ftp.gnu.org/gnu/automake/)"; exit 1) ||
exit 1
12 if [ ! -e src
/SharedFileList.h
]; then
13 echo "Run ./autogen.sh from the base directory of aMule."
17 # Determine the version of automake.
18 automake_version
=`automake --version | head -n 1 | sed -e 's/[^12]*\([12]\.[0-9]+[^ ]*\).*/\1/'`
20 # Require automake 1.7.
21 if expr "1.7" \
> "$automake_version" >/dev
/null
; then
22 automake
--version |
head -n 1
23 echo "Fatal error: automake version 1.7 or higher is required."
27 # Determine version of gettext.
28 gettext_version
=`gettext --version | head -n 1 | sed -e 's/[^0]*\(0\.[0-9][^ ]*\).*/\1/'`
29 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`
31 # Require version as specified in configure.in.
32 if expr "$confver" \
> "$gettext_version" >/dev
/null
; then
33 gettext --version |
head -n 1
34 echo "Fatal error: gettext version "$confver" or higher is required."
38 # Force intl regenration to get last update from installed gettext templates
40 #if [ ! -d intl ]; then
41 echo "Setting up internationalization files."
43 if grep -q datarootdir po
/Makefile.
in.
in; then
44 echo autopoint honors dataroot variable
, not patching.
46 echo autopoint does not honor dataroot variable
, patching.
47 sed -e '/^datadir *=/a\
48 datarootdir = @datarootdir@' po
/Makefile.
in.
in > po
/Makefile.
in.
in.tmp
&& mv -f po
/Makefile.
in.
in.tmp po
/Makefile.
in.
in
49 sed -e '/^datadir *=/a\
50 datarootdir = @datarootdir@' intl
/Makefile.
in > intl
/Makefile.
in.tmp
&& mv -f intl
/Makefile.
in.tmp intl
/Makefile.
in
53 rm -f *.gmo' po
/Makefile.
in.
in > po
/Makefile.
in.
in.tmp
&& mv -f po
/Makefile.
in.
in.tmp po
/Makefile.
in.
in
54 # if [ -f Makefile -a -x config.status ]; then
55 # CONFIG_FILES=intl/Makefile CONFIG_HEADERS= /bin/sh ./config.status
57 # gettextize --intl -f --no-changelog
58 # echo "restoring Makefile.am and configure.in"
59 # cp -f Makefile.am~ Makefile.am
60 # cp -f configure.in~ configure.in
63 echo "Running aclocal -I m4"
66 echo "Running autoheader"
69 echo "Running autoconf"
72 echo "Creating pixmaps Makefile.am"
73 pushd $
(pwd) > /dev
/null
74 cd src
/pixmaps
/flags_xpm
78 echo "Running automake --foreign -a -c -f"
79 automake
--foreign -a -c -f