Description: <short summary of the patch>
 TODO: Put a short summary on the line above and replace this paragraph
 with a longer explanation of this change. Complete the meta-information
 with other relevant fields (see below for details). To make it easier, the
 information below has been extracted from the changelog. Adjust it or drop
 it.
 .
 gcl (2.6.10-23) unstable; urgency=high
 .
   * try default gcc 4.9
   * access libopcodes without link dependency via dlopen
   * Bug fix: "please switch to emacs24", thanks to Gabriele Giacone
     (Closes: #754012).
Author: Camm Maguire <camm@debian.org>
Bug-Debian: http://bugs.debian.org/754012

---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: http://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: <YYYY-MM-DD>

--- gcl-2.6.10.orig/configure
+++ gcl-2.6.10/configure
@@ -8513,7 +8513,8 @@ if test "x$ac_cv_header_dis_asm_h" = xye
   cat >>confdefs.h <<_ACEOF
 #define HAVE_DIS_ASM_H 1
 _ACEOF
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for init_disassemble_info in -lopcodes" >&5
+ MLIBS=$LIBS
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for init_disassemble_info in -lopcodes" >&5
 $as_echo_n "checking for init_disassemble_info in -lopcodes... " >&6; }
 if ${ac_cv_lib_opcodes_init_disassemble_info+:} false; then :
   $as_echo_n "(cached) " >&6
@@ -8558,228 +8559,56 @@ _ACEOF
 
 fi
 
-	for ac_func in print_insn_alpha
-do :
-  ac_fn_c_check_func "$LINENO" "print_insn_alpha" "ac_cv_func_print_insn_alpha"
-if test "x$ac_cv_func_print_insn_alpha" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_PRINT_INSN_ALPHA 1
-_ACEOF
-
-$as_echo "#define PRINT_INSN print_insn_alpha" >>confdefs.h
-
-else
-  for ac_func in print_insn_avr
-do :
-  ac_fn_c_check_func "$LINENO" "print_insn_avr" "ac_cv_func_print_insn_avr"
-if test "x$ac_cv_func_print_insn_avr" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_PRINT_INSN_AVR 1
-_ACEOF
-
-$as_echo "#define PRINT_INSN print_insn_avr" >>confdefs.h
-
-else
-  for ac_func in print_insn_big_arm
-do :
-  ac_fn_c_check_func "$LINENO" "print_insn_big_arm" "ac_cv_func_print_insn_big_arm"
-if test "x$ac_cv_func_print_insn_big_arm" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_PRINT_INSN_BIG_ARM 1
-_ACEOF
-
-$as_echo "#define PRINT_INSN insn_big_arm" >>confdefs.h
-
-else
-  for ac_func in print_insn_big_mips
-do :
-  ac_fn_c_check_func "$LINENO" "print_insn_big_mips" "ac_cv_func_print_insn_big_mips"
-if test "x$ac_cv_func_print_insn_big_mips" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_PRINT_INSN_BIG_MIPS 1
-_ACEOF
-
-$as_echo "#define PRINT_INSN insn_big_mips" >>confdefs.h
-
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
+$as_echo_n "checking for dlopen in -ldl... " >&6; }
+if ${ac_cv_lib_dl_dlopen+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  for ac_func in print_insn_big_powerpc
-do :
-  ac_fn_c_check_func "$LINENO" "print_insn_big_powerpc" "ac_cv_func_print_insn_big_powerpc"
-if test "x$ac_cv_func_print_insn_big_powerpc" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_PRINT_INSN_BIG_POWERPC 1
-_ACEOF
-
-$as_echo "#define PRINT_INSN insn_big_powerpc" >>confdefs.h
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-else
-  for ac_func in print_insn_hppa
-do :
-  ac_fn_c_check_func "$LINENO" "print_insn_hppa" "ac_cv_func_print_insn_hppa"
-if test "x$ac_cv_func_print_insn_hppa" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_PRINT_INSN_HPPA 1
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+  ;
+  return 0;
+}
 _ACEOF
-
-$as_echo "#define PRINT_INSN print_insn_hppa" >>confdefs.h
-
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_dl_dlopen=yes
 else
