toporouter.c: Re-arrange the maths in {vertices,coords}_on_line()
[geda-pcb/pcjc2.git] / autogen.sh
blob166a3d05d1dd1cf1a60cb6d2853f1f09d7d6bab9
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
74 # Add rule for .res file processing
75 echo "
76 %.res.h: %.res
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..."
91 autoheader || exit 1
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..."
99 autoconf || exit 1
100 echo "Done with autoconf"
102 ############################################################################
104 # finish up
107 echo "You must now run configure"
109 echo "All done with autogen.sh"