summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeil Roberts <neil@linux.intel.com>2011-07-18 18:47:44 +0100
committerNeil Roberts <neil@linux.intel.com>2011-07-19 15:12:10 +0100
commit9b6c1eb2cc3ff3b048950050f3b30bdb0d10a1c8 (patch)
tree8faee38ad221b622638fb6694d195fc1d1433717
parent03c4b20931438cc0387b1b8fe2dca26aafefbb0f (diff)
downloadcogl-9b6c1eb2cc3ff3b048950050f3b30bdb0d10a1c8.tar.gz
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
-rw-r--r--configure.ac20
1 files changed, 20 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index a31d65fa..117e3e28 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}"