Ticket #25191 (closed defect: fixed)
openvrml +js_spidermonkey needs -I${prefix}/include/js
| Reported by: | braden@… | Owned by: | raphael@… |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | ports | Version: | 1.9.0 |
| Keywords: | Cc: | ||
| Port: | openvrml |
Description
When building openvrml with +js_spidermonkey, -I${prefix}/include/js needs to be added to CPPFLAGS.
Conceivably, JS_CFLAGS could be used for this instead. However, note that if JS_CFLAGS is not set, configure will set it to "-DXP_UNIX -DJS_THREADSAFE". This is probably correct for MacPorts' SpiderMonkey; but if it's not, JS_CFLAGS should be set to override it.
So, assuming JS_CFLAGS doesn't need to be modified for some other reason, it should be sufficient to apply this -I flag in CPPFLAGS.
Change History
comment:2 in reply to: ↑ description ; follow-up: ↓ 3 Changed 3 years ago by raphael@…
- Status changed from new to closed
- Resolution set to fixed
Replying to braden@…:
Conceivably, JS_CFLAGS could be used for this instead. However, note that if JS_CFLAGS is not set, configure will set it to "-DXP_UNIX -DJS_THREADSAFE".
Here on Mac OS X 10.6.3 on an Intel Core Duo JS_CFLAGS is not set. If I add -I${prefix}/include/js to CPPFLAGS configure fails with the following error in config.log:
configure:19380: checking jsapi.h usability
configure:19380: /usr/bin/gcc-4.2 -c -O2 -arch i386 -I/opt/local/include -I/opt/local/include/js conftest.c >&5
In file included from /opt/local/include/js/jspubtd.h:45,
from /opt/local/include/js/jsapi.h:47,
from conftest.c:61:
/opt/local/include/js/jstypes.h:248:6: error: #error "Must define one of XP_BEOS, XP_OS2, XP_WIN or XP_UNIX"
Adding JS_CFLAGS="-DXP_UNIX -DJS_THREADSAFE -I${prefix}/include/js" to the configure environment works for me.
Fixed in r68681.
comment:3 in reply to: ↑ 2 Changed 3 years ago by braden@…
Replying to raphael@…:
Here on Mac OS X 10.6.3 on an Intel Core Duo JS_CFLAGS is not set. If I add -I${prefix}/include/js to CPPFLAGS configure fails with the following error in config.log:
Sigh. Of course.
Adding JS_CFLAGS="-DXP_UNIX -DJS_THREADSAFE -I${prefix}/include/js" to the configure environment works for me.
Yes, I think that's the Right Thing. It's a shame that the stand-alone SpiderMonkey doesn't provide pkg-config metadata; but if it did, that's probably what it would have in it.
Fixed in r68681.
Thanks.


Please remember to cc the maintainer.