Hello,

  This is a patch I prepared to enable Spidermonkey feature to be 
  compiled against xulrunner. This is useful for distributions such as 
  Ubuntu that ceased to ship a proper libmozjs, yet instead provide it 
  as part of xulrunner.

-- 
 ‎أحمد المحمودي (Ahmed El-Mahmoudy)
  Digital design engineer
 GPG KeyID: 0xEDDDA1B7
 GPG Fingerprint: 8206 A196 2084 7E6D 0DF8  B176 BC19 6A94 EDDD A1B7
Description: Enable building with xulrunner.
Author: أحمد المحمودي (Ahmed El-Mahmoudy) <aelmahmo...@users.sourceforge.net>
--- a/configure
+++ b/configure
@@ -18622,12 +18622,20 @@
 	if test ! -d "$withval"; then
 		withval="";
 	fi
+
+  # Check for xulrunner:
+  ! which xulrunner > /dev/null ||  XULINC="/include/xulrunner-$(xulrunner --gre-version)"
+
 	for spidermonkeydir in "$withval" "" /usr /usr/local /opt/spidermonkey /opt/js; do
-		for spidermonkeyinclude in "/include" "/include/js" "/include/smjs" "/include/mozjs"; do
+		for spidermonkeyinclude in "/include" "/include/js" "/include/smjs" "/include/mozjs" "$XULINC"; do
 			for spidermonkeylib in js smjs mozjs; do
 				if test "$cf_result" = no &&
 				   test -f "$spidermonkeydir$spidermonkeyinclude/jsapi.h"; then
-					SPIDERMONKEY_LIBS="-L$spidermonkeydir/lib -l$spidermonkeylib"
+          if echo $spidermonkeyinclude | grep xulrunner > /dev/null; then
+					  SPIDERMONKEY_LIBS="-L$spidermonkeydir/lib/xulrunner-$(xulrunner --gre-version) -Wl,-R$spidermonkeydir/lib/xulrunner-$(xulrunner --gre-version) -l$spidermonkeylib"
+          else
+					  SPIDERMONKEY_LIBS="-L$spidermonkeydir/lib -l$spidermonkeylib"
+          fi
 					SPIDERMONKEY_CFLAGS="-I$spidermonkeydir$spidermonkeyinclude"
 
 					LIBS="$SPIDERMONKEY_LIBS $LIBS_X"
_______________________________________________
elinks-dev mailing list
elinks-dev@linuxfromscratch.org
http://linuxfromscratch.org/mailman/listinfo/elinks-dev

Reply via email to