47 lines (38 with data), 703 Bytes
#!/bin/sh
if test -n "$1"
then
if test "$1" = -help -o "$1" = --help -o "$1" = -h
then
echo " Usage: configure [-intel] [-mingw]"
echo " Recognized variables:"
echo " CXX C++ compiler executable"
echo " CXXFLAGS Additional compiler flags"
exit 0
fi
fi
# Empty config.mk
echo > config.mk
# Compilers
if test -n "$1"
then
if test "$1" = -intel
then
if test -z $CXX
then
CXX=icpc
fi
AR = xiar
CXXFLAGS="$CXXFLAGS"
fi
fi
# Variables
if test -n "$CXX"
then
echo "CXX = $CXX" >> config.mk
fi
if test -n "$CXXFLAGS"
then
echo "CXXFLAGS = $CXXFLAGS" >> config.mk
fi
# Clean all since configuration changed
make distclean