[PATCH weston] weston/configure.ac: make lcms configurable
Kristian Høgsberg
hoegsberg at gmail.com
Wed Jun 18 17:03:53 PDT 2014
On Fri, May 30, 2014 at 09:51:32AM -0700, Tim Orling wrote:
> From: Tim Orling <TicoTimo at gmail.com>
>
> Make lcms support explicitly configurable.
>
> Signed-off-by: Tim Orling <TicoTimo at gmail.com>
> ---
> configure.ac | 22 +++++++++++++++++-----
> 1 file changed, 17 insertions(+), 5 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index e2bf38d..f509937 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -491,12 +491,24 @@ AC_ARG_ENABLE(demo-clients-install,
> enable_demo_clients_install=no)
> AM_CONDITIONAL(INSTALL_DEMO_CLIENTS, [test "x$enable_demo_clients_install" = "xyes"])
>
> -PKG_CHECK_MODULES(LCMS, lcms2,
> - [have_lcms=yes], [have_lcms=no])
> -if test "x$have_lcms" = xyes; then
> - AC_DEFINE(HAVE_LCMS, 1, [Have lcms support])
> +AC_ARG_ENABLE(lcms,
> + AS_HELP_STRING([--disable-lcms],
> + [Disable lcms support]),,
> + enable_lcms=auto)
> +AM_CONDITIONAL(HAVE_LCMS, [test "x$enable_lcms" = xyes])
> +if test "x$enable_lcms" != "xno"; then
> + PKG_CHECK_MODULES(LCMS,
> + lcms2,
> + [have_lcms=yes],
> + [have_lcms=no])
> + if test "x$have_lcms" = "xno" -a "x$enable_lcms" = "xyes"; then
> + AC_MSG_ERROR([lcms support explicitly requested, but lcms couldn't be found])
> + fi
> + if test "x$have_lcms" = "xyes"; then
> + enable_lcms=yes
> + AC_DEFINE(HAVE_LCMS, 1, [Have lcms support])
> + fi
> fi
> -AM_CONDITIONAL(HAVE_LCMS, [test "x$have_lcms" = xyes])
This makes sense, but we need the AM_CONDITIONAL below the if statement
and it needs to key off of have_lcms so that automatic detection still works.
Kristian
> AC_PATH_PROG([wayland_scanner], [wayland-scanner])
> if test x$wayland_scanner = x; then
> --
> 1.8.3.2
>
> _______________________________________________
> 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