diff --git a/build-aux/m4/bitcoin_qt.m4 b/build-aux/m4/bitcoin_qt.m4 index d690a1fade..6ac45fc2f6 100644 --- a/build-aux/m4/bitcoin_qt.m4 +++ b/build-aux/m4/bitcoin_qt.m4 @@ -203,6 +203,21 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[ BITCOIN_QT_PATH_PROGS([LRELEASE], [lrelease-qt${bitcoin_qt_got_major_vers} lrelease${bitcoin_qt_got_major_vers} lrelease], $qt_bin_path) BITCOIN_QT_PATH_PROGS([LUPDATE], [lupdate-qt${bitcoin_qt_got_major_vers} lupdate${bitcoin_qt_got_major_vers} lupdate],$qt_bin_path, yes) + BITCOIN_QT_CHECK([ + AC_CACHE_CHECK([whether $RCC accepts --format-version option], + [ac_cv_prog_rcc_accepts_format_version], + [ac_cv_prog_rcc_accepts_format_version=no + echo '' > conftest.qrc + $RCC --format-version 1 conftest.qrc >/dev/null 2>&1 && ac_cv_prog_rcc_accepts_format_version=yes + rm -f conftest.qrc]) + if test "$ac_cv_prog_rcc_accepts_format_version" = yes; then + RCCFLAGS="--format-version 1" + else + RCCFLAGS= + fi + AC_SUBST(RCCFLAGS) + ]) + MOC_DEFS='-DHAVE_CONFIG_H -I$(srcdir)' case $host in *darwin*) diff --git a/src/Makefile.qt.include b/src/Makefile.qt.include index ce1acdd4db..fd50a22cfe 100644 --- a/src/Makefile.qt.include +++ b/src/Makefile.qt.include @@ -580,12 +580,12 @@ translate: qt/dashstrings.cpp $(QT_FORMS_UI) $(QT_FORMS_UI) $(BITCOIN_QT_CPP) qt $(QT_QRC_LOCALE_CPP): $(QT_QRC_LOCALE) $(QT_QM) @test -f $(RCC) @test -f $(@D)/$( $@ $(QT_QRC_CPP): $(QT_QRC) $(QT_FORMS_H) $(RES_ICONS) $(RES_IMAGES) $(RES_CSS) $(RES_MOVIES) $(PROTOBUF_H) @test -f $(RCC) - $(AM_V_GEN) QT_SELECT=$(QT_SELECT) $(RCC) -name dash $< | \ + $(AM_V_GEN) QT_SELECT=$(QT_SELECT) $(RCC) $(RCCFLAGS) -name dash $< | \ $(SED) -e '/^\*\*.*Created:/d' -e '/^\*\*.*by:/d' > $@ CLEAN_QT = $(nodist_qt_libbitcoinqt_a_SOURCES) $(QT_QM) $(QT_FORMS_H) qt/*.gcda qt/*.gcno