#!/bin/sh
# $Id: gcc-normal,v 1.9 2025/07/20 19:57:18 tom Exp $
# these are my normal development-options
OPTS="-Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wconversion"

: ${ACTUAL_GCC:=gcc}
case "$ACTUAL_GCC" in
gcc-[ceins]*)
	ACTUAL_GCC=gcc
	;;
esac

ARGS=
case x`uname -s` in
xDarwin)
	for arg in "$@"
	do
		case "x$arg" in
		x-I/usr/X11/include*)
			ARGS="$ARGS -isystem"
			arg=`echo ".$arg" | sed -e 's/^...//'`
			;;
		esac
		ARGS="$ARGS '$arg'"
	done
	;;
xSunOS)
	OPTS="$OPTS -fno-ident -Wno-unknown-pragmas"
	for arg in "$@"
	do
		case "x$arg" in
		x-I/usr/openwin/include*)
			ARGS="$ARGS -isystem"
			arg=`echo ".$arg" | sed -e 's/^...//'`
			;;
		esac
		ARGS="$ARGS '$arg'"
	done
	;;
*)
	for arg in "$@"
	do
		case "x$arg" in
		x-I/usr/X11*/include*)
			ARGS="$ARGS -isystem"
			arg=`echo ".$arg" | sed -e 's/^...//'`
			;;
		esac
		ARGS="$ARGS '$arg'"
	done
	;;
esac
eval "$ACTUAL_GCC" $OPTS $ARGS
