r10243: fix net rpc shutdown (missing alignments and sending an invalid UNISTR4 for...
[Samba.git] / source / autogen.sh
blob3422d7cebfa5c4f87f77eb43c9f0ad77acbc8c22
1 #!/bin/sh
3 # Run this script to build samba from SVN.
5 ## insert all possible names (only works with
6 ## autoconf 2.x
7 TESTAUTOHEADER="autoheader autoheader-2.53 autoheader2.50"
8 TESTAUTOCONF="autoconf autoconf-2.53 autoconf2.50"
10 AUTOHEADERFOUND="0"
11 AUTOCONFFOUND="0"
15 ## Look for autoheader
17 for i in $TESTAUTOHEADER; do
18 if which $i > /dev/null 2>&1; then
19 if test `$i --version | head -n 1 | cut -d. -f 2 | tr -d [:alpha:]` -ge 53; then
20 AUTOHEADER=$i
21 AUTOHEADERFOUND="1"
22 break
25 done
27 ##
28 ## Look for autoconf
31 for i in $TESTAUTOCONF; do
32 if which $i > /dev/null 2>&1; then
33 if test `$i --version | head -n 1 | cut -d. -f 2 | tr -d [:alpha:]` -ge 53; then
34 AUTOCONF=$i
35 AUTOCONFFOUND="1"
36 break
39 done
42 ##
43 ## do we have it?
45 if test "$AUTOCONFFOUND" = "0" -o "$AUTOHEADERFOUND" = "0"; then
46 echo "$0: need autoconf 2.53 or later to build samba from SVN" >&2
47 exit 1
50 echo "$0: running script/mkversion.sh"
51 ./script/mkversion.sh || exit 1
53 rm -rf autom4te*.cache
54 rm -f configure include/config.h*
56 echo "$0: running $AUTOHEADER"
57 $AUTOHEADER || exit 1
59 echo "$0: running $AUTOCONF"
60 $AUTOCONF || exit 1
62 rm -rf autom4te*.cache
64 echo "Now run ./configure and then make."
65 exit 0