aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2014-01-28 09:40:05 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2014-01-28 09:40:12 +0100
commitdfd0d38faef92e8a0af88b56c3020a7324c13d96 (patch)
treea8352c68dae6b0f87097b6b5f28c386958984ae7
parent12e1fcc34e6ce2c889b8dbc37b27f6a1c51cc84c (diff)
parent6986861fdaef84a59f0b4a98ef334fab20aa5710 (diff)
Merge pull request #3591
6986861 build: use -mwindows for gui targets when linking with mingw (Cory Fields)
-rw-r--r--src/m4/bitcoin_qt.m45
-rw-r--r--src/qt/Makefile.am1
-rw-r--r--src/qt/test/Makefile.am1
3 files changed, 7 insertions, 0 deletions
diff --git a/src/m4/bitcoin_qt.m4 b/src/m4/bitcoin_qt.m4
index 4e8cfec0cf..068371e83a 100644
--- a/src/m4/bitcoin_qt.m4
+++ b/src/m4/bitcoin_qt.m4
@@ -109,6 +109,10 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
AX_CHECK_LINK_FLAG([[$base_frameworks]],[QT_LIBS="$QT_LIBS $base_frameworks"],[AC_MSG_ERROR(could not find base frameworks)])
])
;;
+ *mingw*)
+ BITCOIN_QT_CHECK([
+ AX_CHECK_LINK_FLAG([[-mwindows]],[QT_LDFLAGS="$QT_LDFLAGS -mwindows"],[AC_MSG_WARN(-mwindows linker support not detected)])
+ ])
esac
@@ -137,6 +141,7 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
AC_SUBST(QT_INCLUDES)
AC_SUBST(QT_LIBS)
+ AC_SUBST(QT_LDFLAGS)
AC_SUBST(QT_DBUS_INCLUDES)
AC_SUBST(QT_DBUS_LIBS)
AC_SUBST(QT_TEST_INCLUDES)
diff --git a/src/qt/Makefile.am b/src/qt/Makefile.am
index cac6039663..bb95c934f1 100644
--- a/src/qt/Makefile.am
+++ b/src/qt/Makefile.am
@@ -341,6 +341,7 @@ bitcoin_qt_LDADD += $(LIBBITCOIN_WALLET)
endif
bitcoin_qt_LDADD += $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBLEVELDB) $(LIBMEMENV) \
$(BOOST_LIBS) $(QT_LIBS) $(QT_DBUS_LIBS) $(QR_LIBS) $(PROTOBUF_LIBS) $(BDB_LIBS)
+bitcoin_qt_LDFLAGS = $(QT_LDFLAGS)
# forms/foo.h -> forms/ui_foo.h
QT_FORMS_H=$(join $(dir $(QT_FORMS_UI)),$(addprefix ui_, $(notdir $(QT_FORMS_UI:.ui=.h))))
diff --git a/src/qt/test/Makefile.am b/src/qt/test/Makefile.am
index 00ccfadf3f..2461b5ff4d 100644
--- a/src/qt/test/Makefile.am
+++ b/src/qt/test/Makefile.am
@@ -41,5 +41,6 @@ endif
test_bitcoin_qt_LDADD += $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBLEVELDB) \
$(LIBMEMENV) $(BOOST_LIBS) $(QT_DBUS_LIBS) $(QT_TEST_LIBS) $(QT_LIBS) \
$(QR_LIBS) $(PROTOBUF_LIBS) $(BDB_LIBS)
+test_bitcoin_qt_LDFLAGS = $(QT_LDFLAGS)
CLEANFILES = $(BUILT_SOURCES) *.gcda *.gcno