fix guile build

This commit is contained in:
Dirk-Jan C. Binnema
2020-02-25 07:39:00 +02:00
parent aea6db4485
commit 20eea6153f
5 changed files with 22 additions and 22 deletions

View File

@ -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. # build with guile2.2 when available and not disabled.
AC_ARG_ENABLE([guile], AS_HELP_STRING([--disable-guile],[Disable guile])) AC_ARG_ENABLE([guile], AS_HELP_STRING([--disable-guile],[Disable guile]))
AS_IF([test "x$enable_guile" != "xno"],[ 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 # this is a bit hacky; GUILE_PKG
AS_IF([test "x$have_guile22" = "xyes"],[ AS_IF([test "x$have_guile22" = "xyes"],[
GUILE_PKG([2.2]) GUILE_PKG([2.2])
@ -224,10 +224,11 @@ AS_IF([test "x$enable_guile" != "xno"],[
GUILE_FLAGS GUILE_FLAGS
AC_DEFINE_UNQUOTED([GUILE_BINARY],"$GUILE",[guile binary]) AC_DEFINE_UNQUOTED([GUILE_BINARY],"$GUILE",[guile binary])
AC_DEFINE(BUILD_GUILE,[1], [Do we support Guile?]) 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, AM_CONDITIONAL(BUILD_GUILE,[test "x$have_guile" != "xno"])
[ test -n "$GUILE_EFFECTIVE_VERSION" -a -n "$GUILE_SNARF"])
############################################################################### ###############################################################################
############################################################################### ###############################################################################
@ -298,7 +299,7 @@ echo "Webkit2/GTK+ version : $webkit_version"
]) ])
AM_COND_IF([BUILD_GUILE],[ AM_COND_IF([BUILD_GUILE],[
echo "Guile version : $GUILE_EFFECTIVE_VERSION" echo "Guile version : $guile_version"
]) ])
if test "x$build_mu4e" = "xyes"; then if test "x$build_mu4e" = "xyes"; then

View File

@ -47,7 +47,8 @@ libguile_mu_la_LIBADD= \
libguile_mu_la_LDFLAGS= \ libguile_mu_la_LDFLAGS= \
$(ASAN_LDFLAGS) \ $(ASAN_LDFLAGS) \
-shared \ -shared \
-export-dynamic -export-dynamic \
-Wl,-z,muldefs
XFILES= \ XFILES= \
mu-guile.x \ mu-guile.x \

View File

@ -1,5 +1,5 @@
/* /*
** Copyright (C) 2011-2013 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl> ** Copyright (C) 2011-2020 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>
** **
** This program is free software; you can redistribute it and/or modify it ** 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 ** under the terms of the GNU General Public License as published by the
@ -17,14 +17,15 @@
** **
*/ */
#if HAVE_CONFIG_H
#include <config.h> #include <config.h>
#endif /*HAVE_CONFIG_H*/
#include <locale.h> #include <locale.h>
#include <glib-object.h> #include <glib-object.h>
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wredundant-decls"
#include <libguile.h> #include <libguile.h>
#pragma GCC diagnostic pop
#include <mu-runtime.h> #include <mu-runtime.h>
#include <mu-query.h> #include <mu-query.h>

View File

@ -19,12 +19,11 @@ include $(top_srcdir)/gtest.mk
AM_CPPFLAGS=$(XAPIAN_CXXFLAGS) \ AM_CPPFLAGS=$(XAPIAN_CXXFLAGS) \
$(GMIME_CFLAGS) \ $(GMIME_CFLAGS) \
$(GLIB_CFLAGS) \ $(GLIB_CFLAGS) \
-I ${top_srcdir} \ -I${top_srcdir} \
-I ${top_srcdir}/lib \ -I${top_srcdir}/lib \
-I ${top_srcdir}/lib/tests \ -DMU_TESTMAILDIR=\"${top_srcdir}/lib/testdir\" \
-DMU_TESTMAILDIR=\"${top_srcdir}/lib/tests/testdir\" \ -DMU_TESTMAILDIR2=\"${top_srcdir}/lib/testdir2\" \
-DMU_TESTMAILDIR2=\"${top_srcdir}/lib/tests/testdir2\" \ -DMU_TESTMAILDIR3=\"${top_srcdir}/lib/testdir3\" \
-DMU_TESTMAILDIR3=\"${top_srcdir}/lib/tests/testdir3\" \
-DMU_PROGRAM=\"${abs_top_builddir}/mu/mu\" \ -DMU_PROGRAM=\"${abs_top_builddir}/mu/mu\" \
-DMU_GUILE_MODULE_PATH=\"${abs_top_srcdir}/guile/\" \ -DMU_GUILE_MODULE_PATH=\"${abs_top_srcdir}/guile/\" \
-DMU_GUILE_LIBRARY_PATH=\"${abs_top_builddir}/guile/.libs\" \ -DMU_GUILE_LIBRARY_PATH=\"${abs_top_builddir}/guile/.libs\" \
@ -42,7 +41,7 @@ noinst_PROGRAMS= $(TEST_PROGS)
TEST_PROGS += test-mu-guile TEST_PROGS += test-mu-guile
test_mu_guile_SOURCES= test-mu-guile.c dummy.cc 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... # we need to use dummy.cc to enforce c++ linking...
BUILT_SOURCES= \ BUILT_SOURCES= \

View File

@ -1,6 +1,5 @@
/* -*- mode: c; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- /*
** ** Copyright (C) 2012-2020 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>
** Copyright (C) 2012-2013 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>
** **
** This program is free software; you can redistribute it and/or modify it ** 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 ** under the terms of the GNU General Public License as published by the
@ -25,14 +24,13 @@
#include <glib.h> #include <glib.h>
#include <glib/gstdio.h> #include <glib/gstdio.h>
#include "../mu-query.h" #include <lib/mu-query.h>
#include <stdlib.h> #include <stdlib.h>
#include <unistd.h> #include <unistd.h>
#include <string.h> #include <string.h>
#include "test-mu-common.h" #include "test-mu-common.h"
#include "mu-store.hh" #include <lib/mu-store.hh>
/* tests for the command line interface, uses testdir2 */ /* tests for the command line interface, uses testdir2 */