John:
./configure --help

might also be a good idea, I think it might have some options like:

--mysql-libs=/path/to/lib
--mysql-includes=/path/to/include

or something similiar to use.

Unfortunately not, just the "--with-mysql" Option.

Oscar:
You might need CPPFLAGS as well. (e.g. CPPFLAGS="-I/test/core/mariadb/include")
Check also "config.log" for errors.

I had already done both, just forgot to mention it.
But i should have looked further.

Near the end of config.log is saw:
================================
| /* Override any GCC internal prototype to avoid an error.
|    Use char because int might match the return type of a GCC
|    builtin and then its argument prototype would still apply.  */
| #ifdef __cplusplus
| extern "C"
| #endif
| char mysql_init ();
| int
| main ()
| {
| return mysql_init ();
|   ;
|   return 0;
| }
configure:23386: result: no
configure:23520: error: Can't build with MySQL support: libmysqlclient not found
================================
and thought that wouldn't help me.

Now i looked again but further up an saw:
================================
configure:23377: gcc -o conftest -std=gnu99 -g -O2 -fstack-protector-strong -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -mfunction-return=keep -mindirect-branch=keep -Wall -W -Wmissing-prototypes -Wmissing-declarations> ...
/usr/bin/ld: cannot find -lz
collect2: error: ld returned 1 exit status
================================

Zlib i have (of course ;) ) also compiled from source.
After adding "/test/dep/zlib/include" to CPPFLAGS and "/test/dep/zlib/lib" to LDFLAGS the configuration runs without errors.

However i don't understand why the configuration-script takes the non-standard path for openssl automatically and correctly from the PKG_CONFIG_PATH,
but the paths to my zlib and mariadb installations, which i also set in PKG_CONFIG_PATH not...