gfarm (2.4.1-1.1) 06_host_os_nickname.patch

Summary

 configure.ac |   23 ++++++++++++++++++++---
 1 file changed, 20 insertions(+), 3 deletions(-)

    
download this patch

Patch contents

Description: Workaround for incorrect host_os_name (on hurd-i386/kfreebsd-*)
 Note that original code is somewhat broken completely, it call GNU system
 "Linux".  Apparently, GNU/Hurd or GNU/kfreebsd never uses Linux kernel
 at all.
Author: NIIBE Yutaka <gniibe@fsij.org>
Last-Update: 2010-06-08

Index: gfarm-2.3.1/configure.ac
===================================================================
--- gfarm-2.3.1.orig/configure.ac	2010-06-08 12:05:26.000000000 +0900
+++ gfarm-2.3.1/configure.ac	2010-06-08 12:05:26.000000000 +0900
@@ -12,9 +12,26 @@
 AC_CANONICAL_HOST
 
 # "linux-gnu" -> "linux", "netbsdelf" -> "netbsd", "osf5.1b" -> "osf1"
-host_os_nickname=`echo $host_os |
-	sed -e 's/-.*//' -e 's/[[0-9.]]*$//' \
-		-e 's/^netbsdelf$/netbsd/' -e 's/osf[0-9].*/osf1/'`
+case $host_os in
+  linux-gnu*)
+    host_os_nickname=linux
+    ;;
+  kfreebsd-gnu)
+    host_os_nickname=linux
+    ;;
+  gnu*)
+    host_os_nickname=linux
+    ;;
+  netbsdelf)
+    host_os_nickname=netbsd
+    ;;
+  osd5.1b)
+    host_os_nickname=osf1
+    ;;
+  *)
+    host_os_nickname=$host_os
+    ;;
+esac
 
 ######
 ###### Checks for programs.