#! /bin/csh
#
# file shsetup
#      =======
#
# version 6, 29-May-96
# ^^^ this is a dummy version number.  It is usually not updated, because
# this file should not be automatically copied to your system.
#
# setup of SH program
# K. Stammler, 12-Dec-92
#
# This file must be 'source'd in a csh or tcsh shell before running SH.
# Please edit the beginning of the file to match your environment.

#
#
# root path
# ---------
#
# root path for SH (this is where the directories 'source', 'util',
# 'help', etc ..., are)
#
set shcroot=/usr/local/sh


#
#
# compiler switches
# -----------------
#
# If you have to recompile the sources set appropriate values to these
# environment variables.
# SH_COMPILER   :   The ANSI compiler (like gcc or acc, others I didn't check)
#                   The ordinary cc of Sun-Solaris-1 does NOT work.
# SH_CCOPTIONS  :   Options passed to the compiler.  Debugging (-g) is enabled
#                   by default.  Don't use '-DSH_SETUP_GRF' at other places
#                   than SZGRF observatory.  If you want to have compiled the
#                   AH-interface specify '-DSH_SETUP_AH'.  But then you
#                   need (a) to specify also '-lahio' on SH_LINKLIBS and (b)
#                   an appropriate AH-library (libahio.a) in $SH_LIB.  The
#                   one provided is working only on Sun Solaris-1 (SunOS 4.1.3).
# SH_TEXTEDIT   :   Call to (graphical) text editor, like 'textedit' in OpenLook
#                   or 'vuepad' in HP-UX.
# SH_LINKLIBS   :   Additional libraries linked to the executables.  '-lahio'
#                   is required if you have specified '-DSH_SETUP_AH' on
#                   SH_CCOPTIONS (see above).
# SH_MOTIFLIBS  :   extra libraries for OSF/Motif
# SH_LINKOPTIONS:   Additional library paths
# SH_RANLIB     :   ranlib-program for libraries.  Usually 'ranlib' on
#                   Sun-Solaris-1 and 'touch' (which means: do nothing) on
#                   Sun-Solaris-2.
#
# some example settings:
#
# (1) version for Solaris-1 with acc-compiler and AH interface at SZGRF
# acc is not used any more at SZGRF for compiling SH, I switched to gcc (vrs 3).
# acc does not compile properly the one K&R C-source tape_basics.c.
#setenv SH_COMPILER acc
#setenv SH_CCOPTIONS '-g -Xc -vc -DSH_SETUP_GRF -DSH_SETUP_AH'
#setenv SH_TEXTEDIT textedit
#setenv SH_LINKLIBS '-lahio'
#setenv SH_MOTIFLIBS ''
#setenv SH_LINKOPTIONS '-Bstatic'
#setenv SH_RANLIB ranlib
#
# (2) version for Solaris-1 with gcc-compiler with AH interface and wchar_t
# (tested at BGR Hannover)
#setenv SH_COMPILER gcc
#setenv SH_CCOPTIONS '-g -DSH_SETUP_AH -Dwchar_t=char'
#setenv SH_TEXTEDIT textedit
#setenv SH_LINKLIBS '-lahio'
#setenv SH_MOTIFLIBS ''
#setenv SH_LINKOPTIONS
#setenv SH_RANLIB ranlib
#
# (3) version for Solaris-1 with gcc-compiler, with AH interface
# (tested at SZGRF)
#setenv SH_COMPILER gcc
#setenv SH_CCOPTIONS '-g -DSH_SETUP_AH'
#setenv SH_TEXTEDIT textedit
#setenv SH_LINKLIBS '-lahio'
#setenv SH_MOTIFLIBS ''
#setenv SH_LINKOPTIONS
#setenv SH_RANLIB ranlib
#
# (4) version for Solaris-2 with gcc compiler, with AH (tested at SZGRF)
#setenv SH_COMPILER gcc
#setenv SH_CCOPTIONS '-g -DSH_SETUP_AH -DSH_SETUP_SZGRF -I/usr/dt/include -I/usr/openwin/share/include'
#setenv SH_TEXTEDIT nedit
#setenv SH_LINKLIBS '-lahio -lnsl'
#setenv SH_MOTIFLIBS ''
#setenv SH_LINKOPTIONS -L/usr/dt/lib
#setenv SH_RANLIB touch
#
# (5) version for Linux with gcc compiler (tested at SZGRF)
#setenv SH_COMPILER gcc
#setenv SH_CCOPTIONS '-g -I/usr/X11R6/include'
#setenv SH_TEXTEDIT nedit
#setenv SH_LINKLIBS
#setenv SH_MOTIFLIBS ''  # static version
#setenv SH_LINKOPTIONS '-L/usr/X11R6/lib'
#setenv SH_RANLIB ranlib

