#!/bin/sh
# script to compile C programs that are linked 
# against Fortran libraries
# last modified 11 Feb 03 th

linkopt=""
cpplib=""
otheropt=""

for opt in $* ; do
  case $opt in
  -[Ll]* | *.a)
    linkopt="$linkopt $opt"
    ;;
  *.cc)
    otheropt="$otheropt $opt"
    cpplib="-lstdc++"
    ;;
  *)
    otheropt="$otheropt $opt"
    ;;
  esac
done

set -x
gcc $otheropt $linkopt $cpplib

