5 # Run the various GNU autotools to bootstrap the build
6 # system. Should only need to be done once.
8 # for now avoid using bash as not everyone has that installed
12 ############################################################################
17 echo "Checking autopoint version..."
18 ver
=`autopoint --version | awk '{print $NF; exit}'`
19 ap_maj
=`echo $ver | sed 's;\..*;;g'`
20 ap_min
=`echo $ver | sed -e 's;^[0-9]*\.;;g' -e 's;\..*$;;g'`
21 ap_teeny
=`echo $ver | sed -e 's;^[0-9]*\.[0-9]*\.;;g'`
26 if test $ap_min -lt 14 ; then
27 echo "You must have gettext >= 0.14.0 but you seem to have $ver"
32 echo "Running autopoint..."
33 autopoint
--force ||
exit 1
35 ############################################################################
37 # intltoolize (intltool)
40 echo "Checking intltoolize version..."
41 it_ver
=`intltoolize --version | awk '{print $NF; exit}'`
42 it_maj
=`echo $it_ver | sed 's;\..*;;g'`
43 it_min
=`echo $it_ver | sed -e 's;^[0-9]*\.;;g' -e 's;\..*$;;g'`
44 it_teeny
=`echo $it_ver | sed -e 's;^[0-9]*\.[0-9]*\.;;g'`
49 if test $it_min -lt 35 ; then
50 echo "You must have intltool >= 0.35.0 but you seem to have $it_ver"
55 echo "Running intltoolize..."
56 echo "no" | intltoolize
--force --copy --automake ||
exit 1
58 echo "Patching some intltoolize output"
60 # both intltoolize and autopoint create a po/Makefile.in.in, this can't be good...
61 # but intltoolize seems to have some bugs in it. In particular, XGETTEXT and MSGFMT
62 # are set in the Makefile but not passed down when calling MSGMERGE or GENPOT.
63 # This defeats specifying the path to xgettext and msgfmt. Also
64 # we don't have a ChangeLog in the po/ directory right now so don't let
65 # intltool try to include it in the distfile.
67 mv po
/Makefile.
in.
in po
/Makefile.
in.
in.orig
69 -e 's/^MSGMERGE *=/MSGMERGE = XGETTEXT=\${XGETTEXT} MSGFMT=\${MSGFMT} /g' \
70 -e 's/^GENPOT *=/GENPOT = XGETTEXT=\${XGETTEXT} MSGFMT=\${MSGFMT} /g' \
72 po
/Makefile.
in.
in.orig
> po
/Makefile.
in.
in
73 rm -f po
/Makefile.
in.
in.orig
75 ############################################################################
77 # automake/autoconf stuff
80 echo "Running aclocal..."
81 aclocal
$ACLOCAL_FLAGS ||
exit 1
82 echo "Done with aclocal"
84 echo "Running autoheader..."
86 echo "Done with autoheader"
88 echo "Running automake..."
89 automake
-a -c --foreign ||
exit 1
90 echo "Done with automake"
92 echo "Running autoconf..."
94 echo "Done with autoconf"
96 ############################################################################
101 echo "You must now run configure"
103 echo "All done with autogen.sh"