From 33dfc42aa6cacbbb339960b306f98922077d313a Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 15 Feb 2021 11:05:25 +0100 Subject: initial package open https://github.com/RubixML/Tensor/pull/11 check for openblas headers open https://github.com/RubixML/Tensor/issues/12 PHP 8 compatibility --- tensor-headers.patch | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 tensor-headers.patch (limited to 'tensor-headers.patch') diff --git a/tensor-headers.patch b/tensor-headers.patch new file mode 100644 index 0000000..e2fed73 --- /dev/null +++ b/tensor-headers.patch @@ -0,0 +1,39 @@ +From 9feb1e81f79e28b78b803abde4dacaca820dafe8 Mon Sep 17 00:00:00 2001 +From: Remi Collet +Date: Mon, 15 Feb 2021 09:37:22 +0100 +Subject: [PATCH] check for openblas headers + +--- + ext/config.m4 | 18 +++++++++++++++++- + 1 file changed, 17 insertions(+), 1 deletion(-) + +diff --git a/ext/config.m4 b/ext/config.m4 +index ae03d9c..2b130c0 100644 +--- a/ext/config.m4 ++++ b/ext/config.m4 +@@ -1,8 +1,24 @@ + PHP_ARG_ENABLE(tensor, whether to enable tensor, [ --enable-tensor Enable Tensor]) + ++PHP_ARG_WITH(openblas, libopenblas directory, ++[ --with-openblas=DIR libopenblas directory], no, no) ++ + if test "$PHP_TENSOR" = "yes"; then + +- ++ AC_MSG_CHECKING([Check openblas headers]) ++ for i in $PHP_OPENBLAS /usr/local/include /usr/include/openblas /usr/include; do ++ if test -r $i/cblas.h; then ++ OPENBLAS_DIR=$i ++ AC_MSG_RESULT([found in $i]) ++ break ++ fi ++ done ++ ++ if test -z "$OPENBLAS_DIR"; then ++ AC_MSG_ERROR([openblas headers not found]) ++ else ++ PHP_ADD_INCLUDE($OPENBLAS_DIR) ++ fi + + if ! test "x-lopenblas -llapacke -lgfortran -lpthread" = "x"; then + PHP_EVAL_LIBLINE(-lopenblas -llapacke -lgfortran -lpthread, TENSOR_SHARED_LIBADD) -- cgit