[Python-Dev] Can't compile _tkinter.c with Redhat 9 (post-SF#719880) (original) (raw)

Jeff Epler jepler@unpythonic.net
Tue, 17 Jun 2003 20:28:47 -0500


On Tue, Jun 17, 2003 at 05:07:21PM -0400, Barry Warsaw wrote:

On Tue, 2003-06-17 at 16:53, Martin v. L=F6wis wrote: =20 > What is missing is building a standard (i.e. UCS-2) Python against th= e > Redhat (i.e. UCS-4) Tcl. There is now a note in README telling people > to configure Python for UCS-4 on Redhat. It appears that all Redhat 9 > users running into that so far find that acceptable. =20 It would be moderately nicer if configure could detect that UCS-4 was required and automatically provide the --enable-unicode=3Ducs4 option.

You'd be insane to stuff this in just before releasing 2.3 (since this is the first time I've ever written for autoconf), but here it is..

Running on a RedHat 9 machine: checking for wchar.h... yes checking for wchar_t... yes checking size of wchar_t... 4 checking for UCS-4 tcl... yes checking what type to use for unicode... wchar_t

Running on a RedHat 7.1 machine: checking wchar.h usability... yes checking wchar.h presence... yes checking for wchar.h... yes checking for wchar_t... yes checking size of wchar_t... 4 checking for UCS-4 tcl... no checking what type to use for unicode... unsigned short

Tested nowhere else in the universe... in particular, there's no attempt to find the location of the tcl.h header as setup.py does since it's in /usr/include/tcl.h on my system.

Detection of UCS-4 tcl does not override the --enable-unicode=3D setting. Someone who is building Python on a redhat9 system but does not want _tkinter may want the chance to override it, if only due to increased memory consumption of that build.

Jeff

--- Python-2.3b1/configure.in 2003-04-11 10:35:52.000000000 -0500 +++ local-Python-2.3b1/configure.in 2003-06-17 20:17:13.000000000 -0500 @@ -2400,6 +2400,18 @@ AC_CHECK_SIZEOF(wchar_t, 4, [#include <wchar.h>]) fi =20 +AC_MSG_CHECKING(for UCS-4 tcl) +have_ucs4_tcl=3Dno +AC_TRY_COMPILE([ +#include <tcl.h> +#if TCL_UTF_MAX !=3D 6 +# error "NOT UCS4_TCL" +#endif], [], [