This repository has been archived on 2020-06-07. You can view files and clone it, but cannot push or open issues or pull requests.
php-armadillo/config.m4
2019-07-13 02:16:55 +08:00

29 lines
956 B
Plaintext

PHP_ARG_ENABLE(arma, for armadillo support,
[ --enable-arma Enable armadillo support])
PHP_ARG_ENABLE(arma-operators, for operator overloading support in armadillo,
[ --enable-arma-operators Enable operator overloading for armadillo ], no, no)
if test "$PHP_ARMA" != "no"; then
PHP_REQUIRE_CXX()
EXTRA_CXXFLAGS="-std=c++17"
CLANG_TEST_STR=`$CXX --version | grep clang`
if test -n "$CLANG_TEST_STR"; then
EXTRA_CXXFLAGS+=" -Wno-undefined-var-template -Wno-deprecated-declarations"
fi
OPERATORS_SRC="src/operators.cc"
ARMA_SRC=`ls -1d src/*.cc | grep -v $OPERATORS_SRC`
if test "$PHP_ARMA_OPERATORS" != "no"; then
AC_DEFINE(PHP_ARMA_OPERATORS, 1, [ Defined if operator overloading is enabled for armadillo. ])
ARMA_SRC+=" $OPERATORS_SRC"
fi
PHP_NEW_EXTENSION(arma, $ARMA_SRC, $ext_shared, , $EXTRA_CXXFLAGS)
PHP_ADD_LIBRARY(armadillo, 1, ARMA_SHARED_LIBADD)
PHP_SUBST(ARMA_SHARED_LIBADD)
fi