public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in dev-util/valgrind/files: valgrind-3.6.1-user-enable-qt4.patch
@ 2011-02-19 12:31 Anthony G. Basile (blueness)
  0 siblings, 0 replies; only message in thread
From: Anthony G. Basile (blueness) @ 2011-02-19 12:31 UTC (permalink / raw
  To: gentoo-commits

blueness    11/02/19 12:31:23

  Added:                valgrind-3.6.1-user-enable-qt4.patch
  Log:
  Version bump, added patch to fix qtcore automagic
  
  (Portage version: 2.1.9.25/cvs/Linux x86_64)

Revision  Changes    Path
1.1                  dev-util/valgrind/files/valgrind-3.6.1-user-enable-qt4.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/valgrind/files/valgrind-3.6.1-user-enable-qt4.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/valgrind/files/valgrind-3.6.1-user-enable-qt4.patch?rev=1.1&content-type=text/plain

Index: valgrind-3.6.1-user-enable-qt4.patch
===================================================================
--- configure.in.orig	2011-02-17 14:29:14.000000000 -0500
+++ configure.in	2011-02-17 15:05:46.000000000 -0500
@@ -1692,7 +1692,8 @@
 # NEEDED BY THE REGRESSION TEST PROGRAMS.
 
 
-# The test below verifies whether the QtCore package been installed.
+# The test below first checks if the user has manaually disabled
+# QtCore.  It then verifies whether the QtCore package been installed.
 # This test works as follows:
 # - If pkg-config was not installed at the time autogen.sh was run,
 #   the definition of the PKG_CHECK_EXISTS() macro will not be found by
@@ -1709,37 +1710,49 @@
 #   the pkg-config executable is not present on the system on which the
 #   configure script is run.
 
-ifdef(
-  [PKG_CHECK_EXISTS],
-  [PKG_CHECK_EXISTS(
-    [QtCore],
+AC_ARG_ENABLE(qtcore,
+  AS_HELP_STRING(--enable-qtcore, compile with qtcore support),
     [
-      PKG_CHECK_MODULES([QTCORE], [QtCore])
-      # Paranoia: don't trust the result reported by pkg-config, but when
-      # pkg-config reports that QtCore has been found, verify whether linking
-      # programs with QtCore succeeds.
-      AC_LANG(C++)
-      safe_CXXFLAGS="${CXXFLAGS}"
-      CXXFLAGS="${QTCORE_CFLAGS} ${QTCORE_LIBS} $mflag_primary"
-      AC_TRY_LINK(
-        [#include <QMutex>],
-        [QMutex Mutex;],
-        [ac_have_qtcore=yes],
-        [
-          AC_MSG_WARN([Although pkg-config detected Qt4, linking Qt4 programs fails. Skipping Qt4.])
-          ac_have_qtcore=no
-        ]
-        )
-      CXXFLAGS="${safe_CXXFLAGS}"
+      if test x$enableval = xno ; then
+        AC_MSG_CHECKING([for QTCORE ])
+        AC_MSG_RESULT([QTCORE is manually distabled.])
+        [ac_have_qtcore=no]
+      fi
     ],
     [
-      ac_have_qtcore=no
+      ifdef(
+        [PKG_CHECK_EXISTS],
+        [PKG_CHECK_EXISTS(
+          [QtCore],
+          [
+            PKG_CHECK_MODULES([QTCORE], [QtCore])
+            # Paranoia: don't trust the result reported by pkg-config, but when
+            # pkg-config reports that QtCore has been found, verify whether linking
+            # programs with QtCore succeeds.
+            AC_LANG(C++)
+            safe_CXXFLAGS="${CXXFLAGS}"
+            CXXFLAGS="${QTCORE_CFLAGS} ${QTCORE_LIBS} $mflag_primary"
+            AC_TRY_LINK(
+              [#include <QMutex>],
+              [QMutex Mutex;],
+              [ac_have_qtcore=yes],
+              [
+                AC_MSG_WARN([Although pkg-config detected Qt4, linking Qt4 programs fails. Skipping Qt4.])
+                ac_have_qtcore=no
+              ]
+              )
+            CXXFLAGS="${safe_CXXFLAGS}"
+          ],
+          [
+            ac_have_qtcore=no
+          ]
+          )
+        ],
+        AC_MSG_WARN([pkg-config has not been installed or is too old.])
+        AC_MSG_WARN([Detection of Qt4 will be skipped.])
+        [ac_have_qtcore=no]
+      )
     ]
-    )
-  ],
-  AC_MSG_WARN([pkg-config has not been installed or is too old.])
-  AC_MSG_WARN([Detection of Qt4 will be skipped.])
-  [ac_have_qtcore=no]
 )
 
 AM_CONDITIONAL([HAVE_QTCORE], [test x$ac_have_qtcore = xyes])






^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-02-19 12:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-19 12:31 [gentoo-commits] gentoo-x86 commit in dev-util/valgrind/files: valgrind-3.6.1-user-enable-qt4.patch Anthony G. Basile (blueness)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox