6 if [ x
$1 = x--with-nsupdate
]; then
7 echo "nsupdate is always built now."
8 elif [ x
$1 = x--print-sysname
]; then
10 elif [ x
$1 = x--work-dir
]; then
13 elif [ x
$1 = x--dirs
]; then
16 elif [ x
$1 = x--no-links
]; then
18 elif [ x
$1 = x--copts
]; then
21 elif [ x
$sysname = x
]; then
24 echo "Unexpected argument: $1"
32 if [ "$sysname" = "" ]; then
37 if [ x
$gcc_path = x
] && [ -x $foo/gcc
]; then
42 if [ x
$gcc_path = x
]; then
60 minor
=`echo $release |sed -e 's/[0-9]*\.\([0-9][0-9]*\)\(\..*\)*$/\1/'`
61 major
=`echo $release |sed -e 's/\([0-9][0-9]*\)\..*$/\1/'`
64 [123]) sysname
=bsdos
;;
67 *) sysname
=bsdos-4.1
;;
71 if [ $machine = 'alpha' ]; then
73 # OSF1 has libc snprintf/vsnprintf support as of 4.0F. There is
74 # no v4 & v5 portable compile-time way of knowing the system's
75 # version (we can #include a version-identing file, but it is only
78 # So we rely on a system command, 'sizer', and default to
79 # no-snprintf if we can't find it.
80 if [ -x /usr
/sbin
/sizer
] ; then
81 release
=`/usr/sbin/sizer -v | cut -d ' ' -f 4 | cut -c 2-`
82 major
=`echo $release | cut -d . -f 1`
83 minor
=`echo $release | cut -d . -f 2`
84 incr
=`echo $minor | sed 's/[0-9]//g' | tr '[A-Z]' '[0-9]'`
85 minor
=`echo $minor | sed 's/[A-Z]//g'`
87 if [ $major -gt 4 -o \
88 $major -eq 4 -a $minor -gt 0 -o \
89 $major -eq 4 -a $minor -eq 0 -a $incr -gt 5 ]; then
90 copts
="$copts -DHAVE_SNPRINTF"
96 minor
=`echo $release |sed -e 's/[0-9]*\.\([0-9][0-9]*\)\(\..*\)*$/\1/'`
97 major
=`echo $release |sed -e 's/\([0-9][0-9]*\)\..*$/\1/'`
100 1) sysname
=linux-1
;;
102 0) sysname
=linux-2.0
;;
103 1) sysname
=linux-2.1
;;
104 2) sysname
=linux-2.2
;;
105 *) sysname
=linux-2.2
;;
110 minor
=`echo $release |sed -e 's/.*[0-9]*\.\([0-9][0-9]*\).*$/\1/'`
111 major
=`echo $release |sed -e 's/\([0-9][0-9]*\)\..*$/\1/'`
114 if [ x
$gcc_path = x
] && [ -x $foo/gcc
]; then
122 if [ x
$gcc_path = x
]; then
123 echo SunOS
4 build will not work without the GNU C Compiler.
128 if [ x
$gcc_path = x
]; then
145 if [ x
$gcc_path = x
] && [ -x $foo/gcc
]; then
151 if [ x
$gcc_path = x
]; then
161 if [ x
$gcc_path = x
] && [ -x $foo/gcc
]; then
167 if [ x
$gcc_path = x
]; then
176 major
=`echo $release |sed -e 's/\([0-9][0-9]*\)\..*$/\1/'`
190 if [ "$sysname" = "" ]; then
191 if [ x
$print_sysname = xyes
]; then
194 echo "UNIX name: $uname machine: $machine"
196 echo "Unknown system. If this is an SCO system running ODT 3.0 or"
197 echo "higher, type \`\`./configure sco''. Otherwise, this is a"
198 echo "configuration that isn't supported or hasn't been tested."
200 echo "Supported configurations are:"
201 echo " aix AIX 4.1.5.0"
202 echo " ultrix ULTRIX 4.2A or higher"
203 echo " bsdos BSDI BSD/OS 2.1"
204 echo " alphaosf DEC Alpha OSF/1"
206 echo " sunos4 Sunos 4.1.4 (earlier releases may work)"
207 echo " sunos5-cc Solaris 2.4 or higher with Sun cc"
208 echo " sunos5-gcc Solaris 2.4 or higher with gcc"
209 echo " netbsd NetBSD 1.1 or higher"
210 echo " freebsd FreeBSD"
211 echo " openbsd OpenBSD (i386/alpha)"
213 echo " qnx QNX 4.2 or higher"
214 echo " NEXTSTEP NeXTSTEP"
215 echo " sco SCO Open Server"
220 if [ x
$print_sysname = xyes
]; then
221 if [ x
$sysname_print != x
]; then
229 if [ x
$workname = x
]; then
230 if [ x
$sysname_print != x
]; then
231 workname
=work.
${sysname_print}
233 workname
=work.
${sysname}
237 echo "System Type: $sysname"
239 if [ x
$major != x
] && [ x
$minor != x
]; then
240 majversubst
="-e /^##--majver--/,/^##--majver--/s/MajorVersion/$major/"
241 minversubst
="-e /^##--minver--/,/^##--minver--/s/MinorVersion/$minor/"
244 if [ ! -d $workname ]; then
248 if [ x
"$dirs" = x
]; then
249 dirs=". client server relay common omapip dhcpctl minires dst"
254 if [ ! -d ${workname}/$bar ]; then
255 mkdir
${workname}/$bar
257 (sed $majversubst $minversubst \
258 -e "/^##--${sysname}--/,/^##--${sysname}--/s/^#//" \
261 echo "TOP = `pwd`"; \
262 echo CC_OPTIONS
= $copts; \
263 cat $foo/Makefile.dist
) \
264 >${workname}/$bar/Makefile
267 # Make the link tree in which to actually build.
268 if [ x
$nolinks = x
]; then