mu: avoid some linker errors on MacOS

This commit is contained in:
Dirk-Jan C. Binnema 2020-10-31 14:35:50 +02:00
parent f4282d9535
commit 7353c87778
3 changed files with 25 additions and 15 deletions

View File

@ -53,6 +53,12 @@ AX_CXX_COMPILE_STDCXX_14
m4_ifdef([AX_COMPILER_FLAGS],[AX_COMPILER_FLAGS(,,[yes],${extra_flags})]) m4_ifdef([AX_COMPILER_FLAGS],[AX_COMPILER_FLAGS(,,[yes],${extra_flags})])
AX_VALGRIND_CHECK AX_VALGRIND_CHECK
# i.e,., do we hgave -z muldefs?, if not (MacOS), we can't
# build the guile backend
AX_CHECK_LINK_FLAG([-allow-multiple-definition])dnl
AM_CONDITIONAL([LD_ALLOW_MULTIPLE_DEFINITION],
[test "x$ax_cv_check_ldflags___allow_multiple_definition" = xyes])dnl
LT_INIT LT_INIT
AX_CODE_COVERAGE AX_CODE_COVERAGE
@ -214,7 +220,8 @@ AM_CONDITIONAL(BUILD_GUI,[test "x$have_webkit" = "xyes" -a "x$have_gtk" = "xyes"
############################################################################### ###############################################################################
# build with guile 3.0/2.2 when available and not disabled. # build with guile 3.0/2.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"],[ AM_COND_IF([LD_ALLOW_MULTIPLE_DEFINITION],[
AS_IF([test "x$enable_guile" != "xno"],[
PKG_CHECK_MODULES(GUILE, [guile-3.0], [have_guile=yes],[ PKG_CHECK_MODULES(GUILE, [guile-3.0], [have_guile=yes],[
PKG_CHECK_MODULES(GUILE, [guile-2.2], [have_guile=yes], [have_guile=no])]) PKG_CHECK_MODULES(GUILE, [guile-2.2], [have_guile=yes], [have_guile=no])])
AS_IF([test "x$have_guile" = "xyes"],[ AS_IF([test "x$have_guile" = "xyes"],[
@ -226,6 +233,8 @@ AS_IF([test "x$enable_guile" != "xno"],[
AC_SUBST(GUILE_SNARF, [guile-snarf]) AC_SUBST(GUILE_SNARF, [guile-snarf])
guile_version=$($PKG_CONFIG guile-$GUILE_EFFECTIVE_VERSION --modversion) guile_version=$($PKG_CONFIG guile-$GUILE_EFFECTIVE_VERSION --modversion)
]) ])
])],[
AM_MSG_NOTICE(["no guile: need muldef support"])
]) ])
AM_CONDITIONAL(BUILD_GUILE,[test "x$have_guile" = "xyes"]) AM_CONDITIONAL(BUILD_GUILE,[test "x$have_guile" = "xyes"])
############################################################################### ###############################################################################

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
@ -21,6 +21,8 @@
#include <config.h> #include <config.h>
#endif /*HAVE_CONFIG_H*/ #endif /*HAVE_CONFIG_H*/
#include "mu-guile-message.h"
#include <glib-object.h> #include <glib-object.h>
#include <libguile.h> #include <libguile.h>

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
@ -33,7 +33,6 @@ G_BEGIN_DECLS
*/ */
void* mu_guile_message_init (void *data); void* mu_guile_message_init (void *data);
G_END_DECLS G_END_DECLS
#endif /*__MU_GUILE_MESSAGE_H__*/ #endif /*__MU_GUILE_MESSAGE_H__*/