[virglrenderer-devel] [PATCH 1/5] build-sys: Use PKG_CHECK_VAR for libepoxy EGL support checking
Marc-André Lureau
marcandre.lureau at redhat.com
Mon Nov 27 21:27:18 UTC 2017
----- Original Message -----
> If libepoxy is installed in a non-standrad location AC_CHECK_HEADERS_ONCE
> will
> fail to find the header. I did it this way because trying to get
> AC_CHECK_HEADERS_ONCE to find it involved setting and unsetting CFLAGS.
>
> Signed-off-by: Jakob Bornecrantz <jakob.bornecrantz at collabora.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau at redhat.com>
> ---
> configure.ac | 11 ++++++++++-
> 1 file changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/configure.ac b/configure.ac
> index 5ffd448..c0c4abf 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -89,7 +89,7 @@ if test "x$build_tests" = "xyes"; then
> fi
>
> AC_CHECK_FUNCS_ONCE([eventfd])
> -AC_CHECK_HEADERS_ONCE([sys/uio.h epoxy/egl.h])
> +AC_CHECK_HEADERS_ONCE([sys/uio.h])
> AM_CONDITIONAL(HAVE_VALGRIND, [test "x$VALGRIND" != "x"])
> AM_CONDITIONAL(BUILD_TESTS, [test "x$build_tests" = "xyes"])
>
> @@ -101,6 +101,13 @@ if test "x$os_win32" = xno; then
> fi
>
> PKG_CHECK_MODULES([EPOXY], [epoxy])
> +PKG_CHECK_VAR(epoxy_has_egl, [epoxy], [epoxy_has_egl])
> +AS_IF([test "x$epoxy_has_egl" = "x1"], [
> + epoxy_has_egl=yes
> + AC_DEFINE([HAVE_EPOXY_EGL_H], [1], [Libepoxy has EGL support.])
> +],[
> + epoxy_has_egl=no
> +])
>
> AC_ARG_WITH([glx], AS_HELP_STRING([--with-glx], [Build with the x11/glx
> backend]))
> AS_IF([test "x$with_glx" = "xyes"], [
> @@ -109,6 +116,7 @@ AS_IF([test "x$with_glx" = "xyes"], [
> ])
> AM_CONDITIONAL([WITH_GLX], [test "x$with_glx" = "xyes"])
>
> +
> AC_SUBST([DEFINES])
> AC_CONFIG_FILES([
> virglrenderer.pc
> @@ -130,6 +138,7 @@ AC_MSG_NOTICE([
> win32: $os_win32
>
> glx: $with_glx
> + egl: $epoxy_has_egl
> debug: $enable_debug
> tests: $build_tests
>
> --
> 2.11.0
>
> _______________________________________________
> virglrenderer-devel mailing list
> virglrenderer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/virglrenderer-devel
>
More information about the virglrenderer-devel
mailing list