/soc/2015/igor.gajowiak/chatlog: 0304881c74fd: Create an initial...
Igor Gajowiak <[email protected]>
| Newsgroups | gmane.comp.gnome.gaim.cvs |
|---|---|
| Message-ID | <[email protected]> |
Changeset: 0304881c74fdcfdb35be11983cdb22308fe53bcf Author: Igor Gajowiak <[email protected]> Date: 2015-06-24 19:31 +0200 Branch: default URL: https://hg.pidgin.im/soc/2015/igor.gajowiak/chatlog/rev/0304881c74fd Description: Create an initial version of the sqlite3 log plugin. diffstat: configure.ac | 19 +++++++++++++++++++ libpurple/plugins/Makefile.am | 5 +++-- libpurple/plugins/log/Makefile.am | 25 +++++++++++++++++++++++++ libpurple/plugins/log/logsqlite.c | 1 + 4 files changed, 48 insertions(+), 2 deletions(-) diffs (91 lines): diff --git a/configure.ac b/configure.ac --- a/configure.ac +++ b/configure.ac @@ -819,6 +819,24 @@ Use --disable-cap if you do not need the fi dnl ####################################################################### + dnl # Check for libsqlite3 (for the Log plugin with SQLite3 backend) + dnl ####################################################################### + AC_ARG_ENABLE(log_sqlite, [AS_HELP_STRING([--disable-log-sqlite], [compile without sqlite support for the log])], , enable_log_sqlite=yes) + if test "x$enable_log_sqlite" = "xyes" ; then + PKG_CHECK_MODULES(SQLITE3, [sqlite3 >= 3.3], , [ + AC_MSG_RESULT(no) + AC_MSG_ERROR([ +sqlite3 development headers not found, which are required if you wish to +enable sqlite3 support for the log. Use --disable-log-sqlite if you +want to disable sqlite3 support for the log. + ])]) + AC_SUBST(SQLITE3_CFLAGS) + AC_SUBST(SQLITE3_LIBS) + fi + + AM_CONDITIONAL(ENABLE_LOG_SQLITE, test "x$enable_log_sqlite" = "xyes") + + dnl ####################################################################### dnl # Check for GCR for its certificate widgets dnl ####################################################################### if test "x$enable_gcr" = "xyes"; then @@ -2756,6 +2774,7 @@ AC_CONFIG_FILES([Makefile libpurple/example/Makefile libpurple/plugins/Makefile libpurple/plugins/keyrings/Makefile + libpurple/plugins/log/Makefile libpurple/plugins/ssl/Makefile libpurple/Makefile libpurple/protocols/Makefile diff --git a/libpurple/plugins/Makefile.am b/libpurple/plugins/Makefile.am --- a/libpurple/plugins/Makefile.am +++ b/libpurple/plugins/Makefile.am @@ -1,4 +1,4 @@ -DIST_SUBDIRS = ssl keyrings +DIST_SUBDIRS = ssl keyrings log if ENABLE_DBUS DBUS_LTLIB = dbus-example.la @@ -6,7 +6,8 @@ endif SUBDIRS = \ ssl \ - keyrings + keyrings \ + log plugindir = @PURPLE_PLUGINDIR@ diff --git a/libpurple/plugins/log/Makefile.am b/libpurple/plugins/log/Makefile.am new file mode 100644 --- /dev/null +++ b/libpurple/plugins/log/Makefile.am @@ -0,0 +1,25 @@ +EXTRA_DIST = + +CLEANFILES = + +plugindir = @PURPLE_PLUGINDIR@ + +if ENABLE_LOG_SQLITE + +logsqlite_la_CFLAGS = $(AM_CPPFLAGS) $(SQLITE3_CFLAGS) +logsqlite_la_LDFLAGS = -module @PLUGIN_LDFLAGS@ +logsqlite_la_SOURCES = logsqlite.c +logsqlite_la_LIBADD = @PURPLE_LIBS@ $(SQLITE3_LIBS) + +endif + +if PLUGINS + +if ENABLE_LOG_SQLITE + +plugin_LTLIBRARIES = \ + logsqlite.la + +endif + +endif diff --git a/libpurple/plugins/log/logsqlite.c b/libpurple/plugins/log/logsqlite.c new file mode 100644 --- /dev/null +++ b/libpurple/plugins/log/logsqlite.c @@ -0,0 +1,1 @@ +#include <sqlite3.h> _______________________________________________ Commits mailing list [email protected] https://pidgin.im/cgi-bin/mailman/listinfo/commits