dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [libdrm PATCH 2/2] configure.ac: don't detect disabled options dependencies
@ 2016-01-09 15:05 Marcin Ślusarz
  2016-01-19  8:26 ` Emil Velikov
  0 siblings, 1 reply; 3+ messages in thread
From: Marcin Ślusarz @ 2016-01-09 15:05 UTC (permalink / raw)
  To: dri-devel; +Cc: Emil Velikov

Currently with --disable-amdgpu --disable-valgrind --disable-cairo-tests
cunit, valgrind and cairo are still detected.

Signed-off-by: Marcin Ślusarz <marcin.slusarz@gmail.com>
---
 configure.ac | 36 ++++++++++++++++++++++--------------
 1 file changed, 22 insertions(+), 14 deletions(-)

diff --git a/configure.ac b/configure.ac
index c8c4ace..cc44e3f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -359,19 +359,23 @@ if test "x$RADEON" = xyes; then
 	AC_DEFINE(HAVE_RADEON, 1, [Have radeon support])
 fi
 
-# Detect cunit library
-PKG_CHECK_MODULES([CUNIT], [cunit >= 2.1], [have_cunit=yes], [have_cunit=no])
-# If pkg-config does not find cunit, check it using AC_CHECK_LIB.  We
-# do this because Debian (Ubuntu) lacks pkg-config file for cunit.
-# fixed in 2.1-2.dfsg-3: http://anonscm.debian.org/cgit/collab-maint/cunit.git/commit/?h=debian
-if test "x${have_cunit}" = "xno"; then
-	AC_CHECK_LIB([cunit], [CU_initialize_registry], [have_cunit=yes], [have_cunit=no])
-	if test "x${have_cunit}" = "xyes"; then
-		CUNIT_LIBS="-lcunit"
-		CUNIT_CFLAGS=""
-		AC_SUBST([CUNIT_LIBS])
-		AC_SUBST([CUNIT_CFLAGS])
+if test "x$AMDGPU" != xno; then
+	# Detect cunit library
+	PKG_CHECK_MODULES([CUNIT], [cunit >= 2.1], [have_cunit=yes], [have_cunit=no])
+	# If pkg-config does not find cunit, check it using AC_CHECK_LIB.  We
+	# do this because Debian (Ubuntu) lacks pkg-config file for cunit.
+	# fixed in 2.1-2.dfsg-3: http://anonscm.debian.org/cgit/collab-maint/cunit.git/commit/?h=debian
+	if test "x${have_cunit}" = "xno"; then
+		AC_CHECK_LIB([cunit], [CU_initialize_registry], [have_cunit=yes], [have_cunit=no])
+		if test "x${have_cunit}" = "xyes"; then
+			CUNIT_LIBS="-lcunit"
+			CUNIT_CFLAGS=""
+			AC_SUBST([CUNIT_LIBS])
+			AC_SUBST([CUNIT_CFLAGS])
+		fi
 	fi
+else
+	have_cunit=no
 fi
 AM_CONDITIONAL(HAVE_CUNIT, [test "x$have_cunit" != "xno"])
 
@@ -400,7 +404,9 @@ AC_ARG_ENABLE([cairo-tests],
               [AS_HELP_STRING([--enable-cairo-tests],
                               [Enable support for Cairo rendering in tests (default: auto)])],
               [CAIRO=$enableval], [CAIRO=auto])
-PKG_CHECK_MODULES(CAIRO, cairo, [HAVE_CAIRO=yes], [HAVE_CAIRO=no])
+if test "x$CAIRO" != xno; then
+	PKG_CHECK_MODULES(CAIRO, cairo, [HAVE_CAIRO=yes], [HAVE_CAIRO=no])
+fi
 AC_MSG_CHECKING([whether to enable Cairo tests])
 if test "x$CAIRO" = xauto; then
 	CAIRO="$HAVE_CAIRO"
@@ -445,7 +451,9 @@ AC_ARG_ENABLE(valgrind,
               [AS_HELP_STRING([--enable-valgrind],
                              [Build libdrm with  valgrind support (default: auto)])],
                              [VALGRIND=$enableval], [VALGRIND=auto])
-PKG_CHECK_MODULES(VALGRIND, [valgrind], [have_valgrind=yes], [have_valgrind=no])
+if test "x$VALGRIND" != xno; then
+	PKG_CHECK_MODULES(VALGRIND, [valgrind], [have_valgrind=yes], [have_valgrind=no])
+fi
 AC_MSG_CHECKING([whether to enable Valgrind support])
 if test "x$VALGRIND" = xauto; then
 	VALGRIND="$have_valgrind"
-- 
2.1.4

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [libdrm PATCH 2/2] configure.ac: don't detect disabled options dependencies
  2016-01-09 15:05 [libdrm PATCH 2/2] configure.ac: don't detect disabled options dependencies Marcin Ślusarz
@ 2016-01-19  8:26 ` Emil Velikov
  2016-01-19 21:51   ` Marcin Ślusarz
  0 siblings, 1 reply; 3+ messages in thread
From: Emil Velikov @ 2016-01-19  8:26 UTC (permalink / raw)
  To: Marcin Ślusarz; +Cc: ML dri-devel

Hi Marcin,

On 9 January 2016 at 17:05, Marcin Ślusarz <marcin.slusarz@gmail.com> wrote:
> Currently with --disable-amdgpu --disable-valgrind --disable-cairo-tests
> cunit, valgrind and cairo are still detected.
>
Doesn't this patch make 1/2 obsolete ?

> Signed-off-by: Marcin Ślusarz <marcin.slusarz@gmail.com>

Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>

> ---
>  configure.ac | 36 ++++++++++++++++++++++--------------
>  1 file changed, 22 insertions(+), 14 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index c8c4ace..cc44e3f 100644
> --- a/configure.ac
> +++ b/configure.ac

> @@ -400,7 +404,9 @@ AC_ARG_ENABLE([cairo-tests],
>                [AS_HELP_STRING([--enable-cairo-tests],
>                                [Enable support for Cairo rendering in tests (default: auto)])],
>                [CAIRO=$enableval], [CAIRO=auto])
> -PKG_CHECK_MODULES(CAIRO, cairo, [HAVE_CAIRO=yes], [HAVE_CAIRO=no])
> +if test "x$CAIRO" != xno; then
> +       PKG_CHECK_MODULES(CAIRO, cairo, [HAVE_CAIRO=yes], [HAVE_CAIRO=no])
> +fi
Namely: if we have disable-cairo-tests, the module will never be
checked, thus CAIRO_{CFLAGS,LIBS} will be empty. Obviously the user
can explicitly sets the CAIRO_* variables, in which case they're
cutting the branch they're standing on.

Please let me know if you'd prefer to have 1/2 regardless (or if I
missed something)

Thank you for sorting these.

-Emil
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [libdrm PATCH 2/2] configure.ac: don't detect disabled options dependencies
  2016-01-19  8:26 ` Emil Velikov
