[Intel-gfx] [PATCH i-g-t 3/3] configure.ac: Make gsl dependency and dependent code optional

Lyude Paul lyude at redhat.com
Wed Jul 19 17:48:06 UTC 2017


R-B for the first two, I've already pushed them. For this one I'd
prefer it if you just squashed it into the series where you add analog
frame comparison support. Otherwise, looks good.

On Wed, 2017-07-19 at 17:59 +0300, Paul Kocialkowski wrote:
> This adds automake instructions, with matching autoconf macros, to
> make
> the dependency on gsl and the code that depends on it optional.
> 
> This should allow preserving the ability to build IGT on Android,
> where
> gsl support may be lacking.
> 
> Signed-off-by: Paul Kocialkowski <paul.kocialkowski at linux.intel.com>
> ---
>  configure.ac         | 6 +++++-
>  lib/Makefile.am      | 7 +++++++
>  lib/Makefile.sources | 2 --
>  3 files changed, 12 insertions(+), 3 deletions(-)
> 
> diff --git a/configure.ac b/configure.ac
> index 20e5cf96..de0e85dd 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -181,7 +181,8 @@ PKG_CHECK_MODULES(GLIB, [glib-2.0], [glib=yes],
> [glib=no])
>  if test x"$glib" = xyes; then
>  	AC_DEFINE(HAVE_GLIB,1,[Enable glib support])
>  fi
> -PKG_CHECK_MODULES(GSL, gsl)
> +PKG_CHECK_MODULES(GSL, [gsl], [gsl=yes], [gsl=no])
> +AM_CONDITIONAL(HAVE_GSL, [test "x$gsl" = xyes])
>  
>  # for chamelium
>  AC_ARG_ENABLE(chamelium, AS_HELP_STRING([--disable-chamelium],
> @@ -196,6 +197,9 @@ if test "x$enable_chamelium" = xyes; then
>  	if test x"$glib" != xyes; then
>  		AC_MSG_ERROR([Failed to find glib, required by
> chamelium. Use --disable-chamelium to disable chamelium support.])
>  	fi
> +	if test x"$gsl" != xyes; then
> +		AC_MSG_ERROR([Failed to find gsl, required by
> chamelium. Use --disable-chamelium to disable chamelium support.])
> +	fi
>  	AC_DEFINE(HAVE_CHAMELIUM, 1, [Enable Chamelium support])
>  fi
>  
> diff --git a/lib/Makefile.am b/lib/Makefile.am
> index fb922ced..9b506f69 100644
> --- a/lib/Makefile.am
> +++ b/lib/Makefile.am
> @@ -29,6 +29,13 @@ lib_source_list +=	 	\
>  	$(NULL)
>  endif
>  
> +if HAVE_GSL
> +lib_source_list +=	 	\
> +	igt_frame.c		\
> +	igt_frame.h		\
> +	$(NULL)
> +endif
> +
>  AM_CPPFLAGS = -I$(top_srcdir)
>  AM_CFLAGS = \
>  	    $(CWARNFLAGS) \
> diff --git a/lib/Makefile.sources b/lib/Makefile.sources
> index c2e58809..53fdb54c 100644
> --- a/lib/Makefile.sources
> +++ b/lib/Makefile.sources
> @@ -83,8 +83,6 @@ lib_source_list =	 	\
>  	uwildmat/uwildmat.c	\
>  	igt_kmod.c		\
>  	igt_kmod.h		\
> -	igt_frame.c		\
> -	igt_frame.h		\
>  	$(NULL)
>  
>  .PHONY: version.h.tmp


More information about the Intel-gfx mailing list