mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
Don't treat spidermonkeydir="" and luadir="" as special.
Previously, an empty string as spidermonkeydir or luadir meant that the LIBS and CFLAGS variables should be used unchanged. A few commits ago however, the configure script was changed to require test -f "$spidermonkeydir$spidermonkeyinclude/jsapi.h" and test -f "$luadir/include/lua$suffix/lua.h" to succeed. These commands interpret spidermonkeydir="" and luadir="" as the root directory. This behaviour was inconsistent with the part that decides whether to add the directory to *_LIBS and *_CFLAGS or not. The inconsistency could be solved in two ways. Either (a) add an exception so that the test -f is skipped if the variable is empty, or (b) treat an empty string as the root directory throughout. Because the Makefile of SpiderMonkey always installs to a subdirectory of the specified include directory, and ELinks uses #include <jsapi.h> without specifying that subdirectory in source code, it seems unlikely that the SpiderMonkey header files would ever be in the default include path. I am therefore implementing solution (b) here. I suppose similar considerations apply to Lua but did not check that carefully.
This commit is contained in:
parent
899df61a9c
commit
5669a14970
12
configure.in
12
configure.in
@ -630,12 +630,8 @@ if test -z "$disable_spidermonkey"; then
|
||||
for spidermonkeylib in js smjs mozjs; do
|
||||
if test "$cf_result" = no &&
|
||||
test -f "$spidermonkeydir$spidermonkeyinclude/jsapi.h"; then
|
||||
SPIDERMONKEY_LIBS="-l$spidermonkeylib"
|
||||
|
||||
if test ! -z "$spidermonkeydir"; then
|
||||
SPIDERMONKEY_LIBS="-L$spidermonkeydir/lib $SPIDERMONKEY_LIBS"
|
||||
SPIDERMONKEY_LIBS="-L$spidermonkeydir/lib -l$spidermonkeylib"
|
||||
SPIDERMONKEY_CFLAGS="-I$spidermonkeydir$spidermonkeyinclude"
|
||||
fi
|
||||
|
||||
LIBS="$SPIDERMONKEY_LIBS $LIBS_X"
|
||||
CFLAGS="$CFLAGS_X $SPIDERMONKEY_CFLAGS"
|
||||
@ -886,12 +882,8 @@ if test -z "$disable_lua"; then
|
||||
for suffix in "" 50 51; do
|
||||
if test "$cf_result" = no && ( test -f "$luadir/include/lua.h" || \
|
||||
test -f "$luadir/include/lua$suffix/lua.h" ) ; then
|
||||
LUA_LIBS="-llua$suffix -llualib$suffix -lm"
|
||||
|
||||
if test ! -z "$luadir"; then
|
||||
LUA_LIBS="-L$luadir/lib $LUA_LIBS"
|
||||
LUA_LIBS="-L$luadir/lib -llua$suffix -llualib$suffix -lm"
|
||||
LUA_CFLAGS="-I$luadir/include -I$luadir/include/lua$suffix"
|
||||
fi
|
||||
|
||||
LIBS="$LUA_LIBS $LIBS_X"
|
||||
CFLAGS="$CFLAGS_X $LUA_CFLAGS"
|
||||
|
Loading…
Reference in New Issue
Block a user