* lib/text.h: Added text_get_line() declaration
[dia.git] / autogen.sh
blob36bfa5ee83460637751641222b3d0cab8992dffc
1 #!/bin/sh
2 # Run this to generate all the stuff before configure (which only
3 # maintainers should generate).
5 srcdir=`dirname $0`
6 test -z "$srcdir" && srcdir=.
8 ORIGDIR=`pwd`
9 cd $srcdir
11 PROJECT=dia
12 TEST_TYPE=-d
13 FILE=objects
15 DIE=0
17 (autoconf --version) < /dev/null > /dev/null 2>&1 || {
18 echo
19 echo "You must have autoconf installed to compile $PROJECT."
20 echo "Download the appropriate package for your distribution,"
21 echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
22 DIE=1
25 (libtool --version) < /dev/null > /dev/null 2>&1 || {
26 echo
27 echo "You must have libtool installed to compile $PROJECT."
28 echo "Get ftp://alpha.gnu.org/gnu/libtool-1.0h.tar.gz"
29 echo "(or a newer version if it is available)"
30 DIE=1
33 (intltoolize --version) < /dev/null > /dev/null 2>&1 || {
34 echo
35 echo "You must have intltool installed to compile $PROJECT."
36 echo "Get ftp://ftp.gnome.org/pub/GNOME/stable/sources/intltool/intltool-0.16.tar.gz"
37 echo "(or a newer version if it is available)"
38 DIE=1
41 (automake --version) < /dev/null > /dev/null 2>&1 || {
42 echo
43 echo "You must have automake installed to compile $PROJECT."
44 echo "Get ftp://ftp.cygnus.com/pub/home/tromey/automake-1.2d.tar.gz"
45 echo "(or a newer version if it is available)"
46 DIE=1
49 if test "$DIE" -eq 1; then
50 exit 1
53 test $TEST_TYPE $FILE || {
54 echo "You must run this script in the top-level $PROJECT directory"
55 exit 1
58 case $CC in
59 *lcc | *lcc\ *) am_opt=--include-deps;;
60 esac
62 echo "Running gettextize..."
63 glib-gettextize --copy --force
65 echo "Running intltoolize"
66 intltoolize --copy --force --automake
68 echo "Running libtoolize"
69 libtoolize --copy --force
71 aclocal $ACLOCAL_FLAGS
72 autoheader
73 automake --add-missing $am_opt
74 autoconf
76 cd $ORIGDIR
78 # Helper printing functions and some terminal codes, taken from
79 # gnome-common/macros2/gnome-autogen.sh ...
80 boldface="`tput bold 2>/dev/null`"
81 normal="`tput sgr0 2>/dev/null`"
82 printbold() {
83 echo $ECHO_N "$boldface"
84 echo "$@"
85 echo $ECHO_N "$normal"
87 printerr() {
88 echo "$@" >&2
91 conf_flags="--enable-maintainer-mode --enable-db2html"
92 if test x$NOCONFIGURE = x; then
93 if [ "$#" = 0 ]; then
94 printerr "**Warning**: I am going to run \`configure' with no arguments."
95 printerr "If you wish to pass any to it, please specify them on the"
96 printerr \`$0\'" command line."
97 printerr
98 fi
100 printbold Running $srcdir/configure $conf_flags "$@"
101 $srcdir/configure $conf_flags "$@" \
102 && echo Now type \`make\' to compile $PROJECT || exit 1
103 else
104 echo You may want to run $srcdir/configure $conf_flags "$@"
105 echo to build $PROJECT