Update of /cvsroot/openvrml/openvrml
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv2946
Modified Files:
Tag: OpenVRML-0_16-BRANCH
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.92.2.25
retrieving revision 1.92.2.26
diff -C2 -d -r1.92.2.25 -r1.92.2.26
*** configure.ac 9 Jul 2007 07:31:46 -0000 1.92.2.25
--- configure.ac 9 Jul 2007 08:14:58 -0000 1.92.2.26
***************
*** 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.1310.2.185
retrieving revision 1.1310.2.186
diff -C2 -d -r1.1310.2.185 -r1.1310.2.186
*** ChangeLog 9 Jul 2007 07:45:49 -0000 1.1310.2.185
--- ChangeLog 9 Jul 2007 08:14:57 -0000 1.1310.2.186
***************
*** 1,4 ****
--- 1,20 ----
2007-07-09 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...>
+
Doc-comment fixes.
|