2
0
mirror of https://gitlab.isc.org/isc-projects/dhcp synced 2025-08-23 10:28:08 +00:00
isc-dhcp/configure

206 lines
4.7 KiB
Plaintext
Raw Normal View History

1996-05-20 20:18:47 +00:00
#!/bin/sh
while [ $# != 0 ]; do
if [ x$1 = x--with-nsupdate ]; then
echo "nsupdate is always built now."
else
if [ x$1 = x--print-sysname ]; then
print_sysname=yes
else
if [ x$sysname = x ]; then
sysname=$1
else
echo "Unexpected argument: $1"
fi
fi
fi
shift
done
1996-05-20 20:18:47 +00:00
uname=`uname -s`
machine=`uname -m`
if [ "$sysname" = "" ]; then
case $uname in
1999-03-26 19:19:46 +00:00
AIX)
sysname=aix;;
1998-06-25 18:37:45 +00:00
Rhapsody)
sysname=rhapsody;;
1996-05-20 20:18:47 +00:00
ULTRIX)
sysname=ultrix;;
BSD/OS)
2000-06-29 20:04:18 +00:00
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
[123]) sysname=bsdos ;;
*) case $minor in
0) sysname=bsdos ;;
*) sysname=bsdos-4.1 ;;
esac;;
esac;;
1996-05-20 20:18:47 +00:00
OSF1)
if [ $machine = 'alpha' ]; then
1996-05-22 09:51:59 +00:00
sysname=alphaosf
1996-05-20 20:18:47 +00:00
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;;
1996-05-20 20:18:47 +00:00
SunOS)
2000-02-02 20:01:50 +00:00
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/'`
2001-04-05 20:35:52 +00:00
IFS=":"
for foo in $PATH; do
if [ x$gcc_path = x ] && [ -x $foo/gcc ]; then
gcc_path=$foo/gcc
fi
done
2000-02-02 20:01:50 +00:00
case $major in
2000-09-20 00:01:13 +00:00
4)
2001-04-05 20:35:52 +00:00
if [ x$gcc_path = x ]; then
2000-09-20 00:01:13 +00:00
echo SunOS 4 build will not work without the GNU C Compiler.
exit 1
fi
sysname=sunos4;;
2000-02-02 20:01:50 +00:00
5)
2001-04-05 20:35:52 +00:00
if [ x$gcc_path = x ]; then
sysname=sunos5-cc
sysname_print=sunos5
1996-09-11 18:31:46 +00:00
else
2001-04-05 20:35:52 +00:00
sysname=sunos5-gcc
sysname_print=sunos5
1996-09-11 18:31:46 +00:00
fi;;
1996-05-20 20:18:47 +00:00
esac;;
NetBSD)
2000-06-09 18:26:59 +00:00
hw=`uname -m`
case $hw in
2001-02-26 22:21:15 +00:00
arm32) sysname=netbsd-nocast;;
alpha) sysname=netbsd-nocast;;
2000-06-09 18:26:59 +00:00
*) sysname=netbsd;;
esac;;
1999-09-02 00:29:52 +00:00
OpenBSD)
sysname=openbsd;;
1996-05-20 20:18:47 +00:00
FreeBSD)
sysname=freebsd;;
1996-06-12 04:06:16 +00:00
hpux)
2001-04-05 20:35:52 +00:00
for foo in $PATH; do
if [ x$gcc_path = x ] && [ -x $foo/gcc ]; then
gcc_path=$foo/gcc
fi
done
if [ x$gcc_path = x ]; then
sysname=hpux-cc
sysname_print=hpux
2000-11-30 20:49:41 +00:00
else
2001-04-05 20:35:52 +00:00
sysname=hpux-gcc
sysname_print=hpux
2000-11-30 20:49:41 +00:00
fi;;
1996-09-11 18:31:46 +00:00
HP-UX)
2001-04-05 20:35:52 +00:00
for foo in $PATH; do
if [ x$gcc_path = x ] && [ -x $foo/gcc ]; then
gcc_path=$foo/gcc
fi
done
if [ x$gcc_path = x ]; then
sysname=hpux-cc
sysname_print=hpux
2000-11-30 14:42:51 +00:00
else
2001-04-05 20:35:52 +00:00
sysname=hpux-gcc
sysname_print=hpux
2000-11-30 14:42:51 +00:00
fi;;
1996-08-29 09:12:52 +00:00
QNX)
sysname=qnx;;
1997-09-17 00:21:45 +00:00
NEXTSTEP)
sysname=nextstep;;
1999-09-02 00:29:52 +00:00
UnixWare)
sysname=uw7;;
1996-05-20 20:18:47 +00:00
esac
fi
if [ "$sysname" = "" ]; then
if [ x$print_sysname = xyes ]; then
echo "unknown"
else
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
fi
if [ x$print_sysname = xyes ]; then
if [ x$sysname_print != x ]; then
echo $sysname_print
else
echo $sysname
fi
exit 0
1996-05-20 20:18:47 +00:00
fi
if [ x$sysname_print != x ]; then
workname=work.${sysname_print}
else
workname=work.${sysname}
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
if [ ! -d $workname ]; then
mkdir $workname
fi
for foo in . client server relay common omapip dhcpctl minires dst; do
if [ ! -d ${workname}/$foo ]; then
mkdir ${workname}/$foo
fi
(sed $majversubst $minversubst \
-e "/^##--${sysname}--/,/^##--${sysname}--/s/^#//" \
<Makefile.conf; cat site.conf; \
echo "TOP = ../.."; cat $foo/Makefile.dist) \
>${workname}/$foo/Makefile
done
1996-05-20 20:18:47 +00:00
# Make the link tree in which to actually build.
make links
1996-05-20 20:18:47 +00:00
exit 0