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.
 .
 oaklisp (1.3.6-2) unstable; urgency=medium
 .
   * tweaks to not run LaTeX during build-arch, should help port to 68k
Author: Barak A. Pearlmutter <bap@debian.org>

---
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: https://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>

--- oaklisp-1.3.6.orig/Makefile.am
+++ oaklisp-1.3.6/Makefile.am
@@ -14,7 +14,11 @@
 # or from the Free Software Foundation, 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA
 
-SUBDIRS = src man doc
+SUBDIRS = src man
+
+if DOCS
+SUBDIRS += doc
+endif
 
 doc_DATA = README AUTHORS COPYING BUILD.txt ChangeLog NEWS
 
--- oaklisp-1.3.6.orig/configure.ac
+++ oaklisp-1.3.6/configure.ac
@@ -26,6 +26,13 @@ AC_CONFIG_HEADERS([config.h])
 AM_INIT_AUTOMAKE([subdir-objects -Wall])
 
 # Process options
+AC_MSG_CHECKING([enable_docs])
+AC_ARG_ENABLE([docs],
+       [AS_HELP_STRING([--enable-docs],[build and install LaTeX-format documentation (default=yes)])],,
+       [enable_docs=yes])
+AC_MSG_RESULT([$enable_docs])
+AM_CONDITIONAL([DOCS], [test x${enable_docs} = xyes])
+
 AC_MSG_CHECKING([enable_ndebug])
 AC_ARG_ENABLE([ndebug],
        [AS_HELP_STRING([--enable-ndebug],[enable high speed disable debugging (default=yes)])],,
@@ -74,12 +81,12 @@ AS_IF([test x${with_oaklisp} = xcheck ||
 # The options here are for GCC, but -m32 and -mx32 works on amd64 with
 # clang, and others might as well.
 
-AC_CANONICAL_HOST
 AC_CHECK_SIZEOF([void *])
 AS_IF([test x"$ac_cv_sizeof_void_p" = x4],
       [AC_MSG_NOTICE([pointer size matches expectations])],
       [AC_MSG_WARN([non 32-bit pointer platform detected])
        AC_MSG_NOTICE([trying to enable 32-bit memory model compiler option for ${host_cpu}])
+       AC_CANONICAL_HOST
        case "${host_cpu}" in
 	 alpha* )
 	     AC_MSG_ERROR([32-bit memory model unavailable on ${host_cpu}]) ;;
@@ -91,7 +98,7 @@ AS_IF([test x"$ac_cv_sizeof_void_p" = x4
        	     flag32="-milp32" ;;
 	 mips64* )
        	     flag32="-mabi=32" ;;
-	 ppc64* )
+	 powerpc64* | ppc64* )
        	     flag32="-m32" ;;
 	 s390x* )
        	     flag32="-m31" ;;
@@ -116,7 +123,8 @@ AC_PROG_CC
 AC_PROG_INSTALL
 AC_PROG_SED
 AC_CHECK_PROGS([INDENT],[indent],[true])
-AC_CHECK_PROGS([RUBBER],[rubber],[false])
+AS_IF([test x${enable_docs} = xyes],
+ [AC_CHECK_PROGS([RUBBER],[rubber],[false])])
 
 # Checks for libraries.
 AS_IF([test x$threads = xyes],
