Re: [Mesa-dev] [PATCH] automake: Honor (GL|GLU|OSMESA)_LIB from environment

2012-06-05 Thread Dan Nicholson
On 6/4/12, Brad King brad.k...@kitware.com wrote:
 On 06/01/2012 05:49 PM, Dan Nicholson wrote:
 +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}

 I don't think this part is necessary. AC_ARG_VAR does this already. The
 rest makes sense though.

 Thanks for taking a look.  I think the init lines are needed in
 order to set the default values.  With the patch below on top of
 this one I get output

  GL_LIB=
  GLU_LIB=
  OSMESA_LIB=

 and the build fails.  I see no mention in AC_ARG_VAR documentation
 about default value selection:

 http://www.gnu.org/software/autoconf/manual/autoconf-2.67/html_node/Setting-Output-Variables.html#index-AC_005fARG_005fVAR-1134

Duh, you're right. I think this original patch is good to go. The
variables should be substituted in configs/autoconf and a quick grep
shows that there are no remaining hardcoded -lGL around (I think).

--
Dan
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] automake: Honor (GL|GLU|OSMESA)_LIB from environment

2012-06-05 Thread Brad King
On 06/05/2012 11:12 AM, Dan Nicholson wrote:
 Duh, you're right. I think this original patch is good to go.

Great, thanks!

 a quick grep
 shows that there are no remaining hardcoded -lGL around (I think).

I've built with a custom configs/current in the old pure-make
system that sets GL_LIB for years, so I think $(GL_LIB) is
used everywhere unless there is new autotools-specific code
that hard-codes -lGL.

-Brad
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] automake: Honor (GL|GLU|OSMESA)_LIB from environment

2012-06-05 Thread Kenneth Graunke
On 06/01/2012 12:06 PM, Brad King wrote:
 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

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 ...

If people like the environment variables, this patch is
Reviewed-by: Kenneth Graunke kenn...@whitecape.org
and I'll be happy to push it upstream.  Otherwise, it's a trivial change...

Thoughts?

Thanks for the patch and for bearing with us during the crazy automake
transition :)
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] automake: Honor (GL|GLU|OSMESA)_LIB from environment

2012-06-04 Thread Brad King
On 06/01/2012 05:49 PM, Dan Nicholson wrote:
 +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}
 
 I don't think this part is necessary. AC_ARG_VAR does this already. The rest 
 makes sense though.

Thanks for taking a look.  I think the init lines are needed in
order to set the default values.  With the patch below on top of
this one I get output

 GL_LIB=
 GLU_LIB=
 OSMESA_LIB=

and the build fails.  I see no mention in AC_ARG_VAR documentation
about default value selection:

 
http://www.gnu.org/software/autoconf/manual/autoconf-2.67/html_node/Setting-Output-Variables.html#index-AC_005fARG_005fVAR-1134

-Brad


diff --git a/configure.ac b/configure.ac
index 7f6ba96..b4c0a4a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -358,9 +358,9 @@ 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}
+echo GL_LIB=[$GL_LIB]
+echo GLU_LIB=[$GLU_LIB]
+echo OSMESA_LIB=[$OSMESA_LIB]

 dnl
 dnl Mangled Mesa support
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] automake: Honor (GL|GLU|OSMESA)_LIB from environment

2012-06-01 Thread Dan Nicholson
On Jun 1, 2012 12:13 PM, Brad King brad.k...@kitware.com wrote:

 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}

I don't think this part is necessary. AC_ARG_VAR does this already. The
rest makes sense though.

Dan
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev