--- libinterp/dldfcn/amd.cc.orig	2014-09-10 15:17:06.000000000 -0300
+++ libinterp/dldfcn/amd.cc	2014-09-10 16:30:56.255948578 -0300
@@ -164,11 +164,11 @@
 
               // FIXME: how can we manage the memory allocation of amd
               //        in a cleaner manner?
-              amd_malloc = malloc;
-              amd_free = free;
-              amd_calloc = calloc;
-              amd_realloc = realloc;
-              amd_printf = printf;
+              suitesparse_assign_function(malloc_func, amd_malloc, malloc);
+              suitesparse_assign_function(free_func, amd_free, free);
+              suitesparse_assign_function(calloc_func, amd_calloc, calloc);
+              suitesparse_assign_function(realloc_func, amd_realloc, realloc);
+              suitesparse_assign_function(printf_func, amd_printf, printf);
 
               octave_idx_type result = AMD_NAME (_order) (n_col, cidx, ridx, P,
                                                           Control, Info);
--- libinterp/dldfcn/symbfact.cc.orig	2014-09-11 12:57:04.000000000 -0300
+++ libinterp/dldfcn/symbfact.cc	2014-09-11 15:08:21.934923716 -0300
@@ -114,17 +114,17 @@
   if (spu == 0.)
     {
       cm->print = -1;
-      cm->print_function = 0;
+      suitesparse_assign_function(printf_func, cm->print_function, 0);
     }
   else
     {
       cm->print = static_cast<int> (spu) + 2;
-      cm->print_function =&SparseCholPrint;
+      suitesparse_assign_function(printf_func, cm->print_function, &SparseCholPrint);
     }
 
   cm->error_handler = &SparseCholError;
-  cm->complex_divide = CHOLMOD_NAME(divcomplex);
-  cm->hypotenuse = CHOLMOD_NAME(hypot);
+  suitesparse_assign_function2(divcomplex_func, cm->complex_divide, divcomplex);
+  suitesparse_assign_function2(hypot_func, cm->hypotenuse, hypot);
 
   double dummy;
   cholmod_sparse Astore;
--- liboctave/array/CSparse.cc.orig	2014-09-10 19:39:08.000000000 -0300
+++ liboctave/array/CSparse.cc	2014-09-10 23:13:26.776025529 -0300
@@ -5664,17 +5674,17 @@
           if (spu == 0.)
             {
               cm->print = -1;
-              cm->print_function = 0;
+              suitesparse_assign_function(printf_func, cm->print_function, 0);
             }
           else
             {
               cm->print = static_cast<int> (spu) + 2;
-              cm->print_function =&SparseCholPrint;
+              suitesparse_assign_function(printf_func, cm->print_function, &SparseCholPrint);
             }
 
           cm->error_handler = &SparseCholError;
-          cm->complex_divide = CHOLMOD_NAME(divcomplex);
-          cm->hypotenuse = CHOLMOD_NAME(hypot);
+          suitesparse_assign_function2(divcomplex_func, cm->complex_divide, divcomplex);
+          suitesparse_assign_function2(hypot_func, cm->hypotenuse, hypot);
 
           cm->final_ll = true;
 
@@ -5907,17 +5917,17 @@
           if (spu == 0.)
             {
               cm->print = -1;
-              cm->print_function = 0;
+              suitesparse_assign_function(printf_func, cm->print_function, 0);
             }
           else
             {
               cm->print = static_cast<int> (spu) + 2;
-              cm->print_function =&SparseCholPrint;
+              suitesparse_assign_function(printf_func, cm->print_function, &SparseCholPrint);
             }
 
           cm->error_handler = &SparseCholError;
-          cm->complex_divide = CHOLMOD_NAME(divcomplex);
-          cm->hypotenuse = CHOLMOD_NAME(hypot);
+          suitesparse_assign_function2(divcomplex_func, cm->complex_divide, divcomplex);
+          suitesparse_assign_function2(hypot_func, cm->hypotenuse, hypot);
 
           cm->final_ll = true;
 
@@ -6198,17 +6208,17 @@
           if (spu == 0.)
             {
               cm->print = -1;
-              cm->print_function = 0;
+              suitesparse_assign_function(printf_func, cm->print_function, 0);
             }
           else
             {
               cm->print = static_cast<int> (spu) + 2;
-              cm->print_function =&SparseCholPrint;
+              suitesparse_assign_function(printf_func, cm->print_function, &SparseCholPrint);
             }
 
           cm->error_handler = &SparseCholError;
-          cm->complex_divide = CHOLMOD_NAME(divcomplex);
-          cm->hypotenuse = CHOLMOD_NAME(hypot);
+          suitesparse_assign_function2(divcomplex_func, cm->complex_divide, divcomplex);
+          suitesparse_assign_function2(hypot_func, cm->hypotenuse, hypot);
 
           cm->final_ll = true;
 
@@ -6420,17 +6430,17 @@
           if (spu == 0.)
             {
               cm->print = -1;
-              cm->print_function = 0;
+              suitesparse_assign_function(printf_func, cm->print_function, 0);
             }
           else
             {
               cm->print = static_cast<int> (spu) + 2;
-              cm->print_function =&SparseCholPrint;
+              suitesparse_assign_function(printf_func, cm->print_function, &SparseCholPrint);
             }
 
           cm->error_handler = &SparseCholError;
-          cm->complex_divide = CHOLMOD_NAME(divcomplex);
-          cm->hypotenuse = CHOLMOD_NAME(hypot);
+          suitesparse_assign_function2(divcomplex_func, cm->complex_divide, divcomplex);
+          suitesparse_assign_function2(hypot_func, cm->hypotenuse, hypot);
 
           cm->final_ll = true;
 
