[PATCH] Add configure option to disable scanner compilation which is helpful for cross-compilation

Kristian Høgsberg krh at bitplanet.net
Fri May 6 14:38:02 PDT 2011


On Fri, May 6, 2011 at 2:13 AM,  <jani.uusi-rantala at nokia.com> wrote:
> When cross-compiling Wayland, wayland-scanner should be picked up from the host system instead of compiling and trying to run e.g. ARM wayland-scanner on X86.
>
> This patch adds --disable-scanner option for disabling the scanner from the build and using existing wayland-scanner instead (from PATH) which should help in most cross-compilation systems.
>
> By default everything works as before.

Thanks, that's useful, applied.  I trimmed the commit message to fit
within 80 colums.

Kristian

> Signed-off-by: Jani Uusi-Rantala <jani.uusi-rantala at nokia.com>
> ---
>  configure.ac        |    8 ++++++++
>  wayland/Makefile.am |    8 ++++++++
>  2 files changed, 16 insertions(+), 0 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index 34b8dbc..7dc8ccb 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -27,6 +27,14 @@ if test "x$GCC" = "xyes"; then
>  fi
>  AC_SUBST(GCC_CFLAGS)
>
> +AC_ARG_ENABLE([scanner],
> +              [AC_HELP_STRING([--disable-scanner],
> +                              [Disable compilation of wayland-scannner])],
> +              [],
> +              [enable_scanner=yes])
> +
> +AM_CONDITIONAL(ENABLE_SCANNER, test "x$enable_scanner" = xyes)
> +
>  EXPAT_LIB=""
>  AC_ARG_WITH(expat, [  --with-expat=<dir>      Use expat from here],
>                   [ expat=$withval
> diff --git a/wayland/Makefile.am b/wayland/Makefile.am
> index ed31dfc..fd79eb3 100644
> --- a/wayland/Makefile.am
> +++ b/wayland/Makefile.am
> @@ -35,9 +35,16 @@ AM_CPPFLAGS = $(FFI_CFLAGS)
>  AM_CFLAGS = $(GCC_CFLAGS)
>
>  protocoldir = $(top_srcdir)/protocol
> +
> +if ENABLE_SCANNER
>  wayland_scanner = $(top_builddir)/wayland/wayland-scanner
> +else
> +wayland_scanner = wayland-scanner
> +endif
> +
>  include $(top_srcdir)/wayland/scanner.mk
>
> +if ENABLE_SCANNER
>  bin_PROGRAMS = wayland-scanner
>
>  wayland_scanner_SOURCES =                              \
> @@ -46,6 +53,7 @@ wayland_scanner_SOURCES =                             \
>  wayland_scanner_LDADD = $(EXPAT_LIBS) libwayland-util.la
>
>  $(BUILT_SOURCES) : wayland-scanner
> +endif
>
>  BUILT_SOURCES =                                        \
>        wayland-server-protocol.h               \
> --
> 1.7.4.1
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
>


More information about the wayland-devel mailing list