Skip to contentSkip to conversation

configure: Don't bail if libdrm_nouveau isn't available.

PATCH In review Matt Turner 4 participants 8 messages Oct 11, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 configure: Don't bail if libdrm_nouveau isn't available.

We were seriously *requiring* libdrm_nouveau unless explicitly disabled?

---
 configure.ac | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
configure.ac +5 -2
index f65942f..43740f9 100644
@@ -92,8 +92,11 @@ AM_CONDITIONAL(BUILD_ASSEMBLER, [test "x$enable_assembler" = xyes])
 # -----------------------------------------------------------------------------
 # for dma-buf tests
 AC_ARG_ENABLE(nouveau, AS_HELP_STRING([--disable-nouveau],
-	      [Enable use of nouveau API for prime tests (default: enabled)]),
-	      [NOUVEAU=$enableval], [NOUVEAU=yes])
+	      [Enable use of nouveau API for prime tests (default: auto)]),
+	      [NOUVEAU=$enableval], [NOUVEAU=auto])
+if test "x$NOUVEAU" = xauto; then
+	PKG_CHECK_EXISTS([libdrm_nouveau >= 2.4.33], [NOUVEAU=yes], [NOUVEAU=no])
+fi
 if test "x$NOUVEAU" = xyes; then
 	PKG_CHECK_MODULES(DRM_NOUVEAU, [libdrm_nouveau >= 2.4.33])
 	AC_DEFINE(HAVE_NOUVEAU, 1, [Have nouveau support])
Signature · 1 line
1.8.3.2
Acked-by on v1 1/1
#1 lore raw
Quoted 1 line · Matt Turner

We were seriously *requiring* libdrm_nouveau unless explicitly disabled?

Quoted 25 lines
---
 configure.ac | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
configure.ac +5 -2
index f65942f..43740f9 100644
@@ -92,8 +92,11 @@ AM_CONDITIONAL(BUILD_ASSEMBLER, [test "x$enable_assembler" = xyes])
 # -----------------------------------------------------------------------------
 # for dma-buf tests
 AC_ARG_ENABLE(nouveau, AS_HELP_STRING([--disable-nouveau],
-	      [Enable use of nouveau API for prime tests (default: enabled)]),
-	      [NOUVEAU=$enableval], [NOUVEAU=yes])
+	      [Enable use of nouveau API for prime tests (default: auto)]),
+	      [NOUVEAU=$enableval], [NOUVEAU=auto])
+if test "x$NOUVEAU" = xauto; then
+	PKG_CHECK_EXISTS([libdrm_nouveau >= 2.4.33], [NOUVEAU=yes], [NOUVEAU=no])
+fi
 if test "x$NOUVEAU" = xyes; then
 	PKG_CHECK_MODULES(DRM_NOUVEAU, [libdrm_nouveau >= 2.4.33])
 	AC_DEFINE(HAVE_NOUVEAU, 1, [Have nouveau support])
Signature · 1 line
1.8.3.2
Signature · 1 line
Ben Widawsky, Intel Open Source Technology Center
#2 lore raw
In reply to Matt Turner
Quoted 1 line · Matt Turner

We were seriously *requiring* libdrm_nouveau unless explicitly disabled?

I've had a bit of hilarious fail with optional testcases that automatically get disabled when depencies aren't around. Hence why they're all required by default with the optional switch to disable them.
-Daniel

Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
#3 lore raw
Quoted 7 lines · Daniel Vetter
Quoted 1 line · Matt Turner

We were seriously *requiring* libdrm_nouveau unless explicitly disabled?

I've had a bit of hilarious fail with optional testcases that automatically get disabled when depencies aren't around. Hence why they're all required by default with the optional switch to disable them.

You've had this problem in general, or with nouveau?

I mean, this is kind of how autotools is supposed to work. If you explicitly want to ensure something is built you add --enable-thing.

#4 lore raw
Quoted 10 lines · Matt Turner
Quoted 7 lines · Daniel Vetter
Quoted 1 line · Matt Turner

