mirror of
https://github.com/phpv8/v8js.git
synced 2024-12-22 08:11:52 +00:00
Restructure code so an always false condition is moved to skimming loop
This commit is contained in:
parent
be6e1a809a
commit
66d155679b
56
config.m4
56
config.m4
@ -5,36 +5,36 @@ if test "$PHP_V8JS" != "no"; then
|
|||||||
SEARCH_PATH="/usr/local /usr"
|
SEARCH_PATH="/usr/local /usr"
|
||||||
SEARCH_FOR="libv8.$SHLIB_SUFFIX_NAME"
|
SEARCH_FOR="libv8.$SHLIB_SUFFIX_NAME"
|
||||||
|
|
||||||
if test -r $PHP_V8JS/$SEARCH_FOR; then
|
if test -d "$PHP_V8JS"; then
|
||||||
case $host_os in
|
SEARCH_PATH="$PHP_V8JS $SEARCH_PATH"
|
||||||
darwin* )
|
|
||||||
# MacOS does not support --rpath
|
|
||||||
;;
|
|
||||||
* )
|
|
||||||
LDFLAGS="$LDFLAGS -Wl,--rpath=$PHP_V8JS/$PHP_LIBDIR"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
V8_INCLUDE_DIR=$PHP_V8JS/include/v8
|
|
||||||
V8_LIBRARY_DIR=$PHP_V8JS/$PHP_LIBDIR
|
|
||||||
else
|
|
||||||
AC_MSG_CHECKING([for V8 files in default path])
|
|
||||||
ARCH=$(uname -m)
|
|
||||||
|
|
||||||
for i in $SEARCH_PATH ; do
|
|
||||||
if test -r $i/$PHP_LIBDIR/$SEARCH_FOR; then
|
|
||||||
V8_INCLUDE_DIR=$i/include/v8
|
|
||||||
V8_LIBRARY_DIR=$i/$PHP_LIBDIR
|
|
||||||
AC_MSG_RESULT(found in $i)
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test -r $i/$PHP_LIBDIR/$ARCH-linux-gnu/$SEARCH_FOR; then
|
|
||||||
V8_INCLUDE_DIR=$i/include/v8
|
|
||||||
V8_LIBRARY_DIR=$i/$PHP_LIBDIR/$ARCH-linux-gnu
|
|
||||||
AC_MSG_RESULT(found in $i)
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
case $host_os in
|
||||||
|
darwin* )
|
||||||
|
# MacOS does not support --rpath
|
||||||
|
;;
|
||||||
|
* )
|
||||||
|
LDFLAGS="$LDFLAGS -Wl,--rpath=$PHP_V8JS/$PHP_LIBDIR"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([for V8 files in default path])
|
||||||
|
ARCH=$(uname -m)
|
||||||
|
|
||||||
|
for i in $SEARCH_PATH ; do
|
||||||
|
if test -r $i/$PHP_LIBDIR/$SEARCH_FOR; then
|
||||||
|
V8_INCLUDE_DIR=$i/include/v8
|
||||||
|
V8_LIBRARY_DIR=$i/$PHP_LIBDIR
|
||||||
|
AC_MSG_RESULT(found in $i)
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test -r $i/$PHP_LIBDIR/$ARCH-linux-gnu/$SEARCH_FOR; then
|
||||||
|
V8_INCLUDE_DIR=$i/include/v8
|
||||||
|
V8_LIBRARY_DIR=$i/$PHP_LIBDIR/$ARCH-linux-gnu
|
||||||
|
AC_MSG_RESULT(found in $i)
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
AC_DEFINE_UNQUOTED([PHP_V8_EXEC_PATH], "$V8_LIBRARY_DIR/$SEARCH_FOR", [Full path to libv8 library file])
|
AC_DEFINE_UNQUOTED([PHP_V8_EXEC_PATH], "$V8_LIBRARY_DIR/$SEARCH_FOR", [Full path to libv8 library file])
|
||||||
|
|
||||||
if test -z "$V8_INCLUDE_DIR" || test -z "$V8_LIBRARY_DIR"; then
|
if test -z "$V8_INCLUDE_DIR" || test -z "$V8_LIBRARY_DIR"; then
|
||||||
|
Loading…
Reference in New Issue
Block a user