hartmut

I've had my own set of autotool macros for building against different MySQL client and server APIs for quite a while. Originally created as part of my code generator projects (CodeGen_MySQL_UDF and CodeGen_MySQL_Plugin) I ended up having diverging copies in a few other projects, too (my and my autotools branch of ).

So I've finally taken the time to merge the differnet copies into a single standalone project on GitHUB.

The set of autoconf macros supports in this project supports:

  • building against the various MySQL APIs:
    • regular client library API
    • embedded server library API
    • User Defined Function (UDF) API
    • Plugin API
    • NDBAPI
  • check for minimum required version
  • check for a specifc fork (MySQL, MariaDB, ...)
  • building against files from a server source dir

E.g. an autotools project building against the embedded
server library and requiring a certain minimal version of
MariaDB could use the following configure.ac snippet to
support this:


[...]
WITH_MYSQL_SRC()
WITH_MYSQL()
MYSQL_NEED_VERSION([5.5.34])
MYSQL_NEED_FORK([mariadb])
MYSQL_USE_EMBEDDED_API()
MYSQL_SUBST()
[...]

For more detailed information check the README on GitHUB

Tags: 

About the Author

hartmut's picture
Hartmut Holzgraefe

Hartmut has a long experience of MariaDB and MySQL.

hartmut

Anybody out there willing to create a CMake module with similar functionality?

Newsletter Signup

Subscribe to get MariaDB tips, tricks and news updates in your inbox: