blob: 23a7b22a825541a56b97ad6766ba11d15fcdb3a5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
|
#!/bin/sh
while [ $# != 0 ]; do
if [ x$1 = x--with-nsupdate ]; then
nsupdate="-e /^##--nsupdate--/,/^##--nsupdate--/s/^#//"
else
if [ x$sysname = x ]; then
sysname=$1
else
echo "Unexpected argument: $1"
fi
fi
shift
done
uname=`uname -s`
machine=`uname -m`
if [ "$sysname" = "" ]; then
case $uname in
AIX)
sysname=aix;;
Rhapsody)
sysname=rhapsody;;
ULTRIX)
sysname=ultrix;;
BSD/OS)
sysname=bsdos;;
OSF1)
if [ $machine = 'alpha' ]; then
sysname=alphaosf
fi;;
Linux)
release=`uname -r`
minor=`echo $release |sed -e 's/[0-9]*\.\([0-9][0-9]*\)\(\..*\)*$/\1/'`
major=`echo $release |sed -e 's/\([0-9][0-9]*\)\..*$/\1/'`
case $major in
1) sysname=linux-1 ;;
2) case $minor in
0) sysname=linux-2.0 ;;
1) sysname=linux-2.1 ;;
2) sysname=linux-2.2 ;;
*) sysname=linux-2.2 ;;
esac;;
esac;;
SunOS)
case `uname -r` in
4*) sysname=sunos4;;
5*)
set `which gcc`
if [ $# = 1 ]; then
sysname=sunos5-gcc
else
sysname=sunos5-cc
fi;;
esac;;
NetBSD)
sysname=netbsd;;
OpenBSD)
sysname=openbsd;;
FreeBSD)
sysname=freebsd;;
hpux)
sysname=hpux;;
HP-UX)
sysname=hpux;;
QNX)
sysname=qnx;;
NEXTSTEP)
sysname=nextstep;;
UnixWare)
sysname=uw7;;
esac
fi
if [ "$sysname" = "" ]; then
echo "UNIX name: $uname machine: $machine"
echo
echo "Unknown system. If this is an SCO system running ODT 3.0 or"
echo "higher, type \`\`./configure sco''. Otherwise, this is a"
echo "configuration that isn't supported or hasn't been tested."
echo
echo "Supported configurations are:"
echo " aix AIX 4.1.5.0"
echo " ultrix ULTRIX 4.2A or higher"
echo " bsdos BSDI BSD/OS 2.1"
echo " alphaosf DEC Alpha OSF/1"
echo " linux Linux"
echo " sunos4 Sunos 4.1.4 (earlier releases may work)"
echo " sunos5-cc Solaris 2.4 or higher with Sun cc"
echo " sunos5-gcc Solaris 2.4 or higher with gcc"
echo " netbsd NetBSD 1.1 or higher"
echo " freebsd FreeBSD"
echo " openbsd OpenBSD (i386/alpha)"
echo " hpux HP-UX"
echo " qnx QNX 4.2 or higher"
echo " NEXTSTEP NeXTSTEP"
exit 1;
fi
echo "System Type: $sysname"
if [ x$major != x ] && [ x$minor != x ]; then
majversubst="-e /^##--majver--/,/^##--majver--/s/MajorVersion/$major/"
minversubst="-e /^##--minver--/,/^##--minver--/s/MinorVersion/$minor/"
fi
for foo in . client server relay common omapip dhcpctl; do
(sed $nsupdate $majversubst $minversubst \
-e "/^##--${sysname}--/,/^##--${sysname}--/s/^#//" \
<Makefile.conf; cat site.conf; cat $foo/Makefile.dist) \
>$foo/Makefile
done
exit 0
|