1#!/bin/bash 2# Run this to generate all the initial makefiles, etc. 3 4: ${AUTOCONF=autoconf} 5: ${AUTOHEADER=autoheader} 6: ${AUTOMAKE=automake} 7: ${ACLOCAL=aclocal} 8if test "$(uname)" != "Darwin"; then 9 : ${LIBTOOLIZE=libtoolize} 10else 11 : ${LIBTOOLIZE=glibtoolize} 12fi 13: ${LIBTOOL=libtool} 14 15srcdir=`dirname $0` 16test -z "$srcdir" && srcdir=. 17 18cd $srcdir 19PROJECT=libsearpc 20CONFIGURE=configure.ac 21 22DIE=0 23 24($AUTOCONF --version) < /dev/null > /dev/null 2>&1 || { 25 echo 26 echo "You must have autoconf installed to compile $PROJECT." 27 echo "Download the appropriate package for your distribution," 28 echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/" 29 DIE=1 30} 31 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://sourceware.cygnus.com/pub/automake/automake-1.7.tar.gz" 36 echo "(or a newer version if it is available)" 37 DIE=1 38} 39 40if test "$(uname)" != "Darwin"; then 41(grep "^AC_PROG_LIBTOOL" $CONFIGURE >/dev/null) && { 42 ($LIBTOOL --version) < /dev/null > /dev/null 2>&1 || { 43 echo 44 echo "**Error**: You must have \`libtool' installed to compile $PROJECT." 45 echo "Get ftp://ftp.gnu.org/pub/gnu/libtool-1.4.tar.gz" 46 echo "(or a newer version if it is available)" 47 DIE=1 48 } 49} 50fi 51 52 53if test "$DIE" -eq 1; then 54 exit 1 55fi 56 57dr=`dirname .` 58echo processing $dr 59aclocalinclude="$aclocalinclude -I m4" 60 61if test x"$MSYSTEM" = x"MINGW32"; then 62 aclocalinclude="$aclocalinclude -I /mingw32/share/aclocal" 63elif test "$(uname)" = "Darwin"; then 64 aclocalinclude="$aclocalinclude -I /opt/local/share/aclocal" 65fi 66 67 68echo "Creating $dr/aclocal.m4 ..." 69test -r $dr/aclocal.m4 || touch $dr/aclocal.m4 70echo "Running glib-gettextize... Ignore non-fatal messages." 71echo "no" | glib-gettextize --force --copy 72 73echo "Making $dr/aclocal.m4 writable ..." 74test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4 75 76echo "Running $LIBTOOLIZE..." 77$LIBTOOLIZE --force --copy 78 79echo "Running $ACLOCAL $aclocalinclude ..." 80$ACLOCAL $aclocalinclude 81 82echo "Running $AUTOHEADER..." 83$AUTOHEADER 84 85echo "Running $AUTOMAKE --gnu $am_opt ..." 86$AUTOMAKE --add-missing --gnu $am_opt 87 88echo "Running $AUTOCONF ..." 89$AUTOCONF 90