Updated: 2000 Feb 20
Step -1: Make sure you have gcc
The autolog program requires that you have a recent version of the gcc compiler available on your system. autolog and its relatives are not 100% guaranteed under Sun's ansi C compilers, and will definitely not compile under the generic non-ansi cc compiler that was shipped with older SunOS boxes. GNU's gcc is a public-domain ansi-C compiler. The latest version of gcc is available from Sun SITE at UNC Chapel Hill and many other mirror sites.
Step 0: Download the latest copy of autolog
The latest copy of autolog is available via anonymous ftp from Ohio State as a gzip-compressed tar archive (XXKb):
ftp://ftp.astronomy.ohio-state.edu/pub/planet/autolog.tgzAll copies from other sources are not guaranteed... Accept no imitations!
Step 1: Unpack the tar file
Unpack the tar file where you want to create the AutoLog directory:
% zcat autolog.tgz | tar xvf -If you are lucky enough to have the GNU version of tar (e.g., all Linux boxes), then you can type:
% tar xvzf autolog.tgzSome older versions of zcat will not recognized the
.tgz
file extension (tgz
= gzipped tar). In
this case you need to do two steps:
% mv autolog.tgz autolog.gz % zcat autolog.gz | tar xvf -Whichever way you do it, this creates the AutoLog/ directory tree.
Step 2: Find the cfitsio libraries
You will need to have at least version 2.0 of the HEASARC cfitsio libraries on your machine, find out the full path to where the files ``libcfitsio.a'' and ``fitsio.h'' reside. They should be in the same directory. Skip ahead to Step 3.
If you do not have version 2.0 or later of the HEASARC cfitsio subroutine libraries installed on your machine, you will need to get this package and build it now. The libraries are available on the web at the FITSIO Homepage. installation is easy, just follow the directions. Full documentation is available at the same URL.
Once you've installed the cfitsio libraries, remember the path to where the source directory resides. You will need this for the next steps to compile autolog. Step 3: Edit the gccfits script
Go to the AutoLog directory
% cd AutoLogand edit the file gccfits. It should look something like this:
#!/bin/csh setenv CFITSIO /home/keeler/pogge/src/FITSIO/cfitsio gcc $1.c -o $1 -I$CFITSIO -L$CFITSIO -lcfitsio -lm strip $1replace ``/home/keeler/...'' with the path to the cfitsio libraries you found in step 2.
For Solaris systems, you need to include the socket and nsl libraries explicitly, thus
#!/bin/csh setenv CFITSIO /home/keeler/pogge/src/FITSIO/cfitsio gcc $1.c -o $1 -I$CFITSIO -L$CFITSIO -lcfitsio -lm -lsocket -lnsl strip $1This is not required for Linux systems.
When done, make sure that gccfits is still executable by typing:
% chmod +x gccfitsStep 4: Edit autolog.h
If you are on a SunOS box, you will need to make sure that the definition:
#define USE_ERRLISTis correctly set. If you are on a Solaris or Linux box, this line should read:
#undef USE_ERRLISTThis is a bit of gcc/cc arcana, and should go away soon as people (especially Sun) clean up their acts with the compiler libraries.
Step 5: Compile autolog
The autolog program and libraries are compiled using the gccfits script:
% gccfits autologThis should make the autolog executable in the current working directory.
Updated: 2000 February 20 [rwp]