-  for ac_func in print_insn_i386
+  ac_cv_lib_dl_dlopen=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
+$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
+if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
+  #opcodes changes too quickly to link directly
+		for ac_func in print_insn_i386
 do :
   ac_fn_c_check_func "$LINENO" "print_insn_i386" "ac_cv_func_print_insn_i386"
 if test "x$ac_cv_func_print_insn_i386" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_PRINT_INSN_I386 1
 _ACEOF
-
-$as_echo "#define PRINT_INSN print_insn_i386" >>confdefs.h
-
-else
-  for ac_func in print_insn_ia64
-do :
-  ac_fn_c_check_func "$LINENO" "print_insn_ia64" "ac_cv_func_print_insn_ia64"
-if test "x$ac_cv_func_print_insn_ia64" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_PRINT_INSN_IA64 1
-_ACEOF
-
-$as_echo "#define PRINT_INSN print_insn_ia64" >>confdefs.h
-
-else
-  for ac_func in print_insn_little_arm
-do :
-  ac_fn_c_check_func "$LINENO" "print_insn_little_arm" "ac_cv_func_print_insn_little_arm"
-if test "x$ac_cv_func_print_insn_little_arm" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_PRINT_INSN_LITTLE_ARM 1
-_ACEOF
-
-$as_echo "#define PRINT_INSN insn_little_arm" >>confdefs.h
-
-else
-  for ac_func in print_insn_little_mips
-do :
-  ac_fn_c_check_func "$LINENO" "print_insn_little_mips" "ac_cv_func_print_insn_little_mips"
-if test "x$ac_cv_func_print_insn_little_mips" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_PRINT_INSN_LITTLE_MIPS 1
-_ACEOF
-
-$as_echo "#define PRINT_INSN insn_little_mips" >>confdefs.h
-
-else
-  for ac_func in print_insn_little_powerpc
-do :
-  ac_fn_c_check_func "$LINENO" "print_insn_little_powerpc" "ac_cv_func_print_insn_little_powerpc"
-if test "x$ac_cv_func_print_insn_little_powerpc" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_PRINT_INSN_LITTLE_POWERPC 1
-_ACEOF
-
-$as_echo "#define PRINT_INSN insn_little_powerpc" >>confdefs.h
-
-else
-  for ac_func in print_insn_m68k
-do :
-  ac_fn_c_check_func "$LINENO" "print_insn_m68k" "ac_cv_func_print_insn_m68k"
-if test "x$ac_cv_func_print_insn_m68k" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_PRINT_INSN_M68K 1
-_ACEOF
-
-$as_echo "#define PRINT_INSN print_insn_m68k" >>confdefs.h
-
-else
-  for ac_func in print_insn_s390
-do :
-  ac_fn_c_check_func "$LINENO" "print_insn_s390" "ac_cv_func_print_insn_s390"
-if test "x$ac_cv_func_print_insn_s390" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_PRINT_INSN_S390 1
-_ACEOF
-
-$as_echo "#define PRINT_INSN print_insn_s390" >>confdefs.h
-
-else
-  for ac_func in print_insn_sh64
-do :
-  ac_fn_c_check_func "$LINENO" "print_insn_sh64" "ac_cv_func_print_insn_sh64"
-if test "x$ac_cv_func_print_insn_sh64" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_PRINT_INSN_SH64 1
-_ACEOF
-
-$as_echo "#define PRINT_INSN print_insn_sh64" >>confdefs.h
-
-else
-  for ac_func in print_insn_sh
-do :
-  ac_fn_c_check_func "$LINENO" "print_insn_sh" "ac_cv_func_print_insn_sh"
-if test "x$ac_cv_func_print_insn_sh" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_PRINT_INSN_SH 1
-_ACEOF
-
-$as_echo "#define PRINT_INSN print_insn_sh" >>confdefs.h
-
-else
-  for ac_func in print_insn_sparc
-do :
-  ac_fn_c_check_func "$LINENO" "print_insn_sparc" "ac_cv_func_print_insn_sparc"
-if test "x$ac_cv_func_print_insn_sparc" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_PRINT_INSN_SPARC 1
-_ACEOF
-
-$as_echo "#define PRINT_INSN print_insn_sparc" >>confdefs.h
-
-fi
-done
-
-fi
-done
-
-fi
-done
-
-fi
-done
-
-fi
-done
-
-fi
-done
-
-fi
-done
-
-fi
-done
-
+ LIBS="$MLIBS -ldl"
 fi
 done
 
 fi
