3 # Run the various GNU autotools to bootstrap the build
4 # system. Should only need to be done once.
6 # for now avoid using bash as not everyone has that installed
10 ############################################################################
15 echo "Checking autopoint version..."
16 ver
=`autopoint --version | awk '{print $NF; exit}'`
17 ap_maj
=`echo $ver | sed 's;\..*;;g'`
18 ap_min
=`echo $ver | sed -e 's;^[0-9]*\.;;g' -e 's;\..*$;;g'`
19 ap_teeny
=`echo $ver | sed -e 's;^[0-9]*\.[0-9]*\.;;g'`
24 if test $ap_min -lt 14 ; then
25 echo "You must have gettext >= 0.14.0 but you seem to have $ver"
30 echo "Running autopoint..."
31 autopoint
--force ||
exit 1
33 ############################################################################
35 # intltoolize (intltool)
38 echo "Checking intltoolize version..."
39 it_ver
=`intltoolize --version | awk '{print $NF; exit}'`
40 it_maj
=`echo $it_ver | sed 's;\..*;;g'`
41 it_min
=`echo $it_ver | sed -e 's;^[0-9]*\.;;g' -e 's;\..*$;;g'`
42 it_teeny
=`echo $it_ver | sed -e 's;^[0-9]*\.[0-9]*\.;;g'`
47 if test $it_min -lt 35 ; then
48 echo "You must have intltool >= 0.35.0 but you seem to have $it_ver"
53 echo "Running intltoolize..."
54 echo "no" | intltoolize
--force --copy --automake ||
exit 1
56 echo "Patching some intltoolize output"
58 # both intltoolize and autopoint create a po/Makefile.in.in, this can't be good...
59 # but intltoolize seems to have some bugs in it. In particular, XGETTEXT and MSGFMT
60 # are set in the Makefile but not passed down when calling MSGMERGE or GENPOT.
61 # This defeats specifying the path to xgettext and msgfmt. Also
62 # we don't have a ChangeLog in the po/ directory right now so don't let
63 # intltool try to include it in the distfile.
65 mv po
/Makefile.
in.
in po
/Makefile.
in.
in.orig
67 -e 's/^MSGMERGE *=/MSGMERGE = XGETTEXT=\${XGETTEXT} MSGFMT=\${MSGFMT} /g' \
68 -e 's/^GENPOT *=/GENPOT = XGETTEXT=\${XGETTEXT} MSGFMT=\${MSGFMT} /g' \
70 po
/Makefile.
in.
in.orig
> po
/Makefile.
in.
in
75 make -C ../src \$@" >> po
/Makefile.
in.
in
77 rm -f po
/Makefile.
in.
in.orig
79 ############################################################################
81 # automake/autoconf stuff
84 echo "Running aclocal..."
85 aclocal
-I m4 $ACLOCAL_FLAGS ||
exit 1
86 echo "Done with aclocal"
88 echo "Running autoheader..."
90 echo "Done with autoheader"
92 echo "Running automake..."
93 automake
-a -c --foreign ||
exit 1
94 echo "Done with automake"
96 echo "Running autoconf..."
98 echo "Done with autoconf"
100 ############################################################################
105 echo "You must now run configure"
107 echo "All done with autogen.sh"