diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2008-10-18 07:33:40 +0200 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2008-10-18 07:33:40 +0200 |
commit | 771d549d553b2b2adb4de00236a90682ecf8a62c (patch) | |
tree | dc0f9666d33de0bf0aa41912e09520ec58109085 | |
parent | 98bd557e7794772c878e69775766e48c30655cd1 (diff) | |
download | obexd-771d549d553b2b2adb4de00236a90682ecf8a62c.tar.gz |
Add skeleton for EBook plugin
-rw-r--r-- | .gitignore | 7 | ||||
-rw-r--r-- | Makefile.am | 3 | ||||
-rwxr-xr-x | bootstrap | 5 | ||||
-rwxr-xr-x | bootstrap-configure | 3 | ||||
-rw-r--r-- | configure.ac | 17 | ||||
-rw-r--r-- | plugins/Makefile.am | 13 | ||||
-rw-r--r-- | plugins/ebook.c | 45 | ||||
-rw-r--r-- | src/Makefile.am | 2 |
8 files changed, 89 insertions, 6 deletions
@@ -1,16 +1,23 @@ *.o *.a +*.lo +*.la .deps +.libs Makefile Makefile.in aclocal.m4 +config.guess config.h config.h.in config.log config.status +config.sub configure depcomp install-sh +libtool +ltmain.sh missing stamp-h1 autom4te.cache diff --git a/Makefile.am b/Makefile.am index b6dc623..7694dae 100644 --- a/Makefile.am +++ b/Makefile.am @@ -2,4 +2,5 @@ SUBDIRS = gwobex gdbus src plugins client test doc MAINTAINERCLEANFILES = Makefile.in \ - aclocal.m4 configure config.h.in depcomp missing install-sh + aclocal.m4 configure config.h.in config.sub config.guess \ + ltmain.sh depcomp missing install-sh mkinstalldirs @@ -2,5 +2,6 @@ aclocal && \ autoheader && \ - automake --add-missing --copy && \ - autoconf + libtoolize --automake --copy --force && + automake --add-missing --copy && \ + autoconf diff --git a/bootstrap-configure b/bootstrap-configure index b6602b8..6f7c0d4 100755 --- a/bootstrap-configure +++ b/bootstrap-configure @@ -10,4 +10,5 @@ fi --prefix=/usr \ --libexec=/usr/lib/obex \ --mandir=/usr/share/man \ - --sysconfdir=/etc $* + --sysconfdir=/etc \ + --enable-ebook $* diff --git a/configure.ac b/configure.ac index 73d869c..c70ba0e 100644 --- a/configure.ac +++ b/configure.ac @@ -32,7 +32,12 @@ AC_LANG_C AC_PROG_CC AC_PROG_CC_PIE AC_PROG_INSTALL -AC_PROG_RANLIB + +m4_define([_LT_AC_TAGCONFIG], []) +m4_ifdef([AC_LIBTOOL_TAGS], [AC_LIBTOOL_TAGS([])]) + +AC_DISABLE_STATIC +AC_PROG_LIBTOOL AC_CACHE_CHECK(for tm_gmtoff in struct tm, ac_cv_struct_tm_gmtoff, AC_TRY_COMPILE([ @@ -85,6 +90,10 @@ PKG_CHECK_MODULES(BLUEZ, bluez, dummy=yes, AC_SUBST(BLUEZ_CFLAGS) AC_SUBST(BLUEZ_LIBS) +PKG_CHECK_MODULES(EBOOK, libebook-1.2, ebook_found=yes, ebook_found=no) +AC_SUBST(EBOOK_CFLAGS) +AC_SUBST(EBOOK_LIBS) + AC_SUBST([GDBUS_CFLAGS], ['-I$(top_srcdir)/gdbus']) AC_SUBST([GDBUS_LIBS], ['$(top_builddir)/gdbus/libgdbus.a']) @@ -98,6 +107,12 @@ AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug], fi ]) +AC_ARG_ENABLE(ebook, AC_HELP_STRING([--enable-ebook], + [enable EBook plugin]), [ + enable_ebook=${enableval} +]) +AM_CONDITIONAL(EBOOK, test "${enable_ebook}" = "yes" && test "${ebook_found}" = "yes") + AC_ARG_ENABLE(server, AC_HELP_STRING([--disable-server], [disable compilation of OBEX server]), [ enable_server=${enableval} diff --git a/plugins/Makefile.am b/plugins/Makefile.am index 9e689ae..d5a1bb9 100644 --- a/plugins/Makefile.am +++ b/plugins/Makefile.am @@ -1,6 +1,19 @@ plugindir = $(libdir)/obex/plugins +plugin_LTLIBRARIES = + +if EBOOK +plugin_LTLIBRARIES += ebook.la + +ebook_la_SOURCES = ebook.c +ebook_la_LIBADD = @EBOOK_LIBS@ +ebook_la_CFLAGS = @EBOOK_CFLAGS@ +endif + +AM_LDFLAGS = -no-undefined -module -avoid-version \ + -export-symbols-regex obex_plugin_desc + INCLUDES = -I$(top_srcdir)/src MAINTAINERCLEANFILES = Makefile.in diff --git a/plugins/ebook.c b/plugins/ebook.c new file mode 100644 index 0000000..20d18f5 --- /dev/null +++ b/plugins/ebook.c @@ -0,0 +1,45 @@ +/* + * + * OBEX Server + * + * Copyright (C) 2007-2008 Marcel Holtmann <marcel@holtmann.org> + * + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + +#include <plugin.h> +#include <logging.h> + +#include <libebook/e-book.h> + +static int ebook_init(void) +{ + DBG(""); + + return 0; +} + +static void ebook_exit(void) +{ + DBG(""); +} + +OBEX_PLUGIN_DEFINE("ebook", ebook_init, ebook_exit) diff --git a/src/Makefile.am b/src/Makefile.am index cfccd70..9f1b434 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -19,7 +19,7 @@ obexd_LDADD = @GDBUS_LIBS@ @GMODULE_LIBS@ @GLIB_LIBS@ @DBUS_LIBS@ \ endif if MAINTAINER_MODE -plugindir = $(abs_top_srcdir)/plugins +plugindir = $(abs_top_srcdir)/plugins/.libs else plugindir = $(libdir)/obex/plugins endif |