Integrate with gtk-doc for API reference generation
[entangle:entangle.git] / autogen.sh
1 #!/bin/sh
2 # Run this to generate all the initial makefiles, etc.
3
4 set -e
5 srcdir=`dirname $0`
6 test -z "$srcdir" && srcdir=.
7
8 THEDIR=`pwd`
9 cd $srcdir
10
11 DIE=0
12
13 (autoconf --version) < /dev/null > /dev/null 2>&1 || {
14         echo
15         echo "You must have autoconf installed to compile gtk-vnc."
16         echo "Download the appropriate package for your distribution,"
17         echo "or see http://www.gnu.org/software/autoconf"
18         DIE=1
19 }
20
21 (automake --version) < /dev/null > /dev/null 2>&1 || {
22         echo
23         DIE=1
24         echo "You must have automake installed to compile gtk-vnc."
25         echo "Download the appropriate package for your distribution,"
26         echo "or see http://www.gnu.org/software/automake"
27 }
28
29 if test "$DIE" -eq 1; then
30         exit 1
31 fi
32
33 if test -z "$*"; then
34         echo "I am going to run ./configure with --enable-compile-warnings=error"
35         echo "If you wish to pass any extra arguments to it, please specify them"
36         echo "on the $0 command line."
37 fi
38
39 mkdir -p m4
40
41 gtkdocize || exit 1
42 autoreconf -if
43
44 cd $THEDIR
45
46 $srcdir/configure --enable-compile-warnings=error "$@" && {
47     echo
48     echo "Now type 'make' to compile capa."
49 }