Re: [PATCH i-g-t] configure.ac: Try to find XMLRPC with xmlrpc-c-config if pkg-config fails

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
> CC: Daniel Vetter <daniel.vetter@xxxxxxxxx>
> CC: Paul Kocialkowski <paul.kocialkowski@xxxxxxxxxxxxxxx>
> CC: Lyude <lyude@xxxxxxxxxx>

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@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux