The reason why GALPROP does not compile properly on a Mac is the following:
First, download the file v50.1p.tgz from the GALPROP website. Before unzipping it, open a terminal window and type
tar -tf v50.1p.tgz
to list the files that are included in this archive. If you scroll down the list, you will find the following entries:
galprop.cc
Galprop.cc
galprop_classes.h
galprop.h
Galprop.h
Notice that there two pairs of files whose filenames only differ by the case of their initial letters: galprop.cc and Galprop.cc, and galprop.h and Galprop.h. Now, though these pairs have very similar filenames, their contents are completely different and you need all four of them for GALPROP to compile properly. Now go ahead and unzip the archive. You will get a new folder called v50.1p but if you look into it, two things could have happened depending on how your Mac is setup:
1) The files galprop.cc and galprop.h are missing.
Your Mac decompresses the files in the archive in the order their names appear in the list and puts them into the v50.1p folder one by one.
But because Mac OS X does not distinguish between lower and uppercase letters, it has overwritten the lowercase named files with the uppercase named files in this process. So you have lost the two files.
2) The files Galprop.cc and Galprop.h are missing, but you have files named Galprop.1.cc and Galprop.1.h instead.
This will happen if your Mac is setup to put version numbers on files with the same name to distinguish among them.
If 2) has happened, the cure is easy.
Galprop.cc does not care what it is called so just leave it as Galprop.1.cc.
The only place where the header file Galprop.h is included is in the file galprop_classes.h. Edit this file so that its 17th line reads
#include "Galprop.1.h" // AWS20050816
instead of
#include "Galprop.h" // AWS20050816
Then just type in "make" and the compilation should go smoothly. (If it doesn't, see below.)
If 1) has happened, first rename Galprop.cc and Galprop.h to something else and edit galprop_classes.h accordingly.
Then, extract the files galprop.cc and galprop.h from the archive one by one by typing
tar -xzf v50.1p.tgz galprop.cc
tar -xzf v50.1p.tgz galprop.h
and place them in the v50.1p folder. Then type "make".
If you get error messages, you will have to edit the file "makefile".
If you have g++ and gfortran installed on your Mac, uncomment the first two lines and change g77 to gfortran in the second line so that they read
CXX = g++
FC = gfortran
This tells "make" which compliers to use. If you installed the CFITSIO library using fink, change the third line to
CFITSIO = /sw
since that is the directory in which fink has installed the lib and include files for CFITSIO.
Also change the 6th line to
LIBS = -lm -lg2c -L/sw/lib/gcc4.3/lib -lgfortran
The extra info tells "make" where the gfortran library is. If it's not there, look for a file called "libgfortran.a" with your finder and setup the path accordingly.
Let me know if this doesn't work.
Good luck!