collectd: enable/disable libpq explicitly
collectd: enable/disable libpq explicitly

If '--with-libpq' is not included in configure options, the configure
script will assume 'with-libpq=yes' and try to figure below variables
out with 'pg_config':

    with_libpq_includedir, with_libpq_libdir

This causes configure QA errors on some hosts that have 'pg_config'
installed (which from postgresql-devel):

* ERROR: This autoconf log indicates errors, it looked at host include
  and/or library paths while determining system capabilities.

Anyways the target package should not depend on any host headers/libs,
we should enable/disable the libpq support explicitly according to if
the postgresql feature was enabled.

Signed-off-by: Wenzong Fan <f66bf62bd6ae2fe84a21d414af2ae81bdc552ed9@windriver.com>
Signed-off-by: Jackie Huang <49ec7cfe045884df7178a7e982697c7043dbc82b@windriver.com>
Signed-off-by: Martin Jansa <516df3ff67e1fa5d153800b15fb204c0a1a389dc@gmail.com>

WindRiver-OpenSourceLabs/meta-oe-subset,WindRiver-OpenSourceLabs/meta-oe-subset