diff -uNr files.orig/patch-configure files/patch-configure
--- files.orig/patch-configure	2006-11-07 18:07:20.000000000 -0500
+++ files/patch-configure	2007-10-18 10:20:57.000000000 -0400
@@ -1,6 +1,7 @@
---- octave-2.9.9.orig/configure	2006-10-02 13:04:13.000000000 -0700
-+++ octave-2.9.9/configure	2006-11-07 00:28:15.000000000 -0800
-@@ -17238,7 +17238,7 @@
+diff -uNr octave-2.9.15.orig/configure octave-2.9.15/configure
+--- octave-2.9.15.orig/configure	2007-10-17 13:33:17.000000000 -0400
++++ octave-2.9.15/configure	2007-10-17 13:31:50.000000000 -0400
+@@ -16134,7 +16134,7 @@
  { echo "$as_me:$LINENO: result: $ac_cv_lib_cholmod_cholmod_start" >&5
  echo "${ECHO_T}$ac_cv_lib_cholmod_cholmod_start" >&6; }
  if test $ac_cv_lib_cholmod_cholmod_start = yes; then
@@ -9,7 +10,7 @@
  	with_cholmod=yes
  else
  
-@@ -17328,7 +17328,7 @@
+@@ -16208,7 +16208,7 @@
  { echo "$as_me:$LINENO: result: $ac_cv_lib_cholmod_cholmod_start" >&5
  echo "${ECHO_T}$ac_cv_lib_cholmod_cholmod_start" >&6; }
  if test $ac_cv_lib_cholmod_cholmod_start = yes; then
@@ -18,7 +19,7 @@
  fi
  
  fi
-@@ -17420,7 +17420,7 @@
+@@ -16284,7 +16284,7 @@
  { echo "$as_me:$LINENO: result: $ac_cv_lib_cholmod_cholmod_start" >&5
  echo "${ECHO_T}$ac_cv_lib_cholmod_cholmod_start" >&6; }
  if test $ac_cv_lib_cholmod_cholmod_start = yes; then
@@ -27,7 +28,7 @@
  	with_cholmod=yes
  else
  
-@@ -17510,7 +17510,7 @@
+@@ -16358,7 +16358,7 @@
  { echo "$as_me:$LINENO: result: $ac_cv_lib_cholmod_cholmod_start" >&5
  echo "${ECHO_T}$ac_cv_lib_cholmod_cholmod_start" >&6; }
  if test $ac_cv_lib_cholmod_cholmod_start = yes; then
@@ -36,22 +37,12 @@
  	  with_cholmod=yes
  fi
  
-@@ -17919,7 +17919,7 @@
+@@ -16757,7 +16757,7 @@
      RLD_FLAG='-Wl,-rpath -Wl,$(octlibdir)'
    ;;
    *-*-darwin*)
 -    DL_LDFLAGS='-bundle -bundle_loader $(TOPDIR)/src/octave $(LDFLAGS)'
 +    DL_LDFLAGS='$(LDFLAGS) -bundle -bundle_loader $(TOPDIR)/src/octave'
-     MKOCTFILE_DL_LDFLAGS='-bundle -bundle_loader $(bindir)/octave-$(version)$(EXEEXT)'
+     MKOCTFILE_DL_LDFLAGS='-bundle -bundle_loader $$BINDIR/octave-$$OCTAVE_VERSION$$EXEEXT'
      SH_LDFLAGS='-dynamiclib -single_module $(LDFLAGS)'
      CXXPICFLAG=
-@@ -30652,9 +30652,6 @@
- 
- 
- case "$canonical_host_type" in
--  *-*-darwin*)
--    UGLY_DEFS=`echo $DEFS | sed 's,\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",g'`
--  ;;
-   *)
-     UGLY_DEFS=`echo $DEFS | sed 's,\\",\\\\\\\\\\\\\\\\\\",g'`
-   ;;
diff -uNr files.orig/patch-configure-2 files/patch-configure-2
--- files.orig/patch-configure-2	2007-02-27 05:31:59.000000000 -0500
+++ files/patch-configure-2	2007-10-18 11:24:01.000000000 -0400
@@ -1,10 +1,11 @@
---- octave-2.9.9.orig/configure	2007-02-27 01:55:00.000000000 -0800
-+++ octave-2.9.9/configure	2007-02-27 01:55:37.000000000 -0800
-@@ -10788,9 +10788,9 @@
+diff -uNr octave-2.9.15.orig/configure octave-2.9.15/configure
+--- octave-2.9.15.orig/configure	2007-10-18 11:17:52.000000000 -0400
++++ octave-2.9.15/configure	2007-10-18 11:19:19.000000000 -0400
+@@ -10242,9 +10242,9 @@
+ #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+ _ACEOF
  
- GLPK_LIBS=
- if test -n "$glpk_lib"; then
--  as_ac_Lib=`echo "ac_cv_lib_$glpk_lib''_glp_lpx_simplex" | $as_tr_sh`
+-    as_ac_Lib=`echo "ac_cv_lib_$glpk_lib''_glp_lpx_simplex" | $as_tr_sh`
 -{ echo "$as_me:$LINENO: checking for glp_lpx_simplex in -l$glpk_lib" >&5
 -echo $ECHO_N "checking for glp_lpx_simplex in -l$glpk_lib... $ECHO_C" >&6; }
 +  as_ac_Lib=`echo "ac_cv_lib_$glpk_lib''__glp_lpx_simplex" | $as_tr_sh`
@@ -13,7 +14,7 @@
  if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
