ocaml-mariadb
ocaml-mariadb copied to clipboard
Use mariadb_config binary to determine compiler flags
This will use mariadb_config
to determine what to compile and link against. Closes #15.
I've removed support for switching between connector and uhm, server, since that could be handled by putting different mariadb_config
in the path.
I've let the mariadb
/mysql
include prefix in, since I think it would be nice to be able to compile against the MySQL connector, but for this PR I only added mariadb_config
support and ignore mysql_config
. I am not sure this library is compatible with building against MySQL connector anyway.
Hi
This is not correct. OCaml-MariaDB supports MariaDB's two connectors:
- MariaDB C/Connector (libmariadb-dev): link with
-lmariadb
and includemariadb/mysql.h
- MaraDB's libmysqlclient (libmariadbclient-dev): link with
-lmysqlclient
and includemysql/mysql.h
For the second case, you must use mysql_config
to get the flags.
I'd like to support both connectors at least until an Ubuntu LTS version has a C/Connector package that supports the nonblocking APIs.
Oh, I see. I'll add support for mysql_config
as well. Probably tomorrow.
My MariaDB connector from brew
does not come with a mysql_config
and using the one provided by the MySQL connector does not work since there is no mysql/mysql.h
but I suppose this is just because of weird packaging.
I was actually hoping to be able to use this to connect to an (actual) MySQL server but that seems to fail with all kinds of errors.
Doesn't the MariaDB brew package come with a mysql_config
?