dnl Determine whether or not to use Database Daemon CNID backend
AC_MSG_CHECKING([whether or not to use Database Daemon CNID backend])
AC_ARG_WITH(cnid-dbd-backend,
- [ --with-cnid-dbd-backend build CNID with Database Daemon Data Store],
+ [ --with-cnid-dbd-backend build CNID with Database Daemon Data Store [[yes]]],
[ if test x"$withval" = x"no"; then
use_dbd_backend=no
AC_MSG_RESULT([no])
dnl Determine whether or not to use BDB Concurrent Data Store
AC_MSG_CHECKING([whether or not to use BDB Concurrent Data Store])
AC_ARG_WITH(cnid-cdb-backend,
- [ --with-cnid-cdb-backend build CNID with Concurrent BDB Data Store],[
+ [ --with-cnid-cdb-backend build CNID with Concurrent BDB Data Store [[no]]],[
if test x"$withval" = x"no"; then
use_cdb_backend=no
else
dnl Determine whether or not to use LAST DID scheme
AC_MSG_CHECKING([whether or not to use LAST DID scheme])
AC_ARG_WITH(cnid-last-backend,
- [ --with-cnid-last-backend build LAST CNID scheme],
+ [ --with-cnid-last-backend build LAST CNID scheme [[yes]]],
[
if test x"$withval" = x"no"; then
use_last_backend=no
dnl Determine whether or not to use TDB DID scheme
AC_MSG_CHECKING([whether or not to use TDB DID scheme])
AC_ARG_WITH(cnid-tdb-backend,
- [ --with-cnid-tdb-backend build DID CNID scheme],
+ [ --with-cnid-tdb-backend build TDB CNID scheme [[yes]]],
[
if test x"$withval" = x"no"; then
use_tdb_backend=no
fi
AM_CONDITIONAL(USE_TDB_BACKEND, test x"$use_tdb_backend" = x"yes")
+ dnl Check for mysql CNID backend
+ AC_ARG_VAR(MYSQL_CFLAGS, [C compiler flags for MySQL, overriding checks])
+ AC_ARG_VAR(MYSQL_LIBS, [linker flags for MySQL, overriding checks])
+
+ AC_MSG_CHECKING([MySQL library and headers])
+ AC_ARG_WITH(
+ mysql-config,
+ [AS_HELP_STRING([--with-mysql-config=PATH],[Path to mysql-config binary (default: mysql_config)])],
+ MYSQL_CONFIG=$withval
+ )
+
+ if test -z "$MYSQL_CONFIG" -a -z "$MYSQL_CFLAGS" -a -z "$MYSQL_LIBS" ; then
+ AC_PATH_PROG(MYSQL_CONFIG, mysql_config)
+ fi
+
+ if test -x "$MYSQL_CONFIG" ; then
+ AC_MSG_RESULT([$MYSQL_CONFIG])
+ MYSQL_CFLAGS="`$MYSQL_CONFIG --cflags`"
+ MYSQL_LIBS="`$MYSQL_CONFIG --libs`"
+ ac_cv_with_cnid_mysql="yes"
+ elif test -n "$MYSQL_CFLAGS" -a -n "$MYSQL_LIBS" ; then
+ ac_cv_with_cnid_mysql="yes"
+ fi
+
+ if test x"$ac_cv_with_cnid_mysql" = x"yes" ; then
+ compiled_backends="$compiled_backends mysql"
+ AC_DEFINE(CNID_BACKEND_MYSQL, 1, [whether the MySQL CNID module is available])
+ fi
+
+ AC_SUBST(MYSQL_CFLAGS)
+ AC_SUBST(MYSQL_LIBS)
+ AM_CONDITIONAL(USE_MYSQL_BACKEND, test x"$ac_cv_with_cnid_mysql" = x"yes")
+
dnl Set default DID scheme
AC_MSG_CHECKING([default DID scheme])
AC_ARG_WITH(cnid-default-backend,
- [ --with-cnid-default-backend=val set default DID scheme],
+ [ --with-cnid-default-backend=val set default DID scheme [[dbd]]],
[
if test x"$withval" = x; then
AC_MSG_RESULT([ignored])