**************
Welcome to DS9
**************

Quick Instructions for those who hate to read instructions:
To build DS9:

***********
For Solaris
***********

$ cd saods9
$ ln -s make.solaris make.include
$ make
$ make install
DS9, stripped, is in saods9/bin/ds9.

***********
For Solaris64
***********
Solaris64 requires gcc 3.3 or greater. There will be numerous casting
error warnings, just ignore.

There is an issue with ranlib and 64bit libs.
This is a work around. Place in current PATH
$ ln -s /usr/bin/touch ranlib

$ cd saods9
$ ln -s make.solaris64 make.include
$ make

# saods9/saotk/ast/mapping.c will fail. Remove -O2 and recompile

$ make saotk ds9
$ make install
DS9, stripped, is in saods9/bin/ds9.

*********
For Linux
*********

$ cd saods9
$ ln -s make.linux make.include
$ make
$ make install
DS9, stripped, is in saods9/bin/ds9.

************
For LinuxPPC
************

$ cd saods9
$ ln -s make.linuxppc make.include
$ make
$ make install
DS9, stripped, is in saods9/bin/ds9.

*********
For FreeBSD
*********

$ cd saods9
$ ln -s make.freebsd make.include
$ make
$ make install
DS9, stripped, is in saods9/bin/ds9.

*********
For Alpha
*********

$ cd saods9
$ ln -s make.alpha make.include
$ make
$ make install
DS9, stripped, is in saods9/bin/ds9.

*******
For SGI
*******

$ cd saods9
$ ln -s make.sgi make.include
$ make
$ make install
DS9, stripped, is in saods9/bin/ds9.

********
For HPUX
********

$ cd saods9
$ ln -s make.hpux make.include
$ make
$ make install
DS9, stripped, is in saods9/bin/ds9.

*******************
For MacOSX (Darwin)
*******************

This port requires the use of X11R6 and Apple X11
DS9 no longer supports MacOSX 10.1.x

MacOSX 10.2.x- Obtain/install Apple X11 from http://www.apple.com/

Build X11R6 in your $HOME dir.

$ cd /usr/include
$ sudo ln -s $HOME/X11R6/include/X11 .

$ cd saods9
$ ln -s make.darwin make.include
$ make
$ make install
DS9, stripped, is in saods9/bin/ds9.

****************************
For Windows NT/2000/XP
****************************

Obtain/install Cygwin from http://www.cygwin.com
edit /usr/include/sys/types.h 
# define FDSETSIZE 8192

$ cd saods9
$ ln -s make.windows make.include
$ make

# html will fail
$ make fixit
# more errors
$ make finish

$ make install
DS9, stripped, is in saods9/bin/ds9.exe.

*******************
Building philosophy
*******************

First, I'd like to apologize for the state of the makefiles and the
build process. We have been very busy, and the current system is only
temporary. We plan on a full gnu autoconf installation in the future.

DS9 is a Tcl/Tk standalone application. It requires no support files,
libraries, etc. To build DS9, you must also build Tcl, Tk, BLT,
MKTCLAPP, TkImg, TkHTML, AST,and XPA, along with SAOtk. The makefiles
handle all this for you, however, it takes some time and appears very
messy.

The current makefiles are targeted for:

make = gnu make
YACC = bison 1.875
LEX = flex 2.5.4
CC = gcc 3.4 (minimum 3.0)
CXX = g++ 3.4 (minimum 3.0)
X11 = R6

Any changes in the above will require you to make changes to make
files and source code.

*****
Notes
*****

There are a number of issues to lead to the current set up.

1. DS9 comes with Tcl/Tk8.4.7. There are several changes to 2 TCL/TK lib
scripts, so you must used this version when building DS9. We had to
make small changes to xmfbox.tcl and tkfbox.tcl to allow
the '[' and ']' chars, and to handle colormaps correctly.

2. We use BLT 2.4z. The SAOtk frame widget uses the BLT vector
type. Therefor, to build SAOtk, you must have BLT and to run SAOtk,
BLT must be loaded first.

3. The windows version is built with gcc under cygwin. I have not tried
to build using MS VC++.  Currently, the following features are NOT
supported under windows: printing directly to a printer. However,
postscript files may be saved.  FITS Bin Table filtering is only
available when run under cygwin

4. The darwin port (MacOSX) requires the use of X11 server from Apple.
DS9 no longer supports MacOSX 10.1.x.

For more information on using ds9 with IRAF under MacOSX, please see
http://www.owlnet.rice.edu/~marcosh/iraf
