1#! /bin/sh
2# Run this to generate all the initial makefiles, etc.
3
4set -e
5
6srcdir=`dirname $0`
7test -z "$srcdir" && srcdir=.
8
9DIE=0
10
11AUTOMAKE=automake-1.4
12ACLOCAL=aclocal-1.4
13
14($AUTOMAKE --version) < /dev/null > /dev/null 2>&1 || {
15        AUTOMAKE=automake
16        ACLOCAL=aclocal
17}
18
19(autoconf --version) < /dev/null > /dev/null 2>&1 || {
20	echo
21	echo "You must have autoconf installed to compile libvncserver."
22	echo "Download the appropriate package for your distribution,"
23	echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
24	DIE=1
25}
26
27($AUTOMAKE --version) < /dev/null > /dev/null 2>&1 || {
28	echo
29	echo "You must have automake installed to compile libvncserver."
30	echo "Get ftp://sourceware.cygnus.com/pub/automake/automake-1.4.tar.gz"
31	echo "(or a newer version if it is available)"
32	DIE=1
33}
34
35if test "$DIE" -eq 1; then
36	exit 1
37fi
38
39(test -f $srcdir/rfb/rfb.h) || {
40	echo "You must run this script in the top-level libvncserver directory"
41	exit 1
42}
43
44if test -z "$*"; then
45	echo "I am going to run ./configure with no arguments - if you wish "
46        echo "to pass any to it, please specify them on the $0 command line."
47fi
48
49$ACLOCAL $ACLOCAL_FLAGS
50autoheader
51$AUTOMAKE --add-missing --copy
52autoconf
53
54echo "Running ./configure --enable-maintainer-mode" "$@"
55$srcdir/configure --enable-maintainer-mode "$@"
56
57echo "Now type 'make' to compile libvncserver."
58