fixing MSVC build
[dia.git] / autogen.sh
blob2a1224bcb27efabf294101f8c1daa6b570cfa0bd
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 echo You may want to run $srcdir/configure --enable-maintainer-mode --enable-db2html "$@"
79 echo to build $PROJECT