See http://www.astro.princeton.edu/~jhartman/vartools/README_1.38 for general instructions on how to install VARTOOLS version 1.38, including for Linux. This file provides step-by-step instructions for installing on a Mac. The following procedure has been used to successfully build vartools on an out-of-the-box Mac running macOS Mojave 10.14.3. The text on any line starting with a "$" (i.e., all text excluding the leading $) should be entered into a terminal. On a Mac that has already been setup, some of the required software may already be installed, and those steps can be skipped. 1. Download and install Xcode from the App store: https://developer.apple.com/xcode 2. Install xcode command-line tools $ xcode-select --install 3. Install Homebrew: https://brew.sh/ $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" 4. Install wget: $ brew install wget 5. Install gawk: $ brew install gawk 6. Install CFITSIO: $ brew install cfitsio 7. Install GSL: $ brew install gsl 8. Install libtool: $ brew install libtool 9. Install python: $ brew install python 10. Install numpy: $ pip3 install numpy 11. Install R: $ brew install R 12. Install CSPICE: http://naif.jpl.nasa.gov/naif/toolkit_C.html Download MacOS version of cspice.tar.Z (the wget command below will pull the 64bit version, if you have a 32bit processor, you should get that version instead). $ mkdir ${HOME}/src $ cd ${HOME}/src $ wget http://naif.jpl.nasa.gov/pub/naif/toolkit//C/MacIntel_OSX_AppleC_64bit/packages/cspice.tar.Z unpack and build via: $ tar -xzvf cspice.tar.Z $ cd cspice $ tcsh makeall.csh $ mkdir ${HOME}/lib ${HOME}/include $ cp lib/*.a ${HOME}/lib $ cp include/*h ${HOME}/include Install the CSPICE kernel files: $ mkdir ${HOME}/.cspice $ cd ${HOME}/.cspice In Safari, navigate to ftp://naif.jpl.nasa.gov/pub/naif/generic_kernels/spk/planets/ say yes to allow the page to open in finder, and login as a guest. Copy the latest .bsp file (e.g., de435.bsp in April 2019) to ${HOME}/.cspice e.g., after connecting to the ftp server, the following works for me in the terminal: $ cp /Volumes/planets/de435.bsp ${HOME}/.cspice/ In Safari, navigate to ftp://naif.jpl.nasa.gov/pub/naif/generic_kernels/lsk/ say yes to allow the page to open in finder, and login as a guest. Copy the latest .tls file (e.g., naif0012.tls in April 2019) to ${HOME}/.cspice e.g., after connecting to the ftp server, the following works for me in the terminal: $ cp /Volumes/lsk/naif0012.tls ${HOME}/.cspice/ In Safari, navigate to ftp://naif.jpl.nasa.gov/pub/naif/generic_kernels/pck/ say yes to allow the page to open in finder, and login as a guest. Copy the latest pck*.tpc file (e.g., pck00010.tpc in April 2019) to ${HOME}/.cspice e.g., after connecting to the ftp server, the following works for me in the terminal: $ cp /Volumes/pck/pck00010.tpc ${HOME}/.cspice/ Setup environment variables in your .bash_profile: $ touch ${HOME}/.bash_profile $ echo export R_HOME=$(R RHOME) >> ${HOME}/.bash_profile $ echo export CSPICE_EPHEM_FILE=${HOME}/.cspice/de435.bsp >> ${HOME}/.bash_profile $ echo export CSPICE_LEAPSEC_FILE=${HOME}/.cspice/naif0012.tls >> ${HOME}/.bash_profile $ echo export CSPICE_PLANETDATA_FILE=${HOME}/.cspice/pck00010.tpc >> ${HOME}/.bash_profile You would update de435.bsp, naif0012.tls and pck00010.tpc as needed. $ source ${HOME}/.bash_profile 13. Download, configure, and build vartools (assuming above has been followed for installing libraries): $ cd ${HOME}/src $ wget http://www.astro.princeton.edu/~jhartman/vartools/vartools-1.38.tar.gz $ tar -xzvf vartools-1.38.tar.gz $ cd vartools-1.38 $ ./configure --prefix=${HOME}/ \ --with-cspice-lib=${HOME}/lib/cspice.a \ --with-cspice-include=${HOME}/include \ --with-RHOME=${R_HOME} \ F77=gfortran FC=gfortran $ make $ make install The vartools binary will now be installed in ${HOME}/bin 14. Test vartools: $ ${HOME}/bin/vartools -i EXAMPLES/2 -oneline -LS 0.1 10. 0.1 5 1 EXAMPLES/OUTDIR1 whiten clip 5. 1