cvs commit: hugs98/src/unix hugs-package.in

Ross Paterson ross@soi.city.ac.uk
Fri, 18 Jul 2003 12:10:33 +0100


On Fri, Jul 18, 2003 at 01:41:37AM -0700, Sven Panne wrote:
>   Added a REAL hack for HOpenGL stuff. Probably somebody will hit me
>   with a big stick for doing this...  :-]  Improvements highly welcome!

There's worse in there already.

> # MEGA hack for HOpenGL stuff. Perhaps it would be a good
> # idea to mangle *every* file with hack_foreign, using
> # info from the package field c_includes somehow, but this
> # doesn't work yet.

To do it properly, we'd need to look at
- c_includes (it already uses extra_libraries and extra_ld_opts),
- OPTIONS -#include's in the source file, and
- include files already specified in foreign import's
If this adds up to more than one include, we'd need to make a little
header file to include them all, and hack that into all the foreign
import's.  It seems the gap between the spec and what is comfortable
for authors to write necessitates ugly hacks here.  The last time I
complained about this, Alastair suggested a "foreign include" directive,
which might help.