#!/bin/sh

# Check for g++ to avoid using different versions of gcc and g++ on systems
# with both g++-4.X and gcc-4.Y but not g++-4.Y installed.

if g++-5 --version >/dev/null 2>&1; then
	prog=gcc-5
elif g++-4.9 --version >/dev/null 2>&1; then
	prog=gcc-4.9
else
	prog=gcc-4.8
fi

exec $prog "$@"
