5 # Define HOST_OPERATING_SYSTEM to a name for the host operating system.
6 AC_DEFUN([UTILS_HOST_OS],
8 AC_CACHE_CHECK([host operating system],
9 utils_cv_host_operating_system,
13 # These operating system names do not use the default heuristic below.
14 # They are in reverse order, so that more-specific prefixes come first.
15 winnt*) os='Windows NT';;
17 sysv*) os='Unix System V';;
18 superux*) os='SUPER-UX';;
22 riscos*) os='RISC OS';;
23 riscix*) os='RISCiX';;
30 openbsd*) os='OpenBSD';;
31 nsk*) os='NonStop Kernel';;
32 nonstopux*) os='NonStop-UX';;
33 netbsd*) os='NetBSD';;
34 knetbsd*-gnu*) os='GNU/KNetBSD';;
35 kfreebsd*-gnu*) os='GNU/KFreeBSD';;
36 msdosdjgpp*) os='DJGPP';;
40 lynxos*) os='LynxOS';;
41 linux*) os='GNU/Linux';;
45 freebsd*) os='FreeBSD';;
51 atheos*) os='AtheOS';;
52 amigaos*) os='Amiga OS';;
55 # The default heuristic takes the initial alphabetic string
56 # from $host_os, but capitalizes its first letter.
59 expr "X$host_os" : 'X\([A-Za-z]\)' | tr '[a-z]' '[A-Z]'
61 expr "X$host_os" : 'X.\([A-Za-z]*\)'
65 # If $host_os does not start with an alphabetic string, use it unchanged.
69 utils_cv_host_operating_system=$os]])
70 AC_DEFINE_UNQUOTED(HOST_OPERATING_SYSTEM,
71 "$utils_cv_host_operating_system",
72 [The host operating system.])