[PYTHON IMAGE-SIG] Damned with a DECstation...

Tony J Ibbs (Tibs) T.Ibbs@geog.gla.ac.uk
Wed, 19 Mar 1997 12:50:04 +0000

Fredrik Lundh <Fredrik_Lundh@ivab.se> wrote:
> Argh!  Try skipping the automatic configuration and hack the config
> files yourself (but if you don't have an ANSI compiler for your
> DECstation, you're out of luck anyway...)

Seems to me the problem isn't that gcc isn't ISO (and thus ANSI), the problem 
is that the header files provided by DEC don't supply the macros required by 
the configure script (which certainly didn't *used* to be in the ANSI/ISO 
definitions, and aren't mentioned in Harbison & Steele).

Anyway. Well, part of the problem, if I remember correctly, was that there
weren't any configuration files in what I pulled over (if by that you
mean things like config.h), so I had no choice but to use the configure
script. I'll maybe try to check that again...

...Hah! Mea culpa. Stupid me. You called it ImConfig.h, not config.h, so I
didn't see it. Hah.

Anyway, I hacked away, and seem to have built OK. Just for the record, and
in case anyone else cares, here is what I did...

Relevant bits of ImConfig.h (comments removed to save space)
#undef const
#undef inline
#define STDC_HEADERS	1
#define SIZEOF_CHAR	1
#define SIZEOF_FLOAT	4
#define SIZEOF_INT	4
#define SIZEOF_LONG	4
#define SIZEOF_SHORT	2

Ditto for the Makefile:
srcdir=		.
VPATH=		${srcdir}
CC=		gcc
RANLIB=		ranlib
AR=		ar
LIBS=		-ljpeg -lz -L/tools/net/lib -lm
JPEGINCLUDE=	/tools/net/incs
OPT=		-g

(carefully not choosing -Wall for once)

Then I touched config.status, and made things (stopping only to change
all uses of METHODDEF and GLOBAL in Jpeg*.c to have parentheses around
their parameter - wasn't there a note about that on the list a while ago?)
Anyway, the upshot is that "make check" produces a rather strangely coloured
but decipherable image of a female face, so presumably it all worked (hurrah!).

And I've now built a Python with stuff in - seems to be OK.

> Well, I'm not an autoconf wizard, so I don't really know how to solve
> that.  Have made some vague attempts to add -with-jpeg=dir to 0.2b5,
> but never got them to work very good (especially if you first use them
> and then just do ./configure).  If there's any autoconf experts out
> there, please step forward.

Not me - that stuff is *mean*.

All the best, Tony

IMAGE-SIG - SIG on Image Processing with Python

send messages to: image-sig@python.org
administrivia to: image-sig-request@python.org