I think I will have to correct myself on my previous post about gamma function.
I was looking through the source code of octave when I found that in the file
mappers.cc which matches the octave function to corresponding c or fortran
code, the gamma and lgamma functions do not still use the slatec library
fortran codes for gamma/lgamma functions if the system does not have prebuilt
gamma/lgamma function. the mapper just return undefined function error
for these functions. Seems John Eaton is still working on adding these slatec
function in some coming release of Octave.