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 msdosdjgpp*) os='DJGPP';;
38 lynxos*) os='LynxOS';;
39 linux*) os='GNU/Linux';;
43 freebsd*) os='FreeBSD';;
49 atheos*) os='AtheOS';;
50 amigaos*) os='Amiga OS';;
53 # The default heuristic takes the initial alphabetic string
54 # from $host_os, but capitalizes its first letter.
57 expr "X$host_os" : 'X\([A-Za-z]\)' | tr '[a-z]' '[A-Z]'
59 expr "X$host_os" : 'X.\([A-Za-z]*\)'
63 # If $host_os does not start with an alphabetic string, use it unchanged.
67 utils_cv_host_operating_system=$os]])
68 AC_DEFINE_UNQUOTED(HOST_OPERATING_SYSTEM,
69 "$utils_cv_host_operating_system",
70 [The host operating system.])