Browse Source

Make Berkley DB an optional dependency.

It doesn't seem necessary for any of the basic functionality.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
1.2
Reimar Döffinger 10 years ago committed by Oswald Buddenhagen
parent
commit
08dab9465b
  1. 2
      README
  2. 13
      configure.ac
  3. 13
      src/Makefile.am
  4. 2
      src/compat/Makefile.am
  5. 1
      src/drv_maildir.c

2
README

@ -61,7 +61,7 @@ isync executable still exists; it is a compatibility wrapper around mbsync.
* Requirements * Requirements
Berkley DB 4.2+ Berkley DB 4.2+ (optional)
OpenSSL for TLS/SSL support (optional) OpenSSL for TLS/SSL support (optional)
* Installation * Installation

13
configure.ac

@ -146,8 +146,9 @@ AC_CACHE_CHECK([for Berkley DB >= 4.2], ac_cv_berkdb4,
db->truncate(db, 0, 0, 0); db->truncate(db, 0, 0, 0);
db->open(db, 0, "foo", "foo", DB_HASH, DB_CREATE, 0)], db->open(db, 0, "foo", "foo", DB_HASH, DB_CREATE, 0)],
[ac_cv_berkdb4=yes])]) [ac_cv_berkdb4=yes])])
if test "x$ac_cv_berkdb4" = xno; then if test "x$ac_cv_berkdb4" = xyes; then
AC_MSG_ERROR([Berkley DB >= 4.2 not found.]) AC_SUBST([DB_LIBS], ["-ldb"])
AC_DEFINE(USE_DB, 1, [if Berkley DB should be used])
fi fi
have_zlib= have_zlib=
@ -165,7 +166,8 @@ AC_ARG_ENABLE(compat,
if test "x$ob_cv_enable_compat" != xno; then if test "x$ob_cv_enable_compat" != xno; then
AC_CHECK_FUNCS(getopt_long) AC_CHECK_FUNCS(getopt_long)
fi fi
AM_CONDITIONAL(with_compat, test "x$ob_cv_enable_compat" != xno) AM_CONDITIONAL(with_compat, test "x$ob_cv_enable_compat" != xno -a "x$ac_cv_berkdb4" = xyes)
AM_CONDITIONAL(with_mdconvert, test "x$ac_cv_berkdb4" = xyes)
AC_CONFIG_FILES([Makefile src/Makefile src/compat/Makefile isync.spec]) AC_CONFIG_FILES([Makefile src/Makefile src/compat/Makefile isync.spec])
AC_OUTPUT AC_OUTPUT
@ -186,4 +188,9 @@ if test -n "$have_zlib"; then
else else
AC_MSG_RESULT([Not using zlib]) AC_MSG_RESULT([Not using zlib])
fi fi
if test "x$ac_cv_berkdb4" = xyes; then
AC_MSG_RESULT([Using Berkley DB])
else
AC_MSG_RESULT([Not using Berkley DB])
fi
AC_MSG_RESULT() AC_MSG_RESULT()

13
src/Makefile.am

@ -3,20 +3,23 @@ compat_dir = compat
endif endif
SUBDIRS = $(compat_dir) SUBDIRS = $(compat_dir)
bin_PROGRAMS = mbsync mdconvert
mbsync_SOURCES = main.c sync.c config.c util.c socket.c driver.c drv_imap.c drv_maildir.c mbsync_SOURCES = main.c sync.c config.c util.c socket.c driver.c drv_imap.c drv_maildir.c
mbsync_LDADD = -ldb $(SSL_LIBS) $(SOCK_LIBS) $(SASL_LIBS) $(Z_LIBS) mbsync_LDADD = $(DB_LIBS) $(SSL_LIBS) $(SOCK_LIBS) $(SASL_LIBS) $(Z_LIBS)
noinst_HEADERS = common.h config.h driver.h sync.h socket.h noinst_HEADERS = common.h config.h driver.h sync.h socket.h
mdconvert_SOURCES = mdconvert.c mdconvert_SOURCES = mdconvert.c
mdconvert_LDADD = -ldb mdconvert_LDADD = $(DB_LIBS)
if with_mdconvert
mdconvert_prog = mdconvert
mdconvert_man = mdconvert.1
endif
EXTRA_PROGRAMS = tst_timers EXTRA_PROGRAMS = tst_timers
tst_timers_SOURCES = tst_timers.c util.c tst_timers_SOURCES = tst_timers.c util.c
man_MANS = mbsync.1 mdconvert.1 bin_PROGRAMS = mbsync $(mdconvert_prog)
man_MANS = mbsync.1 $(mdconvert_man)
exampledir = $(docdir)/examples exampledir = $(docdir)/examples
example_DATA = mbsyncrc.sample example_DATA = mbsyncrc.sample

2
src/compat/Makefile.am

@ -1,7 +1,7 @@
bin_PROGRAMS = isync bin_PROGRAMS = isync
isync_SOURCES = main.c config.c convert.c util.c isync_SOURCES = main.c config.c convert.c util.c
isync_LDADD = -ldb isync_LDADD = $(DB_LIBS)
noinst_HEADERS = isync.h noinst_HEADERS = isync.h
man_MANS = isync.1 man_MANS = isync.1

1
src/drv_maildir.c

@ -38,7 +38,6 @@
#include <time.h> #include <time.h>
#include <utime.h> #include <utime.h>
#define USE_DB 1
#ifdef __linux__ #ifdef __linux__
# define LEGACY_FLOCK 1 # define LEGACY_FLOCK 1
#endif #endif

Loading…
Cancel
Save