1From 75b973373ed2e9a7a30f62dfe330299306ecff75 Mon Sep 17 00:00:00 2001
2From: Julien Olivain <ju.o@free.fr>
3Date: Sat, 5 Mar 2022 12:36:09 +0100
4Subject: [PATCH] Fix BLAS library integer size detection
5
6When cross-compiling, octave ./configure script fails to detect the BLAS
7library integer size and fails with the message:
8
9    configure: error: unrecognized BLAS library integer size
10
11This patch fixes this detection.
12
13Patch adapted from:
14https://github.com/openembedded/meta-openembedded/commit/0ad153f721ef99de585c4452a997a7104f45d71d
15
16Signed-off-by: Julien Olivain <ju.o@free.fr>
17---
18 configure.ac | 6 ++++++
19 1 file changed, 6 insertions(+)
20
21diff --git a/configure.ac b/configure.ac
22index 4092e5915d..f4ea2c1987 100644
23--- a/configure.ac
24+++ b/configure.ac
25@@ -757,6 +757,12 @@ if test $ax_blas_ok = no || test $ax_lapack_ok = no; then
26   AC_MSG_ERROR([BLAS and LAPACK libraries are required])
27 fi
28
29+if ac_fn_f77_try_run "$LINENO"; then :
30+  ax_cv_blas_integer_size=8
31+else
32+  ax_cv_blas_integer_size=4
33+fi
34+
35 case $ax_cv_blas_integer_size in
36   4)
37     HAVE_64_BIT_BLAS=no
38--
392.39.2
40
41