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/'`
192 if [ "$sysname" = "" ]; then
193 if [ x
$print_sysname = xyes
]; then
196 echo "UNIX name: $uname machine: $machine"
198 echo "Unknown system. If this is an SCO system running ODT 3.0 or"
199 echo "higher, type \`\`./configure sco''. Otherwise, this is a"
200 echo "configuration that isn't supported or hasn't been tested."
202 echo "Supported configurations are:"
203 echo " aix AIX 4.1.5.0"
204 echo " ultrix ULTRIX 4.2A or higher"
205 echo " bsdos BSDI BSD/OS 2.1"
206 echo " alphaosf DEC Alpha OSF/1"
208 echo " sunos4 Sunos 4.1.4 (earlier releases may work)"
209 echo " sunos5-cc Solaris 2.4 or higher with Sun cc"
210 echo " sunos5-gcc Solaris 2.4 or higher with gcc"
211 echo " netbsd NetBSD 1.1 or higher"
212 echo " freebsd FreeBSD"
213 echo " openbsd OpenBSD (i386/alpha)"
215 echo " qnx QNX 4.2 or higher"
216 echo " NEXTSTEP NeXTSTEP"
217 echo " morphos MorphOS"
218 echo " sco SCO Open Server"
223 if [ x
$print_sysname = xyes
]; then
224 if [ x
$sysname_print != x
]; then
232 if [ x
$workname = x
]; then
233 if [ x
$sysname_print != x
]; then
234 workname
=work.
${sysname_print}
236 workname
=work.
${sysname}
240 echo "System Type: $sysname"
242 if [ x
$major != x
] && [ x
$minor != x
]; then
243 majversubst
="-e /^##--majver--/,/^##--majver--/s/MajorVersion/$major/"
244 minversubst
="-e /^##--minver--/,/^##--minver--/s/MinorVersion/$minor/"
247 if [ ! -d $workname ]; then
251 if [ x
"$dirs" = x
]; then
252 dirs=". client server relay common omapip dhcpctl minires dst"
257 if [ ! -d ${workname}/$bar ]; then
258 mkdir
${workname}/$bar
260 (sed $majversubst $minversubst \
261 -e "/^##--${sysname}--/,/^##--${sysname}--/s/^#//" \
264 echo "TOP = `pwd`"; \
265 echo CC_OPTIONS
= $copts; \
266 cat $foo/Makefile.dist
) \
267 >${workname}/$bar/Makefile
270 # Make the link tree in which to actually build.
271 if [ x
$nolinks = x
]; then