summaryrefslogtreecommitdiffstats
path: root/autogen.sh
diff options
context:
space:
mode:
Diffstat (limited to 'autogen.sh')
-rwxr-xr-xautogen.sh58
1 files changed, 58 insertions, 0 deletions
diff --git a/autogen.sh b/autogen.sh
new file mode 100755
index 00000000..0357d93a
--- /dev/null
+++ b/autogen.sh
@@ -0,0 +1,58 @@
1#!/bin/sh
2#
3# autogen.sh glue for CMU Cyrus IMAP
4# $Id$
5#
6# Requires: automake, autoconf, dpkg-dev
7# set -e
8
9MAKE=$(which gnumake)
10if test ! -x "$MAKE" ; then MAKE=$(which gmake) ; fi
11if test ! -x "$MAKE" ; then MAKE=$(which make) ; fi
12HAVE_GNU_MAKE=$($MAKE --version|grep -c "Free Software Foundation")
13
14if test "$HAVE_GNU_MAKE" != "1"; then
15 echo Could not find GNU make on this system, can not proceed with build.
16 exit 1
17else
18 echo Found GNU Make at $MAKE ... good.
19fi
20
21# Refresh GNU autotools toolchain.
22for i in config.guess config.sub missing install-sh mkinstalldirs ; do
23 test -r /usr/share/automake/${i} && {
24 rm -f ${i}
25 cp /usr/share/automake/${i} .
26 }
27 chmod 755 ${i}
28done
29
30aclocal -I lib
31autoheader
32automake -c -a
33autoconf
34
35# For the Debian build
36test -d debian && {
37 # Kill executable list first
38 rm -f debian/executable.files
39
40 # Make sure our executable and removable lists won't be screwed up
41 debclean && echo Cleaned buildtree just in case...
42
43 # refresh list of executable scripts, to avoid possible breakage if
44 # upstream tarball does not include the file or if it is mispackaged
45 # for whatever reason.
46 echo Generating list of executable files...
47 rm -f debian/executable.files
48 find -type f -perm +111 ! -name '.*' -fprint debian/executable.files
49
50 # link these in Debian builds
51 rm -f config.sub config.guess
52 ln -s /usr/share/misc/config.sub .
53 ln -s /usr/share/misc/config.guess .
54}
55
56./configure $*
57
58exit 0