diff options
author | Ted Lemon <source@isc.org> | 2001-04-05 20:35:52 +0000 |
---|---|---|
committer | Ted Lemon <source@isc.org> | 2001-04-05 20:35:52 +0000 |
commit | e0dd13b555bfca136d39efedf8321e23364e96dd (patch) | |
tree | 304925e7aadca09ee31caf233a9e0e90c42e86d1 /configure | |
parent | 6071365896a5bc41067d18a0f764e9b405d1eb84 (diff) | |
download | isc-dhcp-e0dd13b555bfca136d39efedf8321e23364e96dd.tar.gz |
Don't use the which command.
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 43 |
1 files changed, 29 insertions, 14 deletions
@@ -62,21 +62,26 @@ if [ "$sysname" = "" ]; then 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/'` + IFS=":" + for foo in $PATH; do + if [ x$gcc_path = x ] && [ -x $foo/gcc ]; then + gcc_path=$foo/gcc + fi + done + case $major in 4) - set `which gcc` - if [ $# != 1 ]; then + if [ x$gcc_path = x ]; then echo SunOS 4 build will not work without the GNU C Compiler. exit 1 fi sysname=sunos4;; 5) - set `which gcc` - if [ $# = 1 ]; then - sysname=sunos5-gcc + if [ x$gcc_path = x ]; then + sysname=sunos5-cc sysname_print=sunos5 else - sysname=sunos5-cc + sysname=sunos5-gcc sysname_print=sunos5 fi;; esac;; @@ -92,21 +97,31 @@ if [ "$sysname" = "" ]; then FreeBSD) sysname=freebsd;; hpux) - set `which gcc` - if [ $# = 1 ]; then - sysname=hpux-gcc + 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 else - sysname=hpux-cc + sysname=hpux-gcc sysname_print=hpux fi;; HP-UX) - set `which gcc` - if [ $# = 1 ]; then - sysname=hpux-gcc + 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 else - sysname=hpux-cc + sysname=hpux-gcc sysname_print=hpux fi;; QNX) |