Index: kde-2.0.1/koffice-2.0.1/kspread/plugins/calculator/kcalc_core.cpp
diff -c kde-2.0.1/koffice-2.0.1/kspread/plugins/calculator/kcalc_core.cpp:1.1.1.1 kde-2.0.1/koffice-2.0.1/kspread/plugins/calculator/kcalc_core.cpp:1.3
*** kde-2.0.1/koffice-2.0.1/kspread/plugins/calculator/kcalc_core.cpp:1.1.1.1	Tue Dec  5 16:03:37 2000
--- kde-2.0.1/koffice-2.0.1/kspread/plugins/calculator/kcalc_core.cpp	Tue Jan 23 18:19:33 2001
***************
*** 57,63 ****
--- 57,72 ----
  #include <math.h>
  #endif
  
+ #if defined (_AIX) && !defined(_AIX51)
+ /* AIX v4 finite() is broken if you declare a prototype. */
+ #undef HAVE_FUNC_FINITE
+ #endif 
+ 
+ #ifdef HAVE_FUNC_FINITE
  int isinf(double x) { return !finite(x) && x==x; }
+ #else
+ int isinf(double x) { return false; }
+ #endif /* HAVE_FUNC_FINITE */
  #endif
  
  extern QList<CALCAMNT> temp_stack;
Index: kde-2.0.1/koffice-2.0.1/configure.in
diff -c kde-2.0.1/koffice-2.0.1/configure.in:1.1 kde-2.0.1/koffice-2.0.1/configure.in:1.2
*** kde-2.0.1/koffice-2.0.1/configure.in:1.1	Tue Dec  5 16:02:55 2000
--- kde-2.0.1/koffice-2.0.1/configure.in	Tue Jan 23 16:09:09 2001
***************
*** 165,170 ****
--- 165,173 ----
  AC_CHECK_LIB(m, isinf, [
    AC_DEFINE_UNQUOTED(HAVE_FUNC_ISINF, 1, [Define if you have isinf])
  ])
+ AC_CHECK_LIB(m, finite, [
+   AC_DEFINE_UNQUOTED(HAVE_FUNC_FINITE, 1, [Define if you have finite])
+ ])
  KOML_INCLUDES='-I$(top_srcdir)/lib/koml -I$(top_builddir)/lib/koml'
  AC_SUBST(KOML_INCLUDES)
  
Index: kde-2.0.1/koffice-2.0.1/configure
diff -c kde-2.0.1/koffice-2.0.1/configure:1.1 kde-2.0.1/koffice-2.0.1/configure:1.2
*** kde-2.0.1/koffice-2.0.1/configure:1.1	Tue Dec  5 16:02:55 2000
--- kde-2.0.1/koffice-2.0.1/configure	Tue Jan 23 16:09:09 2001
***************
*** 7063,7068 ****
--- 7063,7112 ----
    echo "$ac_t""no" 1>&6
  fi
  
+ echo $ac_n "checking for finite in -lm""... $ac_c" 1>&6
+ echo "configure:1197: checking for finite in -lm" >&5
+ ac_lib_var=`echo m'_'finite | sed 'y%./+-%__p_%'`
+ if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   ac_save_LIBS="$LIBS"
+ LIBS="-lm  $LIBS"
+ cat > conftest.$ac_ext <<EOF
+ #line 7074 "configure"
+ #include "confdefs.h"
+ /* Override any gcc2 internal prototype to avoid an error.  */
+ /* We use char because int might match the return type of a gcc2
+     builtin and then its argument prototype would still apply.  */
+ char finite();
+ 
+ int main() {
+ finite()
+ ; return 0; }
+ EOF
+ if { (eval echo configure:1216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   rm -rf conftest*
+   eval "ac_cv_lib_$ac_lib_var=yes"
+ else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
+   rm -rf conftest*
+   eval "ac_cv_lib_$ac_lib_var=no"
+ fi
+ rm -f conftest*
+ LIBS="$ac_save_LIBS"
+ 
+ fi
+ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+   echo "$ac_t""yes" 1>&6
+   
+   cat >> confdefs.h <<EOF
+ #define HAVE_FUNC_FINITE 1
+ EOF
+ 
+ 
+ else
+   echo "$ac_t""no" 1>&6
+ fi
  KOML_INCLUDES='-I$(top_srcdir)/lib/koml -I$(top_builddir)/lib/koml'
  
  
***************
*** 7113,7119 ****
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 7117 "configure"
  #include "confdefs.h"
  #include <$ac_hdr>
  EOF
--- 7157,7163 ----
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 7159 "configure"
  #include "confdefs.h"
  #include <$ac_hdr>
  EOF
