#! /bin/sh
# a workaround for Mathematica's mcc, which despite several
# postings to support@wolfram.com is still unable to order
# object files and library options correctly
# this file is part of FormCalc
# last modified 30 May 06 th


linkopt=""
otheropt=""

for opt in "$@" ; do
  case $opt in
  -[Ll]* | *.a)
    linkopt="$linkopt \"$opt\""
    ;;
  *)
    otheropt="$otheropt \"$opt\""
    ;;
  esac
done

eval "set -x ; ${REALCC:-gcc} $otheropt $linkopt -lpthread"

