Blame m4/ax_cxx_have_isfinite.m4

Packit Service e31359
dnl @synopsis AX_CXX_HAVE_ISFINITE
Packit Service e31359
dnl
Packit Service e31359
dnl If isfinite() is available to the C++ compiler:
Packit Service e31359
dnl   define HAVE_ISFINITE
Packit Service e31359
dnl   add "-lm" to LIBS
Packit Service e31359
dnl
Packit Service e31359
AC_DEFUN([AX_CXX_HAVE_ISFINITE],
Packit Service e31359
  [ax_cxx_have_isfinite_save_LIBS=$LIBS
Packit Service e31359
   LIBS="$LIBS -lm"
Packit Service e31359
Packit Service e31359
   AC_CACHE_CHECK(for isfinite, ax_cv_cxx_have_isfinite,
Packit Service e31359
    [AC_LANG_SAVE
Packit Service e31359
     AC_LANG_CPLUSPLUS
Packit Service e31359
     AC_LINK_IFELSE(
Packit Service e31359
       [AC_LANG_PROGRAM(
Packit Service e31359
         [[#include <math.h>]],
Packit Service e31359
         [[int f = isfinite( 3 );]])],
Packit Service e31359
       [ax_cv_cxx_have_isfinite=yes],
Packit Service e31359
       [ax_cv_cxx_have_isfinite=no])
Packit Service e31359
     AC_LANG_RESTORE])
Packit Service e31359
Packit Service e31359
   if test "$ax_cv_cxx_have_isfinite" = yes; then
Packit Service e31359
     AC_DEFINE([HAVE_ISFINITE],1,[define if compiler has isfinite])
Packit Service e31359
   else
Packit Service e31359
     LIBS=$ax_cxx_have_isfinite_save_LIBS
Packit Service e31359
   fi
Packit Service e31359
])