From patchwork Tue Feb 23 13:08:51 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?Qm8gw4PLnHJzdGVkIEFuZHJlc2Vu?= X-Patchwork-Id: 81462 Received: from lists.sourceforge.net (lists.sourceforge.net [216.34.181.88]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o1NEapSW030214 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 23 Feb 2010 14:37:28 GMT Received: from localhost ([127.0.0.1] helo=sfs-ml-4.v29.ch3.sourceforge.com) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1Njvqu-0000Jz-1R; Tue, 23 Feb 2010 14:35:08 +0000 Received: from sfi-mx-1.v28.ch3.sourceforge.com ([172.29.28.121] helo=mx.sourceforge.net) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1Njvqt-0000Ju-Bm for dri-devel@lists.sourceforge.net; Tue, 23 Feb 2010 14:35:07 +0000 X-ACL-Warn: Received: from [83.101.72.69] (helo=cannonball.ingmar.endoftheinternet.org) by sfi-mx-1.v28.ch3.sourceforge.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.69) id 1Njvqp-0006Ed-FD for dri-devel@lists.sourceforge.net; Tue, 23 Feb 2010 14:35:04 +0000 Received: from bo by cannonball.ingmar.endoftheinternet.org with local (Exim 4.69) (envelope-from ) id 1NjuVV-0007uw-1L; Tue, 23 Feb 2010 14:08:57 +0100 From: =?UTF-8?q?Bo=20=C3=98rsted=20Andresen?= To: dri-devel@lists.sourceforge.net Subject: [PATCH] Add explicit control over udev and cairo usage. Date: Tue, 23 Feb 2010 14:08:51 +0100 Message-Id: <1266930531-28472-1-git-send-email-zlin@exherbo.org> X-Mailer: git-send-email 1.7.0 X-Spam-Score: 1.0 (+) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. 1.0 RDNS_NONE Delivered to trusted network by a host with no rDNS X-Headers-End: 1Njvqp-0006Ed-FD Cc: ingmar@exherbo.org X-BeenThere: dri-devel@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.sourceforge.net X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Tue, 23 Feb 2010 14:37:28 +0000 (UTC) diff --git a/configure.ac b/configure.ac index ef7700f..3fcdb44 100644 --- a/configure.ac +++ b/configure.ac @@ -40,9 +40,6 @@ AC_SUBST(PTHREADSTUBS_LIBS) pkgconfigdir=${libdir}/pkgconfig AC_SUBST(pkgconfigdir) -AC_ARG_ENABLE(udev, AS_HELP_STRING([--enable-udev], - [Enable support for using udev instead of mknod (default: disabled)]), - [UDEV=$enableval], [UDEV=no]) AC_ARG_ENABLE(libkms, AS_HELP_STRING([--disable-libkms], @@ -142,10 +139,6 @@ AC_CACHE_CHECK([for supported warning flags], libdrm_cv_warn_cflags, [ AC_MSG_CHECKING([which warning flags were supported])]) WARN_CFLAGS="$libdrm_cv_warn_cflags" -if test "x$UDEV" = xyes; then - AC_DEFINE(UDEV, 1, [Have UDEV support]) -fi - AM_CONDITIONAL(HAVE_LIBKMS, [test "x$LIBKMS" = xyes]) AM_CONDITIONAL(HAVE_VMWGFX, [test "x$VMWGFX" = xyes]) @@ -157,18 +150,34 @@ AM_CONDITIONAL(HAVE_NOUVEAU, [test "x$NOUVEAU" = xyes]) AM_CONDITIONAL(HAVE_RADEON, [test "x$RADEON" = xyes]) -PKG_CHECK_MODULES(CAIRO, cairo, [HAVE_CAIRO=yes], [HAVE_CAIRO=no]) -if test "x$HAVE_CAIRO" = xyes; then - AC_DEFINE(HAVE_CAIRO, 1, [Have cairo support]) +AC_ARG_WITH(cairo, + AS_HELP_STRING([--with-cairo], + [enable use of cairo for tests (default: disabled)]),, + [with_cairo=no]) + +if test x"$with_cairo" != x"no" ; then + PKG_CHECK_MODULES(CAIRO, cairo,, + AC_MSG_ERROR([cairo support explicitly requested, but cairo not found])) + AC_DEFINE(HAVE_CAIRO, 1, [Have cairo support]) fi -AM_CONDITIONAL(HAVE_CAIRO, [test "x$HAVE_CAIRO" = xyes]) + +AM_CONDITIONAL(HAVE_CAIRO, [test x"$with_cairo" != x"no"]) + # For enumerating devices in test case -PKG_CHECK_MODULES(LIBUDEV, libudev, [HAVE_LIBUDEV=yes], [HAVE_LIBUDEV=no]) -if test "x$HAVE_LIBUDEV" = xyes; then - AC_DEFINE(HAVE_LIBUDEV, 1, [Have libudev support]) +AC_ARG_ENABLE(udev, + AS_HELP_STRING([--enable-udev], + [enable support for using udev instead of mknod (default: disabled)]),, + [enable_udev=no]) + +if test x"$enable_udev" != x"no" ; then + PKG_CHECK_MODULES(LIBUDEV, libudev,, + AC_MSG_ERROR([udev support explicitly requested, but libudev not found])) + AC_DEFINE(UDEV, 1, [Have udev support]) + AC_DEFINE(HAVE_LIBUDEV, 1, [Have libudev support]) fi -AM_CONDITIONAL(HAVE_LIBUDEV, [test "x$HAVE_LIBUDEV" = xyes]) + +AM_CONDITIONAL(HAVE_LIBUDEV, [test x"$enable_udev" != x"no"]) if test "x$INTEL" != "xno"; then # Check for atomic intrinsics