diff options
author | Benjamin Gordon <[email protected]> | 2018-06-13 16:17:32 -0600 |
---|---|---|
committer | Gurchetan Singh <[email protected]> | 2019-03-21 10:18:31 -0700 |
commit | b30aad552cde507a70c6bf3bc2ce40ed69e0ecf2 (patch) | |
tree | a3b516755365b867863253b75accecc4fdae8899 /configure.ac | |
parent | e426c3a6cb020d1b156415e20c6f53a7195f96cd (diff) |
configure.ac/meson.build: Add options for library suffixes
When building the Chrome OS Android container, we need to build copies
of mesa that don't conflict with the Android system-supplied libraries.
This adds options to create suffixed versions of EGL and GLES libraries:
libEGL.so -> libEGL${egl-lib-suffix}.so
libGLESv1_CM.so -> libGLESv1_CM${gles-lib-suffix}.so
libGLESv2.so -> libGLES${gles-lib-suffix}.so
This is similar to what happens when --enable-libglvnd is specified, but
without the side effects of linking against libglvnd. To avoid
unexpected clashes with the suffixed appended by libglvnd, make it an
error to specify both --enable-libglvnd and --with-egl-lib-suffix.
Reviewed-by: Eric Engestrom <[email protected]>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index d8124479c76..073ffc508d5 100644 --- a/configure.ac +++ b/configure.ac @@ -1557,6 +1557,23 @@ AC_ARG_WITH([osmesa-lib-name], GL_LIB="$DEFAULT_GL_LIB_NAME" OSMESA_LIB=OSMesa +AC_ARG_WITH([egl-lib-suffix], + [AS_HELP_STRING([--with-egl-lib-suffix@<:@=NAME@:>@], + [specify EGL library suffix @<:@default=none@:>@])], + [EGL_LIB_SUFFIX=$withval], + [EGL_LIB_SUFFIX=""]) +AC_ARG_WITH([gles-lib-suffix], + [AS_HELP_STRING([--with-gles-lib-suffix@<:@=NAME@:>@], + [specify GLES library suffix @<:@default=none@:>@])], + [GLES_LIB_SUFFIX=$withval], + [GLES_LIB_SUFFIX=""]) +AS_IF([test "x$EGL_LIB_SUFFIX" = xyes], [EGL_LIB_SUFFIX=""]) +AS_IF([test "x$GLES_LIB_SUFFIX" = xyes], [GLES_LIB_SUFFIX=""]) + +if test "x$enable_libglvnd" = xyes -a "x$EGL_LIB_SUFFIX" != x; then + AC_MSG_ERROR([EGL lib suffix can't be used with libglvnd]) +fi + dnl dnl Mangled Mesa support dnl @@ -1575,6 +1592,8 @@ if test "x${enable_mangling}" = "xyes" ; then OSMESA_LIB="Mangled${OSMESA_LIB}" fi AC_SUBST([GL_LIB]) +AC_SUBST([EGL_LIB_SUFFIX]) +AC_SUBST([GLES_LIB_SUFFIX]) AC_SUBST([OSMESA_LIB]) dnl HACK when building glx + glvnd we ship gl.pc, despite that glvnd should do it |