]> granicus.if.org Git - neomutt/commitdiff
configure: make it more consistent 549/head
authorDamien Riegel <damien.riegel@gmail.com>
Mon, 24 Apr 2017 21:24:52 +0000 (17:24 -0400)
committerRichard Russon <rich@flatcap.org>
Sat, 29 Apr 2017 14:08:11 +0000 (15:08 +0100)
Most of the diff is reworking how notmuch is built. It used an extra
AM_CONDITIONAL but was the only component to do so, so change that to
make it consistent with the rest of the configure.

Lua picked the same thing but BUILD_LUA is actually never used, so it
could be dropped too.

Rest of the commit cleans up some pollution between MUTTLIBS and LIBS.

Makefile.am
configure.ac

index f4b06af7fe9eaa0d94bd53ba9107193bd918b68c..332e9815d48e7f6b32c2a13635e1936e19086824 100644 (file)
@@ -65,11 +65,10 @@ EXTRA_mutt_SOURCES = account.c bcache.c bcache.h browser.h compress.c \
        crypt_gpgme.c crypt_mod_pgp_classic.c crypt_mod_pgp_gpgme.c \
        crypt_mod_smime_classic.c crypt_mod_smime_gpgme.c dotlock.c \
        gnupgparse.c hcache.c hcache.h mbyte.h md5.c mutt_idna.c mutt_idna.h \
-       mutt_lua.c mutt_sasl.c mutt_socket.c mutt_ssl.c mutt_ssl_gnutls.c \
+       mutt_lua.c mutt_sasl.c mutt_notmuch.c mutt_socket.c mutt_ssl.c mutt_ssl_gnutls.c \
        mutt_tunnel.c newsrc.c nntp.c pgp.c pgpinvoke.c pgpkey.c pgplib.c \
        pgpmicalg.c pgppacket.c pop.c pop_auth.c pop_lib.c remailer.c \
-       remailer.h resize.c sha1.c smime.c smtp.c url.h utf8.c \
-       wcwidth.c
+       remailer.h resize.c sha1.c smime.c smtp.c url.h utf8.c wcwidth.c
 
 EXTRA_DIST = account.h ascii.h attach.h browser.h buffer.h buffy.h ChangeLog \
        ChangeLog.neomutt ChangeLog.nntp charset.h compress.h config.rpath \
@@ -79,21 +78,16 @@ EXTRA_DIST = account.h ascii.h attach.h browser.h buffer.h buffy.h ChangeLog \
        hcache_qdbm.c hcache_tc.c hcachever.sh.in history.h init.h keymap.h \
        lib.h LICENSE.md mailbox.h mapping.h mbyte.h md5.h mime.h mime.types \
        mutt.h mutt_commands.h mutt_crypt.h mutt_curses.h mutt_idna.h \
-       mutt_lua.h mutt_menu.h mutt_options.h mutt_regex.h mutt_sasl.h \
+       mutt_lua.h mutt_menu.h mutt_notmuch.h mutt_options.h mutt_regex.h mutt_sasl.h \
        mutt_sasl_plain.h mutt_socket.h mutt_ssl.h mutt_tunnel.h mx.h myvar.h \
        nntp.h OPS OPS.CRYPT OPS.MIX OPS.NOTMUCH OPS.PGP OPS.SIDEBAR OPS.SMIME \
        pager.h PATCHES patchlist.sh pgp.h pgpewrap.c pgplib.h pgppacket.h \
        pop.h protos.h README.md README.SSL remailer.c remailer.h \
-       rfc1524.h rfc2047.h rfc2231.h rfc3676.h rfc822.h sha1.h sidebar.h smime.h \ 
+       rfc1524.h rfc2047.h rfc2231.h rfc3676.h rfc822.h sha1.h sidebar.h smime.h \
        smime_keys.pl sort.h txt2c.c txt2c.sh UPDATING version.h keymap_alldefs.h
 
 EXTRA_SCRIPTS = smime_keys
 
-if BUILD_NOTMUCH
-mutt_SOURCES += mutt_notmuch.c mutt_notmuch.h
-mutt_LDADD += $(NOTMUCH_LIBS)
-endif
-
 mutt_dotlock_SOURCES = mutt_dotlock.c
 mutt_dotlock_LDADD = $(LIBOBJS)
 mutt_dotlock_DEPENDENCIES = $(LIBOBJS)
index 1ab17bbeefb8d85cbb63afced8ce8d86223a9da8..42470f3bcb6484c8b174530f9111636c0d698afb 100644 (file)
@@ -290,18 +290,17 @@ AS_IF([test x$enable_lua = "xyes"], [
        AC_DEFINE(USE_LUA, 1, [Define if you want support for LUA.])
        MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS mutt_lua.o"
        CPPFLAGS="$CPPFLAGS $LUA_INCLUDE"
-       LIBS="$LIBS $LUA_LIB"
+       MUTTLIBS="$MUTTLIBS $LUA_LIB"
 ])
-AM_CONDITIONAL(BUILD_LUA, test x$enable_lua = xyes)
 
 dnl --enable-notmuch
 AS_IF([test x$use_notmuch = "xyes"], [
-       AC_CHECK_LIB(notmuch, notmuch_database_open,,
+       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"
+       MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS mutt_notmuch.o"
+       MUTTLIBS="$MUTTLIBS -lnotmuch"
        OPS="$OPS \$(srcdir)/OPS.NOTMUCH"
-       need_notmuch="yes"
 
        AC_MSG_CHECKING([for notmuch api version 3])
        AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
@@ -315,7 +314,6 @@ AS_IF([test x$use_notmuch = "xyes"], [
        ])
        AC_MSG_RESULT([$notmuch_api_3])
 ])
-AM_CONDITIONAL(BUILD_NOTMUCH, test x$need_notmuch = xyes)
 
 dnl --with-mixmaster
 AS_IF([test "$alongwith_mixmaster" != "no"], [
@@ -419,7 +417,7 @@ main ()
        AC_CHECK_LIB($cf_ncurses, initscr,
                [MUTTLIBS="$MUTTLIBS -l$cf_ncurses"
 
-               AC_CHECK_LIB($cf_ncurses, tgetent, [], [
+               AC_CHECK_LIB($cf_ncurses, tgetent, [:], [
                        AC_CHECK_LIB(tinfo, tgetent, [MUTTLIBS="$MUTTLIBS -ltinfo"])
                ])
 
@@ -1139,7 +1137,6 @@ AC_SUBST(MUTTLIBS)
 AC_SUBST(MUTT_LIB_OBJECTS)
 AC_SUBST(LIBIMAP)
 AC_SUBST(LIBIMAPDEPS)
-AC_SUBST(NOTMUCH_LIBS)
 
 dnl -- iconv/gettext --
 
@@ -1238,7 +1235,7 @@ if test "x$with_idn" != "xno"; then
 
     AC_SEARCH_LIBS([stringprep_check_version], [idn], [
         AC_DEFINE([HAVE_LIBIDN], 1, [Define to 1 if you have the GNU idn library])
-        MUTTLIBS="$MUTTLIBS $LIBS"
+        MUTTLIBS="$MUTTLIBS -lidn"
 
         LIBS="$LIBS $LIBICONV"
         AC_CHECK_FUNCS(idna_to_unicode_utf8_from_utf8 idna_to_unicode_8z8z)