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=mdk 10TEST_TYPE=-d 11FILE=mixlib 12 13DIE=0 14 15grep "^AM_GNU_GETTEXT" $srcdir/configure.ac >/dev/null && { 16 (gettext --version) < /dev/null > /dev/null 2>&1 || { 17 echo 18 echo "**Error**: You must have \`gettext' installed to compile $PROJECT." 19 echo "(0.13.1 or a newer version if it is available)" 20 DIE=1 21 } 22} 23 24(autoconf --version) < /dev/null > /dev/null 2>&1 || { 25 echo 26 echo "**Error**: You must have autoconf installed to compile $PROJECT." 27 echo "(2.53 or a newer version if it is available)" 28 DIE=1 29} 30 31(automake --version) < /dev/null > /dev/null 2>&1 || { 32 echo 33 echo "**Error**: You must have automake installed to compile $PROJECT." 34 echo "(1.5 or a newer version if it is available)" 35 DIE=1 36 NO_AUTOMAKE=yes 37} 38 39# if no automake, don't bother testing for aclocal 40test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || { 41 echo 42 echo "**Error**: Missing \`aclocal'. The version of \`automake'" 43 echo "installed doesn't appear recent enough." 44 DIE=1 45} 46 47 48if test "$DIE" -eq 1; then 49 exit 1 50fi 51 52test $TEST_TYPE $FILE || { 53 echo "You must run this script in the top-level $PROJECT directory" 54 exit 1 55} 56 57case $CC in 58*xlc | *xlc\ * | *lcc | *lcc\ *) am_opt=--include-deps;; 59esac 60 61echo "Running gettext's autopoint..." 62autopoint --force 63 64echo "Running intltoolize" 65intltoolize --copy --force --automake 66 67ACLOCAL_FLAGS="-I m4" 68echo "Running aclocal ..." 69aclocal $ACLOCAL_FLAGS 70 71# optionally feature autoheader 72(autoheader --version) < /dev/null > /dev/null 2>&1 && autoheader 73 74# changelog file 75touch ChangeLog 76 77echo "Running automake --add-missing --gnu $am_opt ..." 78automake -a --gnu $am_opt 79 80echo "Running autoconf ..." 81autoconf 82cd $ORIGDIR 83