#!/bin/csh
#
#  Creates configuration Makefile. Before attempting to make anything
#  in this directory, enter
#
#   ./configure
#
#  !REVISION HISTORY
#
#  09oct97   da Silva   Initial code.
#  19oct97   da Silva   Simplified.
#  14Nov97   C Redder   Modified all occurances of rm -f to /bin/rm -f
#                       to suppress confirmation messages.
#  25Jan00   Todling    Addapted to be used by ARPACK
#
#.....................................................................

if ( $#argv >= 1 ) then
	cd ../include
	if($status) exit 1
	echo "Usage: "
        echo "           configure "
	echo " "
        exit 1
endif

# First try a site specific ARmake.inc
# ------------------------------------
  set makeconf = ARmake.`uname -n`

# If there is no such a thing, try an Architecture dependent
# ----------------------------------------------------------
  if ( ! (-e $makeconf) ) set makeconf = ARmake.`uname -s`


# Just make the symlink()
# -----------------------
  if ( -e ./ARMAKES/$makeconf ) then
	/bin/rm -f ARmake.inc
        ln -s ./ARMAKES/$makeconf ARmake.inc
        echo " "
	echo "configure: successful configuration - ARmake.inc is $makeconf"
        echo " "

  else
        echo " "
        echo error: cannot find site or arch dependent ARmake.inc
        echo " "
        exit 1

  endif

# All done
# --------
  exit 0
