All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t] configure.ac: Try to find XMLRPC with xmlrpc-c-config if pkg-config fails
@ 2017-08-03 13:34 Petri Latvala
  2017-08-03 17:35 ` Daniel Vetter
  0 siblings, 1 reply; 4+ messages in thread
From: Petri Latvala @ 2017-08-03 13:34 UTC (permalink / raw)
  To: intel-gfx; +Cc: Daniel Vetter

Debian and Ubuntu have XMLRPC packages without pkg-config files. Let's
do automatically what the user would anyway do manually.

Signed-off-by: Petri Latvala <petri.latvala@intel.com>
CC: Daniel Vetter <daniel.vetter@intel.com>
CC: Paul Kocialkowski <paul.kocialkowski@linux.intel.com>
CC: Lyude <lyude@redhat.com>
---
 configure.ac | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 6d3db87..2ceea2c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -191,8 +191,19 @@ AC_ARG_ENABLE(chamelium, AS_HELP_STRING([--enable-chamelium],
 	      [enable_chamelium=no])
 AM_CONDITIONAL(HAVE_CHAMELIUM, [test "x$enable_chamelium" = xyes])
 if test "x$enable_chamelium" = xyes; then
-	PKG_CHECK_MODULES(XMLRPC, xmlrpc xmlrpc_util xmlrpc_client, [],
-			  [AC_MSG_ERROR([Failed to find xmlrpc, required by chamelium.])])
+	PKG_CHECK_MODULES(XMLRPC, xmlrpc xmlrpc_util xmlrpc_client,
+		          [xmlrpc=yes], [xmlrpc=no])
+	if test x"$xmlrpc" != xyes; then
+		AC_CHECK_PROG([XMLRPC_C_CONFIG], [xmlrpc-c-config], [yes], [no])
+		if test x"$XMLRPC_C_CONFIG" = xyes; then
+			XMLRPC_CFLAGS=$(xmlrpc-c-config client --cflags)
+			XMLRPC_LIBS=$(xmlrpc-c-config client --libs)
+			AC_SUBST(XMLRPC_CFLAGS)
+			AC_SUBST(XMLRPC_LIBS)
+		else
+			AC_MSG_ERROR([Failed to find xmlrpc, required by chamelium.])
+		fi
+	fi
 	PKG_CHECK_MODULES(PIXMAN, pixman-1, [],
 			  [AC_MSG_ERROR([Failed to find pixman, required by chamelium.])])
 	if test x"$udev" != xyes; then
-- 
2.9.3

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH i-g-t] configure.ac: Try to find XMLRPC with xmlrpc-c-config if pkg-config fails
  2017-08-03 13:34 [PATCH i-g-t] configure.ac: Try to find XMLRPC with xmlrpc-c-config if pkg-config fails Petri Latvala
@ 2017-08-03 17:35 ` Daniel Vetter
  2017-08-04  9:15   ` Arkadiusz Hiler
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Vetter @ 2017-08-03 17:35 UTC (permalink / raw)
  To: Petri Latvala; +Cc: Daniel Vetter, intel-gfx

On Thu, Aug 03, 2017 at 04:34:45PM +0300, Petri Latvala wrote:
> Debian and Ubuntu have XMLRPC packages without pkg-config files. Let's
> do automatically what the user would anyway do manually.
> 
> Signed-off-by: Petri Latvala <petri.latvala@intel.com>
> CC: Daniel Vetter <daniel.vetter@intel.com>
> CC: Paul Kocialkowski <paul.kocialkowski@linux.intel.com>
> CC: Lyude <lyude@redhat.com>

Works like I charm, I went right ahead and pushed it.

Lyude, I noticed that you've disabled chamelium by default, but I guess we
could also auto-enable (if deps are there) if you feel like.

Thanks, Daniel

> ---
>  configure.ac | 15 +++++++++++++--
>  1 file changed, 13 insertions(+), 2 deletions(-)
> 
> diff --git a/configure.ac b/configure.ac
> index 6d3db87..2ceea2c 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -191,8 +191,19 @@ AC_ARG_ENABLE(chamelium, AS_HELP_STRING([--enable-chamelium],
>  	      [enable_chamelium=no])
>  AM_CONDITIONAL(HAVE_CHAMELIUM, [test "x$enable_chamelium" = xyes])
>  if test "x$enable_chamelium" = xyes; then
> -	PKG_CHECK_MODULES(XMLRPC, xmlrpc xmlrpc_util xmlrpc_client, [],
> -			  [AC_MSG_ERROR([Failed to find xmlrpc, required by chamelium.])])
> +	PKG_CHECK_MODULES(XMLRPC, xmlrpc xmlrpc_util xmlrpc_client,
> +		          [xmlrpc=yes], [xmlrpc=no])
> +	if test x"$xmlrpc" != xyes; then
> +		AC_CHECK_PROG([XMLRPC_C_CONFIG], [xmlrpc-c-config], [yes], [no])
> +		if test x"$XMLRPC_C_CONFIG" = xyes; then
> +			XMLRPC_CFLAGS=$(xmlrpc-c-config client --cflags)
> +			XMLRPC_LIBS=$(xmlrpc-c-config client --libs)
> +			AC_SUBST(XMLRPC_CFLAGS)
> +			AC_SUBST(XMLRPC_LIBS)
> +		else
> +			AC_MSG_ERROR([Failed to find xmlrpc, required by chamelium.])
> +		fi
> +	fi
>  	PKG_CHECK_MODULES(PIXMAN, pixman-1, [],
>  			  [AC_MSG_ERROR([Failed to find pixman, required by chamelium.])])
>  	if test x"$udev" != xyes; then
> -- 
> 2.9.3
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH i-g-t] configure.ac: Try to find XMLRPC with xmlrpc-c-config if pkg-config fails
  2017-08-03 17:35 ` Daniel Vetter
