Fix OpenChange server code and access to Samba4 databases.
[OpenChange-git-clone.git] / autogen.sh
blob0c00aff7d7d2338f45f09d5439d10d08a3fecad9
1 #!/bin/sh
3 # Run this script to build openchange from SVN
5 ## insert all possible names (only works with
6 ## autoconf 2.x
7 TESTAUTOHEADER="autoheader autoheader-2.53 autoheader2.50 autoheader259 autoheader253"
8 TESTAUTOCONF="autoconf autoconf-2.53 autoconf2.50 autoconf259 autoconf253"
9 TESTACLOCAL="aclocal aclocal19"
11 AUTOHEADERFOUND="0"
12 AUTOCONFFOUND="0"
13 ACLOCALFOUND="0"
16 ## Look for autoheader
18 for i in $TESTAUTOHEADER; do
19 if which $i > /dev/null 2>&1; then
20 if test `$i --version | head -n 1 | cut -d. -f 2 | tr -d [:alpha:]` -ge 53; then
21 AUTOHEADER=$i
22 AUTOHEADERFOUND="1"
23 break
26 done
29 ## Look for autoconf
32 for i in $TESTAUTOCONF; do
33 if which $i > /dev/null 2>&1; then
34 if test `$i --version | head -n 1 | cut -d. -f 2 | tr -d [:alpha:]` -ge 53; then
35 AUTOCONF=$i
36 AUTOCONFFOUND="1"
37 break
40 done
43 ## Look for aclocal
45 for i in $TESTACLOCAL; do
46 if which $i > /dev/null 2>&1; then
47 ACLOCAL=$i
48 ACLOCALFOUND="1"
49 break
51 done
55 ## do we have it?
57 if test "$AUTOCONFFOUND" = "0" -o "$AUTOHEADERFOUND" = "0"; then
58 echo "$0: need autoconf 2.53 or later to build openchange from SVN" >&2
59 exit 1
62 if test "$ACLOCALFOUND" = "0"; then
63 echo "$0: aclocal not found" >&2
64 exit 1
68 rm -rf autom4te*.cache
69 rm -f configure include/config.h*
71 echo "$0: running $ACLOCAL"
72 $ACLOCAL || exit 1
74 echo "$0: running $AUTOHEADER"
75 $AUTOHEADER || exit 1
77 echo "$0: running $AUTOCONF"
78 $AUTOCONF || exit 1
81 rm -rf autom4te*.cache
83 echo "Now run ./configure and gmake"
84 exit 0