#! /bin/sh
# Generated automatically from mmc.in by configure.
#---------------------------------------------------------------------------#
# Copyright (C) 1994-1998, 2000-2002 The University of Melbourne.
# This file may only be copied under the terms of the GNU General
# Public License - see the file COPYING in the Mercury distribution.
#---------------------------------------------------------------------------#
#
# MMC - Melbourne Mercury Compiler.
#
# Use `mmc -h' for help.
#
# Environment variables: MERCURY_STDLIB_DIR, MERCURY_INT_DIR,
# MERCURY_ALL_MC_C_INCL_DIRS, MERCURY_COMPILER, MERCURY_C_COMPILER,
# MERCURY_DEFAULT_GRADE, MERCURY_DEFAULT_OPT_LEVEL.

MC=${MERCURY_COMPILER="/usr/lib/mercury/bin/powerpc-mandrake-linux-gnu/mercury_compile"}
case "$MERCURY_INT_DIR" in
    "")
	INT_DIR_OPT=
	STDLIB_DIR=${MERCURY_STDLIB_DIR=/usr/lib/mercury}
	STDLIB_DIR_OPT="--mercury-standard-library-directory \"${STDLIB_DIR}\""
	;;
    *)
	INT_DIR_OPT="-I $MERCURY_INT_DIR"
	STDLIB_DIR_OPT=--no-mercury-standard-library-directory
	;;
esac

# The default options settings are passed in the DEFAULT_MCFLAGS enviroment
# variable, rather than on the command line, so that they can be overridden
# by the value of MCFLAGS in the Mercury.options file. 
#
# The default optimization level should be after
# all the options that describe the machine configuration.
DEFAULT_MCFLAGS=${DEFAULT_MCFLAGS-"\
		$MERCURY_ALL_MC_C_INCL_DIRS \
		--cc \"${MERCURY_C_COMPILER=gcc}\" \
		--grade \"${MERCURY_DEFAULT_GRADE=asm_fast.gc}\" \
		--cflags-for-threads \"-DMR_THREAD_SAFE -DLINUX_THREADS 			-D_THREAD_SAFE -D_REENTRANT\" \
		--cflags-for-regs \"\" \
		--cflags-for-gotos \"-fno-defer-pop -fno-function-cse -fno-gcse\" \
		--cflags-for-pic \"\" \
		--c-flag-to-name-object-file \"-o \" \
		--object-file-extension \".o\" \
		--pic-object-file-extension \".pic_o\" \
		--create-archive-command \"ar\" \
		--create-archive-command-output-flag \"\" \
		--create-archive-command-flags \"cr\" \
		--ranlib-command \"ranlib\" \
		--fullarch \"powerpc-mandrake-linux-gnu\" \
		--install-prefix \"/usr\" \
		 --libgrade asm_fast.gc --libgrade hlc.gc --libgrade asm_fast.gc.prof --libgrade asm_fast.gc.memprof --libgrade asm_fast.gc.tr --libgrade asm_fast.gc.tr.debug --libgrade hlc.par.gc \
		--num-real-r-regs \"5\" \
		--num-real-r-temps \"6\" \
		--conf-low-tag-bits \"2\" \
		--bits-per-word \"32\" \
		--bytes-per-word \"4\" \
		--dotnet-library-version \"1.0.2411.0\" \
		 \
		--no-unboxed-float \
		${MERCURY_DEFAULT_OPT_LEVEL=-O2} \
		$STDLIB_DIR_OPT \
		"}
export DEFAULT_MCFLAGS

case $# in
	0) exec $MC $INT_DIR_OPT ;;
	*) exec $MC "$@" $INT_DIR_OPT ;;
esac

