#!/bin/sh
##**************************************************************
##
## Copyright (C) 1990-2007, Condor Team, Computer Sciences Department,
## University of Wisconsin-Madison, WI.
## 
## Licensed under the Apache License, Version 2.0 (the "License"); you
## may not use this file except in compliance with the License.  You may
## obtain a copy of the License at
## 
##    http://www.apache.org/licenses/LICENSE-2.0
## 
## Unless required by applicable law or agreed to in writing, software
## distributed under the License is distributed on an "AS IS" BASIS,
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
## See the License for the specific language governing permissions and
## limitations under the License.
##
##**************************************************************


# pick an appropriate vendor supplied cpp and invoke it, possibly with 
# arguments in addition to the ones supplied to this program.

os=`uname -s | sed 's/IRIX.*/IRIX/'`

case "x$os" in
	xAIX)
		exec /lib/cpp $*
		;;
	xOSF1)
		exec /lib/cpp $*
		;;
	xHP-UX)
		# Use /lib/cpp.ansi if we've got it, otherwise try /usr/ccs/lbin
		test -x /lib/cpp.ansi && exec /lib/cpp.ansi $*
       		exec /usr/local/bin/cpp $*
		;;
	xIRIX)
		# stupid irix, this is santctioned by the X distribution.
		exec cc -E -cckr $*
		;;
	xLinux)
		exec /lib/cpp $*
		;;
	xFreeBSD)
		exec /usr/bin/cpp $*
		;;
	xDarwin)
		# /usr/bin/cpp is funny on this OS, I can't figure out how to tell
		# it not to perform precompilation of the headers. So I'll just use 
		# the cpp with the installed gcc, which should be fine.
		exec gcc -E -w -no-cpp-precomp $*
		;;
	xSunOS)
		exec /usr/ccs/lib/cpp $*
		;;
	*)
		echo "$0 can't figure out the right cpp to use on $os!";
		exit 1;
		;;
esac

exit 1;
