After that i've tried to configure with following: LDFLAGS="-L/test/core/mariadb/lib" ./configure --prefix=/test/core/dovecot --with-ssldir=/test/core/dovecot/tls --with-mysql
LDFLAGS="-L/test/core/mariadb/lib" ./configure --prefix=/test/core/dovecot --with-ssldir=/test/core/dovecot/tls --with-mysql