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*-gnu*) os='GNU/NetBSD';; # NetBSD kernel+libc, GNU userland
34 netbsd*) os='NetBSD';;
35 knetbsd*-gnu) os='GNU/KNetBSD';; # NetBSD kernel, GNU libc+userland
36 kfreebsd*-gnu) os='GNU/KFreeBSD';; # FreeBSD kernel, GNU libc+userland
37 msdosdjgpp*) os='DJGPP';;
41 lynxos*) os='LynxOS';;
42 linux*) os='GNU/Linux';;
46 freebsd*) os='FreeBSD';;
52 atheos*) os='AtheOS';;
53 amigaos*) os='Amiga OS';;
56 # The default heuristic takes the initial alphabetic string
57 # from $host_os, but capitalizes its first letter.
60 expr "X$host_os" : 'X\([A-Za-z]\)' | tr '[a-z]' '[A-Z]'
62 expr "X$host_os" : 'X.\([A-Za-z]*\)'
66 # If $host_os does not start with an alphabetic string, use it unchanged.
70 utils_cv_host_operating_system=$os]])
71 AC_DEFINE_UNQUOTED(HOST_OPERATING_SYSTEM,
72 "$utils_cv_host_operating_system",
73 [The host operating system.])