ocaml-community / ocaml-mariadb

OCaml bindings to MariaDB, supporting the nonblocking API
55 stars 18 forks source link

Use cc instead of gcc to get this to compile on FreeBSD #32

Closed apeschar closed 3 years ago

apeschar commented 4 years ago

FreeBSD doesn't have gcc so that breaks ./configure.

cc links to GCC on Linux, and to clang on FreeBSD, so it should always work.

With this change, opam install mariadb works with these environment variables set:

CPATH="/usr/local/include/mysql:/usr/local/include/mysql/mysql:/usr/local/include" \
LIBRARY_PATH="/usr/local/lib/mysql:/usr/local/lib" \
opam install mariadb

We should probably be using mysql_config/mariadb_config instead, but I guess that's a bit more work to implement.

andrenth commented 3 years ago

Sorry it took so long...

apeschar commented 3 years ago

Better late than never. :)