source: vendor/current/source4/autogen.sh@ 414

Last change on this file since 414 was 414, checked in by Herwig Bauernfeind, 15 years ago

Samba 3.5.0: Initial import

File size: 1.6 KB
Line 
1#!/bin/sh
2
3# Run this script to build samba from git.
4
5while true; do
6 case $1 in
7 --version-file)
8 VERSION_FILE=$2
9 shift 2
10 ;;
11 *)
12 break
13 ;;
14 esac
15done
16
17## insert all possible names (only works with
18## autoconf 2.x)
19TESTAUTOHEADER="autoheader autoheader-2.53 autoheader2.50 autoheader259 autoheader253"
20TESTAUTOCONF="autoconf autoconf-2.53 autoconf2.50 autoconf259 autoconf253"
21
22AUTOHEADERFOUND="0"
23AUTOCONFFOUND="0"
24
25if which which > /dev/null 2>&1; then
26 echo -n
27else
28 echo "$0: need 'which' to figure out if we have the right autoconf to build samba from git" >&2
29 exit 1
30fi
31##
32## Look for autoheader
33##
34for i in $TESTAUTOHEADER; do
35 if which $i > /dev/null 2>&1; then
36 if test `$i --version | head -n 1 | cut -d. -f 2 | sed "s/[^0-9]//g"` -ge 53; then
37 AUTOHEADER=$i
38 AUTOHEADERFOUND="1"
39 break
40 fi
41 fi
42done
43
44##
45## Look for autoconf
46##
47
48for i in $TESTAUTOCONF; do
49 if which $i > /dev/null 2>&1; then
50 if test `$i --version | head -n 1 | cut -d. -f 2 | sed "s/[^0-9]//g"` -ge 53; then
51 AUTOCONF=$i
52 AUTOCONFFOUND="1"
53 break
54 fi
55 fi
56done
57
58
59##
60## do we have it?
61##
62if test "$AUTOCONFFOUND" = "0" -o "$AUTOHEADERFOUND" = "0"; then
63 echo "$0: need autoconf 2.53 or later to build samba from git" >&2
64 exit 1
65fi
66
67echo "$0: running script/mkversion.sh"
68./script/mkversion.sh $VERSION_FILE || exit 1
69
70rm -rf autom4te*.cache
71rm -f configure include/config_tmp.h*
72
73IPATHS="-I. -I../lib/replace"
74
75echo "$0: running $AUTOHEADER $IPATHS"
76$AUTOHEADER $IPATHS || exit 1
77
78echo "$0: running $AUTOCONF $IPATHS"
79$AUTOCONF $IPATHS || exit 1
80
81rm -rf autom4te*.cache
82
83echo "Now run ./configure (or ./configure.developer) and then make."
84exit 0
Note: See TracBrowser for help on using the repository browser.