-@@ -10809,11 +10809,11 @@
+@@ -10263,11 +10263,11 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -27,3 +28,12 @@
    ;
    return 0;
  }
+@@ -10310,7 +10310,7 @@
+       GLPK_LIBS="-l$glpk_lib"
+ 
+ cat >>confdefs.h <<\_ACEOF
+-#define GLPK_PRE_4_14 1
++#undef  GLPK_PRE_4_14
+ _ACEOF
+ 
+ else
diff -uNr files.orig/patch-configure-3 files/patch-configure-3
--- files.orig/patch-configure-3	2007-02-27 20:21:12.000000000 -0500
+++ files/patch-configure-3	1969-12-31 19:00:00.000000000 -0500
@@ -1,11 +0,0 @@
---- octave-2.9.9.orig/configure	2007-02-26 12:22:12.000000000 -0800
-+++ octave-2.9.9/configure	2007-02-26 12:25:42.000000000 -0800
-@@ -30253,7 +30253,7 @@
-     fi
-     { echo "$as_me:$LINENO: checking to see if your gnuplot supports multiple plot windows" >&5
- echo $ECHO_N "checking to see if your gnuplot supports multiple plot windows... $ECHO_C" >&6; }
--    if test -z "`echo 'set term x11 2' | $GNUPLOT_BINARY 2>&1`"; then
-+    if test -z "`echo 'set term aqua 2' | $GNUPLOT_BINARY 2>&1`"; then
-       { echo "$as_me:$LINENO: result: yes" >&5
- echo "${ECHO_T}yes" >&6; }
-     else
diff -uNr files.orig/patch-dynamic-ld-cc files/patch-dynamic-ld-cc
--- files.orig/patch-dynamic-ld-cc	2007-02-26 03:32:14.000000000 -0500
+++ files/patch-dynamic-ld-cc	2007-10-17 20:13:18.000000000 -0400
@@ -1,6 +1,7 @@
---- octave-2.9.9.orig/src/dynamic-ld.cc	2007-02-25 19:16:09.000000000 +0100
-+++ octave-2.9.9/src/dynamic-ld.cc	2007-02-25 18:44:29.000000000 +0100
-@@ -406,7 +406,11 @@
+diff -uNr octave-2.9.15.orig/src/dynamic-ld.cc octave-2.9.15/src/dynamic-ld.cc
+--- octave-2.9.15.orig/src/dynamic-ld.cc	2007-10-12 17:27:29.000000000 -0400
++++ octave-2.9.15/src/dynamic-ld.cc	2007-10-17 20:11:54.000000000 -0400
+@@ -443,7 +443,11 @@
  	    {
  	      octave_mex_file_list::append (mex_file);
  
diff -uNr files.orig/patch-glpk files/patch-glpk
--- files.orig/patch-glpk	2007-02-27 09:31:39.000000000 -0500
+++ files/patch-glpk	1969-12-31 19:00:00.000000000 -0500
@@ -1,46 +0,0 @@
---- octave-2.9.9.orig/src/DLD-FUNCTIONS/__glpk__.cc	2007-02-27 03:47:14.000000000 -0800
-+++ octave-2.9.9/src/DLD-FUNCTIONS/__glpk__.cc	2007-02-27 03:48:53.000000000 -0800
-@@ -38,8 +38,10 @@
- 
- #if defined (HAVE_GLPK)
- 
--extern "C" {
- #include <glpk.h>
-+extern "C" {
-+  void _glp_lib_print_hook(int (*func)(void *info, char *buf), void *info);
-+  void _glp_lib_fault_hook(int (*func)(void *info, char *buf), void *info); 
- }
- 
- #define NIntP 17
-@@ -141,10 +143,10 @@
- 
-   clock_t t_start = clock();
- 
--  lib_set_fault_hook (NULL, glpk_fault_hook);
-+  _glp_lib_fault_hook (glpk_fault_hook, NULL);
- 
-   if (lpxIntParam[0] > 1)
--    lib_set_print_hook (NULL, glpk_print_hook);
-+    _glp_lib_print_hook (glpk_print_hook, NULL);
- 
-   LPX *lp = lpx_create_prob ();
- 
-@@ -277,7 +279,7 @@
-       break;
- 
-     default:
--      insist (method != method);
-+      glpk_fault_hook (NULL, "method != method");
-     }
- 
-   /*  errnum assumes the following results:
-@@ -342,7 +344,8 @@
- 	}
- 
-       *time = (clock () - t_start) / CLOCKS_PER_SEC;
--      *mem = (lib_env_ptr () -> mem_tpeak);
-+      /* currently there is no way to determine memory usage */
-+      *mem = 0;
- 
-       lpx_delete_prob (lp);
-       return 0;
diff -uNr files.orig/patch-glpk.m files/patch-glpk.m
--- files.orig/patch-glpk.m	2007-02-27 20:21:12.000000000 -0500
+++ files/patch-glpk.m	1969-12-31 19:00:00.000000000 -0500
@@ -1,12 +0,0 @@
---- octave-2.9.9.orig/scripts/optimization/glpk.m	2007-02-26 13:30:39.000000000 -0800
-+++ octave-2.9.9/scripts/optimization/glpk.m	2007-02-26 13:32:37.000000000 -0800
-@@ -361,7 +361,8 @@
- ## @item time
- ## Time (in seconds) used for solving LP/MIP problem.
- ## @item mem
--## Memory (in bytes) used for solving LP/MIP problem.
-+## Memory (in bytes) used for solving LP/MIP problem (this is not 
-+## available if the version of GLPK is 4.15 or later)
- ## @end table
- ## @end table
- ## 

