All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t 0/3] Various autoconf fixups
@ 2017-07-19 14:58 Paul Kocialkowski
  2017-07-19 14:58 ` [PATCH i-g-t 1/3] configure.ac: Enable back chamelium build by default Paul Kocialkowski
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Paul Kocialkowski @ 2017-07-19 14:58 UTC (permalink / raw)
  To: intel-gfx

These patches apply on top of:
tests/chamelium: Detect analogue bridges and handle EDID accordingly

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

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

* [PATCH i-g-t 1/3] configure.ac: Enable back chamelium build by default
  2017-07-19 14:58 [PATCH i-g-t 0/3] Various autoconf fixups Paul Kocialkowski
@ 2017-07-19 14:58 ` Paul Kocialkowski
  2017-07-19 14:58 ` [PATCH i-g-t 2/3] configure.ac: Make glib dependency optional to preserve Android build Paul Kocialkowski
  2017-07-19 14:59 ` [PATCH i-g-t 3/3] configure.ac: Make gsl dependency and dependent code optional Paul Kocialkowski
  2 siblings, 0 replies; 5+ messages in thread
From: Paul Kocialkowski @ 2017-07-19 14:58 UTC (permalink / raw)
  To: intel-gfx

Introducing an option for chamelium build inadvertently disabled it by
default, according to the definition of the AC_ARG_ENABLE macro.

This enables it back chamelium by default.

Fixes: fd096fcc ("configure.ac: Make building chamelium an option")

Signed-off-by: Paul Kocialkowski <paul.kocialkowski@linux.intel.com>
---
 configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index db0015e5..690f73ef 100644
--- a/configure.ac
+++ b/configure.ac
@@ -183,7 +183,7 @@ PKG_CHECK_MODULES(GSL, gsl)
 # for chamelium
 AC_ARG_ENABLE(chamelium, AS_HELP_STRING([--disable-chamelium],
 	      [Enable building of chamelium libraries and tests (default: yes)]),
-	      [enable_chamelium=yes], [enable_chamelium=no])
+	      [enable_chamelium=no], [enable_chamelium=yes])
 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, [],
-- 
2.13.2

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

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

