This paper addresses the problem of energy-optimal waypoint-following guidance for an Unmanned Aerial Vehicle with the consideration of a general autopilot dynamics model. The proposed guidance law is derived as a solution of a linear quadratic optimal control problem in conjunction with a linearized kinematics model. The algorithm developed integrates path planning and following into a single step and is able to be applied to a general waypoint-following mission. Theoretical analysis reveals that previously suggested optimal point-to-point guidance laws are special cases of the proposed approach. Nonlinear numerical simulations clearly demonstrate the effectiveness of the proposed formulations.