diff m4/acinclude.m4 @ 24336:0771ce2d30ef stable

build: Fix compiling OCTAVE_ARPACK_OK_2 Fortran code (bug #52425). * m4/acinclude.m4 (OCTAVE_ARPACK_OK_2): Save FFLAGS. Add $F77_INTEGER_8_FLAG to FFLAGS for compilation of test Fortran code. Restore FFLAGS.
author Rik <rik@octave.org>
date Wed, 29 Nov 2017 13:43:58 -0800
parents f52d91f6ef80
children 999b167e5b4a
line wrap: on
line diff
--- a/m4/acinclude.m4	Wed Nov 29 11:01:59 2017 -0800
+++ b/m4/acinclude.m4	Wed Nov 29 13:43:58 2017 -0800
@@ -948,7 +948,9 @@
 AC_DEFUN([OCTAVE_CHECK_LIB_ARPACK_OK_2], [
   AC_CACHE_CHECK([whether the arpack library is free of bugs],
     [octave_cv_lib_arpack_ok_2],
-    [AC_LANG_PUSH(Fortran 77)
+    [save_FFLAGS="$FFLAGS"
+    FFLAGS="$FFLAGS $F77_INTEGER_8_FLAG"
+    AC_LANG_PUSH(Fortran 77)
     AC_RUN_IFELSE([[
       program bug_52425 
 c
@@ -1063,6 +1065,8 @@
     octave_cv_lib_arpack_ok_2=yes,
     octave_cv_lib_arpack_ok_2=no,
     octave_cv_lib_arpack_ok_2=yes)
+    ## Restore FFLAGS.
+    FFLAGS="$save_FFLAGS"
     AC_LANG_POP(Fortran 77)
   ])
   if test $octave_cv_lib_arpack_ok_2 = yes; then