#!/bin/sh

: ${R_HOME=`R RHOME`}
if test -z "${R_HOME}"; then
    echo "could not determine R_HOME"
    exit 1
fi

cp src/Makevars.in src/Makevars

CC=`"${R_HOME}/bin/R" CMD config CC`
if $CC -v 2>&1 | grep -q '^gcc version'; then
  echo "PKG_CFLAGS = -Wall" >> src/Makevars
fi
