diff --git a/.travis.yml b/.travis.yml index e4ad2f9..6d2ae79 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,7 +10,7 @@ php: env: global: - - ARMA_VERSION="9.700.2" + - ARMA_VERSION="9.700.3" - ARMA_SRC="http://sourceforge.net/projects/arma/files/armadillo-${ARMA_VERSION}.tar.xz" before_install: diff --git a/config.m4 b/config.m4 index 8f000c2..510e248 100644 --- a/config.m4 +++ b/config.m4 @@ -32,7 +32,7 @@ if test "$PHP_ARMA" != "no"; then # Include PCH file if valid. EXTRA_CXXFLAGS="-std=c++17 -DARMA_DONT_PRINT_ERRORS" - CLANG_TEST_STR=`$CXX --version | grep clang` + CLANG_TEST_STR=`echo | $CXX -dM -E - | grep __clang__` if test -f "$PCH_FILE"; then if test -n "$CLANG_TEST_STR"; then EXTRA_CXXFLAGS+=" -include-pch $PCH_FILE" diff --git a/src/base.hh b/src/base.hh index ab4ab61..90b214f 100644 --- a/src/base.hh +++ b/src/base.hh @@ -10,6 +10,8 @@ #include "php_arma.hh" #include "complex.hh" +#ifdef PHP_ARMA_OPERATORS + #define PHP_ARMA_BASE_OPERATOR_EX2(cls, type, func) \ PHP_ARMA_OPERATOR_EX2((base>), cls, func) @@ -38,6 +40,8 @@ PHP_ARMA_BASE_ASSIGN_OPERATOR_EX(subview_mat, func) \ PHP_ARMA_OPERATOR_END() +#endif // PHP_ARMA_OPERATORS + namespace php_arma { template diff --git a/src/dense.hh b/src/dense.hh index f847a44..2afe848 100644 --- a/src/dense.hh +++ b/src/dense.hh @@ -10,6 +10,8 @@ #include "php_arma.hh" #include "complex.hh" +#ifdef PHP_ARMA_OPERATORS + #define PHP_ARMA_DENSE_OPERATOR_EX2(cls, type, func) \ PHP_ARMA_OPERATOR_EX2((dense>), cls, func) @@ -24,6 +26,8 @@ PHP_ARMA_DENSE_OPERATOR_EX(subview_mat, func) \ PHP_ARMA_OPERATOR_END() +#endif // PHP_ARMA_OPERATORS + namespace php_arma { template diff --git a/src/mapval.hh b/src/mapval.hh index 43923ae..0c792af 100644 --- a/src/mapval.hh +++ b/src/mapval.hh @@ -9,6 +9,8 @@ #include "php_arma.hh" +#ifdef PHP_ARMA_OPERATORS + #define PHP_ARMA_MAPVAL_OPERATOR_EX(type, func) \ PHP_ARMA_OPERATOR_EX(mapval_dense , func) \ PHP_ARMA_OPERATOR_EX(mapval_spmat , func) \ @@ -21,6 +23,8 @@ PHP_ARMA_MAPVAL_OPERATOR_EX(cx_double, func) \ PHP_ARMA_OPERATOR_END() +#endif // PHP_ARMA_OPERATORS + namespace php_arma { template