Skip to content

Commit e2986ea

Browse files
committed
Merge branch 'patch-autoconf-ac-try' of https://github.com/petk/v8js into issue-374
2 parents dea7395 + 59c2aaa commit e2986ea

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

config.m4

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ if test "$PHP_V8JS" != "no"; then
4343
old_CPPFLAGS=$CPPFLAGS
4444
AC_LANG_PUSH([C++])
4545
CPPFLAGS="-std="$ac_cv_v8_cstd
46-
AC_TRY_RUN([int main() { return 0; }],[],[ac_cv_v8_cstd="c++0x"],[])
46+
AC_RUN_IFELSE([AC_LANG_SOURCE([[int main() { return 0; }]])],[],[ac_cv_v8_cstd="c++0x"],[])
4747
AC_LANG_POP([C++])
4848
CPPFLAGS=$old_CPPFLAGS
4949
]);
@@ -53,27 +53,27 @@ if test "$PHP_V8JS" != "no"; then
5353
old_CXXFLAGS=$CXXFLAGS
5454
AC_LANG_PUSH([C++])
5555
CXXFLAGS="-std="$ac_cv_v8_cstd
56-
AC_TRY_RUN([int main() {
56+
AC_RUN_IFELSE([AC_LANG_SOURCE([[int main() {
5757
struct { unsigned int x; } foo = {-1};
5858
(void) foo;
5959
return 0;
60-
}], [ ac_cv_v8_narrowing="" ], [
60+
}]])],[ac_cv_v8_narrowing=""],[
6161
CXXFLAGS="-Wno-c++11-narrowing -std="$ac_cv_v8_cstd
62-
AC_TRY_RUN([int main() {
62+
AC_RUN_IFELSE([AC_LANG_SOURCE([[int main() {
6363
struct { unsigned int x; } foo = {-1};
6464
(void) foo;
6565
return 0;
66-
}], [ ac_cv_v8_narrowing="-Wno-c++11-narrowing" ], [
66+
}]])],[ac_cv_v8_narrowing="-Wno-c++11-narrowing"],[
6767
CXXFLAGS="-Wno-narrowing -std="$ac_cv_v8_cstd
68-
AC_TRY_RUN([int main() {
68+
AC_RUN_IFELSE([AC_LANG_SOURCE([[int main() {
6969
struct { unsigned int x; } foo = {-1};
7070
(void) foo;
7171
return 0;
72-
}], [ ac_cv_v8_narrowing="-Wno-narrowing" ], [
72+
}]])],[ac_cv_v8_narrowing="-Wno-narrowing"],[
7373
AC_MSG_ERROR([cannot compile with narrowing])
74-
], [])
75-
], [])
76-
], [])
74+
],[])
75+
],[])
76+
],[])
7777
AC_LANG_POP([C++])
7878
CXXFLAGS=$old_CXXFLAGS
7979
]);
@@ -117,7 +117,7 @@ if test "$PHP_V8JS" != "no"; then
117117
dnl
118118
LIBS="$LIBS $V8JS_SHARED_LIBADD"
119119
AC_CACHE_CHECK(for V8 version, ac_cv_v8_version, [
120-
AC_TRY_RUN([#include <v8.h>
120+
AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <v8.h>
121121
#include <iostream>
122122
#include <fstream>
123123
using namespace std;
@@ -132,7 +132,7 @@ int main ()
132132
return 0;
133133
}
134134
return 1;
135-
}], [ac_cv_v8_version=`cat ./conftestval|awk '{print $1}'`], [ac_cv_v8_version=NONE], [ac_cv_v8_version=NONE])
135+
}]])],[ac_cv_v8_version=`cat ./conftestval|awk '{print $1}'`],[ac_cv_v8_version=NONE],[ac_cv_v8_version=NONE])
136136
])
137137

138138
if test "$ac_cv_v8_version" != "NONE"; then

0 commit comments

Comments
 (0)