mirror of
https://github.com/phpv8/v8js.git
synced 2024-12-22 14:01:53 +00:00
More robust scanning, override SEARCH_PATH by explicitly given dir
This commit is contained in:
parent
8edc8b65d8
commit
303ab95a90
24
config.m4
24
config.m4
@ -6,9 +6,10 @@ if test "$PHP_V8JS" != "no"; then
|
|||||||
SEARCH_FOR="libv8.$SHLIB_SUFFIX_NAME"
|
SEARCH_FOR="libv8.$SHLIB_SUFFIX_NAME"
|
||||||
|
|
||||||
if test -d "$PHP_V8JS"; then
|
if test -d "$PHP_V8JS"; then
|
||||||
SEARCH_PATH="$PHP_V8JS $SEARCH_PATH"
|
SEARCH_PATH="$PHP_V8JS"
|
||||||
fi
|
|
||||||
|
|
||||||
|
# set rpath, so library loader picks up libv8 even if it's not on the
|
||||||
|
# system's library search path
|
||||||
case $host_os in
|
case $host_os in
|
||||||
darwin* )
|
darwin* )
|
||||||
# MacOS does not support --rpath
|
# MacOS does not support --rpath
|
||||||
@ -17,28 +18,29 @@ if test "$PHP_V8JS" != "no"; then
|
|||||||
LDFLAGS="$LDFLAGS -Wl,--rpath=$PHP_V8JS/$PHP_LIBDIR"
|
LDFLAGS="$LDFLAGS -Wl,--rpath=$PHP_V8JS/$PHP_LIBDIR"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
AC_MSG_CHECKING([for V8 files in default path])
|
AC_MSG_CHECKING([for V8 files in default path])
|
||||||
ARCH=$(uname -m)
|
ARCH=$(uname -m)
|
||||||
|
|
||||||
for i in $SEARCH_PATH ; do
|
for i in $SEARCH_PATH ; do
|
||||||
if test -r $i/$PHP_LIBDIR/$SEARCH_FOR; then
|
if test -r "$i/$PHP_LIBDIR/$SEARCH_FOR" -a -r "$i/include/v8/v8.h"; then
|
||||||
V8_INCLUDE_DIR=$i/include/v8
|
V8_INCLUDE_DIR="$i/include/v8"
|
||||||
V8_LIBRARY_DIR=$i/$PHP_LIBDIR
|
V8_LIBRARY_DIR="$i/$PHP_LIBDIR"
|
||||||
AC_MSG_RESULT(found in $i)
|
AC_MSG_RESULT(found in $i)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Debian installations
|
# Debian installations
|
||||||
if test -r $i/$PHP_LIBDIR/$ARCH-linux-gnu/$SEARCH_FOR; then
|
if test -r "$i/$PHP_LIBDIR/$ARCH-linux-gnu/$SEARCH_FOR"; then
|
||||||
V8_INCLUDE_DIR=$i/include/v8
|
V8_INCLUDE_DIR="$i/include/v8"
|
||||||
V8_LIBRARY_DIR=$i/$PHP_LIBDIR/$ARCH-linux-gnu
|
V8_LIBRARY_DIR="$i/$PHP_LIBDIR/$ARCH-linux-gnu"
|
||||||
AC_MSG_RESULT(found in $i)
|
AC_MSG_RESULT(found in $i)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Manual installations
|
# Manual installations
|
||||||
if test -r $i/$PHP_LIBDIR/$SEARCH_FOR && test -r $i/include/libplatform/libplatform.h; then
|
if test -r "$i/$PHP_LIBDIR/$SEARCH_FOR" -a -r "$i/include/libplatform/libplatform.h"; then
|
||||||
V8_INCLUDE_DIR=$i/include
|
V8_INCLUDE_DIR="$i/include"
|
||||||
V8_LIBRARY_DIR=$i/$PHP_LIBDIR
|
V8_LIBRARY_DIR="$i/$PHP_LIBDIR"
|
||||||
AC_MSG_RESULT(found in $i)
|
AC_MSG_RESULT(found in $i)
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user