view configure @ 458:e26b974f7ba3

doc/AMR-study-utils: update for the current situation
author Mychaela Falconia <falcon@freecalypso.org>
date Fri, 10 May 2024 18:45:36 +0000
parents 19f1aa01ea10
children cb1d1ea7f2c5
line wrap: on
line source

#!/bin/sh
# This configure script is custom and hand-coded;
# it is NOT a product of GNU Autoconf or any other such tools!

set -e

if [ ! -f configure ]
then
	echo "This script needs to be run from the top of the source tree" 1>&2
	exit 1
fi

# defaults that can be overridden
CC=gcc
CFLAGS=-O2
PREFIX=/opt/themwi

while [ $# != 0 ]
do
	case "$1" in
		--prefix=*)
			PREFIX=`echo $1 | cut -c 10-`
			;;
		CC=*)
			CC=`echo $1 | cut -c 4-`
			;;
		CFLAGS=*)
			CFLAGS=`echo $1 | cut -c 8-`
			;;
		*)
			echo "error: non-understood option $1" 1>&2
			exit 1;
			;;
	esac
	shift
done

# emit the Makefile include fragment
echo "CC=$CC" > config.defs
echo "CFLAGS=$CFLAGS" >> config.defs
echo "PREFIX=$PREFIX" >> config.defs