s4-dsdb: Use samdb_reference_dn_is_our_ntdsa()
[Samba/gebeck_regimport.git] / source3 / autogen.sh
blob2238efbe5e617edfad8ebd8ea71f7b67bae79e5c
1 #!/bin/sh
3 # Run this script to build samba from GIT.
5 while true; do
6 case $1 in
7 --version-file)
8 VERSION_FILE=$2
9 shift 2
12 break
14 esac
15 done
17 ## insert all possible names (only works with
18 ## autoconf 2.x)
19 TESTAUTOHEADER="autoheader autoheader-2.53 autoheader2.50 autoheader259 autoheader253"
20 TESTAUTOCONF="autoconf autoconf-2.53 autoconf2.50 autoconf259 autoconf253"
22 AUTOHEADERFOUND="0"
23 AUTOCONFFOUND="0"
27 ## Look for autoheader
29 for i in $TESTAUTOHEADER; do
30 if which $i > /dev/null 2>&1; then
31 if test `$i --version | head -n 1 | cut -d. -f 2 | sed "s/[^0-9]//g"` -ge 53; then
32 AUTOHEADER=$i
33 AUTOHEADERFOUND="1"
34 break
37 done
39 ##
40 ## Look for autoconf
43 for i in $TESTAUTOCONF; do
44 if which $i > /dev/null 2>&1; then
45 if test `$i --version | head -n 1 | cut -d. -f 2 | sed "s/[^0-9]//g"` -ge 53; then
46 AUTOCONF=$i
47 AUTOCONFFOUND="1"
48 break
51 done
54 ##
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 samba from GIT" >&2
59 exit 1
62 echo "$0: running script/mkversion.sh"
63 ./script/mkversion.sh $VERSION_FILE || exit 1
65 rm -rf autom4te*.cache
66 rm -f configure include/config.h*
68 IPATHS="-Im4 -I../m4 -I../lib/replace"
70 echo "$0: running $AUTOHEADER $IPATHS"
71 $AUTOHEADER $IPATHS || exit 1
73 echo "$0: running $AUTOCONF $IPATHS"
74 $AUTOCONF $IPATHS || exit 1
76 rm -rf autom4te*.cache
78 ( cd ../examples/VFS || exit 1
79 echo "$0: running $AUTOHEADER in ../examples/VFS/"
80 $AUTOHEADER || exit 1
81 echo "$0: running $AUTOCONF in ../examples/VFS/"
82 $AUTOCONF || exit 1
83 rm -rf autom4te*.cache
84 ) || exit 1
87 if gcc -E tests/preproc-dummy.c -o /dev/null ;
88 then
89 PIDL_OUTPUTDIR="autoconf/librpc/gen_ndr" CPP="gcc -E" PIDL=../pidl/pidl \
90 srcdir=. ../librpc/build_idl.sh ../librpc/idl/*.idl
91 PIDL_OUTPUTDIR="autoconf/librpc/gen_ndr" CPP="gcc -E" PIDL=../pidl/pidl \
92 srcdir=. script/build_idl.sh librpc/idl/*.idl
93 else
94 echo "Warning: Could not compile idl files in autogen, "
95 echo "some autconf tests might not work properly"
98 perl ../script/mkparamdefs.pl ../lib/param/param_functions.c --file autoconf/lib/param/param_local.h --generate-scope=LOCAL
99 perl ../script/mkparamdefs.pl ../lib/param/loadparm.c ../lib/param/param_functions.c --file autoconf/lib/param/param_global.h --generate-scope=GLOBAL
100 perl ../script/mkparamdefs.pl param/loadparm.c ../lib/param/param_functions.c --file autoconf/source3/param/param_global.h --generate-scope=GLOBAL
101 perl ../source4/script/mkproto.pl ../lib/param/loadparm.c ../lib/param/param_functions.c --public autoconf/lib/param/param_proto.h --private autoconf/lib/param/param_proto.h
102 perl ../script/mks3param.pl ../lib/param/loadparm.c ../lib/param/param_functions.c --file autoconf/lib/param/s3_param.h
104 echo "Now run ./configure (or ./configure.developer) and then make."
105 exit 0