Regenerate rats r-tree when re-allocating a bigger rats array.
[geda-pcb/gde.git] / autogen.sh
blobd1671fbcdfbc37e9829f249bfee1c63ba5a70d3e
1 #! /bin/sh
3 # $Id$
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
9 CONFIG_SHELL=/bin/sh
10 export CONFIG_SHELL
12 ############################################################################
14 # autopoint (gettext)
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'`
22 echo " $ver"
24 case $ap_maj in
26 if test $ap_min -lt 14 ; then
27 echo "You must have gettext >= 0.14.0 but you seem to have $ver"
28 exit 1
31 esac
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'`
45 echo " $it_ver"
47 case $it_maj in
49 if test $it_min -lt 35 ; then
50 echo "You must have intltool >= 0.35.0 but you seem to have $it_ver"
51 exit 1
54 esac
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
68 sed \
69 -e 's/^MSGMERGE *=/MSGMERGE = XGETTEXT=\${XGETTEXT} MSGFMT=\${MSGFMT} /g' \
70 -e 's/^GENPOT *=/GENPOT = XGETTEXT=\${XGETTEXT} MSGFMT=\${MSGFMT} /g' \
71 -e 's/ChangeLog//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..."
85 autoheader || exit 1
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..."
93 autoconf || exit 1
94 echo "Done with autoconf"
96 ############################################################################
98 # finish up
101 echo "You must now run configure"
103 echo "All done with autogen.sh"