Build fixes and proper generation of 'config.h'

Signed-off-by: Harshavardhana <fharshav@redhat.com>