[
https://issues.apache.org/jira/browse/COUCHDB-562?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12980372#action_12980372
]
Paul Joseph Davis commented on COUCHDB-562:
-------------------------------------------
Hrm. I'm not a big fan of relying on PKG_CHECK_MODULES' weird behavior there
then.
How about something like such:
PKG_CHECK_MODULES([JS], [mozilla-js >= 1.7], [
JS_CFLAGS="$(${PKG_CONFIG} --cflags mozilla-js)"
JS_LIB_DIR="$(${PKG_CONFIG} --variable=sdkdir mozilla-js)/lib"
JS_LIB_FLAGS="-L$JS_LIB_DIR"
], [])
AC_ARG_WITH([js-include], [AC_HELP_STRING([--with-js-include=PATH],
[set PATH to the SpiderMonkey include directory])], [
JS_CFLAGS="-I$withval"
], [])
AC_ARG_WITH([js-lib], [AC_HELP_STRING([--with-js-lib=PATH],
[set PATH to the SpiderMonkey library directory])], [
JS_LIB_DIR=$withval
JS_LIB_FLAGS="-L$withval"
], [])
if test x${JS_CFLAGS} = x; then
JS_CFLAGS="-I/usr/include"
JS_CFLAGS="$JS_CFLAGS -I/usr/include/js"
JS_CFLAGS="$JS_CFLAGS -I/usr/include/mozjs"
JS_CFLAGS="$JS_CFLAGS -I/usr/local/include"
JS_CFLAGS="$JS_CFLAGS -I/opt/local/include"
JS_CFLAGS="$JS_CFLAGS -I/usr/local/include/js"
JS_CFLAGS="$JS_CFLAGS -I/opt/local/include/js"
fi
if test x${JS_LIB_FLAGS} = x; then
JS_LIB_DIR=""
JS_LIB_FLAGS=""
fi
> link couchjs with bound libmozjs
> --------------------------------
>
> Key: COUCHDB-562
> URL: https://issues.apache.org/jira/browse/COUCHDB-562
> Project: CouchDB
> Issue Type: Improvement
> Components: Build System
> Affects Versions: 0.11
> Environment: linux, ubuntu,debian
> Reporter: Meno Abels
> Fix For: 1.2
>
> Attachments: couchdb-562.patch, couchdb-562_2.patch,
> couchdb-mozjs-rpath.patch
>
>
> If you build the couchdb from the source with a prefix set and
> --with-js-[lib|include] option the resulting couchjs programm in
> <prefix>/lib/couchdb/bin/couchjs does not know where to find the specified
> libmozjs.so which was specified in with-js-lib. This causes that quite all
> test will fail.
> To fix this the rpath has to setup during the compile. I don't had a look
> where to do this.
> but a small shell wrapper fix it also
> #!/bin/sh
> LD_LIBRARY_PATH=... exec $0.orig $@
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.