[cogl] configure: Add configure options to override the GL library name



commit 9b6c1eb2cc3ff3b048950050f3b30bdb0d10a1c8
Author: Neil Roberts <neil linux intel com>
Date:   Mon Jul 18 18:47:44 2011 +0100

    configure: Add configure options to override the GL library name
    
    This adds 3 configure options to override the library name that gets
    dlopened for GL, GLES and GLESv2. This could be useful for distro
    maintainers who have an unusual name for the libraries (for example,
    on OpenBSD the GL library appears to be called libGL.so.4). This could
    at least be simpler than having to create a distro patch.
    
    The configure options would be used like this:
    
    ./configure --with-gl-libname=libGL.so \
                --with-gles1-libname=libGLESv1.so \
                --with-gles2-libname=libGLESv2.so
    
    https://bugzilla.gnome.org/show_bug.cgi?id=654593

 configure.ac |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index a31d65f..117e3e2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -540,6 +540,20 @@ AM_CONDITIONAL([COGL_DRIVER_GL_SUPPORTED], [test "x$enable_gl" = "xyes"])
 AM_CONDITIONAL([COGL_DRIVER_GLES_SUPPORTED],
                [test "x$enable_gles1" = "xyes" || test "x$enable_gles2" = "xyes"])
 
+dnl Allow the GL library names to be overridden with configure options
+AC_ARG_WITH([gl-libname],
+            [AS_HELP_STRING([--with-gl-libname],
+                            override the name of the GL library to dlopen)],
+            [COGL_GL_LIBNAME="$withval"])
+AC_ARG_WITH([gles1-libname],
+            [AS_HELP_STRING([--with-gles1-libname],
+                            override the name of the GLESv1 library to dlopen)],
+            [COGL_GLES1_LIBNAME="$withval"])
+AC_ARG_WITH([gles2-libname],
+            [AS_HELP_STRING([--with-gles2-libname],
+                            override the name of the GLESv2 library to dlopen)],
+            [COGL_GLES2_LIBNAME="$withval"])
+
 AC_SUBST([COGL_GL_LIBNAME])
 AC_SUBST([COGL_GLES1_LIBNAME])
 AC_SUBST([COGL_GLES2_LIBNAME])
@@ -957,6 +971,12 @@ echo ""
 # Features
 echo " â Features:"
 echo "        Drivers: ${enabled_drivers}"
+AS_IF([test "x$GL_LIBRARY_DIRECTLY_LINKED" != xyes],
+      [for driver in $enabled_drivers; do
+         driver=`echo $driver | tr "[gles]" "[GLES]"`
+         libname=`eval echo \\$COGL_${driver}_LIBNAME`
+         echo "        Library name for $driver: $libname"
+       done])
 echo "        GL Window System APIs:${GL_WINSYS_APIS}"
 if test "x$SUPPORT_EGL" = "xyes"; then
 echo "        EGL Platforms:${EGL_PLATFORMS}"



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]