From: Braden M. <br...@us...> - 2007-07-09 08:14:35
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv2913 Modified Files: ChangeLog configure.ac Log Message: Define JS_THREADSAFE when compiling against newer libmozjs. This is required when building against the libmozjs included with Firefox 2.0. Index: configure.ac =================================================================== RCS file: /cvsroot/openvrml/openvrml/configure.ac,v retrieving revision 1.119 retrieving revision 1.120 diff -C2 -d -r1.119 -r1.120 *** configure.ac 1 Jul 2007 03:53:36 -0000 1.119 --- configure.ac 9 Jul 2007 08:14:35 -0000 1.120 *************** *** 266,269 **** --- 266,282 ---- fi openvrml_run_path="${GRE_PATH}${openvrml_run_path}" + + # + # Ugh. libmozjs from Firefox 2.0 needs -DJS_THREADSAFE; but the + # Cflags from the pkg-config metadata don't include it. Check + # mozilla-config.h; if we find JS_THREADSAFE there, assume we need + # it. + # + AS_IF([test -n "$mozilla_js_pkg"], + [moz_includedir=`$PKG_CONFIG --variable=includedir $mozilla_js_pkg` + AS_IF([grep JS_THREADSAFE $moz_includedir/mozilla-config.h > /dev/null], + [AS_IF([$PKG_CONFIG --cflags $mozilla_js_pkg | grep JS_THREADSAFE > /dev/null], + , + [JS_CFLAGS="${JS_CFLAGS} -DJS_THREADSAFE"])])]) fi fi Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1531 retrieving revision 1.1532 diff -C2 -d -r1.1531 -r1.1532 *** ChangeLog 9 Jul 2007 07:08:16 -0000 1.1531 --- ChangeLog 9 Jul 2007 08:14:35 -0000 1.1532 *************** *** 1,7 **** 2007-07-09 Braden McDaniel <br...@en...> * README: Added documentation for --with-libjs. ! 2007-07-06 Braden McDaniel <br...@en...> Doc-comment fixes. --- 1,23 ---- + 2007-07-06 Braden McDaniel <br...@en...> + + Define JS_THREADSAFE when compiling against newer libmozjs. This + is required when building against the libmozjs included with + Firefox 2.0. + + * configure.ac: The pkg-config metadata file for libmozjs doesn't + include -DJS_THREADSAFE in Cflags. Inspect mozilla-config.h to + see if JS_THREADSAFE is defined there; and if so, add + -DJS_THREADSAFE to JS_CFLAGS. + * src/libopenvrml/openvrml/script.cpp + (js_::script::activate(double, const std::string &, size_t, const + openvrml::field_value *[])): When compiling with JS_THREADSAFE, + call JS_SetContextThread on entering this function and + JS_ClearContextThread on leaving it. + 2007-07-09 Braden McDaniel <br...@en...> * README: Added documentation for --with-libjs. ! 2007-07-09 Braden McDaniel <br...@en...> Doc-comment fixes. |