Re: [Mesa-dev] [PATCH] configure.ac: Add --with-(gl|glu|osmesa)-lib-name options
Brad King brad.k...@kitware.com writes: On 07/09/2012 04:57 PM, Brad King wrote: Running git bisect points to commit 2d4b77c7 (automake: Convert src/mesa/drivers/x11/Makefile, 2012-06-12). The change made by the commit does not obviously drop use of GL_LIB. Upon closer inspection it *does* obviously drop use of GL_LIB. Now libGL is hard-coded in Makefile.am. Naive replacement like that below is not valid automake code AFAICT. I'm not familiar enough with automake to know how to make the library name configurable. Does anyone know? For the OSMesa changes, Laurent Carlier used @OSMESA_LIB@, so if you did this patch using @GL_LIB@, it would at least be consistent with that. pgpP71R89F3JU.pgp Description: PGP signature ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] configure.ac: Add --with-(gl|glu|osmesa)-lib-name options
On 07/09/2012 04:57 PM, Brad King wrote: Running git bisect points to commit 2d4b77c7 (automake: Convert src/mesa/drivers/x11/Makefile, 2012-06-12). The change made by the commit does not obviously drop use of GL_LIB. Upon closer inspection it *does* obviously drop use of GL_LIB. Now libGL is hard-coded in Makefile.am. Naive replacement like that below is not valid automake code AFAICT. I'm not familiar enough with automake to know how to make the library name configurable. Does anyone know? Thanks, -Brad diff --git a/src/mesa/drivers/x11/Makefile.am b/src/mesa/drivers/x11/Makefile.am index cced238..af3fa8f 100644 --- a/src/mesa/drivers/x11/Makefile.am +++ b/src/mesa/drivers/x11/Makefile.am @@ -33,10 +33,10 @@ AM_CPPFLAGS = \ $(DEFINES) if HAVE_X11_DRIVER -lib_LTLIBRARIES = libGL.la +lib_LTLIBRARIES = lib$(GL_LIB).la endif -libGL_la_SOURCES = \ +lib$(GL_LIB)_la_SOURCES = \ glxapi.h \ glxheader.h \ xfonts.h \ @@ -55,20 +55,20 @@ GL_MAJOR = 1 GL_MINOR = 6 GL_PATCH = 0 -libGL_la_LIBADD = \ +lib$(GL_LIB)_la_LIBADD = \ $(top_builddir)/src/mesa/libmesa.a \ $(top_builddir)/src/mapi/glapi/libglapi.a -libGL_la_LDFLAGS = \ +lib$(GL_LIB)_la_LDFLAGS = \ -version-number $(GL_MAJOR):$(GL_MINOR):$(GL_PATCH) \ $(GL_LIB_DEPS) if HAVE_SHARED_GLAPI -libGL_la_LDFLAGS += -L$(top_builddir)/$(LIB_DIR) -l$(GLAPI_LIB) +lib$(GL_LIB)_la_LDFLAGS += -L$(top_builddir)/$(LIB_DIR) -l$(GLAPI_LIB) endif # Provide compatibility with scripts for the old Mesa build system for # a while by putting a link to the driver into /lib of the build tree. -all-local: libGL.la +all-local: lib$(GL_LIB).la $(MKDIR_P) $(top_builddir)/$(LIB_DIR); - ln -f .libs/libGL.so.$(GL_MAJOR).$(GL_MINOR).$(GL_PATCH) $(top_builddir)/$(LIB_DIR)/libGL.so.1 - ln -sf libGL.so.1 $(top_builddir)/$(LIB_DIR)/libGL.so + ln -f .libs/lib$(GL_LIB).so.$(GL_MAJOR).$(GL_MINOR).$(GL_PATCH) $(top_builddir)/$(LIB_DIR)/lib$(GL_LIB).so.1 + ln -sf lib$(GL_LIB).so.1 $(top_builddir)/$(LIB_DIR)/lib$(GL_LIB).so ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] configure.ac: Add --with-(gl|glu|osmesa)-lib-name options
On 06/11/2012 04:37 PM, Kenneth Graunke wrote: Oh, sorry! Lost track of this. It looks like Eric's pushed it now. Yes, thanks Eric! However, since then another commit broke the feature. The build always produces GL no matter the --with-gl-lib-name given. The GLU and OSMesa options still work. Running git bisect points to commit 2d4b77c7 (automake: Convert src/mesa/drivers/x11/Makefile, 2012-06-12). The change made by the commit does not obviously drop use of GL_LIB. Any idea? Thanks, -Brad ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] configure.ac: Add --with-(gl|glu|osmesa)-lib-name options
On 06/05/2012 02:03 PM, Kenneth Graunke wrote: On 06/05/2012 10:59 AM, Brad King wrote: ./autogen.sh --with-gl-lib-name=GL --with-glu-lib-name=GLU --with-osmesa-lib-name=OSMesa ... That looks cleaner to me. Here is a patch for it. Reviewed-by: Kenneth Graunke kenn...@whitecape.org If there are no objections, I'll push this tomorrow. Thanks! I haven't seen this appear in any origin branch yet. No rush, I just want to make sure it isn't accidentally forgotten. Thanks, -Brad ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] configure.ac: Add --with-(gl|glu|osmesa)-lib-name options
On 06/11/2012 05:58 AM, Brad King wrote: On 06/05/2012 02:03 PM, Kenneth Graunke wrote: On 06/05/2012 10:59 AM, Brad King wrote: ./autogen.sh --with-gl-lib-name=GL --with-glu-lib-name=GLU --with-osmesa-lib-name=OSMesa ... That looks cleaner to me. Here is a patch for it. Reviewed-by: Kenneth Graunke kenn...@whitecape.org If there are no objections, I'll push this tomorrow. Thanks! I haven't seen this appear in any origin branch yet. No rush, I just want to make sure it isn't accidentally forgotten. Thanks, -Brad Oh, sorry! Lost track of this. It looks like Eric's pushed it now. Thanks again. --Ken ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH] configure.ac: Add --with-(gl|glu|osmesa)-lib-name options
These allow 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/05/2012 01:38 PM, Kenneth Graunke wrote: This looks good to me. The only real question I have is whether it makes sense to set them via environment variables, like you did, or whether it'd be better to use AC_ARG_WITH and do: ./autogen.sh --with-gl-lib-name=GL --with-glu-lib-name=GLU --with-osmesa-lib-name=OSMesa ... That looks cleaner to me. Here is a patch for it. Thanks, -Brad configure.ac | 29 ++--- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/configure.ac b/configure.ac index 9fb8149..e607d1c 100644 --- a/configure.ac +++ b/configure.ac @@ -355,6 +355,24 @@ else LIB_EXTENSION='so' ;; esac fi +AC_ARG_WITH([gl-lib-name], + [AS_HELP_STRING([--with-gl-lib-name@:@=NAME@:@], +[specify GL library name @:@default=GL@:@])], + [GL_LIB=$withval], + [GL_LIB=GL]) +AC_ARG_WITH([glu-lib-name], + [AS_HELP_STRING([--with-glu-lib-name@:@=NAME@:@], +[specify GLU library name @:@default=GLU@:@])], + [GLU_LIB=$withval], + [GLU_LIB=GLU]) +AC_ARG_WITH([osmesa-lib-name], + [AS_HELP_STRING([--with-osmesa-lib-name@:@=NAME@:@], +[specify OSMesa library name @:@default=OSMesa@:@])], + [OSMESA_LIB=$withval], + [OSMESA_LIB=OSMesa]) +AS_IF([test x$GL_LIB = xyes], [GL_LIB=GL]) +AS_IF([test x$GLU_LIB = xyes], [GLU_LIB=GLU]) +AS_IF([test x$OSMESA_LIB = xyes], [OSMESA_LIB=OSMesa]) dnl dnl Mangled Mesa support @@ -365,19 +383,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
Re: [Mesa-dev] [PATCH] configure.ac: Add --with-(gl|glu|osmesa)-lib-name options
On 06/05/2012 10:59 AM, Brad King wrote: These allow 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/05/2012 01:38 PM, Kenneth Graunke wrote: This looks good to me. The only real question I have is whether it makes sense to set them via environment variables, like you did, or whether it'd be better to use AC_ARG_WITH and do: ./autogen.sh --with-gl-lib-name=GL --with-glu-lib-name=GLU --with-osmesa-lib-name=OSMesa ... That looks cleaner to me. Here is a patch for it. Thanks, -Brad configure.ac | 29 ++--- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/configure.ac b/configure.ac index 9fb8149..e607d1c 100644 --- a/configure.ac +++ b/configure.ac @@ -355,6 +355,24 @@ else LIB_EXTENSION='so' ;; esac fi +AC_ARG_WITH([gl-lib-name], + [AS_HELP_STRING([--with-gl-lib-name@:@=NAME@:@], +[specify GL library name @:@default=GL@:@])], + [GL_LIB=$withval], + [GL_LIB=GL]) +AC_ARG_WITH([glu-lib-name], + [AS_HELP_STRING([--with-glu-lib-name@:@=NAME@:@], +[specify GLU library name @:@default=GLU@:@])], + [GLU_LIB=$withval], + [GLU_LIB=GLU]) +AC_ARG_WITH([osmesa-lib-name], + [AS_HELP_STRING([--with-osmesa-lib-name@:@=NAME@:@], +[specify OSMesa library name @:@default=OSMesa@:@])], + [OSMESA_LIB=$withval], + [OSMESA_LIB=OSMesa]) +AS_IF([test x$GL_LIB = xyes], [GL_LIB=GL]) +AS_IF([test x$GLU_LIB = xyes], [GLU_LIB=GLU]) +AS_IF([test x$OSMESA_LIB = xyes], [OSMESA_LIB=OSMesa]) dnl dnl Mangled Mesa support @@ -365,19 +383,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 Reviewed-by: Kenneth Graunke kenn...@whitecape.org If there are no objections, I'll push this tomorrow. Thanks! ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] configure.ac: Add --with-(gl|glu|osmesa)-lib-name options
On 06/05/2012 02:03 PM, Kenneth Graunke wrote: On 06/05/2012 01:38 PM, Kenneth Graunke wrote: ./autogen.sh --with-gl-lib-name=GL --with-glu-lib-name=GLU --with-osmesa-lib-name=OSMesa ... That looks cleaner to me. Here is a patch for it. Reviewed-by: Kenneth Graunke kenn...@whitecape.org If there are no objections, I'll push this tomorrow. Thanks! Great, thanks. If you want it: Signed-off-by: Brad King brad.k...@kitware.com -Brad ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev