summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.in13
-rw-r--r--aclocal.m41
-rw-r--r--config.h.in3
-rwxr-xr-xconfigure198
-rw-r--r--configure.ac4
-rw-r--r--libltdl/Makefile.in13
-rw-r--r--m4/ax_lib_mysql.m4148
-rw-r--r--src/Client/Makefile.in13
-rw-r--r--src/Client/Requests/Makefile.in13
-rw-r--r--src/Common/Backends/Makefile.in13
-rw-r--r--src/Common/Makefile.in13
-rw-r--r--src/Common/RequestHandlers/Makefile.in13
-rw-r--r--src/Common/Requests/Makefile.in13
-rw-r--r--src/Core/Backends/Makefile.in13
-rw-r--r--src/Core/Makefile.in13
-rw-r--r--src/Core/RequestHandlers/Makefile.in13
-rw-r--r--src/Core/Requests/Makefile.in13
-rw-r--r--src/Daemon/Backends/Makefile.in13
-rw-r--r--src/Daemon/Makefile.in13
-rw-r--r--src/Daemon/RequestHandlers/Makefile.in13
-rw-r--r--src/Daemon/Requests/Makefile.in13
-rw-r--r--src/Makefile.am2
-rw-r--r--src/Makefile.in15
-rw-r--r--src/Net/Makefile.in13
-rw-r--r--src/Net/Packets/Makefile.in13
-rw-r--r--src/modules/Makefile.am8
-rw-r--r--src/modules/Makefile.in33
-rw-r--r--src/modules/SystemBackendPosix.h8
-rw-r--r--src/modules/SystemBackendProc.h8
-rw-r--r--src/modules/UserBackendMysql.cpp50
-rw-r--r--src/modules/UserBackendMysql.h64
31 files changed, 656 insertions, 120 deletions
diff --git a/Makefile.in b/Makefile.in
index 04b7d86..cac5cb8 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -40,10 +40,11 @@ DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
config/install-sh config/ltmain.sh config/missing
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/argz.m4 \
- $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltdl.m4 \
- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
- $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/ax_lib_mysql.m4 $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltdl.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \
+ $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
@@ -135,6 +136,10 @@ LT_DLPREOPEN = @LT_DLPREOPEN@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
+MYSQL_CFLAGS = @MYSQL_CFLAGS@
+MYSQL_CONFIG = @MYSQL_CONFIG@
+MYSQL_LDFLAGS = @MYSQL_LDFLAGS@
+MYSQL_VERSION = @MYSQL_VERSION@
NM = @NM@
NMEDIT = @NMEDIT@
OBJEXT = @OBJEXT@
diff --git a/aclocal.m4 b/aclocal.m4
index ca2982d..0456cbb 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -896,6 +896,7 @@ AC_SUBST([am__untar])
]) # _AM_PROG_TAR
m4_include([m4/argz.m4])
+m4_include([m4/ax_lib_mysql.m4])
m4_include([m4/libtool.m4])
m4_include([m4/ltdl.m4])
m4_include([m4/ltoptions.m4])
diff --git a/config.h.in b/config.h.in
index b437711..a642aba 100644
--- a/config.h.in
+++ b/config.h.in
@@ -96,6 +96,9 @@
/* Define to 1 if you have the `memset' function. */
#undef HAVE_MEMSET
+/* Define to 1 if MySQL libraries are available */
+#undef HAVE_MYSQL
+
/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
#undef HAVE_NDIR_H
diff --git a/configure b/configure
index ba31f0b..261dd35 100755
--- a/configure
+++ b/configure
@@ -903,6 +903,10 @@ GnuTLS_CFLAGS
GnuTLS_LIBS
sigc_CFLAGS
sigc_LIBS
+MYSQL_CONFIG
+MYSQL_VERSION
+MYSQL_CFLAGS
+MYSQL_LDFLAGS
GSSAPI_LIBS
READLINE_LIBS
LIBOBJS
@@ -1527,6 +1531,8 @@ Optional Packages:
--with-included-ltdl use the GNU ltdl sources included here
--with-ltdl-include=DIR use the ltdl headers installed in DIR
--with-ltdl-lib=DIR use the libltdl.la installed in DIR
+ --with-mysql=[ARG] use MySQL client library [default=yes], optionally
+ specify path to mysql_config
Some influential environment variables:
CXX C++ compiler command
@@ -5173,13 +5179,13 @@ if test "${lt_cv_nm_interface+set}" = set; then
else
lt_cv_nm_interface="BSD nm"
echo "int some_variable = 0;" > conftest.$ac_ext
- (eval echo "\"\$as_me:5176: $ac_compile\"" >&5)
+ (eval echo "\"\$as_me:5182: $ac_compile\"" >&5)
(eval "$ac_compile" 2>conftest.err)
cat conftest.err >&5
- (eval echo "\"\$as_me:5179: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+ (eval echo "\"\$as_me:5185: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
(eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
cat conftest.err >&5
- (eval echo "\"\$as_me:5182: output\"" >&5)
+ (eval echo "\"\$as_me:5188: output\"" >&5)
cat conftest.out >&5
if $GREP 'External.*some_variable' conftest.out > /dev/null; then
lt_cv_nm_interface="MS dumpbin"
@@ -6279,7 +6285,7 @@ ia64-*-hpux*)
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 6282 "configure"' > conftest.$ac_ext
+ echo '#line 6288 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -8604,11 +8610,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:8607: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:8613: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:8611: \$? = $ac_status" >&5
+ echo "$as_me:8617: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -8928,11 +8934,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:8931: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:8937: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:8935: \$? = $ac_status" >&5
+ echo "$as_me:8941: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -9033,11 +9039,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:9036: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:9042: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:9040: \$? = $ac_status" >&5
+ echo "$as_me:9046: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -9088,11 +9094,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:9091: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:9097: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:9095: \$? = $ac_status" >&5
+ echo "$as_me:9101: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -11849,7 +11855,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11852 "configure"
+#line 11858 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11949,7 +11955,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11952 "configure"
+#line 11958 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -13952,11 +13958,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:13955: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:13961: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:13959: \$? = $ac_status" >&5
+ echo "$as_me:13965: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -14051,11 +14057,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:14054: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:14060: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:14058: \$? = $ac_status" >&5
+ echo "$as_me:14064: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -14103,11 +14109,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:14106: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:14112: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:14110: \$? = $ac_status" >&5
+ echo "$as_me:14116: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -15986,7 +15992,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 15989 "configure"
+#line 15995 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -17433,7 +17439,149 @@ echo "${ECHO_T}yes" >&6; }
:
fi
-CPPFLAGS='-I${top_srcdir}'"/src $GnuTLS_CFLAGS $sigc_CFLAGS $INCLTDL $CPPFLAGS"
+
+
+# Check whether --with-mysql was given.
+if test "${with_mysql+set}" = set; then
+ withval=$with_mysql;
+ if test "$withval" = "no"; then
+ want_mysql="no"
+ elif test "$withval" = "yes"; then
+ want_mysql="yes"
+ else
+ want_mysql="yes"
+ MYSQL_CONFIG="$withval"
+ fi
+
+else
+ want_mysql="yes"
+
+fi
+
+
+ MYSQL_CFLAGS=""
+ MYSQL_LDFLAGS=""
+ MYSQL_VERSION=""
+
+
+ if test "$want_mysql" = "yes"; then
+
+ if test -z "$MYSQL_CONFIG" -o test; then
+ # Extract the first word of "mysql_config", so it can be a program name with args.
+set dummy mysql_config; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_path_MYSQL_CONFIG+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $MYSQL_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_MYSQL_CONFIG="$MYSQL_CONFIG" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_MYSQL_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_path_MYSQL_CONFIG" && ac_cv_path_MYSQL_CONFIG="no"
+ ;;
+esac
+fi
+MYSQL_CONFIG=$ac_cv_path_MYSQL_CONFIG
+if test -n "$MYSQL_CONFIG"; then
+ { echo "$as_me:$LINENO: result: $MYSQL_CONFIG" >&5
+echo "${ECHO_T}$MYSQL_CONFIG" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+ fi
+
+ if test "$MYSQL_CONFIG" != "no"; then
+ { echo "$as_me:$LINENO: checking for MySQL libraries" >&5
+echo $ECHO_N "checking for MySQL libraries... $ECHO_C" >&6; }
+
+ MYSQL_CFLAGS="`$MYSQL_CONFIG --cflags`"
+ MYSQL_LDFLAGS="`$MYSQL_CONFIG --libs`"
+
+ MYSQL_VERSION=`$MYSQL_CONFIG --version`
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_MYSQL 1
+_ACEOF
+
+
+ found_mysql="yes"
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+ else
+ found_mysql="no"
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+ fi
+ fi
+
+
+
+ mysql_version_req=
+
+ if test "$found_mysql" = "yes" -a -n "$mysql_version_req"; then
+
+ { echo "$as_me:$LINENO: checking if MySQL version is >= $mysql_version_req" >&5
+echo $ECHO_N "checking if MySQL version is >= $mysql_version_req... $ECHO_C" >&6; }
+
+ mysql_version_req_major=`expr $mysql_version_req : '\([0-9]*\)'`
+ mysql_version_req_minor=`expr $mysql_version_req : '[0-9]*\.\([0-9]*\)'`
+ mysql_version_req_micro=`expr $mysql_version_req : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
+ if test "x$mysql_version_req_micro" = "x"; then
+ mysql_version_req_micro="0"
+ fi
+
+ mysql_version_req_number=`expr $mysql_version_req_major \* 1000000 \
+ \+ $mysql_version_req_minor \* 1000 \
+ \+ $mysql_version_req_micro`
+
+ mysql_version_major=`expr $MYSQL_VERSION : '\([0-9]*\)'`
+ mysql_version_minor=`expr $MYSQL_VERSION : '[0-9]*\.\([0-9]*\)'`
+ mysql_version_micro=`expr $MYSQL_VERSION : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
+ if test "x$mysql_version_micro" = "x"; then
+ mysql_version_micro="0"
+ fi
+
+ mysql_version_number=`expr $mysql_version_major \* 1000000 \
+ \+ $mysql_version_minor \* 1000 \
+ \+ $mysql_version_micro`
+
+ mysql_version_check=`expr $mysql_version_number \>\= $mysql_version_req_number`
+ if test "$mysql_version_check" = "1"; then
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+ else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+ fi
+ fi
+
+
+
+
+
+
+CPPFLAGS='-I${top_srcdir}'"/src $GnuTLS_CFLAGS $sigc_CFLAGS $MYSQL_CFLAGS $INCLTDL $CPPFLAGS"
{ echo "$as_me:$LINENO: checking for gss_init_sec_context in -lgssapi_krb5" >&5
echo $ECHO_N "checking for gss_init_sec_context in -lgssapi_krb5... $ECHO_C" >&6; }
@@ -21123,6 +21271,10 @@ GnuTLS_CFLAGS!$GnuTLS_CFLAGS$ac_delim
GnuTLS_LIBS!$GnuTLS_LIBS$ac_delim
sigc_CFLAGS!$sigc_CFLAGS$ac_delim
sigc_LIBS!$sigc_LIBS$ac_delim
+MYSQL_CONFIG!$MYSQL_CONFIG$ac_delim
+MYSQL_VERSION!$MYSQL_VERSION$ac_delim
+MYSQL_CFLAGS!$MYSQL_CFLAGS$ac_delim
+MYSQL_LDFLAGS!$MYSQL_LDFLAGS$ac_delim
GSSAPI_LIBS!$GSSAPI_LIBS$ac_delim
READLINE_LIBS!$READLINE_LIBS$ac_delim
LIBOBJS!$LIBOBJS$ac_delim
@@ -21131,7 +21283,7 @@ ltdl_LIBOBJS!$ltdl_LIBOBJS$ac_delim
ltdl_LTLIBOBJS!$ltdl_LTLIBOBJS$ac_delim
_ACEOF
- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 46; then
+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 50; then
break
elif $ac_last_try; then
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
diff --git a/configure.ac b/configure.ac
index e6775f8..c80e6b8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -31,7 +31,9 @@ AM_CONDITIONAL(INCLUDED_LTDL, test "x$with_included_ltdl" = xyes)
PKG_CHECK_MODULES(GnuTLS, gnutls, , AC_MSG_ERROR(Test for GnuTLS failed.))
PKG_CHECK_MODULES(sigc, sigc++-2.0, , AC_MSG_ERROR(Test for SigC++ 2.0 failed.))
-CPPFLAGS='-I${top_srcdir}'"/src $GnuTLS_CFLAGS $sigc_CFLAGS $INCLTDL $CPPFLAGS"
+AX_LIB_MYSQL
+
+CPPFLAGS='-I${top_srcdir}'"/src $GnuTLS_CFLAGS $sigc_CFLAGS $MYSQL_CFLAGS $INCLTDL $CPPFLAGS"
AC_CHECK_LIB(gssapi_krb5, gss_init_sec_context, AC_SUBST(GSSAPI_LIBS, -lgssapi_krb5), AC_CHECK_LIB(gssapi, gss_init_sec_context, GSSAPI_LIBS=-lgssapi, AC_MSG_ERROR(Test for GSSAPI library failed.)))
AC_CHECK_LIB(readline, readline, AC_SUBST(READLINE_LIBS, -lreadline), AC_MSG_ERROR(Test for GNU readline library failed.))
diff --git a/libltdl/Makefile.in b/libltdl/Makefile.in
index 6371bcd..a5a1f86 100644
--- a/libltdl/Makefile.in
+++ b/libltdl/Makefile.in
@@ -44,10 +44,11 @@ DIST_COMMON = README $(am__include_HEADERS_DIST) \
$(srcdir)/Makefile.in COPYING.LIB
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/argz.m4 \
- $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltdl.m4 \
- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
- $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/ax_lib_mysql.m4 $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltdl.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \
+ $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
@@ -207,6 +208,10 @@ LT_DLPREOPEN = @LT_DLPREOPEN@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
+MYSQL_CFLAGS = @MYSQL_CFLAGS@
+MYSQL_CONFIG = @MYSQL_CONFIG@
+MYSQL_LDFLAGS = @MYSQL_LDFLAGS@
+MYSQL_VERSION = @MYSQL_VERSION@
NM = @NM@
NMEDIT = @NMEDIT@
OBJEXT = @OBJEXT@
diff --git a/m4/ax_lib_mysql.m4 b/m4/ax_lib_mysql.m4
new file mode 100644
index 0000000..a7dce39
--- /dev/null
+++ b/m4/ax_lib_mysql.m4
@@ -0,0 +1,148 @@
+##### http://autoconf-archive.cryp.to/ax_lib_mysql.html
+#
+# SYNOPSIS
+#
+# AX_LIB_MYSQL([MINIMUM-VERSION])
+#
+# DESCRIPTION
+#
+# This macro provides tests of availability of MySQL client library
+# of particular version or newer.
+#
+# AX_LIB_MYSQL macro takes only one argument which is optional. If
+# there is no required version passed, then macro does not run
+# version test.
+#
+# The --with-mysql option takes one of three possible values:
+#
+# no - do not check for MySQL client library
+#
+# yes - do check for MySQL library in standard locations
+# (mysql_config should be in the PATH)
+#
+# path - complete path to mysql_config utility, use this option if
+# mysql_config can't be found in the PATH
+#
+# This macro calls:
+#
+# AC_SUBST(MYSQL_CFLAGS)
+# AC_SUBST(MYSQL_LDFLAGS)
+# AC_SUBST(MYSQL_VERSION)
+#
+# And sets:
+#
+# HAVE_MYSQL
+#
+# LAST MODIFICATION
+#
+# 2006-07-16
+#
+# COPYLEFT
+#
+# Copyright (c) 2006 Mateusz Loskot <mateusz@loskot.net>
+#
+# Copying and distribution of this file, with or without
+# modification, are permitted in any medium without royalty provided
+# the copyright notice and this notice are preserved.
+
+AC_DEFUN([AX_LIB_MYSQL],
+[
+ AC_ARG_WITH([mysql],
+ AC_HELP_STRING([--with-mysql=@<:@ARG@:>@],
+ [use MySQL client library @<:@default=yes@:>@, optionally specify path to mysql_config]
+ ),
+ [
+ if test "$withval" = "no"; then
+ want_mysql="no"
+ elif test "$withval" = "yes"; then
+ want_mysql="yes"
+ else
+ want_mysql="yes"
+ MYSQL_CONFIG="$withval"
+ fi
+ ],
+ [want_mysql="yes"]
+ )
+
+ MYSQL_CFLAGS=""
+ MYSQL_LDFLAGS=""
+ MYSQL_VERSION=""
+
+ dnl
+ dnl Check MySQL libraries (libpq)
+ dnl
+
+ if test "$want_mysql" = "yes"; then
+
+ if test -z "$MYSQL_CONFIG" -o test; then
+ AC_PATH_PROG([MYSQL_CONFIG], [mysql_config], [no])
+ fi
+
+ if test "$MYSQL_CONFIG" != "no"; then
+ AC_MSG_CHECKING([for MySQL libraries])
+
+ MYSQL_CFLAGS="`$MYSQL_CONFIG --cflags`"
+ MYSQL_LDFLAGS="`$MYSQL_CONFIG --libs`"
+
+ MYSQL_VERSION=`$MYSQL_CONFIG --version`
+
+ AC_DEFINE([HAVE_MYSQL], [1],
+ [Define to 1 if MySQL libraries are available])
+
+ found_mysql="yes"
+ AC_MSG_RESULT([yes])
+ else
+ found_mysql="no"
+ AC_MSG_RESULT([no])
+ fi
+ fi
+
+ dnl
+ dnl Check if required version of MySQL is available
+ dnl
+
+
+ mysql_version_req=ifelse([$1], [], [], [$1])
+
+ if test "$found_mysql" = "yes" -a -n "$mysql_version_req"; then
+
+ AC_MSG_CHECKING([if MySQL version is >= $mysql_version_req])
+
+ dnl Decompose required version string of MySQL
+ dnl and calculate its number representation
+ mysql_version_req_major=`expr $mysql_version_req : '\([[0-9]]*\)'`
+ mysql_version_req_minor=`expr $mysql_version_req : '[[0-9]]*\.\([[0-9]]*\)'`
+ mysql_version_req_micro=`expr $mysql_version_req : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'`
+ if test "x$mysql_version_req_micro" = "x"; then
+ mysql_version_req_micro="0"
+ fi
+
+ mysql_version_req_number=`expr $mysql_version_req_major \* 1000000 \
+ \+ $mysql_version_req_minor \* 1000 \
+ \+ $mysql_version_req_micro`
+
+ dnl Decompose version string of installed MySQL
+ dnl and calculate its number representation
+ mysql_version_major=`expr $MYSQL_VERSION : '\([[0-9]]*\)'`
+ mysql_version_minor=`expr $MYSQL_VERSION : '[[0-9]]*\.\([[0-9]]*\)'`
+ mysql_version_micro=`expr $MYSQL_VERSION : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'`
+ if test "x$mysql_version_micro" = "x"; then
+ mysql_version_micro="0"
+ fi
+
+ mysql_version_number=`expr $mysql_version_major \* 1000000 \
+ \+ $mysql_version_minor \* 1000 \
+ \+ $mysql_version_micro`
+
+ mysql_version_check=`expr $mysql_version_number \>\= $mysql_version_req_number`
+ if test "$mysql_version_check" = "1"; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ fi
+ fi
+
+ AC_SUBST([MYSQL_VERSION])
+ AC_SUBST([MYSQL_CFLAGS])
+ AC_SUBST([MYSQL_LDFLAGS])
+])
diff --git a/src/Client/Makefile.in b/src/Client/Makefile.in
index ecdc323..cf94831 100644
--- a/src/Client/Makefile.in
+++ b/src/Client/Makefile.in
@@ -38,10 +38,11 @@ DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/argz.m4 \
- $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltdl.m4 \
- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
- $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/ax_lib_mysql.m4 $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltdl.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \
+ $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
@@ -140,6 +141,10 @@ LT_DLPREOPEN = @LT_DLPREOPEN@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
+MYSQL_CFLAGS = @MYSQL_CFLAGS@
+MYSQL_CONFIG = @MYSQL_CONFIG@
+MYSQL_LDFLAGS = @MYSQL_LDFLAGS@
+MYSQL_VERSION = @MYSQL_VERSION@
NM = @NM@
NMEDIT = @NMEDIT@
OBJEXT = @OBJEXT@
diff --git a/src/Client/Requests/Makefile.in b/src/Client/Requests/Makefile.in
index a184280..cbea164 100644
--- a/src/Client/Requests/Makefile.in
+++ b/src/Client/Requests/Makefile.in
@@ -38,10 +38,11 @@ DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/argz.m4 \
- $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltdl.m4 \
- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
- $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/ax_lib_mysql.m4 $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltdl.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \
+ $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
@@ -131,6 +132,10 @@ LT_DLPREOPEN = @LT_DLPREOPEN@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
+MYSQL_CFLAGS = @MYSQL_CFLAGS@
+MYSQL_CONFIG = @MYSQL_CONFIG@
+MYSQL_LDFLAGS = @MYSQL_LDFLAGS@
+MYSQL_VERSION = @MYSQL_VERSION@
NM = @NM@
NMEDIT = @NMEDIT@
OBJEXT = @OBJEXT@
diff --git a/src/Common/Backends/Makefile.in b/src/Common/Backends/Makefile.in
index e57b0e2..0afc996 100644
--- a/src/Common/Backends/Makefile.in
+++ b/src/Common/Backends/Makefile.in
@@ -38,10 +38,11 @@ DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/argz.m4 \
- $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltdl.m4 \
- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
- $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/ax_lib_mysql.m4 $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltdl.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \
+ $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
@@ -127,6 +128,10 @@ LT_DLPREOPEN = @LT_DLPREOPEN@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
+MYSQL_CFLAGS = @MYSQL_CFLAGS@
+MYSQL_CONFIG = @MYSQL_CONFIG@
+MYSQL_LDFLAGS = @MYSQL_LDFLAGS@
+MYSQL_VERSION = @MYSQL_VERSION@
NM = @NM@
NMEDIT = @NMEDIT@
OBJEXT = @OBJEXT@
diff --git a/src/Common/Makefile.in b/src/Common/Makefile.in
index ce2091c..6762adb 100644
--- a/src/Common/Makefile.in
+++ b/src/Common/Makefile.in
@@ -38,10 +38,11 @@ DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/argz.m4 \
- $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltdl.m4 \
- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
- $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/ax_lib_mysql.m4 $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltdl.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \
+ $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
@@ -142,6 +143,10 @@ LT_DLPREOPEN = @LT_DLPREOPEN@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
+MYSQL_CFLAGS = @MYSQL_CFLAGS@
+MYSQL_CONFIG = @MYSQL_CONFIG@
+MYSQL_LDFLAGS = @MYSQL_LDFLAGS@
+MYSQL_VERSION = @MYSQL_VERSION@
NM = @NM@
NMEDIT = @NMEDIT@
OBJEXT = @OBJEXT@
diff --git a/src/Common/RequestHandlers/Makefile.in b/src/Common/RequestHandlers/Makefile.in
index 0461a06..df796e8 100644
--- a/src/Common/RequestHandlers/Makefile.in
+++ b/src/Common/RequestHandlers/Makefile.in
@@ -38,10 +38,11 @@ DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/argz.m4 \
- $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltdl.m4 \
- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
- $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/ax_lib_mysql.m4 $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltdl.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \
+ $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
@@ -130,6 +131,10 @@ LT_DLPREOPEN = @LT_DLPREOPEN@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
+MYSQL_CFLAGS = @MYSQL_CFLAGS@
+MYSQL_CONFIG = @MYSQL_CONFIG@
+MYSQL_LDFLAGS = @MYSQL_LDFLAGS@
+MYSQL_VERSION = @MYSQL_VERSION@
NM = @NM@
NMEDIT = @NMEDIT@
OBJEXT = @OBJEXT@
diff --git a/src/Common/Requests/Makefile.in b/src/Common/Requests/Makefile.in
index 912bc1d..29668a1 100644
--- a/src/Common/Requests/Makefile.in
+++ b/src/Common/Requests/Makefile.in
@@ -38,10 +38,11 @@ DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/argz.m4 \
- $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltdl.m4 \
- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
- $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/ax_lib_mysql.m4 $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltdl.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \
+ $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
@@ -130,6 +131,10 @@ LT_DLPREOPEN = @LT_DLPREOPEN@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
+MYSQL_CFLAGS = @MYSQL_CFLAGS@
+MYSQL_CONFIG = @MYSQL_CONFIG@
+MYSQL_LDFLAGS = @MYSQL_LDFLAGS@
+MYSQL_VERSION = @MYSQL_VERSION@
NM = @NM@
NMEDIT = @NMEDIT@
OBJEXT = @OBJEXT@
diff --git a/src/Core/Backends/Makefile.in b/src/Core/Backends/Makefile.in
index 48c0d09..2f09fc7 100644
--- a/src/Core/Backends/Makefile.in
+++ b/src/Core/Backends/Makefile.in
@@ -38,10 +38,11 @@ DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/argz.m4 \
- $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltdl.m4 \
- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
- $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/ax_lib_mysql.m4 $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltdl.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \
+ $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
@@ -125,6 +126,10 @@ LT_DLPREOPEN = @LT_DLPREOPEN@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
+MYSQL_CFLAGS = @MYSQL_CFLAGS@
+MYSQL_CONFIG = @MYSQL_CONFIG@
+MYSQL_LDFLAGS = @MYSQL_LDFLAGS@
+MYSQL_VERSION = @MYSQL_VERSION@
NM = @NM@
NMEDIT = @NMEDIT@
OBJEXT = @OBJEXT@
diff --git a/src/Core/Makefile.in b/src/Core/Makefile.in
index 78d76f8..4a157bc 100644
--- a/src/Core/Makefile.in
+++ b/src/Core/Makefile.in
@@ -38,10 +38,11 @@ DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/argz.m4 \
- $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltdl.m4 \
- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
- $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/ax_lib_mysql.m4 $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltdl.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \
+ $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
@@ -140,6 +141,10 @@ LT_DLPREOPEN = @LT_DLPREOPEN@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
+MYSQL_CFLAGS = @MYSQL_CFLAGS@
+MYSQL_CONFIG = @MYSQL_CONFIG@
+MYSQL_LDFLAGS = @MYSQL_LDFLAGS@
+MYSQL_VERSION = @MYSQL_VERSION@
NM = @NM@
NMEDIT = @NMEDIT@
OBJEXT = @OBJEXT@
diff --git a/src/Core/RequestHandlers/Makefile.in b/src/Core/RequestHandlers/Makefile.in
index 60cd516..97e6ea9 100644
--- a/src/Core/RequestHandlers/Makefile.in
+++ b/src/Core/RequestHandlers/Makefile.in
@@ -38,10 +38,11 @@ DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/argz.m4 \
- $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltdl.m4 \
- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
- $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/ax_lib_mysql.m4 $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltdl.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \
+ $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
@@ -132,6 +133,10 @@ LT_DLPREOPEN = @LT_DLPREOPEN@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
+MYSQL_CFLAGS = @MYSQL_CFLAGS@
+MYSQL_CONFIG = @MYSQL_CONFIG@
+MYSQL_LDFLAGS = @MYSQL_LDFLAGS@
+MYSQL_VERSION = @MYSQL_VERSION@
NM = @NM@
NMEDIT = @NMEDIT@
OBJEXT = @OBJEXT@
diff --git a/src/Core/Requests/Makefile.in b/src/Core/Requests/Makefile.in
index 1d0e531..f2d5042 100644
--- a/src/Core/Requests/Makefile.in
+++ b/src/Core/Requests/Makefile.in
@@ -38,10 +38,11 @@ DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/argz.m4 \
- $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltdl.m4 \
- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
- $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/ax_lib_mysql.m4 $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltdl.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \
+ $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
@@ -130,6 +131,10 @@ LT_DLPREOPEN = @LT_DLPREOPEN@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
+MYSQL_CFLAGS = @MYSQL_CFLAGS@
+MYSQL_CONFIG = @MYSQL_CONFIG@
+MYSQL_LDFLAGS = @MYSQL_LDFLAGS@
+MYSQL_VERSION = @MYSQL_VERSION@
NM = @NM@
NMEDIT = @NMEDIT@
OBJEXT = @OBJEXT@
diff --git a/src/Daemon/Backends/Makefile.in b/src/Daemon/Backends/Makefile.in
index fb2a4dc..aa79134 100644
--- a/src/Daemon/Backends/Makefile.in
+++ b/src/Daemon/Backends/Makefile.in
@@ -37,10 +37,11 @@ DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/argz.m4 \
- $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltdl.m4 \
- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
- $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/ax_lib_mysql.m4 $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltdl.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \
+ $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
@@ -112,6 +113,10 @@ LT_DLPREOPEN = @LT_DLPREOPEN@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
+MYSQL_CFLAGS = @MYSQL_CFLAGS@
+MYSQL_CONFIG = @MYSQL_CONFIG@
+MYSQL_LDFLAGS = @MYSQL_LDFLAGS@
+MYSQL_VERSION = @MYSQL_VERSION@
NM = @NM@
NMEDIT = @NMEDIT@
OBJEXT = @OBJEXT@
diff --git a/src/Daemon/Makefile.in b/src/Daemon/Makefile.in
index d8a9f0e..d27c780 100644
--- a/src/Daemon/Makefile.in
+++ b/src/Daemon/Makefile.in
@@ -38,10 +38,11 @@ DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/argz.m4 \
- $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltdl.m4 \
- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
- $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/ax_lib_mysql.m4 $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltdl.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \
+ $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
@@ -138,6 +139,10 @@ LT_DLPREOPEN = @LT_DLPREOPEN@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
+MYSQL_CFLAGS = @MYSQL_CFLAGS@
+MYSQL_CONFIG = @MYSQL_CONFIG@
+MYSQL_LDFLAGS = @MYSQL_LDFLAGS@
+MYSQL_VERSION = @MYSQL_VERSION@
NM = @NM@
NMEDIT = @NMEDIT@
OBJEXT = @OBJEXT@
diff --git a/src/Daemon/RequestHandlers/Makefile.in b/src/Daemon/RequestHandlers/Makefile.in
index 25f5a93..a8ec16f 100644
--- a/src/Daemon/RequestHandlers/Makefile.in
+++ b/src/Daemon/RequestHandlers/Makefile.in
@@ -38,10 +38,11 @@ DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/argz.m4 \
- $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltdl.m4 \
- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
- $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/ax_lib_mysql.m4 $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltdl.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \
+ $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
@@ -129,6 +130,10 @@ LT_DLPREOPEN = @LT_DLPREOPEN@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
+MYSQL_CFLAGS = @MYSQL_CFLAGS@
+MYSQL_CONFIG = @MYSQL_CONFIG@
+MYSQL_LDFLAGS = @MYSQL_LDFLAGS@
+MYSQL_VERSION = @MYSQL_VERSION@
NM = @NM@
NMEDIT = @NMEDIT@
OBJEXT = @OBJEXT@
diff --git a/src/Daemon/Requests/Makefile.in b/src/Daemon/Requests/Makefile.in
index bfd9698..977caf4 100644
--- a/src/Daemon/Requests/Makefile.in
+++ b/src/Daemon/Requests/Makefile.in
@@ -38,10 +38,11 @@ DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/argz.m4 \
- $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltdl.m4 \
- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
- $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/ax_lib_mysql.m4 $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltdl.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \
+ $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
@@ -129,6 +130,10 @@ LT_DLPREOPEN = @LT_DLPREOPEN@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
+MYSQL_CFLAGS = @MYSQL_CFLAGS@
+MYSQL_CONFIG = @MYSQL_CONFIG@
+MYSQL_LDFLAGS = @MYSQL_LDFLAGS@
+MYSQL_VERSION = @MYSQL_VERSION@
NM = @NM@
NMEDIT = @NMEDIT@
OBJEXT = @OBJEXT@
diff --git a/src/Makefile.am b/src/Makefile.am
index 09dbff6..a1726dc 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -14,4 +14,4 @@ madc_LDADD = Client/libclient.la Common/libcommon.la Net/libnet.la \
mad_core_SOURCES = mad-core.cpp
mad_core_LDADD = Core/libcore.la Common/libcommon.la Net/libnet.la \
$(sigc_LIBS) $(GnuTLS_LIBS) $(GSSAPI_LIBS) @LIBLTDL@
-mad_core_LDFLAGS = -export-dynamic -dlpreopen modules/SystemBackendPosix.la -dlpreopen modules/SystemBackendProc.la
+mad_core_LDFLAGS = -export-dynamic -dlpreopen modules/SystemBackendPosix.la -dlpreopen modules/SystemBackendProc.la -dlopen modules/UserBackendMysql.la
diff --git a/src/Makefile.in b/src/Makefile.in
index ad973f9..c10ce6a 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -37,10 +37,11 @@ subdir = src
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/argz.m4 \
- $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltdl.m4 \
- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
- $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/ax_lib_mysql.m4 $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltdl.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \
+ $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
@@ -157,6 +158,10 @@ LT_DLPREOPEN = @LT_DLPREOPEN@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
+MYSQL_CFLAGS = @MYSQL_CFLAGS@
+MYSQL_CONFIG = @MYSQL_CONFIG@
+MYSQL_LDFLAGS = @MYSQL_LDFLAGS@
+MYSQL_VERSION = @MYSQL_VERSION@
NM = @NM@
NMEDIT = @NMEDIT@
OBJEXT = @OBJEXT@
@@ -248,7 +253,7 @@ mad_core_SOURCES = mad-core.cpp
mad_core_LDADD = Core/libcore.la Common/libcommon.la Net/libnet.la \
$(sigc_LIBS) $(GnuTLS_LIBS) $(GSSAPI_LIBS) @LIBLTDL@
-mad_core_LDFLAGS = -export-dynamic -dlpreopen modules/SystemBackendPosix.la -dlpreopen modules/SystemBackendProc.la
+mad_core_LDFLAGS = -export-dynamic -dlpreopen modules/SystemBackendPosix.la -dlpreopen modules/SystemBackendProc.la -dlopen modules/UserBackendMysql.la
all: all-recursive
.SUFFIXES:
diff --git a/src/Net/Makefile.in b/src/Net/Makefile.in
index 557c2ac..af404c3 100644
--- a/src/Net/Makefile.in
+++ b/src/Net/Makefile.in
@@ -38,10 +38,11 @@ DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/argz.m4 \
- $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltdl.m4 \
- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
- $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/ax_lib_mysql.m4 $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltdl.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \
+ $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
@@ -140,6 +141,10 @@ LT_DLPREOPEN = @LT_DLPREOPEN@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
+MYSQL_CFLAGS = @MYSQL_CFLAGS@
+MYSQL_CONFIG = @MYSQL_CONFIG@
+MYSQL_LDFLAGS = @MYSQL_LDFLAGS@
+MYSQL_VERSION = @MYSQL_VERSION@
NM = @NM@
NMEDIT = @NMEDIT@
OBJEXT = @OBJEXT@
diff --git a/src/Net/Packets/Makefile.in b/src/Net/Packets/Makefile.in
index 4afc36e..14a649d 100644
--- a/src/Net/Packets/Makefile.in
+++ b/src/Net/Packets/Makefile.in
@@ -38,10 +38,11 @@ DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/argz.m4 \
- $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltdl.m4 \
- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
- $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/ax_lib_mysql.m4 $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltdl.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \
+ $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
@@ -131,6 +132,10 @@ LT_DLPREOPEN = @LT_DLPREOPEN@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
+MYSQL_CFLAGS = @MYSQL_CFLAGS@
+MYSQL_CONFIG = @MYSQL_CONFIG@
+MYSQL_LDFLAGS = @MYSQL_LDFLAGS@
+MYSQL_VERSION = @MYSQL_VERSION@
NM = @NM@
NMEDIT = @NMEDIT@
OBJEXT = @OBJEXT@
diff --git a/src/modules/Makefile.am b/src/modules/Makefile.am
index 40e15cc..a40da15 100644
--- a/src/modules/Makefile.am
+++ b/src/modules/Makefile.am
@@ -1,7 +1,7 @@
madlibdir = ${libdir}/mad
moddir = ${madlibdir}/modules
-mod_LTLIBRARIES = SystemBackendPosix.la SystemBackendProc.la
+mod_LTLIBRARIES = SystemBackendPosix.la SystemBackendProc.la UserBackendMysql.la
SystemBackendPosix_la_SOURCES = SystemBackendPosix.cpp
SystemBackendPosix_la_LIBADD = $(sigc_LIBS)
@@ -10,4 +10,8 @@ SystemBackendPosix_la_LDFLAGS = -module -avoid-version -export-dynamic -static -
SystemBackendProc_la_SOURCES = SystemBackendProc.cpp
SystemBackendProc_la_LDFLAGS = -module -avoid-version -export-dynamic -static -export-symbols-regex '^SystemBackendProc_LTX_'
-noinst_HEADERS = SystemBackendPosix.h SystemBackendProc.h
+UserBackendMysql_la_SOURCES = UserBackendMysql.cpp
+UserBackendMysql_la_LIBADD = $(MYSQL_LDFLAGS)
+UserBackendMysql_la_LDFLAGS = -module -avoid-version -export-dynamic -export-symbols-regex '^UserBackendMysql_LTX_'
+
+noinst_HEADERS = SystemBackendPosix.h SystemBackendProc.h UserBackendMysql.h
diff --git a/src/modules/Makefile.in b/src/modules/Makefile.in
index bc464ef..86ab52b 100644
--- a/src/modules/Makefile.in
+++ b/src/modules/Makefile.in
@@ -38,10 +38,11 @@ DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/argz.m4 \
- $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltdl.m4 \
- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
- $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/ax_lib_mysql.m4 $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltdl.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \
+ $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
@@ -69,6 +70,12 @@ SystemBackendProc_la_OBJECTS = $(am_SystemBackendProc_la_OBJECTS)
SystemBackendProc_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
$(CXXFLAGS) $(SystemBackendProc_la_LDFLAGS) $(LDFLAGS) -o $@
+UserBackendMysql_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am_UserBackendMysql_la_OBJECTS = UserBackendMysql.lo
+UserBackendMysql_la_OBJECTS = $(am_UserBackendMysql_la_OBJECTS)
+UserBackendMysql_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+ $(CXXFLAGS) $(UserBackendMysql_la_LDFLAGS) $(LDFLAGS) -o $@
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/config/depcomp
am__depfiles_maybe = depfiles
@@ -82,9 +89,9 @@ CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
$(LDFLAGS) -o $@
SOURCES = $(SystemBackendPosix_la_SOURCES) \
- $(SystemBackendProc_la_SOURCES)
+ $(SystemBackendProc_la_SOURCES) $(UserBackendMysql_la_SOURCES)
DIST_SOURCES = $(SystemBackendPosix_la_SOURCES) \
- $(SystemBackendProc_la_SOURCES)
+ $(SystemBackendProc_la_SOURCES) $(UserBackendMysql_la_SOURCES)
HEADERS = $(noinst_HEADERS)
ETAGS = etags
CTAGS = ctags
@@ -149,6 +156,10 @@ LT_DLPREOPEN = @LT_DLPREOPEN@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
+MYSQL_CFLAGS = @MYSQL_CFLAGS@
+MYSQL_CONFIG = @MYSQL_CONFIG@
+MYSQL_LDFLAGS = @MYSQL_LDFLAGS@
+MYSQL_VERSION = @MYSQL_VERSION@
NM = @NM@
NMEDIT = @NMEDIT@
OBJEXT = @OBJEXT@
@@ -228,13 +239,16 @@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
madlibdir = ${libdir}/mad
moddir = ${madlibdir}/modules
-mod_LTLIBRARIES = SystemBackendPosix.la SystemBackendProc.la
+mod_LTLIBRARIES = SystemBackendPosix.la SystemBackendProc.la UserBackendMysql.la
SystemBackendPosix_la_SOURCES = SystemBackendPosix.cpp
SystemBackendPosix_la_LIBADD = $(sigc_LIBS)
SystemBackendPosix_la_LDFLAGS = -module -avoid-version -export-dynamic -static -export-symbols-regex '^SystemBackendPosix_LTX_'
SystemBackendProc_la_SOURCES = SystemBackendProc.cpp
SystemBackendProc_la_LDFLAGS = -module -avoid-version -export-dynamic -static -export-symbols-regex '^SystemBackendProc_LTX_'
-noinst_HEADERS = SystemBackendPosix.h SystemBackendProc.h
+UserBackendMysql_la_SOURCES = UserBackendMysql.cpp
+UserBackendMysql_la_LIBADD = $(MYSQL_LDFLAGS)
+UserBackendMysql_la_LDFLAGS = -module -avoid-version -export-dynamic -export-symbols-regex '^UserBackendMysql_LTX_'
+noinst_HEADERS = SystemBackendPosix.h SystemBackendProc.h UserBackendMysql.h
all: all-am
.SUFFIXES:
@@ -299,6 +313,8 @@ SystemBackendPosix.la: $(SystemBackendPosix_la_OBJECTS) $(SystemBackendPosix_la_
$(SystemBackendPosix_la_LINK) -rpath $(moddir) $(SystemBackendPosix_la_OBJECTS) $(SystemBackendPosix_la_LIBADD) $(LIBS)
SystemBackendProc.la: $(SystemBackendProc_la_OBJECTS) $(SystemBackendProc_la_DEPENDENCIES)
$(SystemBackendProc_la_LINK) -rpath $(moddir) $(SystemBackendProc_la_OBJECTS) $(SystemBackendProc_la_LIBADD) $(LIBS)
+UserBackendMysql.la: $(UserBackendMysql_la_OBJECTS) $(UserBackendMysql_la_DEPENDENCIES)
+ $(UserBackendMysql_la_LINK) -rpath $(moddir) $(UserBackendMysql_la_OBJECTS) $(UserBackendMysql_la_LIBADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -308,6 +324,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SystemBackendPosix.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SystemBackendProc.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/UserBackendMysql.Plo@am__quote@
.cpp.o:
@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
diff --git a/src/modules/SystemBackendPosix.h b/src/modules/SystemBackendPosix.h
index 9be16af..bbf1941 100644
--- a/src/modules/SystemBackendPosix.h
+++ b/src/modules/SystemBackendPosix.h
@@ -17,8 +17,8 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef MAD_MODULE_SYSTEMBACKENDPOSIX_H_
-#define MAD_MODULE_SYSTEMBACKENDPOSIX_H_
+#ifndef MAD_MODULES_SYSTEMBACKENDPOSIX_H_
+#define MAD_MODULES_SYSTEMBACKENDPOSIX_H_
#include <Common/SystemBackend.h>
@@ -33,7 +33,7 @@
namespace Mad {
namespace Modules {
-class SystemBackendPosix : public Common::SystemBackend {
+class SystemBackendPosix : private Common::SystemBackend {
private:
static SystemBackendPosix *backend;
static std::map<pid_t, sigc::slot<void, int> > processes;
@@ -93,4 +93,4 @@ class SystemBackendPosix : public Common::SystemBackend {
}
}
-#endif /* MAD_MODULE_SYSTEMBACKENDPOSIX_H_ */
+#endif /* MAD_MODULES_SYSTEMBACKENDPOSIX_H_ */
diff --git a/src/modules/SystemBackendProc.h b/src/modules/SystemBackendProc.h
index db3c743..bd4767d 100644
--- a/src/modules/SystemBackendProc.h
+++ b/src/modules/SystemBackendProc.h
@@ -17,8 +17,8 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef MAD_MODULE_SYSTEMBACKENDPROC_H_
-#define MAD_MODULE_SYSTEMBACKENDPROC_H_
+#ifndef MAD_MODULES_SYSTEMBACKENDPROC_H_
+#define MAD_MODULES_SYSTEMBACKENDPROC_H_
#include <Common/SystemBackend.h>
@@ -27,7 +27,7 @@
namespace Mad {
namespace Modules {
-class SystemBackendProc : public Common::SystemBackend {
+class SystemBackendProc : private Common::SystemBackend {
private:
static SystemBackendProc *backend;
@@ -64,4 +64,4 @@ class SystemBackendProc : public Common::SystemBackend {
}
}
-#endif /* MAD_MODULE_SYSTEMBACKENDPROC_H_ */
+#endif /* MAD_MODULES_SYSTEMBACKENDPROC_H_ */
diff --git a/src/modules/UserBackendMysql.cpp b/src/modules/UserBackendMysql.cpp
new file mode 100644
index 0000000..f27bea5
--- /dev/null
+++ b/src/modules/UserBackendMysql.cpp
@@ -0,0 +1,50 @@
+/*
+ * UserBackendMysql.cpp
+ *
+ * Copyright (C) 2008 Matthias Schiffer <matthias@gamezock.de>
+ *
+ * This program is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "UserBackendMysql.h"
+
+#define init UserBackendMysql_LTX_init
+#define deinit UserBackendMysql_LTX_deinit
+
+
+namespace Mad {
+namespace Modules {
+
+bool UserBackendMysql::handleConfigEntry(const Common::ConfigEntry&, bool handled) {
+
+}
+
+void UserBackendMysql::configFinished() {
+ UserBackend::registerBackend(backend);
+}
+
+}
+}
+
+extern "C" {
+
+void init() {
+ Mad::Modules::UserBackendMysql::registerBackend();
+}
+
+void deinit() {
+ Mad::Modules::UserBackendMysql::unregisterBackend();
+}
+
+}
diff --git a/src/modules/UserBackendMysql.h b/src/modules/UserBackendMysql.h
new file mode 100644
index 0000000..7e134e5
--- /dev/null
+++ b/src/modules/UserBackendMysql.h
@@ -0,0 +1,64 @@
+/*
+ * UserBackendMysql.h
+ *
+ * Copyright (C) 2008 Matthias Schiffer <matthias@gamezock.de>
+ *
+ * This program is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef MAD_MODULES_USERBACKENDMYSQL_H_
+#define MAD_MODULES_USERBACKENDMYSQL_H_
+
+#include <Core/UserBackend.h>
+#include <Common/Configurable.h>
+#include <Common/ConfigManager.h>
+
+
+namespace Mad {
+namespace Modules {
+
+class UserBackendMysql : private Core::UserBackend, private Common::Configurable {
+ private:
+ static UserBackendMysql *backend;
+
+ UserBackendMysql() {}
+
+ protected:
+ virtual bool handleConfigEntry(const Common::ConfigEntry &entry, bool);
+ virtual void configFinished();
+
+ public:
+ static void registerBackend() {
+ if(backend)
+ return;
+
+ backend = new UserBackendMysql();
+ Common::ConfigManager::get()->registerConfigurable(backend);
+ }
+
+ static void unregisterBackend() {
+ if(!backend)
+ return;
+
+ Common::ConfigManager::get()->unregisterConfigurable(backend);
+ UserBackend::unregisterBackend(backend);
+ delete backend;
+ backend = 0;
+ }
+};
+
+}
+}
+
+#endif /* MAD_MODULES_USERBACKENDMYSQL_H_ */