#! /bin/sh -f

args=''
incdirs=''

for arg in ` echo "$CPLUS_INCLUDE_PATH" | tr : ' ' `
do
  incdirs="$incdirs '-I$arg'"
done

for arg
do
  case "$arg" in
  -I*)
    incdirs="$incdirs '$arg'"
    ;;
  *)
    args="$args '$arg'"
    ;;
  esac
done

eval "c++ $incdirs -I/usr/pkg/include -O2  -Wall -D_FORTIFY_SOURCE=2 -I/usr/pkg/include -D_REENTRANT -D_THREAD_SAFE   -DPIC -fPIC $args"
exit $?
