1#!/bin/sh 2# Run this to generate all the stuff before configure (which only 3# maintainers should generate). 4 5srcdir=`dirname $0` 6test -z "$srcdir" && srcdir=. 7 8ORIGDIR=`pwd` 9cd $srcdir 10 11PROJECT=dia 12TEST_TYPE=-d 13FILE=objects 14 15DIE=0 16 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 23} 24 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 31} 32 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 39} 40 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 47} 48 49if test "$DIE" -eq 1; then 50 exit 1 51fi 52 53test $TEST_TYPE $FILE || { 54 echo "You must run this script in the top-level $PROJECT directory" 55 exit 1 56} 57 58case $CC in 59*lcc | *lcc\ *) am_opt=--include-deps;; 60esac 61 62echo "Running gettextize..." 63glib-gettextize --copy --force 64 65echo "Running intltoolize" 66intltoolize --copy --force --automake 67 68echo "Running libtoolize" 69libtoolize --copy --force 70 71aclocal $ACLOCAL_FLAGS 72autoheader 73automake --add-missing $am_opt 74autoconf 75 76cd $ORIGDIR 77 78# Helper printing functions and some terminal codes, taken from 79# gnome-common/macros2/gnome-autogen.sh ... 80boldface="`tput bold 2>/dev/null`" 81normal="`tput sgr0 2>/dev/null`" 82printbold() { 83 echo $ECHO_N "$boldface" 84 echo "$@" 85 echo $ECHO_N "$normal" 86} 87printerr() { 88 echo "$@" >&2 89} 90 91conf_flags="--enable-maintainer-mode --enable-db2html" 92if 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 99 100 printbold Running $srcdir/configure $conf_flags "$@" 101 $srcdir/configure $conf_flags "$@" \ 102 && echo Now type \`make\' to compile $PROJECT || exit 1 103else 104 echo You may want to run $srcdir/configure $conf_flags "$@" 105 echo to build $PROJECT 106fi 107