Density functional theory for inhomogeneous polymer solutions