changeset 15295:d1751eee9a42

acinclude.m4: Use AC_LANG_PUSH macro with AC_CACHE_CHECK for greater efficiency. * acinclude.m4: Use AC_LANG_PUSH macro with AC_CACHE_CHECK for greater efficiency.
author Rik <rik@octave.org>
date Tue, 04 Sep 2012 17:36:11 -0700
parents 2981cdbb955f
children 43e484fa7e42
files m4/acinclude.m4
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/m4/acinclude.m4
+++ b/m4/acinclude.m4
@@ -357,10 +357,10 @@
 dnl allocated arrays in Fortran does not?
 dnl
 AC_DEFUN([OCTAVE_CHECK_LIB_ARPACK_OK], [
-  AC_LANG_PUSH(C++)
   AC_CACHE_CHECK([whether the arpack library works],
     [octave_cv_lib_arpack_ok],
-    [AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+    [AC_LANG_PUSH(C++)
+    AC_RUN_IFELSE([AC_LANG_PROGRAM([[
 // External functions from ARPACK library
 extern "C" int
 F77_FUNC (dnaupd, DNAUPD) (int&, const char *, const int&, const char *,
@@ -493,8 +493,8 @@
     octave_cv_lib_arpack_ok=yes,
     octave_cv_lib_arpack_ok=no,
     octave_cv_lib_arpack_ok=yes)
+    AC_LANG_POP(C++)
   ])
-  AC_LANG_POP(C++)
   if test "$octave_cv_lib_arpack_ok" = "yes"; then
     $1
   else