* small changes to make dia build
[dia.git] / autogen.sh
blobe73548fe06392ce6ee37d3d1b441d6a835812d2b
1 #!/bin/sh
2 # Run this to generate all the initial makefiles, etc.
4 srcdir=`dirname $0`
5 test -z "$srcdir" && srcdir=.
7 ORIGDIR=`pwd`
8 cd $srcdir
10 PROJECT=dia
11 TEST_TYPE=-d
12 FILE=objects
14 DIE=0
16 (autoconf --version) < /dev/null > /dev/null 2>&1 || {
17 echo
18 echo "You must have autoconf installed to compile $PROJECT."
19 echo "Download the appropriate package for your distribution,"
20 echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
21 DIE=1
24 (libtool --version) < /dev/null > /dev/null 2>&1 || {
25 echo
26 echo "You must have libtool installed to compile $PROJECT."
27 echo "Get ftp://alpha.gnu.org/gnu/libtool-1.0h.tar.gz"
28 echo "(or a newer version if it is available)"
29 DIE=1
32 (automake --version) < /dev/null > /dev/null 2>&1 || {
33 echo
34 echo "You must have automake installed to compile $PROJECT."
35 echo "Get ftp://ftp.cygnus.com/pub/home/tromey/automake-1.2d.tar.gz"
36 echo "(or a newer version if it is available)"
37 DIE=1
40 if test "$DIE" -eq 1; then
41 exit 1
44 test $TEST_TYPE $FILE || {
45 echo "You must run this script in the top-level $PROJECT directory"
46 exit 1
49 if test -z "$*"; then
50 echo "I am going to run ./configure with no arguments - if you wish "
51 echo "to pass any to it, please specify them on the $0 command line."
54 case $CC in
55 *lcc | *lcc\ *) am_opt=--include-deps;;
56 esac
58 echo "Running gettextize... Ignore non-fatal messages."
59 # Hmm, we specify --force here, since otherwise things don't
60 # get added reliably, but we don't want to overwrite intl
61 # while making dist.
62 echo "no" | gettextize --copy --force
64 echo "Running libtoolize"
65 libtoolize --copy --force
67 aclocal $ACLOCAL_FLAGS
69 # optionally feature autoheader
70 (autoheader --version) < /dev/null > /dev/null 2>&1 && autoheader
72 automake -a $am_opt
73 autoconf
75 cd $ORIGDIR
77 $srcdir/configure "$@"
79 echo
80 echo "Now type 'make' to compile $PROJECT."