#        Copyright(C) 1997 Network Flight Recorder, Inc.
#        All rights reserved.
#
#        Use and distribution of this software and its source code
#        are governed by the terms and conditions of the
#        Network Flight Recorder Software License ("LICENSE.TXT")
#
# by Mark Sienkiewicz / NFR

#
# if a parameter is given, always use it.
#

case "$1"
in
"")
	;;
*)
	echo 's?httpd_token?'$1'?' >> xlate
	exit 0
	;;
esac

#
# ok, no parameter.  See if httpd is on $PATH.
#

httpd="`which httpd`"
case "$httpd"
in
*' '*)
	;;
*)
	echo 's?httpd_token?'$httpd'?' >> xlate
	exit 0
	;;
esac

#
# ok, not on $PATH.  See if we can find it in some places we might
# commonly expect it to be on various systems
#


for x in /usr/contrib/bin/httpd /usr/local/bin/httpd /httpd/bin/httpd /usr/sbin/httpd
do
        if [ -x $x ]
        then
		echo 's?httpd_token?'$x'?' >> xlate
                exit 0
        fi
done

echo " "
echo "DID NOT FIND HTTPD - please set HTTPD= in include/Makefile-config"
echo "re-run bin/fixmake, and repeat 'make install'"
echo " "
exit 1

