Commits
David B. Evans authored 921a1f38206
1 + | |
2 + | # |
3 + | # autogen.sh glue for Grisbi |
4 + | # $Id: autogen.sh,v 1.15 2009/08/23 07:27:46 pbiava Exp $ |
5 + | # |
6 + | # Requires: automake, autoconf, dpkg-dev |
7 + | |
8 + | # |
9 + | # Check if autoconf and automake are installed |
10 + | # |
11 + | autoconf --version >/dev/null 2>&1 |
12 + | if [ $? -ne 0 ] ; then |
13 + | echo "Please install autoconf and rerun this script !" |
14 + | exit 1 |
15 + | fi |
16 + | automake --version >/dev/null 2>&1 |
17 + | if [ $? -ne 0 ] ; then |
18 + | echo "Please install automake and rerun this script !" |
19 + | exit 1 |
20 + | fi |
21 + | echo "automake and autoconf are installed" |
22 + | |
23 + | # test for some distribution... |
24 + | |
25 + | PATH_AUTOMAKE=$(ls -1d /usr/share/automake* 2>/dev/null | sort -gbu | tail -1) |
26 + | |
27 + | if ! test -x $PATH_AUTOMAKE |
28 + | then |
29 + | echo "Error: directory $PATH_AUTOMAKE does not exist" |
30 + | fi |
31 + | |
32 + | # Refresh GNU autotools toolchain. |
33 + | for i in config.guess config.sub missing install-sh mkinstalldirs ; do |
34 + | test -r $PATH_AUTOMAKE/${i} && { |
35 + | rm -f ${i} |
36 + | cp $PATH_AUTOMAKE/${i} . |
37 + | } |
38 + | if test -r ${i} ; then |
39 + | chmod 755 ${i} |
40 + | fi |
41 + | done |
42 + | |
43 + | # |
44 + | # Apple's Developer Tools have a "libtool" that has nothing to do with |
45 + | # the GNU libtool; they call the latter "glibtool". They also call |
46 + | # libtoolize "glibtoolize". |
47 + | # |
48 + | # Check for "glibtool" first. |
49 + | # Borrowed from ethereal |
50 + | # |
51 + | LTVER=`glibtool --version 2>/dev/null | grep ' libtool)' | \ |
52 + | sed 's/.*libtool) \([0-9][0-9.]*\)[^ ]* .*/\1/'` |
53 + | if test -z "$LTVER" |
54 + | then |
55 + | LTVER=`libtool --version | grep ' libtool)' | \ |
56 + | sed 's/.*) \([0-9][0-9.]*\)[^ ]* .*/\1/' ` |
57 + | LIBTOOLIZE=libtoolize |
58 + | else |
59 + | LIBTOOLIZE=glibtoolize |
60 + | fi |
61 + | case "$LTVER" in |
62 + | '' | 0.* | 1.[0-3]* ) |
63 + | |
64 + | cat >&2 <<_EOF_ |
65 + | |
66 + | You must have libtool 1.4 or later installed to compile $PROJECT. |
67 + | Download the appropriate package for your distribution/OS, |
68 + | or get the source tarball at ftp://ftp.gnu.org/pub/gnu/libtool/ |
69 + | _EOF_ |
70 + | exit 1 |
71 + | ;; |
72 + | esac |
73 + | |
74 + | $LIBTOOLIZE --force --copy |
75 + | |
76 + | intltoolize --force --copy --automake |
77 + | |
78 + | autoreconf --verbose --force --install |
79 + | |
80 + | # |
81 + | # Check if the configure script is created |
82 + | # |
83 + | echo |
84 + | if [ ! -f ./configure ] ; then |
85 + | echo "The configure script was not created !" |
86 + | echo "You can't compile Grisbi." |
87 + | exit 1 |
88 + | fi |
89 + | echo "The configure script was successfully created." |
90 + | echo "To compile Grisbi, please run :" |
91 + | echo " ./configure" |
92 + | echo " make" |
93 + | echo " make install" |
94 + | echo |
95 + | |
96 + | exit 0 |