@ 2017-08-04  9:15   ` Arkadiusz Hiler
  2017-08-04 10:07     ` Arkadiusz Hiler
  0 siblings, 1 reply; 4+ messages in thread
From: Arkadiusz Hiler @ 2017-08-04  9:15 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: Daniel Vetter, intel-gfx

On Thu, Aug 03, 2017 at 07:35:33PM +0200, Daniel Vetter wrote:
> On Thu, Aug 03, 2017 at 04:34:45PM +0300, Petri Latvala wrote:
> > Debian and Ubuntu have XMLRPC packages without pkg-config files. Let's
> > do automatically what the user would anyway do manually.
> > 
> > Signed-off-by: Petri Latvala <petri.latvala@intel.com>
> > CC: Daniel Vetter <daniel.vetter@intel.com>
> > CC: Paul Kocialkowski <paul.kocialkowski@linux.intel.com>
> > CC: Lyude <lyude@redhat.com>
> 
> Works like I charm, I went right ahead and pushed it.
> 
> Lyude, I noticed that you've disabled chamelium by default, but I guess we
> could also auto-enable (if deps are there) if you feel like.
> 
> Thanks, Daniel

Hey,

I do not like that "auto-enable if deps are there" and let me explain
why ;-)

Chamelium is not very widely used, and most people don't care about it
being build, so that's why it should not be the default.

But then if you do care and it haven't build this one time for you the
"fun" with rootcausing starts.

I think it's better to make people used to explicitly request chamelium
to be build and have nice configure-time errors, stating what exactely
is missing.

Especially now, when new dependencies for chamelium are being added all
the time.


And I believe that should apply to everything - we shouldn't have things
that may build or may not if you follow exactely the same build steps on
different machines.

The components should be either mandatory by default or made "mandatory"
with a switch.

-- 
Cheers,
Arek
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH i-g-t] configure.ac: Try to find XMLRPC with xmlrpc-c-config if pkg-config fails
  2017-08-04  9:15   ` Arkadiusz Hiler
@ 2017-08-04 10:07     ` Arkadiusz Hiler
  0 siblings, 0 replies; 4+ messages in thread
From: Arkadiusz Hiler @ 2017-08-04 10:07 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: Daniel Vetter, intel-gfx

On Fri, Aug 04, 2017 at 12:15:18PM +0300, Arkadiusz Hiler wrote:
> On Thu, Aug 03, 2017 at 07:35:33PM +0200, Daniel Vetter wrote:
> > On Thu, Aug 03, 2017 at 04:34:45PM +0300, Petri Latvala wrote:
> > > Debian and Ubuntu have XMLRPC packages without pkg-config files. Let's
> > > do automatically what the user would anyway do manually.
> > > 
> > > Signed-off-by: Petri Latvala <petri.latvala@intel.com>
> > > CC: Daniel Vetter <daniel.vetter@intel.com>
> > > CC: Paul Kocialkowski <paul.kocialkowski@linux.intel.com>
> > > CC: Lyude <lyude@redhat.com>
> > 
> > Works like I charm, I went right ahead and pushed it.
> > 
> > Lyude, I noticed that you've disabled chamelium by default, but I guess we
> > could also auto-enable (if deps are there) if you feel like.
> > 
> > Thanks, Daniel
> 
> Hey,
> 
> I do not like that "auto-enable if deps are there" and let me explain
> why ;-)
> 
> Chamelium is not very widely used, and most people don't care about it
> being build, so that's why it should not be the default.
> 
> But then if you do care and it haven't build this one time for you the
> "fun" with rootcausing starts.
> 
> I think it's better to make people used to explicitly request chamelium
> to be build and have nice configure-time errors, stating what exactely
> is missing.
> 
> Especially now, when new dependencies for chamelium are being added all
> the time.
> 
> 
> And I believe that should apply to everything - we shouldn't have things
> that may build or may not if you follow exactely the same build steps on
> different machines.
> 
> The components should be either mandatory by default or made "mandatory"
> with a switch.
> 
> -- 
> Cheers,
> Arek

CCing people who may be interested.
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

end of thread, other threads:[~2017-08-04 10:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-03 13:34 [PATCH i-g-t] configure.ac: Try to find XMLRPC with xmlrpc-c-config if pkg-config fails Petri Latvala
2017-08-03 17:35 ` Daniel Vetter
2017-08-04  9:15   ` Arkadiusz Hiler
2017-08-04 10:07     ` Arkadiusz Hiler

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.