In message <[EMAIL PROTECTED]> on Thu, 5 May 2005 00:33:01 +0200, Rhialto
<[EMAIL PROTECTED]> said:
rhialto> I think many of the assignments in the Imakefile should use
rhialto> ?= instead of =, so that they can usefully be set from the
rhialto> Imakefile.local.
I've a problem with that. As far as I know, that's highly dependent
on GNU make. Unless we can clearly say that such an assignment
operator is supported by all makes out there, I'm not sure I want to
go for it.
A different way would be to support C macros that define the parts we
might need, something like this:
#ifdef JPEG
# ifdef JPEG_LIBDIR
JPEGLIBDIR = JPEG_LIBDIR
# else
JPEGLIBDIR =
# endif
# ifdef JPEG_INCDIR
JPEGINCDIR = JPEG_INCDIR
# else
JPEGINCDIR =
# endif
JPEGDEFINES = -DJPEG
JPEGLIB = $(JPEGLIBDIR) -ljpeg
#else
JPEGLIB =
JPEGLIBDIR =
JPEGINCDIR =
JPEGDEFINES =
#endif
To be honest with you though, that's playing with fire.
Something that just struck me is also that there's really no reason to
define all those variables with no value. No reason at all. That
would probably be the easy solution for the problem.
Yet another solution is to support specific variables to be defined in
Imakefile.local, so for example, the JPEG thing could look like this:
#ifdef JPEG
JPEGLIBDIR = $(USER_JPEGLIBDIR)
JPEGINCDIR = $(USER_JPEGINCDIR)
JPEGDEFINES = -DJPEG
JPEGLIB = $(JPEGLIBDIR) -ljpeg
#else
JPEGLIB =
JPEGLIBDIR =
JPEGINCDIR =
JPEGDEFINES =
#endif
All that would be needed would be to do the following in
Imakefile.local:
#define JPEG
USER_JPEGLIBDIR = -L/usr/pkg/packages/jpeg-6bnb2/lib
-Wl,-rpath,/usr/pkg/packages/jpeg-6bnb2/lib
USER_JPEGINCDIR = -I/usr/pkg/packages/jpeg-6bnb2/include
Actually, I think I could support something like that.
Now, for a feature freeze, things are really piling up into 3.7...
I'm pondering if I should save this for 3.8...
Cheers,
Richard
-----
Please consider sponsoring my work on free software.
See http://www.free.lp.se/sponsoring.html for details.
--
Richard Levitte [EMAIL PROTECTED]
http://richard.levitte.org/
"When I became a man I put away childish things, including
the fear of childishness and the desire to be very grown up."
-- C.S. Lewis