Mercurial > hg > octave-lyh
comparison m4/acinclude.m4 @ 15294: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 |
comparison
equal
deleted
inserted
replaced
15293:2981cdbb955f | 15294:d1751eee9a42 |
---|---|
355 dnl with the buggy ARPACK library but the C++ program does. Maybe it | 355 dnl with the buggy ARPACK library but the C++ program does. Maybe it |
356 dnl is the memory allocation that exposes the bug and using statically | 356 dnl is the memory allocation that exposes the bug and using statically |
357 dnl allocated arrays in Fortran does not? | 357 dnl allocated arrays in Fortran does not? |
358 dnl | 358 dnl |
359 AC_DEFUN([OCTAVE_CHECK_LIB_ARPACK_OK], [ | 359 AC_DEFUN([OCTAVE_CHECK_LIB_ARPACK_OK], [ |
360 AC_LANG_PUSH(C++) | |
361 AC_CACHE_CHECK([whether the arpack library works], | 360 AC_CACHE_CHECK([whether the arpack library works], |
362 [octave_cv_lib_arpack_ok], | 361 [octave_cv_lib_arpack_ok], |
363 [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ | 362 [AC_LANG_PUSH(C++) |
363 AC_RUN_IFELSE([AC_LANG_PROGRAM([[ | |
364 // External functions from ARPACK library | 364 // External functions from ARPACK library |
365 extern "C" int | 365 extern "C" int |
366 F77_FUNC (dnaupd, DNAUPD) (int&, const char *, const int&, const char *, | 366 F77_FUNC (dnaupd, DNAUPD) (int&, const char *, const int&, const char *, |
367 int&, const double&, double*, const int&, | 367 int&, const double&, double*, const int&, |
368 double*, const int&, int*, int*, double*, | 368 double*, const int&, int*, int*, double*, |
491 doit (); | 491 doit (); |
492 ]])], | 492 ]])], |
493 octave_cv_lib_arpack_ok=yes, | 493 octave_cv_lib_arpack_ok=yes, |
494 octave_cv_lib_arpack_ok=no, | 494 octave_cv_lib_arpack_ok=no, |
495 octave_cv_lib_arpack_ok=yes) | 495 octave_cv_lib_arpack_ok=yes) |
496 ]) | 496 AC_LANG_POP(C++) |
497 AC_LANG_POP(C++) | 497 ]) |
498 if test "$octave_cv_lib_arpack_ok" = "yes"; then | 498 if test "$octave_cv_lib_arpack_ok" = "yes"; then |
499 $1 | 499 $1 |
500 else | 500 else |
501 $2 | 501 $2 |
502 fi | 502 fi |