This README file contains instructions to install the jfftw Java wrapper for  
the FFTW C library developed by Will Hossack, School of Physics, The University 
of Edinburgh.
For problems on installation, please contact Francesca De Angeli, Institute of 
Astronomy (fda at ast.cam.ac.uk).

The packafe uses Java native interfaces to allow the usage of the latest release 
of the FFTW C library from Java.

The package requires the installation of the FFTW C library. For instructions 
please refer to the FFTW documentation (www.fftw.org).

After installing the FFTW library on your computer you will need to compile the 
c codes in the directory jfftw/c into a library. Under linux this should be 
achieved straightfowardly using the provided Makefile. Instructions for Mac users 
follow at the end of this file.
 
Add the jfftw/jfftw.jar archive to your java classpath.

If anyone experiences problems that are not included in this file (and finds a 
solution) please let us know so that we can add it to this README.

** Installation of the JFFTW Java wrapper for FFTW on a MacOSX **

1) Download and install the FFTW 3.1 C library from www.fftw.org.
   Installing the FFTW C library creates no problem whatsoever.
   
2) Open the archive jfftw.tar.gz. This will create a directory "jfftw".
   This contains a sub-directory called "c". From "jfftw/c" do the following:
   
   >  cc -bundle -I /System/Library/Frameworks/JavaVM.framework/Headers -o libjfftw3.jnilib -framework JavaVM uk_ac_ed_ph_jfftw_FFTWImp.c uk_ac_ed_ph_jfftw_FFTWComplexImp.c uk_ac_ed_ph_jfftw_FFTWRealImp.c -lfftw3
      
   (this command is all on one line)      
   This creates the JNI library libjfftw.jnilib. This has to be moved to
   /usr/lib/java/ with 
   
   >  sudo mv libjfftw.jnilib /usr/lib/java/.  
   (this will prompt for your passwd)
   
3) Add the jfftw/jfftw.jar archive to your java classpath.
