#!/bin/bash

set -ex

# Makefile.in sets CC=@MAKEFILE_CC@.  MAKEFILE_CC is the value of the CC
# environment variable when configure was run prefixed with libtool. e.g.
# MAKEFILE_CC = libtool clang
# This means that if you call make CC=clang, it will drop libtool and just
# use clang which breaks the build.  To fix this we mark the variables as
# override, so that the command line argument CC will be ignored.

sed -i -e 's/^CC=/override CC=/g' -e 's/^CXX=/override CXX=/g' dist/Makefile.in
