|
|
@@ -1,9 +1,36 @@
|
|
|
-#! /bin/sh
|
|
|
+#!/bin/sh
|
|
|
+#
|
|
|
+# autogen.sh glue from CMU Cyrus IMAP
|
|
|
+# $Id$
|
|
|
+#
|
|
|
+# Requires: automake, autoconf, dpkg-dev
|
|
|
+# set -e
|
|
|
+
|
|
|
+MAKE=$(which gnumake)
|
|
|
+if test ! -x "$MAKE" ; then MAKE=$(which gmake) ; fi
|
|
|
+if test ! -x "$MAKE" ; then MAKE=$(which make) ; fi
|
|
|
+HAVE_GNU_MAKE=$($MAKE --version|grep -c "Free Software Foundation")
|
|
|
+
|
|
|
+if test "$HAVE_GNU_MAKE" != "1"; then
|
|
|
+ echo Could not find GNU make on this system, can not proceed with build.
|
|
|
+ exit 1
|
|
|
+else
|
|
|
+ echo Found GNU Make at $MAKE ... good.
|
|
|
+fi
|
|
|
+
|
|
|
+# Refresh GNU autotools toolchain.
|
|
|
+for i in config.guess config.sub missing install-sh mkinstalldirs ; do
|
|
|
+ test -r /usr/share/automake/${i} && {
|
|
|
+ rm -f ${i}
|
|
|
+ cp /usr/share/automake/${i} .
|
|
|
+ }
|
|
|
+ chmod 755 ${i}
|
|
|
+done
|
|
|
|
|
|
aclocal -I lib
|
|
|
-autoconf
|
|
|
autoheader
|
|
|
automake --add-missing --copy
|
|
|
+autoconf
|
|
|
|
|
|
if [ -f debian/rules ] ; then
|
|
|
chmod +x debian/rules
|