]> granicus.if.org Git - neomutt/commitdiff
add basic files and build-sys stuff
authorKarel Zak <kzak@redhat.com>
Wed, 14 Dec 2011 10:58:47 +0000 (11:58 +0100)
committerRichard Russon <rich@flatcap.org>
Mon, 14 Mar 2016 23:11:40 +0000 (23:11 +0000)
Signed-off-by: Karel Zak <kzak@redhat.com>
Makefile.am
OPS.NOTMUCH [new file with mode: 0644]
README.notmuch [new file with mode: 0644]
configure.ac
mutt_notmuch.c [new file with mode: 0644]
mutt_notmuch.h [new file with mode: 0644]

index 6d3d85eaf1624c8e7edd91d89d73d3d4f360ed91..412733c6f5666bb153f62ac4d54d819119b7b54f 100644 (file)
@@ -83,6 +83,16 @@ endif
 
 EXTRA_DIST += OPS.SIDEBAR
 
+if BUILD_NOTMUCH
+mutt_SOURCES += mutt_notmuch.c mutt_notmuch.h
+mutt_LDADD += $(NOTMUCH_LIBS)
+endif
+
+# kz
+EXTRA_DIST += README.notmuch OPS.NOTMUCH
+
+
+
 mutt_dotlock_SOURCES = mutt_dotlock.c
 mutt_dotlock_LDADD = $(LIBOBJS)
 mutt_dotlock_DEPENDENCIES = $(LIBOBJS)
@@ -135,9 +145,9 @@ smime_keys: $(srcdir)/smime_keys.pl
 keymap_defs.h: $(OPS) $(srcdir)/gen_defs
        $(srcdir)/gen_defs $(OPS) > keymap_defs.h
 
-keymap_alldefs.h: $(srcdir)/OPS $(srcdir)/OPS.SIDEBAR $(srcdir)/OPS.PGP $(srcdir)/OPS.MIX $(srcdir)/OPS.CRYPT $(srcdir)/OPS.SMIME $(srcdir)/gen_defs
+keymap_alldefs.h: $(srcdir)/OPS $(srcdir)/OPS.SIDEBAR $(srcdir)/OPS.NOTMUCH $(srcdir)/OPS.PGP $(srcdir)/OPS.MIX $(srcdir)/OPS.CRYPT $(srcdir)/OPS.SMIME $(srcdir)/gen_defs
        rm -f $@
-       $(srcdir)/gen_defs $(srcdir)/OPS $(srcdir)/OPS.PGP \
+       $(srcdir)/gen_defs $(srcdir)/OPS $(srcdir)/OPS.NOTMUCH $(srcdir)/OPS.PGP \
                $(srcdir)/OPS.SIDEBAR $(srcdir)/OPS.MIX $(srcdir)/OPS.CRYPT $(srcdir)/OPS.SMIME \
                        > keymap_alldefs.h
 
diff --git a/OPS.NOTMUCH b/OPS.NOTMUCH
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/README.notmuch b/README.notmuch
new file mode 100644 (file)
index 0000000..989029e
--- /dev/null
@@ -0,0 +1,15 @@
+
+notmuch support for mutt
+------------------------
+
+ * notmuch is e-email library for e-mail fulltext indexing and tagging; see
+   http://notmuchmail.org/ for more information.
+
+ * compile:
+
+  $ git clone git://github.com/karelzak/mutt-kz.git
+  $ cd mutt-kz
+  $ ./prepare
+  $ ./configure --enable-notmuch
+  $ make
+
index b14afa18ae4eb4e27d86495551558db961ae1c19..de835f4a605c48c6602bf27a4fc106f5099439c4 100644 (file)
@@ -184,6 +184,31 @@ AC_ARG_ENABLE(sidebar, AC_HELP_STRING([--enable-sidebar], [Enable Sidebar suppor
 ])
 AM_CONDITIONAL(BUILD_SIDEBAR, test x$need_sidebar = xyes)
 
+AC_ARG_ENABLE(notmuch, AC_HELP_STRING([--enable-notmuch], [Enable NOTMUCH support]),
+[       if test x$enableval = xyes ; then
+               AC_CHECK_LIB(notmuch, notmuch_database_open,,
+                       AC_MSG_ERROR([Unable to find Notmuch library]))
+               AC_DEFINE(USE_NOTMUCH,1,[ Define if you want support for the notmuch. ])
+               NOTMUCH_LIBS="-lnotmuch"
+               OPS="$OPS \$(srcdir)/OPS.NOTMUCH"
+               need_notmuch="yes"
+
+               AC_MSG_CHECKING([for notmuch api version 3])
+               AC_COMPILE_IFELSE( [AC_LANG_PROGRAM(
+                                       [[#include <notmuch.h>]],
+                                       [[notmuch_database_open("/path", NOTMUCH_DATABASE_MODE_READ_ONLY, (notmuch_database_t**)NULL);]]
+                                       )],
+               [notmuch_api_3=yes
+                       AC_DEFINE([NOTMUCH_API_3], 1, [Define to 1 if you have the notmuch api version 3.])
+                       ],
+               [notmuch_api_3=no]
+               )
+               AC_MSG_RESULT([$notmuch_api_3])
+        fi
+])
+AM_CONDITIONAL(BUILD_NOTMUCH, test x$need_notmuch = xyes)
+
+
 AC_ARG_WITH(mixmaster, AS_HELP_STRING([--with-mixmaster@<:@=PATH@:>@],[Include Mixmaster support]),
   [if test "$withval" != no
    then
@@ -1075,6 +1100,7 @@ AC_SUBST(MUTTLIBS)
 AC_SUBST(MUTT_LIB_OBJECTS)
 AC_SUBST(LIBIMAP)
 AC_SUBST(LIBIMAPDEPS)
+AC_SUBST(NOTMUCH_LIBS)
 
 dnl -- iconv/gettext --
 
diff --git a/mutt_notmuch.c b/mutt_notmuch.c
new file mode 100644 (file)
index 0000000..1aae62c
--- /dev/null
@@ -0,0 +1,5 @@
+/*
+ * Notmuch support for mutt
+ *
+ * Copyright (C) 2011 Karel Zak <kzak@redhat.com>
+ */
diff --git a/mutt_notmuch.h b/mutt_notmuch.h
new file mode 100644 (file)
index 0000000..dc7ae15
--- /dev/null
@@ -0,0 +1,7 @@
+/*
+ * Copyright (C) 2011 Karel Zak <kzak@redhat.com>
+ */
+#ifndef _MUTT_NOTMUCH_H_
+#define _MUTT_NOTMUCH_H_ 1
+
+#endif /* _MUTT_NOTMUCH_H_ */