Hi
PG_config doesn't seem the problem. From the config.log
configure:18606: checking for pg_config
configure:18625: found /usr/bin/pg_config
configure:18637: result: /usr/bin/pg_config
configure:18651: checking for PQexec in -lpq
configure:18676: i686-w64-mingw32-gcc -o conftest.exe -O2 -g -pipe -Wall -fexceptions --param=ssp-buffer-size=4 -mms-bitfields -I/usr/i686-w64-mingw32/sys-root/mingw/include -mms-bitfields -I/usr/i686-w64-mingw32/sys-root/mingw/include/pango-1.0 -I/usr/i686-w64-mingw32/sys-root/mingw/include/cairo -I/usr/i686-w64-mingw32/sys-root/mingw/include/glib-2.0 -I/usr/i686-w64-mingw32/sys-root/mingw/lib/glib-2.0/include -I/usr/i686-w64-mingw32/sys-root/mingw/include/pixman-1 -I/usr/i686-w64-mingw32/sys-root/mingw/include -I/usr/i686-w64-mingw32/sys-root/mingw/include/freetype2 -I/usr/i686-w64-mingw32/sys-root/mingw/include -I/usr/i686-w64-mingw32/sys-root/mingw/include/libpng16 -Wl,--exclude-libs=libintl.a -Wl,--exclude-libs=libiconv.a -Wl,--no-keep-memory conftest.c -lpq /usr/i686-w64-mingw32/sys-root/mingw/lib/libintl.dll.a -L/usr/i686-w64-mingw32/sys-root/mingw/lib >&5
/usr/lib64/gcc/i686-w64-mingw32/5.1.0/../../../../i686-w64-mingw32/bin/ld: cannot find -lpq
collect2: error: ld returned 1 exit status
configure:18676: $? = 1
configure: failed program was:
| /* confdefs.h */