dnl ---- configure.ac for gb.db.mysql driver

m4_include([../version.m4])
AC_INIT([gambas3-gb-db2-mysql],[GB_VERSION],[GB_MAIL],[],[GB_URL])
AC_CONFIG_MACRO_DIR([m4])

GB_INIT(gb.db2.mysql)
LT_INIT

GB_COMPONENT(
  mysql, MYSQL, gb.db.mysql, [src],
  [GB_FIND(mysql.h, $prefix /opt/local /opt /usr/local/lib /usr/local /usr/lib /usr, include mysql*/include)],
  [GB_FIND(libmysqlclient.$SHLIBEXT, $prefix /opt/local /opt /usr/local /usr, lib mysql*/lib)],
  [$C_LIB -lmysqlclient -lz])

gb_save_cppflags=$CPPFLAGS
CPPFLAGS=$MYSQL_INC

GB_CHECK_MYSQL_CONSTANT(SECURE_AUTH)
GB_CHECK_MYSQL_CONSTANT(SSL_MODE_DISABLED)
GB_CHECK_MYSQL_CONSTANT(SSL_MODE_PREFERRED)
GB_CHECK_MYSQL_CONSTANT(SSL_MODE_VERIFY_CA)
GB_CHECK_MYSQL_CONSTANT(SSL_MODE_VERIFY_IDENTITY)
GB_CHECK_MYSQL_CONSTANT(OPT_COMPRESSION_ALGORITHMS)
GB_CHECK_MYSQL_CONSTANT(OPT_GET_SERVER_PUBLIC_KEY)
GB_CHECK_MYSQL_CONSTANT(OPT_LOAD_DATA_LOCAL_DIR)
GB_CHECK_MYSQL_CONSTANT(OPT_RECONNECT)
GB_CHECK_MYSQL_CONSTANT(OPT_RETRY_COUNT)
GB_CHECK_MYSQL_CONSTANT(OPT_SSL_FIPS_MODE)
GB_CHECK_MYSQL_CONSTANT(OPT_SSL_MODE)
GB_CHECK_MYSQL_CONSTANT(OPT_SSL_VERIFY_SERVER_CERT)
GB_CHECK_MYSQL_CONSTANT(OPT_TLS_CIPHERSUITES)
GB_CHECK_MYSQL_CONSTANT(OPT_ZSTD_COMPRESSION_LEVEL)

CPPFLAGS=$gb_save_cppflags

AC_CONFIG_FILES([\
Makefile \
src/Makefile \
])
AC_OUTPUT

GB_PRINT_MESSAGES
