#!/bin/tcsh -f
# IRAFXTERM.CSH -- try to determine if we should start up an xterm
# or an xgterm
#

# initialize SAORD variables
if ( $?SAORD_ROOT == 0 ) then
  setenv SAORD_ROOT /scisoft/saord
endif
if ( -e ${SAORD_ROOT}/xpa1 ) then
  setenv XPA_VERSION 1
else
  setenv XPA_VERSION 2
endif
if ( $?SAORD_BIN == 0 ) then
  setenv SAORD_BIN ${SAORD_ROOT}/bin.`${SAORD_ROOT}/getarch`
endif
if ( $?SAORD_TMPDIR == 0 ) then
  setenv SAORD_TMPDIR /tmp
endif
setenv SAORD_VERSION "`cat ${SAORD_ROOT}/VERSION`"
# end of SAORD initialization

if ( $?NCLXTERM == 0 ) then
    if ( "`${SAORD_BIN}/access xgterm`" != "" ) then
	setenv NCLXTERM "xgterm"
    else
	setenv NCLXTERM "xterm"
    endif
endif

echo "$NCLXTERM"

