From: Saleem Abdulrasool <compn...@compnerd.org> --- configure.ac | 39 ++++++++++++++++++++++++--------------- 1 files changed, 24 insertions(+), 15 deletions(-)
The existing --enable-udev option claims to be disabled by default so this patch also makes it that. 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 -- 1.6.6.2 ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev -- _______________________________________________ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel