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 $WANT_AUTOMAKE 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 version at least $WANT_AUTOMAKE
21 if expr "$WANT_AUTOMAKE" \
> "$automake_version" >/dev
/null
; then
22 automake
--version |
head -n 1
23 echo "Fatal error: automake version $WANT_AUTOMAKE 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.ac | 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.ac.
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 if [ x
$UNAME = x
"Darwin" ]; then
54 echo Not patching po
/Makefile.
in.
in - sed is too old.
57 rm -f *.gmo' po
/Makefile.
in.
in > po
/Makefile.
in.
in.tmp
&& mv -f po
/Makefile.
in.
in.tmp po
/Makefile.
in.
in
59 # if [ -f Makefile -a -x config.status ]; then
60 # CONFIG_FILES=intl/Makefile CONFIG_HEADERS= /bin/sh ./config.status
62 # gettextize --intl -f --no-changelog
63 # echo "restoring Makefile.am and configure.ac"
64 # cp -f Makefile.am~ Makefile.am
65 # cp -f configure.ac~ configure.ac
68 echo "Running aclocal -I m4"
71 echo "Running autoheader"
74 echo "Running autoconf"
77 echo "Creating pixmaps Makefile.am"
79 cd src
/pixmaps
/flags_xpm
83 echo "Running automake --foreign -a -c -f"
84 automake
--foreign -a -c -f