diff --git a/boehm-gc/ChangeLog b/boehm-gc/ChangeLog
index 1ddff1cf906be14696c7c39abac75ac32b3d5517..fe484157b31a5cc836aa9fa836ccb0d20b146364 100644
--- a/boehm-gc/ChangeLog
+++ b/boehm-gc/ChangeLog
@@ -1,3 +1,7 @@
+Mon Aug  2 23:09:41 1999  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
+
+	* configure.in (machdep): Use mips_ultrix_mach_dep.s on Ultrix V4.
+
 1999-08-03  Tom Tromey  <tromey@cygnus.com>
 
 	* gc_priv.h (GC_test_and_set): Implementation for Linux PPC from
diff --git a/boehm-gc/configure b/boehm-gc/configure
index faebc05a081e1700eb984405188c32c286450a1f..739898c4574cb74b3a73f88e831bd8231cf8e29f 100755
--- a/boehm-gc/configure
+++ b/boehm-gc/configure
@@ -2394,12 +2394,6 @@ case "$host" in
  alpha*-*-*)
     machdep="alpha_mach_dep.lo"
     ;;
- mips-*-*)
-    machdep="mips_sgi_mach_dep.lo"
-    cat >> confdefs.h <<\EOF
-#define NO_EXECUTE_PERMISSION 1
-EOF
-
     ;;
  mipstx39-*-elf*)
     machdep="mips_ultrix_mach_dep.lo"
@@ -2412,6 +2406,15 @@ EOF
 EOF
 
     ;;
+ mips-dec-ultrix*)
+    machdep="mips_ultrix_mach-dep.lo"
+    ;;
+ mips-*-*)
+    machdep="mips_sgi_mach_dep.lo"
+    cat >> confdefs.h <<\EOF
+#define NO_EXECUTE_PERMISSION 1
+EOF
+
  sparc-sun-solaris2.3*)
     cat >> confdefs.h <<\EOF
 #define SUNOS53_SHARED_LIB 1
diff --git a/boehm-gc/configure.in b/boehm-gc/configure.in
index f14a677d9fed115a428eb903c8c8b9fcca60e7e6..c39f3e27c7af14c6f6dca8c3d40072a87dd4d773 100644
--- a/boehm-gc/configure.in
+++ b/boehm-gc/configure.in
@@ -137,15 +137,18 @@ case "$host" in
  alpha*-*-*)
     machdep="alpha_mach_dep.lo"
     ;;
- mips-*-*)
-    machdep="mips_sgi_mach_dep.lo"
-    AC_DEFINE(NO_EXECUTE_PERMISSION)
     ;;
  mipstx39-*-elf*)
     machdep="mips_ultrix_mach_dep.lo"
     AC_DEFINE(STACKBASE, __stackbase)
     AC_DEFINE(DATASTART_IS_ETEXT)
     ;;
+ mips-dec-ultrix*)
+    machdep="mips_ultrix_mach-dep.lo"
+    ;;
+ mips-*-*)
+    machdep="mips_sgi_mach_dep.lo"
+    AC_DEFINE(NO_EXECUTE_PERMISSION)
  sparc-sun-solaris2.3*)
     AC_DEFINE(SUNOS53_SHARED_LIB)
     ;;