Re: [elinks-dev] Patch to enable Spidermonkey feature compilation against xulrunner

2010-03-31 Thread Kamil Dudka
On Wednesday 31 of March 2010 13:06:22 أحمد المحمودي wrote:
> 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.

Let me note the file 'configure' is generated.  You need to modify 
'configure.in' instead.  Otherwise your changes will be blown out
on the next run of autoconf.

Kamil
___
elinks-dev mailing list
[email protected]
http://linuxfromscratch.org/mailman/listinfo/elinks-dev


Re: [elinks-dev] Patch to enable Spidermonkey feature compilation against xulrunner

2010-03-31 Thread أحمد المحمودي
On Wed, Mar 31, 2010 at 01:50:26PM +0200, Kamil Dudka wrote:
> Let me note the file 'configure' is generated.  You need to modify 
> 'configure.in' instead.  Otherwise your changes will be blown out
> on the next run of autoconf.
---end quoted text---

Thanks for the notice. Attached is the patch against configure.in

-- 
 ‎أحمد المحمودي (Ahmed El-Mahmoudy)
  Digital design engineer
 GPG KeyID: 0xEDDDA1B7
 GPG Fingerprint: 8206 A196 2084 7E6D 0DF8  B176 BC19 6A94 EDDD A1B7
--- a/configure.in	2010-03-31 14:07:21.0 +0200
+++ b/configure.in	2010-03-31 14:10:49.630277115 +0200
@@ -633,12 +633,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
[email protected]
http://linuxfromscratch.org/mailman/listinfo/elinks-dev