1#!/bin/sh 2# Run this to generate all the initial makefiles, etc. 3 4srcdir=`dirname $0` 5test -z "$srcdir" && srcdir=. 6 7ORIGDIR=`pwd` 8cd $srcdir 9PROJECT=xmlroff 10TEST_TYPE=-f 11FILE=xmlroff/xmlroff.c 12AC_CONFIG_AUX_DIR=config 13 14DIE=0 15 16have_libtool=false 17if libtool --version < /dev/null > /dev/null 2>&1 ; then 18 libtool_version=`libtoolize --version | libtoolize --version | sed 's/^[^0-9]*\([0-9].[0-9.]*\).*/\1/'` 19 case $libtool_version in 20 1.4*|1.5*|2.*) 21 have_libtool=true 22 ;; 23 esac 24fi 25if $have_libtool ; then : ; else 26 echo 27 echo "You must have libtool 1.4 or later installed to compile $PROJECT." 28 echo "Install the appropriate package for your distribution," 29 echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/" 30 DIE=1 31fi 32 33(autoconf --version) < /dev/null > /dev/null 2>&1 || { 34 echo 35 echo "You must have autoconf installed to compile $PROJECT." 36 echo "Download the appropriate package for your distribution," 37 echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/" 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://sourceware.cygnus.com/pub/automake/automake-1.4.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 58test -d config || { 59 echo "Creating AC_CONFIG_AUX_DIR, \`$AC_CONFIG_AUX_DIR'." 60 mkdir config 61} 62 63if test -z "$*"; then 64 echo "I am going to run ./configure with no arguments - if you wish " 65 echo "to pass any to it, please specify them on the $0 command line." 66fi 67 68libtoolize --copy --force 69aclocal $ACLOCAL_FLAGS 70 71# optionally run autoheader 72(autoheader --version) < /dev/null > /dev/null 2>&1 && autoheader 73 74automake -a $am_opt 75autoconf 76cd $ORIGDIR 77 78$srcdir/configure --enable-maintainer-mode "$@" 79 80echo 81echo "Now type 'make' to compile $PROJECT." 82