pkg-config detection is done manually for gtk but for qt and ncurses it uses the
pkg.m4 macros, this create conflict between the two methods (empty vs no value
for example).
Attach a patch:
- add pkg-config initialization to make the pkg.m4 macros happy.
- remove the manual pkg-config detection.
- detect existence by output of pkg.m4 method.