-done
-
-fi
-done
-
-fi
-done
-
-fi
-done
-
-fi
-done
-
-fi
-done
-
-fi
-done
 
 fi
 
--- gcl-2.6.10.orig/configure.in
+++ gcl-2.6.10/configure.in
@@ -2429,23 +2429,10 @@ AC_CHECK_FUNCS(sigaltstack)
 AC_CHECK_FUNCS(feenableexcept)
 
 AC_CHECK_HEADERS(dis-asm.h,
+	MLIBS=$LIBS
 	AC_CHECK_LIB(opcodes,init_disassemble_info)
-	AC_CHECK_FUNCS(print_insn_alpha,AC_DEFINE([PRINT_INSN],[print_insn_alpha],[instruction disassemble routine]),
-	AC_CHECK_FUNCS(print_insn_avr,AC_DEFINE([PRINT_INSN],[print_insn_avr],[instruction disassemble routine]),
-	AC_CHECK_FUNCS(print_insn_big_arm,AC_DEFINE([PRINT_INSN],[insn_big_arm],[instruction disassemble routine]),
-	AC_CHECK_FUNCS(print_insn_big_mips,AC_DEFINE([PRINT_INSN],[insn_big_mips],[instruction disassemble routine]),
-	AC_CHECK_FUNCS(print_insn_big_powerpc,AC_DEFINE([PRINT_INSN],[insn_big_powerpc],[instruction disassemble routine]),
-	AC_CHECK_FUNCS(print_insn_hppa,AC_DEFINE([PRINT_INSN],[print_insn_hppa],[instruction disassemble routine]),
-	AC_CHECK_FUNCS(print_insn_i386,AC_DEFINE([PRINT_INSN],[print_insn_i386],[instruction disassemble routine]),
-	AC_CHECK_FUNCS(print_insn_ia64,AC_DEFINE([PRINT_INSN],[print_insn_ia64],[instruction disassemble routine]),
-	AC_CHECK_FUNCS(print_insn_little_arm,AC_DEFINE([PRINT_INSN],[insn_little_arm],[instruction disassemble routine]),
-	AC_CHECK_FUNCS(print_insn_little_mips,AC_DEFINE([PRINT_INSN],[insn_little_mips],[instruction disassemble routine]),
-	AC_CHECK_FUNCS(print_insn_little_powerpc,AC_DEFINE([PRINT_INSN],[insn_little_powerpc],[instruction disassemble routine]),
-	AC_CHECK_FUNCS(print_insn_m68k,AC_DEFINE([PRINT_INSN],[print_insn_m68k],[instruction disassemble routine]),
-	AC_CHECK_FUNCS(print_insn_s390,AC_DEFINE([PRINT_INSN],[print_insn_s390],[instruction disassemble routine]),
-	AC_CHECK_FUNCS(print_insn_sh64,AC_DEFINE([PRINT_INSN],[print_insn_sh64],[instruction disassemble routine]),
-	AC_CHECK_FUNCS(print_insn_sh,AC_DEFINE([PRINT_INSN],[print_insn_sh],[instruction disassemble routine]),
-	AC_CHECK_FUNCS(print_insn_sparc,AC_DEFINE([PRINT_INSN],[print_insn_sparc],[instruction disassemble routine]))))))))))))))))))
+	AC_CHECK_LIB(dl,dlopen,#opcodes changes too quickly to link directly 
+		AC_CHECK_FUNCS(print_insn_i386,LIBS="$MLIBS -ldl")))
 
 #if test $use = "386-linux" ; then
 	AC_CHECK_HEADERS(asm/sigcontext.h)
--- gcl-2.6.10.orig/h/gclincl.h.in
+++ gcl-2.6.10/h/gclincl.h.in
@@ -177,54 +177,9 @@
 /* output_bfd element present */
 #undef HAVE_OUTPUT_BFD
 