--- liboctave/array/dSparse.cc.orig	2014-09-10 19:39:08.000000000 -0300
+++ liboctave/array/dSparse.cc	2014-09-10 23:08:26.606778161 -0300
@@ -5866,17 +5876,17 @@
           if (spu == 0.)
             {
               cm->print = -1;
-              cm->print_function = 0;
+              suitesparse_assign_function(printf_func, cm->print_function, 0);
             }
           else
             {
               cm->print = static_cast<int> (spu) + 2;
-              cm->print_function =&SparseCholPrint;
+              suitesparse_assign_function(printf_func, cm->print_function, &SparseCholPrint);
             }
 
           cm->error_handler = &SparseCholError;
-          cm->complex_divide = CHOLMOD_NAME(divcomplex);
-          cm->hypotenuse = CHOLMOD_NAME(hypot);
+          suitesparse_assign_function2(divcomplex_func, cm->complex_divide, divcomplex);
+          suitesparse_assign_function2(hypot_func, cm->hypotenuse, hypot);
 
           cm->final_ll = true;
 
@@ -6083,17 +6093,17 @@
           if (spu == 0.)
             {
               cm->print = -1;
-              cm->print_function = 0;
+              suitesparse_assign_function(printf_func, cm->print_function, 0);
             }
           else
             {
               cm->print = static_cast<int> (spu) + 2;
-              cm->print_function =&SparseCholPrint;
+              suitesparse_assign_function(printf_func, cm->print_function, &SparseCholPrint);
             }
 
           cm->error_handler = &SparseCholError;
-          cm->complex_divide = CHOLMOD_NAME(divcomplex);
-          cm->hypotenuse = CHOLMOD_NAME(hypot);
+          suitesparse_assign_function2(divcomplex_func, cm->complex_divide, divcomplex);
+          suitesparse_assign_function2(hypot_func, cm->hypotenuse, hypot);
 
           cm->final_ll = true;
 
@@ -6345,17 +6355,17 @@
           if (spu == 0.)
             {
               cm->print = -1;
-              cm->print_function = 0;
+              suitesparse_assign_function(printf_func, cm->print_function, 0);
             }
           else
             {
               cm->print = static_cast<int> (spu) + 2;
-              cm->print_function =&SparseCholPrint;
+              suitesparse_assign_function(printf_func, cm->print_function, &SparseCholPrint);
             }
 
           cm->error_handler = &SparseCholError;
-          cm->complex_divide = CHOLMOD_NAME(divcomplex);
-          cm->hypotenuse = CHOLMOD_NAME(hypot);
+          suitesparse_assign_function2(divcomplex_func, cm->complex_divide, divcomplex);
+          suitesparse_assign_function2(hypot_func, cm->hypotenuse, hypot);
 
           cm->final_ll = true;
 
@@ -6579,17 +6589,17 @@
           if (spu == 0.)
             {
               cm->print = -1;
-              cm->print_function = 0;
+              suitesparse_assign_function(printf_func, cm->print_function, 0);
             }
           else
             {
               cm->print = static_cast<int> (spu) + 2;
-              cm->print_function =&SparseCholPrint;
+              suitesparse_assign_function(printf_func, cm->print_function, &SparseCholPrint);
             }
 
           cm->error_handler = &SparseCholError;
-          cm->complex_divide = CHOLMOD_NAME(divcomplex);
-          cm->hypotenuse = CHOLMOD_NAME(hypot);
+          suitesparse_assign_function2(divcomplex_func, cm->complex_divide, divcomplex);
+          suitesparse_assign_function2(hypot_func, cm->hypotenuse, hypot);
 
           cm->final_ll = true;
 
--- liboctave/numeric/sparse-base-chol.cc.orig	2014-09-10 19:39:08.000000000 -0300
+++ liboctave/numeric/sparse-base-chol.cc	2014-09-10 23:51:18.631623425 -0300
@@ -105,17 +116,17 @@
   if (spu == 0.)
     {
       cm->print = -1;
-      cm->print_function = 0;
+      suitesparse_assign_function(printf_func, cm->print_function, 0);
     }
   else
     {
       cm->print = static_cast<int> (spu) + 2;
-      cm->print_function =&SparseCholPrint;
+      suitesparse_assign_function(printf_func, cm->print_function, &SparseCholPrint);
     }
 
   cm->error_handler = &SparseCholError;
-  cm->complex_divide = CHOLMOD_NAME(divcomplex);
-  cm->hypotenuse = CHOLMOD_NAME(hypot);
+  suitesparse_assign_function2(divcomplex_func, cm->complex_divide, divcomplex);
+  suitesparse_assign_function2(hypot_func, cm->hypotenuse, hypot);
 
   cm->final_asis = false;
   cm->final_super = false;
--- liboctave/util/oct-sparse.h.orig	2014-09-10 19:39:07.000000000 -0300
+++ liboctave/util/oct-sparse.h	2014-09-11 10:39:03.332928647 -0300
@@ -94,4 +94,14 @@
 #endif
 #endif
 
+// Cope with new suitesparse versions
+//
+#if defined( SUITESPARSE_VERSION ) && SUITESPARSE_VERSION >= SUITESPARSE_VER_CODE(4,3)
+#define suitesparse_assign_function(f_name,f_var,f_assign) (SuiteSparse_config.f_name = f_assign)
+#define suitesparse_assign_function2(f_name,f_var,f_assign) (SuiteSparse_config.f_name = SuiteSparse_##f_assign)
+#else
+#define suitesparse_assign_function(f_name,f_var,f_assign) (f_var = f_assign)
+#define suitesparse_assign_function2(f_name,f_var,f_assign) (f_var = CHOLMOD_NAME(f_assign))
+#endif
+
 #endif
