Teach 'configure' to read the default GL_LIB, GLU_LIB, and OSMESA_LIB values from the environment. This allows one to mangle the library names (without also mangling the symbol names) to make them distinct from other GL libraries on the system. ---
On 06/01/2012 10:06 AM, Brian Paul wrote: > You should transition to using autoconf One feature I used in the pure-make build system was to create a custom configs/current to set GL_LIB, GLU_LIB, and OSMESA_LIB to have a "Mesa" prefix. This helps ensure that VTK both builds and runs against my nightly Mesa build regardless of what other "GL" libraries appear in the dynamic loader's search path. With this patch I can run $ GL_LIB=MesaGL GLU_LIB=MesaGLU OSMESA_LIB=MesaOSMesa ./autogen.sh ... to build with custom library names. Please review. Thanks, -Brad configure.ac | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/configure.ac b/configure.ac index 9fb8149..7f6ba96 100644 --- a/configure.ac +++ b/configure.ac @@ -355,6 +355,12 @@ else LIB_EXTENSION='so' ;; esac fi +AC_ARG_VAR([GL_LIB],[name of GL library @<:@default=GL@:>@]) +AC_ARG_VAR([GLU_LIB],[name of GLU library @<:@default=GLU@:>@]) +AC_ARG_VAR([OSMESA_LIB],[name of OSMesa library @<:@default=OSMesa@:>@]) +GL_LIB="${GL_LIB-GL}" +GLU_LIB="${GLU_LIB-GLU}" +OSMESA_LIB="${OSMESA_LIB-OSMesa}" dnl dnl Mangled Mesa support @@ -365,19 +371,16 @@ AC_ARG_ENABLE([mangling], [enable_mangling="${enableval}"], [enable_mangling=no] ) -GL_LIB="GL" -GLU_LIB="GLU" -OSMESA_LIB="OSMesa" if test "x${enable_mangling}" = "xyes" ; then DEFINES="${DEFINES} -DUSE_MGL_NAMESPACE" - GL_LIB="MangledGL" - GLU_LIB="MangledGLU" - OSMESA_LIB="MangledOSMesa" + GL_LIB="Mangled${GL_LIB}" + GLU_LIB="Mangled${GLU_LIB}" + OSMESA_LIB="Mangled${OSMESA_LIB}" fi AC_SUBST([GL_LIB]) AC_SUBST([GLU_LIB]) AC_SUBST([OSMESA_LIB]) -AM_CONDITIONAL(HAVE_MANGLED_GL, test $GL_LIB = MangledGL) +AM_CONDITIONAL(HAVE_MANGLED_GL, test "x${enable_mangling}" = "xyes") dnl dnl potentially-infringing-but-nobody-knows-for-sure stuff -- 1.7.10 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev