diff --git a/configure.ac b/configure.ac index ad390b63..7e1db62e 100644 --- a/configure.ac +++ b/configure.ac @@ -37,10 +37,10 @@ AC_SUBST(prefix) AC_PROG_CXX AC_PROG_CC AC_PROG_CPP -AC_PROG_CC_STDC -AC_PROG_CC_C99 AC_PROG_INSTALL -AC_HEADER_STDC +AC_CHECK_INCLUDES_DEFAULT +AC_PROG_EGREP + extra_flags="-Wformat-security \ -Wstack-protector \ @@ -99,7 +99,7 @@ AS_IF([test "x$enable_mu4e" != "xno"], [ AS_CASE([$emacs_version], [*25.3*],[build_mu4e=yes], [*26*|*27*|*28*|*29*],[build_mu4e=yes], - [AC_WARN([emacs is too old to build mu4e (need emacs >= 25.3)])]) + [AC_MSG_WARN(emacs is too old to build mu4e (need emacs >= 25.3))]) ]) AM_CONDITIONAL(BUILD_MU4E, test "x$build_mu4e" = "xyes") @@ -107,8 +107,7 @@ AM_CONDITIONAL(BUILD_MU4E, test "x$build_mu4e" = "xyes") # e.g. Solaris. See mu-maildir.c. Explicitly disabling it is for # testing purposes only AC_ARG_ENABLE([dirent-d-type], - AC_HELP_STRING([--disable-dirent-d-type], - [Don't use dirent->d_type, even if you have it]), + AS_HELP_STRING([--disable-dirent-d-type],[Don't use dirent->d_type, even if you have it]), [], [AC_STRUCT_DIRENT_D_TYPE] ) AS_IF([test "x$ac_cv_member_struct_dirent_d_type" != "xyes"], @@ -119,8 +118,7 @@ AS_IF([test "x$ac_cv_member_struct_dirent_d_type" != "xyes"], # order; this is much faster on some file systems (such as extfs3). # Explicitly disabling it is for testing purposes only. AC_ARG_ENABLE([dirent-d-ino], - AC_HELP_STRING([--disable-dirent-d-ino], - [Don't use dirent->d_ino, even if you have it]), + AS_HELP_STRING([--disable-dirent-d-ino],[Don't use dirent->d_ino, even if you have it]), [], [AC_STRUCT_DIRENT_D_INO] ) AS_IF([test "x$ac_cv_member_struct_dirent_d_ino" != "xyes"], diff --git a/guile/Makefile.am b/guile/Makefile.am index b6387be4..dd911087 100644 --- a/guile/Makefile.am +++ b/guile/Makefile.am @@ -82,16 +82,16 @@ mu_guile_TEXINFOS= \ # SUFFIXES = .x .doc # .cc.x: # $(AM_V_GEN) $(GUILE_SNARF) -o $@ $< $(snarfcxxopts) -SNARF_DATA=$(XFILES) +#SNARF_DATA=$(XFILES) # FIXME: GUILE_SITEDIR would be better, but that # breaks 'make distcheck' scmdir=${prefix}/share/guile/site/${GUILE_EFFECTIVE_VERSION} scm_DATA=mu.scm -EXTRA_DIST=$(scm_DATA) $(SNARF_DATA) +EXTRA_DIST=$(scm_DATA) $(XFILES) ## Add -MG to make the .x magic work with auto-dep code. MKDEP = $(CC) -M -MG $(snarfcppopts) -CLEANFILES=$(XFILES) +#CLEANFILES=$(XFILES) diff --git a/guile/mu-guile-message.cc b/guile/mu-guile-message.cc index c099dbf1..2d0bb5e3 100644 --- a/guile/mu-guile-message.cc +++ b/guile/mu-guile-message.cc @@ -183,7 +183,8 @@ SCM_DEFINE(get_field, SCM_ASSERT(scm_integer_p(FIELD), FIELD, SCM_ARG2, FUNC_NAME); const auto field_opt{field_from_number(static_cast(scm_to_int(FIELD)))}; SCM_ASSERT(!!field_opt, FIELD, SCM_ARG2, FUNC_NAME); - +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wswitch-enum" switch (field_opt->id) { case Field::Id::Priority: return get_prio_scm(*msg); @@ -193,6 +194,7 @@ SCM_DEFINE(get_field, return get_body(*msg, false); default: break; } +#pragma GCC diagnostic pop switch (field_opt->type) { case Field::Type::String: diff --git a/lib/message/Makefile.am b/lib/message/Makefile.am index c6cf8161..d10815f8 100644 --- a/lib/message/Makefile.am +++ b/lib/message/Makefile.am @@ -13,6 +13,7 @@ ## 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 Street, Fifth Floor, Boston, MA 02110-1301, USA. +include $(top_srcdir)/gtest.mk AM_CXXFLAGS= \ $(WARN_CXXFLAGS) \ @@ -27,6 +28,8 @@ noinst_LTLIBRARIES= \ libmu_message_la_SOURCES= \ mu-message.cc \ mu-message.hh \ + mu-message-file.cc \ + mu-message-file.hh \ mu-message-part.cc \ mu-message-part.hh \ mu-contact.hh \