[PATCH] pinentry:: Qt: Append -std=c++11 if building against Qt 5.7
Kristian Fiskerstrand
kristian.fiskerstrand at sumptuouscapital.com
Thu Aug 11 19:13:39 CEST 2016
Hi,
* m4/qt.m4: Append -std=c++11 to CFLAGS if building against Qt 5.7
--
Qt 5.7 enables C++11 for Qt modules, and any app relying on it require to be
compiled with at least this standard.
This patch adds detection for Qt 5.7 and make sure -std=c++11 is passed
if building against Qt 5.7 or higher.
##
( http://wiki.qt.io/New_Features_in_Qt_5.7 )
--
----------------------------
Kristian Fiskerstrand
Blog: https://blog.sumptuouscapital.com
Twitter: @krifisk
----------------------------
Public OpenPGP certificate at hkp://pool.sks-keyservers.net
fpr:94CB AFDD 3034 5109 5618 35AA 0B7F 8B60 E3ED FAE3
----------------------------
Primum ego, tum ego, deinde ego
First I, then I, thereafter I.
-------------- next part --------------
From 7384e2a575dde2809784d9f182fd1d247064c8a2 Mon Sep 17 00:00:00 2001
From: Kristian Fiskerstrand <kf at sumptuouscapital.com>
Date: Thu, 11 Aug 2016 14:44:37 +0200
Subject: [PATCH] Qt: Append -std=c++11 if building against Qt 5.7
* m4/qt.m4: Append -std=c++11 to CFLAGS if building against Qt 5.7
--
Qt 5.7 enables C++11 for Qt modules, and any app relying on it require to be
compiled with at least this standard.
This patch adds detection for Qt 5.7 and make sure -std=c++11 is passed if
building against Qt 5.7 or higher.
---
m4/qt.m4 | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/m4/qt.m4 b/m4/qt.m4
index 093f428..90c4a6e 100644
--- a/m4/qt.m4
+++ b/m4/qt.m4
@@ -35,6 +35,7 @@ AC_DEFUN([FIND_QT],
enable_pinentry_qt5="try")
have_qt5_libs="no";
+ require_qt_cpp11="no";
if test "$enable_pinentry_qt5" != "no"; then
PKG_CHECK_MODULES(PINENTRY_QT,
@@ -47,6 +48,15 @@ AC_DEFUN([FIND_QT],
fi
fi
if test "$have_qt5_libs" = "yes"; then
+ PKG_CHECK_MODULES(PINENTRY_QT_REQUIRE_CPP11,
+ Qt5Core >= 5.7.0,
+ [require_qt_cpp11="yes"],
+ [require_qt_cpp11="no"])
+
+ if test "${require_qt_cpp11}" = "yes"; then
+ PINENTRY_QT_CFLAGS="$PINENTRY_QT_CFLAGS -std=c++11"
+ fi
+
AC_CHECK_TOOL(MOC, moc)
AC_MSG_CHECKING([moc version])
mocversion=`$MOC -v 2>&1`
--
2.7.3
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 455 bytes
Desc: OpenPGP digital signature
URL: </pipermail/attachments/20160811/f0ed5999/attachment.sig>
More information about the Gnupg-devel
mailing list