[GRASS-dev] reorder tcltk/opengl checks in configure?

For bug

http://trac.osgeo.org/grass/ticket/598

configure needs to temporarily strip out 64bit arch flags on OSX for the TclTk Aqua tests. To do this, based on the OpenGL setting selected (TclTk Aqua is dependent on OpenGL setting = aqua), the opengl test must happen before the TclTk tests.

I don't see anything dependent on TclTk that would be affected if the tcltk tests are moved to after the opengl tests.

Comments from the configure/make guru?

-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

"The beast is actively interested only in now, and, as it is always now and always shall be, there is an eternity of time for the accomplishment of objects."

- the wisdom of Tarzan

William Kyngesburye wrote:

http://trac.osgeo.org/grass/ticket/598

configure needs to temporarily strip out 64bit arch flags on OSX for
the TclTk Aqua tests. To do this, based on the OpenGL setting
selected (TclTk Aqua is dependent on OpenGL setting = aqua), the
opengl test must happen before the TclTk tests.

I don't see anything dependent on TclTk that would be affected if the
tcltk tests are moved to after the opengl tests.

Comments from the configure/make guru?

Will NVIZ cope with a 32-bit Tcl/Tk but 64-bit OpenGL?

When it comes to linking NVIZ, the command will include both the
Tcl/Tk linker flags and the OpenGL linker flags. There's no point in
configure testing whether linking a test program against Tcl/Tk works
without certain linker flags if NVIZ itself is going to be linked with
those flags.

--
Glynn Clements <glynn@gclements.plus.com>

On May 14, 2009, at 7:50 PM, Glynn Clements wrote:

William Kyngesburye wrote:

http://trac.osgeo.org/grass/ticket/598

configure needs to temporarily strip out 64bit arch flags on OSX for
the TclTk Aqua tests. To do this, based on the OpenGL setting
selected (TclTk Aqua is dependent on OpenGL setting = aqua), the
opengl test must happen before the TclTk tests.

I don't see anything dependent on TclTk that would be affected if the
tcltk tests are moved to after the opengl tests.

Comments from the configure/make guru?

Will NVIZ cope with a 32-bit Tcl/Tk but 64-bit OpenGL?

When it comes to linking NVIZ, the command will include both the
Tcl/Tk linker flags and the OpenGL linker flags. There's no point in
configure testing whether linking a test program against Tcl/Tk works
without certain linker flags if NVIZ itself is going to be linked with
those flags.

The system frameworks (including OpenGL) on OSX 10.5 are all quad-architecture - ppc/intel, 32+64bit. Only the deprecated Carbon stuff that wxPython and Tk rely on are 32bit-only. If the system was all only 64bit, we'd have a 64bit wxPython and 64bit TclTk by now.

So, when I configure for a quad-arch GRASS (adding arch flags to CFLAGS and LDFLAGS), it will test the TclTk linking with the same, and fail to link because 64bit arches are missing.

I plan to add a $(subst) command to the nviz makefile (and a couple others that link Tk libraries) to strip out the 64bit flags on OSX when OpenGL aqua is used. I have that worked out and tested (same thing I used in the wx nviz and vdigit makefiles before the switch to setup.py), it just needs the configure tk tests to pass.

-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

All generalizations are dangerous, even this one.

Glynn,

I'm trying to fiddle with configure.in to figure out what to do for tcltk 64bit aqua. When I run autoconf (in dev6 branch) I get:

configure.in:47: error: possibly undefined macro: AC_MSG_ERROR
       If this token and others are legitimate, please use m4_pattern_allow.
       See the Autoconf documentation.

Configure is generated, though it's twice the size of the configure in SVN. But it dies with a syntax error.

Is there anything special I need to do?

I have autoconf 2.61, which comes with the Xcode installation. I don't want to mess with it to update it, if that's what's needed.

-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

"Oh, look, I seem to have fallen down a deep, dark hole. Now what does that remind me of? Ah, yes - life."

- Marvin