# (6) version for HP-UX (tested at Collm-Observatory, CLL)
#setenv SH_COMPILER cc
#setenv SH_CCOPTIONS '-g -Ae -DSH_SETUP_HPUX -I/usr/include/X11R5 -I/usr/include/Motif1.2'
#setenv SH_TEXTEDIT vuepad
#setenv SH_LINKLIBS ''
#setenv SH_MOTIFLIBS ''
#setenv SH_LINKOPTIONS '-L/usr/lib/X11R5 -L/usr/lib/Motif1.2'
#setenv SH_RANLIB ranlib
#
# (7) version for IBM/AIX (tested at University of Goettingen)
#setenv SH_COMPILER c89
#setenv SH_CCOPTIONS '-g -Xc -vc -DSH_SETUP_AIX -D_POSIX_SOURCE'
#setenv SH_TEXTEDIT not-yet-tested
#setenv SH_LINKLIBS ''
#setenv SH_MOTIFLIBS ''
#setenv SH_LINKOPTIONS '-L/usr/local/X11/lib'
#setenv SH_RANLIB ranlib

# Preliminary version for use with Mac OS X 10.4 (James Wookey, Uni. of Bristol)
setenv SH_COMPILER gcc
setenv SH_CCOPTIONS '-g -I/usr/X11R6/include'
setenv SH_TEXTEDIT nedit
setenv SH_LINKLIBS
setenv SH_MOTIFLIBS ''  # static version
setenv SH_LINKOPTIONS '-L/usr/X11R6/lib'
setenv SH_RANLIB ranlib


# -----------------------------------------------------------------------------
#  Do not edit beyond this point (at least try to)
# -----------------------------------------------------------------------------



# paths
setenv SH_ROOT $shcroot
setenv SH_USERROOT $HOME/sh
setenv SH_PRIVATE $SH_USERROOT/private
setenv SH_HELP $shcroot/help/
setenv SH_COMMAND $shcroot/command/
setenv SH_COMMAND2 $shcroot/command/bmp/
setenv SH_FILTER $shcroot/filter/
setenv SH_GLOBALS $shcroot/globals/
setenv SH_ERRORS $shcroot/errors/
setenv SH_INPUTS $shcroot/inputs/
setenv SH_UTIL $shcroot/util/
setenv SH_PDE $shcroot/inputs/pde/
setenv SH_SOURCE $shcroot/source/
setenv SH_EXTPROG $shcroot/util/
setenv SH_LIB $shcroot/lib/
if  (! -e $HOME/sh/shscratch)  then
   echo 'creating directory $HOME/sh/shscratch'
   mkdir -p $HOME/sh/shscratch 
endif
if  (! -e $HOME/sh/private)  then
   echo 'creating directory $HOME/sh/private'
   mkdir -p $HOME/sh/private
endif
setenv SH_SCRATCH $HOME/sh/shscratch/
setenv SH_USERDIR $HOME/sh/private/
alias SH $shcroot/shc_world
alias SH_N $shcroot/shc
#
#
# all following instructions are not needed for the command line version SH
# -------------------------------------------------------------------------
#
# for SHM
#
alias SHM '(setenv UIDPATH $shcroot/source/motif/shm_world.uid; $shcroot/source/motif/shm_world)'
alias SHM_N '(setenv UIDPATH $shcroot/source/motif/shm.uid; $shcroot/source/motif/shm)'
#
# for utility programs of SHM
#
setenv SH_LOCSAT /programs/sol2/ls
setenv SH_LOCSAT_EXEC $SH_UTIL/LocSAT
#
# for SEED software
#
setenv SEED_INPUTS $SH_SOURCE/seed_io/inputs
setenv SEED_PROG $SH_SOURCE/seed_io
alias sfdlist $SEED_PROG/sfdlist.csh
alias sfdlist_l $SEED_PROG/sfdlist_l.csh
alias sfd_extract_times $SEED_PROG/sfd_extract_times
alias seed_tape $SEED_PROG/seed_tape
alias seed_gaps $SEED_PROG/seedgaps
