Skip to content

Commit

Permalink
configure.ac: fix bashisms
Browse files Browse the repository at this point in the history
configure scripts need to be runnable with a POSIX-compliant /bin/sh.

On many (but not all!) systems, /bin/sh is provided by Bash, so errors
like this aren't spotted. Notably Debian defaults to /bin/sh provided
by dash which doesn't tolerate such bashisms as '=='.

This retains compatibility with bash.

Fixes configure warnings/errors like:
```
checking for cheev_ in -llapack... yes
./configure: 8590: test: x: unexpected operator
checking how to print strings... printf
```
  • Loading branch information
thesamesam authored and fghoussen committed Dec 20, 2023
1 parent 569a385 commit 31b5076
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ dnl Check for LAPACK libraries
AX_LAPACK([], [AC_MSG_ERROR([cannot find LAPACK libraries])])

AC_ARG_VAR(INTERFACE64, [set to 1 to use the 64-bit integer interface (ILP64) for ARPACK, BLAS and LAPACK])
if test x"$INTERFACE64" == x"1"; then
if test x"$INTERFACE64" = x"1"; then
AC_LANG_PUSH([Fortran 77])
AX_CHECK_COMPILE_FLAG(-fdefault-integer-8, FFLAGS="$FFLAGS -fdefault-integer-8",
AX_CHECK_COMPILE_FLAG(-i8, FFLAGS="$FFLAGS -i8",
Expand Down Expand Up @@ -191,7 +191,7 @@ AS_IF([test x"$enable_mpi" != x"no"], [
])

dnl TODO: this needs full re-write of parpack to support ILP64...
if test x"$INTERFACE64" == x"1"; then
if test x"$INTERFACE64" = x"1"; then
if test x"$enable_mpi" != x"no"; then
AC_MSG_ERROR([Parallel arpack does not support ILP64.])
fi
Expand Down

0 comments on commit 31b5076

Please sign in to comment.