@ 2016-01-19 21:51   ` Marcin Ślusarz
  0 siblings, 0 replies; 3+ messages in thread
From: Marcin Ślusarz @ 2016-01-19 21:51 UTC (permalink / raw)
  To: Emil Velikov; +Cc: ML dri-devel

On Tue, Jan 19, 2016 at 10:26:16AM +0200, Emil Velikov wrote:
> Hi Marcin,
> 
> On 9 January 2016 at 17:05, Marcin Ślusarz <marcin.slusarz@gmail.com> wrote:
> > Currently with --disable-amdgpu --disable-valgrind --disable-cairo-tests
> > cunit, valgrind and cairo are still detected.
> >
> Doesn't this patch make 1/2 obsolete ?

Yes, more or less. Both patches fix the issue I was seeing.

> 
> > Signed-off-by: Marcin Ślusarz <marcin.slusarz@gmail.com>
> 
> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
> 
> > ---
> >  configure.ac | 36 ++++++++++++++++++++++--------------
> >  1 file changed, 22 insertions(+), 14 deletions(-)
> >
> > diff --git a/configure.ac b/configure.ac
> > index c8c4ace..cc44e3f 100644
> > --- a/configure.ac
> > +++ b/configure.ac
> 
> > @@ -400,7 +404,9 @@ AC_ARG_ENABLE([cairo-tests],
> >                [AS_HELP_STRING([--enable-cairo-tests],
> >                                [Enable support for Cairo rendering in tests (default: auto)])],
> >                [CAIRO=$enableval], [CAIRO=auto])
> > -PKG_CHECK_MODULES(CAIRO, cairo, [HAVE_CAIRO=yes], [HAVE_CAIRO=no])
> > +if test "x$CAIRO" != xno; then
> > +       PKG_CHECK_MODULES(CAIRO, cairo, [HAVE_CAIRO=yes], [HAVE_CAIRO=no])
> > +fi
> Namely: if we have disable-cairo-tests, the module will never be
> checked, thus CAIRO_{CFLAGS,LIBS} will be empty. Obviously the user
> can explicitly sets the CAIRO_* variables, in which case they're
> cutting the branch they're standing on.
> 
> Please let me know if you'd prefer to have 1/2 regardless (or if I
> missed something)

I thought it would be better to have cairo build flags guarded by global
HAVE_CAIRO flag. If you want to apply just this patch, that's fine by me.

> 
> Thank you for sorting these.

Thanks,
Marcin
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-01-19 21:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-09 15:05 [libdrm PATCH 2/2] configure.ac: don't detect disabled options dependencies Marcin Ślusarz
2016-01-19  8:26 ` Emil Velikov
2016-01-19 21:51   ` Marcin Ślusarz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).