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
74 # Add rule for .res file processing
77 \$(INTLTOOL_EXTRACT) --type=gettext/quoted $^" >> po
/Makefile.
in.
in
79 rm -f po
/Makefile.
in.
in.orig
81 ############################################################################
83 # automake/autoconf stuff
86 echo "Running aclocal..."
87 aclocal
-I m4 $ACLOCAL_FLAGS ||
exit 1
88 echo "Done with aclocal"
90 echo "Running autoheader..."
92 echo "Done with autoheader"
94 echo "Running automake..."
95 automake
-a -c --foreign ||
exit 1
96 echo "Done with automake"
98 echo "Running autoconf..."
100 echo "Done with autoconf"
102 ############################################################################
107 echo "You must now run configure"
109 echo "All done with autogen.sh"