* [PATCH i-g-t 2/3] configure.ac: Make glib dependency optional to preserve Android build
  2017-07-19 14:58 [PATCH i-g-t 0/3] Various autoconf fixups Paul Kocialkowski
  2017-07-19 14:58 ` [PATCH i-g-t 1/3] configure.ac: Enable back chamelium build by default Paul Kocialkowski
@ 2017-07-19 14:58 ` Paul Kocialkowski
  2017-07-19 14:59 ` [PATCH i-g-t 3/3] configure.ac: Make gsl dependency and dependent code optional Paul Kocialkowski
  2 siblings, 0 replies; 5+ messages in thread
From: Paul Kocialkowski @ 2017-07-19 14:58 UTC (permalink / raw)
  To: intel-gfx

This adds ifdef wrappers, with matching autoconf macros, to make the
dependency on glib (used for parsing configuration) optional.

This allows preserving the ability to build IGT on Android, where glib
support is lacking.

Signed-off-by: Paul Kocialkowski <paul.kocialkowski@linux.intel.com>
---
 configure.ac   | 8 +++++++-
 lib/igt_core.c | 9 +++++++++
 2 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 690f73ef..20e5cf96 100644
--- a/configure.ac
+++ b/configure.ac
@@ -177,7 +177,10 @@ AM_CONDITIONAL(HAVE_UDEV, [test "x$udev" = xyes])
 if test x"$udev" = xyes; then
 	AC_DEFINE(HAVE_UDEV,1,[Enable udev-based monitor hotplug detection])
 fi
-PKG_CHECK_MODULES(GLIB, glib-2.0)
+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)
 
 # for chamelium
@@ -190,6 +193,9 @@ if test "x$enable_chamelium" = xyes; then
 			  [AC_MSG_ERROR([Failed to find xmlrpc, required by chamelium. Use --disable-chamelium to disable chamelium support.])])
 	PKG_CHECK_MODULES(PIXMAN, pixman-1, [],
 			  [AC_MSG_ERROR([Failed to find pixman, required by chamelium. Use --disable-chamelium to disable chamelium support.])])
+	if test x"$glib" != xyes; then
+		AC_MSG_ERROR([Failed to find glib, required by chamelium. Use --disable-chamelium to disable chamelium support.])
+	fi
 	AC_DEFINE(HAVE_CHAMELIUM, 1, [Enable Chamelium support])
 fi
 
diff --git a/lib/igt_core.c b/lib/igt_core.c
index 5a3b00e8..028ef6bd 100644
--- a/lib/igt_core.c
+++ b/lib/igt_core.c
@@ -293,7 +293,10 @@ static struct {
 } log_buffer;
 static pthread_mutex_t log_buffer_mutex = PTHREAD_MUTEX_INITIALIZER;
 
+#ifdef HAVE_GLIB
 GKeyFile *igt_key_file;
+#endif
+
 char *frame_dump_path;
 
 const char *igt_test_name(void)
@@ -618,6 +621,7 @@ static void oom_adjust_for_doom(void)
 
 }
 
+#ifdef HAVE_GLIB
 static int config_parse(void)
 {
 	GError *error = NULL;
@@ -643,6 +647,7 @@ static int config_parse(void)
 
 	return 0;
 }
+#endif
 
 static int common_init(int *argc, char **argv,
 		       const char *extra_short_opts,
@@ -799,6 +804,7 @@ static int common_init(int *argc, char **argv,
 		snprintf(key_file_loc, 100, "%s/.igtrc", g_get_home_dir());
 	}
 
+#ifdef HAVE_GLIB
 	igt_key_file = g_key_file_new();
 	ret = g_key_file_load_from_file(igt_key_file, key_file_loc,
 					G_KEY_FILE_NONE, &error);
@@ -811,6 +817,7 @@ static int common_init(int *argc, char **argv,
 	}
 
 	ret = config_parse();
+#endif
 
 out:
 	if (!key_file_env && key_file_loc)
@@ -1423,8 +1430,10 @@ void igt_exit(void)
 {
 	igt_exit_called = true;
 
+#ifdef HAVE_GLIB
 	if (igt_key_file)
 		g_key_file_free(igt_key_file);
+#endif
 
 	if (run_single_subtest && !run_single_subtest_found) {
 		igt_warn("Unknown subtest: %s\n", run_single_subtest);
-- 
2.13.2

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

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

* [PATCH i-g-t 3/3] configure.ac: Make gsl dependency and dependent code optional
  2017-07-19 14:58 [PATCH i-g-t 0/3] Various autoconf fixups Paul Kocialkowski
  2017-07-19 14:58 ` [PATCH i-g-t 1/3] configure.ac: Enable back chamelium build by default Paul Kocialkowski
  2017-07-19 14:58 ` [PATCH i-g-t 2/3] configure.ac: Make glib dependency optional to preserve Android build Paul Kocialkowski
@ 2017-07-19 14:59 ` Paul Kocialkowski
  2017-07-19 17:48   ` Lyude Paul
  2 siblings, 1 reply; 5+ messages in thread
From: Paul Kocialkowski @ 2017-07-19 14:59 UTC (permalink / raw)
  To: intel-gfx

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@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
-- 
2.13.2

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

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

* Re: [PATCH i-g-t 3/3] configure.ac: Make gsl dependency and dependent code optional
  2017-07-19 14:59 ` [PATCH i-g-t 3/3] configure.ac: Make gsl dependency and dependent code optional Paul Kocialkowski
@ 2017-07-19 17:48   ` Lyude Paul
  0 siblings, 0 replies; 5+ messages in thread
From: Lyude Paul @ 2017-07-19 17:48 UTC (permalink / raw)
  To: Paul Kocialkowski, intel-gfx

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

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

end of thread, other threads:[~2017-07-19 17:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-19 14:58 [PATCH i-g-t 0/3] Various autoconf fixups Paul Kocialkowski
2017-07-19 14:58 ` [PATCH i-g-t 1/3] configure.ac: Enable back chamelium build by default Paul Kocialkowski
2017-07-19 14:58 ` [PATCH i-g-t 2/3] configure.ac: Make glib dependency optional to preserve Android build Paul Kocialkowski
2017-07-19 14:59 ` [PATCH i-g-t 3/3] configure.ac: Make gsl dependency and dependent code optional Paul Kocialkowski
2017-07-19 17:48   ` Lyude Paul

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.