In a recent publication (Hansen-Goos and Mecke 2009 Phys. Rev. Lett. 102 018302) we constructed a free energy functional for the inhomogeneous hard-body fluid, which reduces to Rosenfeld's fundamental measure theory (Rosenfeld 1989 Phys. Rev. Lett. 63 980) when applied to hard spheres. The new functional is able to yield the isotropic-nematic transition for the hard-spherocylinder fluid in contrast to Rosenfeld's fundamental measure theory for non-spherical particles (Rosenfeld 1994 Phys. Rev. E 50 R3318). The description of inhomogeneous isotropic fluids is also improved when compared with data from Monte Carlo simulations for hard spherocylinders in contact with a planar hard wall. However, the new functional for the inhomogeneous fluid in general does not comply with the exact second order virial expansion. We introduced the ζ correction in order to minimize the deviation from Onsager's exact result in the isotropic bulk fluid. In this article we give a detailed account of the construction of the new functional. An extension of the ζ correction makes the latter better suited for non-isotropic particle distributions. The extended ζ correction is shown to improve the description of the isotropic-nematic bulk phase diagram while it has little effect on the results for the isotropic but inhomogeneous hard-spherocylinder fluid. We argue that the gain from using higher order tensorial weighted densities in the theory is likely to be inferior to the associated increase in complexity.