-/* Define to 1 if you have the `print_insn_alpha' function. */
-#undef HAVE_PRINT_INSN_ALPHA
-
-/* Define to 1 if you have the `print_insn_avr' function. */
-#undef HAVE_PRINT_INSN_AVR
-
-/* Define to 1 if you have the `print_insn_big_arm' function. */
-#undef HAVE_PRINT_INSN_BIG_ARM
-
-/* Define to 1 if you have the `print_insn_big_mips' function. */
-#undef HAVE_PRINT_INSN_BIG_MIPS
-
-/* Define to 1 if you have the `print_insn_big_powerpc' function. */
-#undef HAVE_PRINT_INSN_BIG_POWERPC
-
-/* Define to 1 if you have the `print_insn_hppa' function. */
-#undef HAVE_PRINT_INSN_HPPA
-
 /* Define to 1 if you have the `print_insn_i386' function. */
 #undef HAVE_PRINT_INSN_I386
 
-/* Define to 1 if you have the `print_insn_ia64' function. */
-#undef HAVE_PRINT_INSN_IA64
-
-/* Define to 1 if you have the `print_insn_little_arm' function. */
-#undef HAVE_PRINT_INSN_LITTLE_ARM
-
-/* Define to 1 if you have the `print_insn_little_mips' function. */
-#undef HAVE_PRINT_INSN_LITTLE_MIPS
-
-/* Define to 1 if you have the `print_insn_little_powerpc' function. */
-#undef HAVE_PRINT_INSN_LITTLE_POWERPC
-
-/* Define to 1 if you have the `print_insn_m68k' function. */
-#undef HAVE_PRINT_INSN_M68K
-
-/* Define to 1 if you have the `print_insn_s390' function. */
-#undef HAVE_PRINT_INSN_S390
-
-/* Define to 1 if you have the `print_insn_sh' function. */
-#undef HAVE_PRINT_INSN_SH
-
-/* Define to 1 if you have the `print_insn_sh64' function. */
-#undef HAVE_PRINT_INSN_SH64
-
-/* Define to 1 if you have the `print_insn_sparc' function. */
-#undef HAVE_PRINT_INSN_SPARC
-
 /* have putenv call */
 #undef HAVE_PUTENV
 
@@ -387,9 +342,6 @@
 /* system pagewidth */
 #undef PAGEWIDTH
 
-/* instruction disassemble routine */
-#undef PRINT_INSN
-
 /* have sigcontext in signal.h */
 #undef SIGNAL_H_HAS_SIGCONTEXT
 
--- gcl-2.6.10.orig/lsp/gcl_fpe_test.lsp
+++ gcl-2.6.10/lsp/gcl_fpe_test.lsp
@@ -8,35 +8,12 @@
 	 (assert (eql r rr))
 	 (when (and chk cc)
 	   (unless (eq 'fnop (cadr (member :op (arithmetic-error-operation cc))))
-	     (assert (every 'eql (symbol-name f) (symbol-name (cadr (member :op (arithmetic-error-operation cc))))))
+	     (assert (eq (symbol-function f) (cadr (member :fun (arithmetic-error-operation cc)))))
 	     (assert (or (every 'equalp (mapcar (lambda (x) (if (numberp x) x (coerce x 'list))) a)
 				(arithmetic-error-operands cc))
 			 (every 'equalp (nreverse (mapcar (lambda (x) (if (numberp x) x (coerce x 'list))) a))
 				(arithmetic-error-operands cc)))))))))
 