We were seriously *requiring* libdrm_nouveau unless explicitly disabled?

I've had a bit of hilarious fail with optional testcases that automatically get disabled when depencies aren't around. Hence why they're all required by default with the optional switch to disable them.

You've had this problem in general, or with nouveau?

In general.

Quoted 2 lines

I mean, this is kind of how autotools is supposed to work. If you explicitly want to ensure something is built you add --enable-thing.

Yeah, but otoh I'm positively incompetent ;-) And since the main use case for i-g-t is to distribute the tests autoconf doesn't quite work like it usually does.
-Daniel

Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
#5 lore raw
Quoted 5 lines · Daniel Vetter
Quoted 4 lines · Matt Turner
Quoted 3 lines · Daniel Vetter
Quoted 1 line · Matt Turner

We were seriously *requiring* libdrm_nouveau unless explicitly disabled?

Quoted 8 lines
Quoted 6 lines
Quoted 4 lines

I've had a bit of hilarious fail with optional testcases that automatically get disabled when depencies aren't around. Hence why they're all required by default with the optional switch to disable them.

You've had this problem in general, or with nouveau?

In general.

So I think what I'm saying is that the nouveau support in intel-gpu-tools isn't the project's primary purpose, so we should allow it to build without nouveau support if you don't have nouveau installed. If you don't have nouveau installed, you're not making a mistake by not building intel-gpu-tools without support. And if you have nouveau installed, you still get nouveau support.

#6 lore raw
Quoted 13 lines · Matt Turner
Quoted 12 lines · Daniel Vetter
Quoted 10 lines · Matt Turner
Quoted 7 lines · Daniel Vetter
Quoted 1 line · Matt Turner

We were seriously *requiring* libdrm_nouveau unless explicitly disabled?

I've had a bit of hilarious fail with optional testcases that automatically get disabled when depencies aren't around. Hence why they're all required by default with the optional switch to disable them.

You've had this problem in general, or with nouveau?

Quoted 8 lines
Quoted 1 line

In general.

So I think what I'm saying is that the nouveau support in intel-gpu-tools isn't the project's primary purpose, so we should allow it to build without nouveau support if you don't have nouveau installed. If you don't have nouveau installed, you're not making a mistake by not building intel-gpu-tools without support. And if you have nouveau installed, you still get nouveau support.

I completely agree with Matt.

If the system doesn't already have nouveau installed, then it there is very low likelihood that it makes any sense to install nouveau onto that system. It very likely does not have NVidia hardware at all. So why require it? Let's just autodetect it and behave sanely.

Requiring libdrm_nouveau is a nuisance for developers working on platforms where libdrm doesn't get built with NVidia support.

Reviewed-by
#7 lore raw
Quoted 25 lines · Chad Versace
Quoted 13 lines · Matt Turner
Quoted 12 lines · Daniel Vetter
Quoted 10 lines · Matt Turner
Quoted 7 lines · Daniel Vetter
Quoted 1 line · Matt Turner

We were seriously *requiring* libdrm_nouveau unless explicitly disabled?

I've had a bit of hilarious fail with optional testcases that automatically get disabled when depencies aren't around. Hence why they're all required by default with the optional switch to disable them.

You've had this problem in general, or with nouveau?

Quoted 8 lines
Quoted 1 line

In general.

So I think what I'm saying is that the nouveau support in intel-gpu-tools isn't the project's primary purpose, so we should allow it to build without nouveau support if you don't have nouveau installed. If you don't have nouveau installed, you're not making a mistake by not building intel-gpu-tools without support. And if you have nouveau installed, you still get nouveau support.

I completely agree with Matt.

Quoted 7 lines

If the system doesn't already have nouveau installed, then it there is very low likelihood that it makes any sense to install nouveau onto that system. It very likely does not have NVidia hardware at all. So why require it? Let's just autodetect it and behave sanely.

Requiring libdrm_nouveau is a nuisance for developers working on platforms where libdrm doesn't get built with NVidia support.

And, this patch gets