mirror of
https://github.com/phpv8/v8js.git
synced 2025-03-11 23:28:45 +00:00
Merge branch 'patch-autoconf-ac-try' of https://github.com/petk/v8js into issue-374
This commit is contained in:
commit
e2986ea16c
24
config.m4
24
config.m4
@ -43,7 +43,7 @@ if test "$PHP_V8JS" != "no"; then
|
|||||||
old_CPPFLAGS=$CPPFLAGS
|
old_CPPFLAGS=$CPPFLAGS
|
||||||
AC_LANG_PUSH([C++])
|
AC_LANG_PUSH([C++])
|
||||||
CPPFLAGS="-std="$ac_cv_v8_cstd
|
CPPFLAGS="-std="$ac_cv_v8_cstd
|
||||||
AC_TRY_RUN([int main() { return 0; }],[],[ac_cv_v8_cstd="c++0x"],[])
|
AC_RUN_IFELSE([AC_LANG_SOURCE([[int main() { return 0; }]])],[],[ac_cv_v8_cstd="c++0x"],[])
|
||||||
AC_LANG_POP([C++])
|
AC_LANG_POP([C++])
|
||||||
CPPFLAGS=$old_CPPFLAGS
|
CPPFLAGS=$old_CPPFLAGS
|
||||||
]);
|
]);
|
||||||
@ -53,27 +53,27 @@ if test "$PHP_V8JS" != "no"; then
|
|||||||
old_CXXFLAGS=$CXXFLAGS
|
old_CXXFLAGS=$CXXFLAGS
|
||||||
AC_LANG_PUSH([C++])
|
AC_LANG_PUSH([C++])
|
||||||
CXXFLAGS="-std="$ac_cv_v8_cstd
|
CXXFLAGS="-std="$ac_cv_v8_cstd
|
||||||
AC_TRY_RUN([int main() {
|
AC_RUN_IFELSE([AC_LANG_SOURCE([[int main() {
|
||||||
struct { unsigned int x; } foo = {-1};
|
struct { unsigned int x; } foo = {-1};
|
||||||
(void) foo;
|
(void) foo;
|
||||||
return 0;
|
return 0;
|
||||||
}], [ ac_cv_v8_narrowing="" ], [
|
}]])],[ac_cv_v8_narrowing=""],[
|
||||||
CXXFLAGS="-Wno-c++11-narrowing -std="$ac_cv_v8_cstd
|
CXXFLAGS="-Wno-c++11-narrowing -std="$ac_cv_v8_cstd
|
||||||
AC_TRY_RUN([int main() {
|
AC_RUN_IFELSE([AC_LANG_SOURCE([[int main() {
|
||||||
struct { unsigned int x; } foo = {-1};
|
struct { unsigned int x; } foo = {-1};
|
||||||
(void) foo;
|
(void) foo;
|
||||||
return 0;
|
return 0;
|
||||||
}], [ ac_cv_v8_narrowing="-Wno-c++11-narrowing" ], [
|
}]])],[ac_cv_v8_narrowing="-Wno-c++11-narrowing"],[
|
||||||
CXXFLAGS="-Wno-narrowing -std="$ac_cv_v8_cstd
|
CXXFLAGS="-Wno-narrowing -std="$ac_cv_v8_cstd
|
||||||
AC_TRY_RUN([int main() {
|
AC_RUN_IFELSE([AC_LANG_SOURCE([[int main() {
|
||||||
struct { unsigned int x; } foo = {-1};
|
struct { unsigned int x; } foo = {-1};
|
||||||
(void) foo;
|
(void) foo;
|
||||||
return 0;
|
return 0;
|
||||||
}], [ ac_cv_v8_narrowing="-Wno-narrowing" ], [
|
}]])],[ac_cv_v8_narrowing="-Wno-narrowing"],[
|
||||||
AC_MSG_ERROR([cannot compile with narrowing])
|
AC_MSG_ERROR([cannot compile with narrowing])
|
||||||
], [])
|
],[])
|
||||||
], [])
|
],[])
|
||||||
], [])
|
],[])
|
||||||
AC_LANG_POP([C++])
|
AC_LANG_POP([C++])
|
||||||
CXXFLAGS=$old_CXXFLAGS
|
CXXFLAGS=$old_CXXFLAGS
|
||||||
]);
|
]);
|
||||||
@ -117,7 +117,7 @@ if test "$PHP_V8JS" != "no"; then
|
|||||||
dnl
|
dnl
|
||||||
LIBS="$LIBS $V8JS_SHARED_LIBADD"
|
LIBS="$LIBS $V8JS_SHARED_LIBADD"
|
||||||
AC_CACHE_CHECK(for V8 version, ac_cv_v8_version, [
|
AC_CACHE_CHECK(for V8 version, ac_cv_v8_version, [
|
||||||
AC_TRY_RUN([#include <v8.h>
|
AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <v8.h>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
using namespace std;
|
using namespace std;
|
||||||
@ -132,7 +132,7 @@ int main ()
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}], [ac_cv_v8_version=`cat ./conftestval|awk '{print $1}'`], [ac_cv_v8_version=NONE], [ac_cv_v8_version=NONE])
|
}]])],[ac_cv_v8_version=`cat ./conftestval|awk '{print $1}'`],[ac_cv_v8_version=NONE],[ac_cv_v8_version=NONE])
|
||||||
])
|
])
|
||||||
|
|
||||||
if test "$ac_cv_v8_version" != "NONE"; then
|
if test "$ac_cv_v8_version" != "NONE"; then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user