From 20eea6153f33974c478926fe1964a0ac7622bf41 Mon Sep 17 00:00:00 2001 From: "Dirk-Jan C. Binnema" Date: Tue, 25 Feb 2020 07:39:00 +0200 Subject: [PATCH] fix guile build --- configure.ac | 9 +++++---- guile/Makefile.am | 3 ++- guile/mu-guile.c | 9 +++++---- guile/tests/Makefile.am | 13 ++++++------- guile/tests/test-mu-guile.c | 10 ++++------ 5 files changed, 22 insertions(+), 22 deletions(-) diff --git a/configure.ac b/configure.ac index 5f11f9cd..98879ba0 100644 --- a/configure.ac +++ b/configure.ac @@ -216,7 +216,7 @@ AM_CONDITIONAL(BUILD_GUI,[test "x$have_webkit" = "xyes" -a "x$have_gtk" = "xyes" # build with guile2.2 when available and not disabled. AC_ARG_ENABLE([guile], AS_HELP_STRING([--disable-guile],[Disable guile])) AS_IF([test "x$enable_guile" != "xno"],[ - PKG_CHECK_MODULES(guile_22, guile-2.2, [have_guile22=yes],[have_guile22=no]) + PKG_CHECK_MODULES(GUILE22, guile-2.2, [have_guile22=yes],[have_guile22=no]) # this is a bit hacky; GUILE_PKG AS_IF([test "x$have_guile22" = "xyes"],[ GUILE_PKG([2.2]) @@ -224,10 +224,11 @@ AS_IF([test "x$enable_guile" != "xno"],[ GUILE_FLAGS AC_DEFINE_UNQUOTED([GUILE_BINARY],"$GUILE",[guile binary]) AC_DEFINE(BUILD_GUILE,[1], [Do we support Guile?]) + AC_SUBST(GUILE_SNARF, [guile-snarf]) + guile_version=$($PKG_CONFIG guile-2.2 --modversion) ]) ]) -AM_CONDITIONAL(BUILD_GUILE, -[ test -n "$GUILE_EFFECTIVE_VERSION" -a -n "$GUILE_SNARF"]) +AM_CONDITIONAL(BUILD_GUILE,[test "x$have_guile" != "xno"]) ############################################################################### ############################################################################### @@ -298,7 +299,7 @@ echo "Webkit2/GTK+ version : $webkit_version" ]) AM_COND_IF([BUILD_GUILE],[ -echo "Guile version : $GUILE_EFFECTIVE_VERSION" +echo "Guile version : $guile_version" ]) if test "x$build_mu4e" = "xyes"; then diff --git a/guile/Makefile.am b/guile/Makefile.am index c95f9b15..08c495c0 100644 --- a/guile/Makefile.am +++ b/guile/Makefile.am @@ -47,7 +47,8 @@ libguile_mu_la_LIBADD= \ libguile_mu_la_LDFLAGS= \ $(ASAN_LDFLAGS) \ -shared \ - -export-dynamic + -export-dynamic \ + -Wl,-z,muldefs XFILES= \ mu-guile.x \ diff --git a/guile/mu-guile.c b/guile/mu-guile.c index 982c38ea..59f243a4 100644 --- a/guile/mu-guile.c +++ b/guile/mu-guile.c @@ -1,5 +1,5 @@ /* -** Copyright (C) 2011-2013 Dirk-Jan C. Binnema +** Copyright (C) 2011-2020 Dirk-Jan C. Binnema ** ** 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 @@ -17,14 +17,15 @@ ** */ -#if HAVE_CONFIG_H #include -#endif /*HAVE_CONFIG_H*/ - #include #include + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wredundant-decls" #include +#pragma GCC diagnostic pop #include #include diff --git a/guile/tests/Makefile.am b/guile/tests/Makefile.am index e65d1f5b..8df87fbb 100644 --- a/guile/tests/Makefile.am +++ b/guile/tests/Makefile.am @@ -19,12 +19,11 @@ include $(top_srcdir)/gtest.mk AM_CPPFLAGS=$(XAPIAN_CXXFLAGS) \ $(GMIME_CFLAGS) \ $(GLIB_CFLAGS) \ - -I ${top_srcdir} \ - -I ${top_srcdir}/lib \ - -I ${top_srcdir}/lib/tests \ - -DMU_TESTMAILDIR=\"${top_srcdir}/lib/tests/testdir\" \ - -DMU_TESTMAILDIR2=\"${top_srcdir}/lib/tests/testdir2\" \ - -DMU_TESTMAILDIR3=\"${top_srcdir}/lib/tests/testdir3\" \ + -I${top_srcdir} \ + -I${top_srcdir}/lib \ + -DMU_TESTMAILDIR=\"${top_srcdir}/lib/testdir\" \ + -DMU_TESTMAILDIR2=\"${top_srcdir}/lib/testdir2\" \ + -DMU_TESTMAILDIR3=\"${top_srcdir}/lib/testdir3\" \ -DMU_PROGRAM=\"${abs_top_builddir}/mu/mu\" \ -DMU_GUILE_MODULE_PATH=\"${abs_top_srcdir}/guile/\" \ -DMU_GUILE_LIBRARY_PATH=\"${abs_top_builddir}/guile/.libs\" \ @@ -42,7 +41,7 @@ noinst_PROGRAMS= $(TEST_PROGS) TEST_PROGS += test-mu-guile test_mu_guile_SOURCES= test-mu-guile.c dummy.cc -test_mu_guile_LDADD=${top_builddir}/lib/tests/libtestmucommon.la +test_mu_guile_LDADD=${top_builddir}/lib/libtestmucommon.la # we need to use dummy.cc to enforce c++ linking... BUILT_SOURCES= \ diff --git a/guile/tests/test-mu-guile.c b/guile/tests/test-mu-guile.c index 987e9c6d..f5189586 100644 --- a/guile/tests/test-mu-guile.c +++ b/guile/tests/test-mu-guile.c @@ -1,6 +1,5 @@ -/* -*- mode: c; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- -** -** Copyright (C) 2012-2013 Dirk-Jan C. Binnema +/* +** Copyright (C) 2012-2020 Dirk-Jan C. Binnema ** ** 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 @@ -25,14 +24,13 @@ #include #include -#include "../mu-query.h" - +#include #include #include #include #include "test-mu-common.h" -#include "mu-store.hh" +#include /* tests for the command line interface, uses testdir2 */