* Support for the hppa architecture has been added.
  Patch: arch-hppa.diff
  Provided-by: LaMont Jones <lamont@smallone.fc.hp.com>
  Added-by: Rob Browning <rlb@defaultvalue.org>
  Status: appears to be incorporated upstream

--- emacs21-21.2.orig/configure.in
+++ emacs21-21.2/configure.in
@@ -552,6 +552,9 @@
   hppa*-*-nextstep* )
     machine=hp800 opsys=nextstep
   ;;
+  hppa*-*-linux-gnu* )
+    machine=hp800 opsys=gnu-linux
+  ;;
 
   ## Orion machines
   orion-orion-bsd* )
--- emacs21-21.2.orig/src/m/hp800.h
+++ emacs21-21.2/src/m/hp800.h
@@ -85,7 +85,7 @@
 #define bcmp		memcmp
 #endif
 
-#ifdef __hpux
+#if defined(__hpux) || defined(__linux__)
 /* Now define a symbol for the cpu type, if your compiler
    does not define it automatically:
    Ones defined so far include vax, m68000, ns16000, pyramid,
@@ -94,6 +94,15 @@
 #     define hp9000s800
 #endif
 
+#ifdef __linux__
+/* Data type of load average, as read out of kmem.  */
+
+#define LOAD_AVE_TYPE long
+
+/* Convert that into an integer that is 100 for a load average of 1.0  */
+
+#define LOAD_AVE_CVT(x) (int) (((double) (x)) * 100.0 / FSCALE)
+#else
 /* Data type of load average, as read out of kmem.  */
 
 #define LOAD_AVE_TYPE double
@@ -101,7 +110,7 @@
 /* Convert that into an integer that is 100 for a load average of 1.0  */
 
 #define LOAD_AVE_CVT(x) ((int) (x * 100.0))
-
+#endif
 
 /* Define CANNOT_DUMP on machines where unexec does not work.
    Then the function dump-emacs will not be defined
@@ -116,6 +125,7 @@
    Otherwise Emacs assumes that text space precedes data space,
    numerically.  */
 
+#ifdef __hpux
 #define VIRT_ADDR_VARIES
 
 /* Define C_ALLOCA if this machine does not support a true alloca
@@ -134,6 +144,9 @@
 
 #define DATA_START    0x40000000
 #define TEXT_START    0x00000000
+#else
+#define HAVE_ALLOCA
+#endif
 
 #define STACK_DIRECTION 1 
 
@@ -147,6 +160,7 @@
 /* This machine requires completely different unexec code
    which lives in a separate file.  Specify the file name.  */
 
+#ifdef __hpux
 #define UNEXEC unexhp9k800.o
 
 #define LIBS_MACHINE
@@ -179,5 +193,5 @@
 
 #define index strchr
 #define rindex strrchr
-
-#endif /* __hpux */
+#endif
+#endif