-(defun l/ (x y) (declare (long-float x y)) (/ x y))
-(defun s/ (x y) (declare (short-float x y)) (/ x y))
-(defun lsqrt (x) (declare (long-float x)) (the long-float (sqrt x)))
-
-(test-fpe 'l/ (list 1.0 2.0) 0.5)
-(test-fpe 'l/ (list 1.0 0.0) :division-by-zero)
-(test-fpe 'l/ (list 0.0 0.0) :floating-point-invalid-operation)
-(test-fpe 'l/ (list most-positive-long-float least-positive-normalized-long-float) :floating-point-overflow)
-(test-fpe 'l/ (list least-positive-normalized-long-float most-positive-long-float) :floating-point-underflow)
-(test-fpe 'l/ (list 1.2 1.3) :floating-point-inexact)
-
-(test-fpe 's/ (list 1.0s0 2.0s0) 0.5s0)
-(test-fpe 's/ (list 1.0s0 0.0s0) :division-by-zero)
-(test-fpe 's/ (list 0.0s0 0.0s0) :floating-point-invalid-operation)
-(test-fpe 's/ (list most-positive-short-float least-positive-normalized-short-float) :floating-point-overflow)
-(test-fpe 's/ (list least-positive-normalized-short-float most-positive-short-float) :floating-point-underflow)
-(test-fpe 's/ (list 1.2s0 1.3s0) :floating-point-inexact)
-
-(test-fpe 'lsqrt (list 4.0) 2.0)
-(test-fpe 'lsqrt (list -1.0) :floating-point-invalid-operation)
-(test-fpe 'lsqrt (list 1.2) :floating-point-inexact))
-
-
 #+(or x86_64 i386)
 (progn
   (eval-when
@@ -209,3 +186,27 @@
   (test-fpe 'sqrtpd (list da db dr) dr t)
   (test-fpe 'sqrtpd (list dn db dr) :floating-point-invalid-operation t)
   (test-fpe 'sqrtpd (list da db dr) :floating-point-inexact t))
+
+
+(defun l/ (x y) (declare (long-float x y)) (/ x y))
+(defun s/ (x y) (declare (short-float x y)) (/ x y))
+(defun lsqrt (x) (declare (long-float x)) (the long-float (sqrt x)))
+
+
+(test-fpe 'l/ (list 1.0 2.0) 0.5 t)
+(test-fpe 'l/ (list 1.0 0.0) :division-by-zero t)
+(test-fpe 'l/ (list 0.0 0.0) :floating-point-invalid-operation t)
+(test-fpe 'l/ (list most-positive-long-float least-positive-normalized-long-float) :floating-point-overflow t)
+(test-fpe 'l/ (list least-positive-normalized-long-float most-positive-long-float) :floating-point-underflow t)
+(test-fpe 'l/ (list 1.2 1.3) :floating-point-inexact t)
+
+(test-fpe 's/ (list 1.0s0 2.0s0) 0.5s0 t)
+(test-fpe 's/ (list 1.0s0 0.0s0) :division-by-zero t)
+(test-fpe 's/ (list 0.0s0 0.0s0) :floating-point-invalid-operation t)
+(test-fpe 's/ (list most-positive-short-float least-positive-normalized-short-float) :floating-point-overflow t)
+(test-fpe 's/ (list least-positive-normalized-short-float most-positive-short-float) :floating-point-underflow t)
+(test-fpe 's/ (list 1.2s0 1.3s0) :floating-point-inexact t)
+
+(test-fpe 'lsqrt (list 4.0) 2.0 t)
+(test-fpe 'lsqrt (list -1.0) :floating-point-invalid-operation t)
+(test-fpe 'lsqrt (list 1.2) :floating-point-inexact t)
--- gcl-2.6.10.orig/o/main.c
+++ gcl-2.6.10/o/main.c
@@ -1000,7 +1000,7 @@ init_main(void) {
 #include "writable.h"
 #endif
 
-#ifdef PRINT_INSN
+#ifdef HAVE_PRINT_INSN_I386
 
 #include "dis-asm.h"
 
@@ -1034,6 +1034,8 @@ DEFUN_NEW("DISASSEMBLE-INSTRUCTION",obje
 #ifdef HAVE_PRINT_INSN_I386
 
   static disassemble_info i;
+  void *v;
+  int (*s)();
   int j;
 
   memset(&i,0,sizeof(i));
@@ -1045,15 +1047,19 @@ DEFUN_NEW("DISASSEMBLE-INSTRUCTION",obje
   i.print_address_func=my_pa;
   bp=b;
 
-  j=PRINT_INSN(addr,&i);
-  my_fprintf(NULL," ;");
-  return MMcons(make_simple_string(b),make_fixnum(j));
+  if ((v=dlopen("libopcodes.so",RTLD_NOW))) {
+    if ((s=dlsym(v,"print_insn_i386"))) {
+      j=s(addr,&i);
+      my_fprintf(NULL," ;");
+      return MMcons(make_simple_string(b),make_fixnum(j));
+    }
+    massert(!dlclose(v));
+  }
 
-#else
+#endif
 
   return MMcons(make_simple_string("fnop ;"),make_fixnum(0));
 
-#endif
 }
 
 typedef struct {
