annotate m4/host-os.m4 @ 40196:e63f5d3edab5

relocatable-prog: Update documentation. * doc/relocatable-maint.texi (Supporting Relocation): Update to match the recent changes.
author Bruno Haible <bruno@clisp.org>
date Sun, 24 Feb 2019 01:49:15 +0100
parents b06060465f09
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
18990
4e69302a47a0 More systematic m4 quoting and indentation.
Bruno Haible <bruno@clisp.org>
parents: 18626
diff changeset
1 # serial 10
5045
325f3a7a5d79 Rename utils_ to gl_ in host-os.m4.
Paul Eggert <eggert@cs.ucla.edu>
parents: 4834
diff changeset
2
40057
b06060465f09 maint: Run 'make update-copyright'
Paul Eggert <eggert@cs.ucla.edu>
parents: 19484
diff changeset
3 # Copyright (C) 2001, 2003-2004, 2006, 2009-2019 Free Software Foundation, Inc.
5611
87c42e194f4a Use an all-permissive copyright notice, recommended by RMS.
Paul Eggert <eggert@cs.ucla.edu>
parents: 5103
diff changeset
4 # This file is free software; the Free Software Foundation
87c42e194f4a Use an all-permissive copyright notice, recommended by RMS.
Paul Eggert <eggert@cs.ucla.edu>
parents: 5103
diff changeset
5 # gives unlimited permission to copy and/or distribute it,
87c42e194f4a Use an all-permissive copyright notice, recommended by RMS.
Paul Eggert <eggert@cs.ucla.edu>
parents: 5103
diff changeset
6 # with or without modifications, as long as this notice is preserved.
5045
325f3a7a5d79 Rename utils_ to gl_ in host-os.m4.
Paul Eggert <eggert@cs.ucla.edu>
parents: 4834
diff changeset
7
325f3a7a5d79 Rename utils_ to gl_ in host-os.m4.
Paul Eggert <eggert@cs.ucla.edu>
parents: 4834
diff changeset
8 # Written by Paul Eggert.
3468
71b22af0f0c7 (UTILS_HOST_OS): New file/macro.
Jim Meyering <jim@meyering.net>
parents:
diff changeset
9
71b22af0f0c7 (UTILS_HOST_OS): New file/macro.
Jim Meyering <jim@meyering.net>
parents:
diff changeset
10 dnl From Paul Eggert.
71b22af0f0c7 (UTILS_HOST_OS): New file/macro.
Jim Meyering <jim@meyering.net>
parents:
diff changeset
11
71b22af0f0c7 (UTILS_HOST_OS): New file/macro.
Jim Meyering <jim@meyering.net>
parents:
diff changeset
12 # Define HOST_OPERATING_SYSTEM to a name for the host operating system.
5045
325f3a7a5d79 Rename utils_ to gl_ in host-os.m4.
Paul Eggert <eggert@cs.ucla.edu>
parents: 4834
diff changeset
13 AC_DEFUN([gl_HOST_OS],
3468
71b22af0f0c7 (UTILS_HOST_OS): New file/macro.
Jim Meyering <jim@meyering.net>
parents:
diff changeset
14 [
7369
ab997acbb35a [ChangeLog]
Paul Eggert <eggert@cs.ucla.edu>
parents: 5611
diff changeset
15 AC_REQUIRE([AC_CANONICAL_HOST])dnl
3468
71b22af0f0c7 (UTILS_HOST_OS): New file/macro.
Jim Meyering <jim@meyering.net>
parents:
diff changeset
16 AC_CACHE_CHECK([host operating system],
18990
4e69302a47a0 More systematic m4 quoting and indentation.
Bruno Haible <bruno@clisp.org>
parents: 18626
diff changeset
17 [gl_cv_host_operating_system],
3468
71b22af0f0c7 (UTILS_HOST_OS): New file/macro.
Jim Meyering <jim@meyering.net>
parents:
diff changeset
18
71b22af0f0c7 (UTILS_HOST_OS): New file/macro.
Jim Meyering <jim@meyering.net>
parents:
diff changeset
19 [[case $host_os in
71b22af0f0c7 (UTILS_HOST_OS): New file/macro.
Jim Meyering <jim@meyering.net>
parents:
diff changeset
20
71b22af0f0c7 (UTILS_HOST_OS): New file/macro.
Jim Meyering <jim@meyering.net>
parents:
diff changeset
21 # These operating system names do not use the default heuristic below.
71b22af0f0c7 (UTILS_HOST_OS): New file/macro.
Jim Meyering <jim@meyering.net>
parents:
diff changeset
22 # They are in reverse order, so that more-specific prefixes come first.
12421
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
23 winnt*) os='Windows NT';;
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
24 vos*) os='VOS';;
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
25 sysv*) os='Unix System V';;
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
26 superux*) os='SUPER-UX';;
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
27 sunos*) os='SunOS';;
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
28 stop*) os='STOP';;
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
29 sco*) os='SCO Unix';;
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
30 riscos*) os='RISC OS';;
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
31 riscix*) os='RISCiX';;
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
32 qnx*) os='QNX';;
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
33 pw32*) os='PW32';;
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
34 ptx*) os='ptx';;
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
35 plan9*) os='Plan 9';;
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
36 osf*) os='Tru64';;
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
37 os2*) os='OS/2';;
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
38 openbsd*) os='OpenBSD';;
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
39 nsk*) os='NonStop Kernel';;
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
40 nonstopux*) os='NonStop-UX';;
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
41 netbsd*-gnu*) os='GNU/NetBSD';; # NetBSD kernel+libc, GNU userland
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
42 netbsd*) os='NetBSD';;
13700
64110b464ca2 mirbsd: add some more support
Eric Blake <eblake@redhat.com>
parents: 12559
diff changeset
43 mirbsd*) os='MirBSD';;
12421
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
44 knetbsd*-gnu) os='GNU/kNetBSD';; # NetBSD kernel, GNU libc+userland
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
45 kfreebsd*-gnu) os='GNU/kFreeBSD';; # FreeBSD kernel, GNU libc+userland
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
46 msdosdjgpp*) os='DJGPP';;
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
47 mpeix*) os='MPE/iX';;
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
48 mint*) os='MiNT';;
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
49 mingw*) os='MinGW';;
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
50 lynxos*) os='LynxOS';;
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
51 linux*) os='GNU/Linux';;
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
52 hpux*) os='HP-UX';;
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
53 hiux*) os='HI-UX';;
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
54 gnu*) os='GNU';;
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
55 freebsd*) os='FreeBSD';;
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
56 dgux*) os='DG/UX';;
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
57 bsdi*) os='BSD/OS';;
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
58 bsd*) os='BSD';;
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
59 beos*) os='BeOS';;
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
60 aux*) os='A/UX';;
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
61 atheos*) os='AtheOS';;
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
62 amigaos*) os='Amiga OS';;
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
63 aix*) os='AIX';;
3468
71b22af0f0c7 (UTILS_HOST_OS): New file/macro.
Jim Meyering <jim@meyering.net>
parents:
diff changeset
64
71b22af0f0c7 (UTILS_HOST_OS): New file/macro.
Jim Meyering <jim@meyering.net>
parents:
diff changeset
65 # The default heuristic takes the initial alphabetic string
71b22af0f0c7 (UTILS_HOST_OS): New file/macro.
Jim Meyering <jim@meyering.net>
parents:
diff changeset
66 # from $host_os, but capitalizes its first letter.
71b22af0f0c7 (UTILS_HOST_OS): New file/macro.
Jim Meyering <jim@meyering.net>
parents:
diff changeset
67 [A-Za-z]*)
12421
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
68 os=`
16378
0abea39a697e Fix test failure in many locales on Solaris 11.
Bruno Haible <bruno@clisp.org>
parents: 16201
diff changeset
69 expr "X$host_os" : 'X\([A-Za-z]\)' | LC_ALL=C tr '[a-z]' '[A-Z]'
12421
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
70 ``
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
71 expr "X$host_os" : 'X.\([A-Za-z]*\)'
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
72 `
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
73 ;;
3468
71b22af0f0c7 (UTILS_HOST_OS): New file/macro.
Jim Meyering <jim@meyering.net>
parents:
diff changeset
74
71b22af0f0c7 (UTILS_HOST_OS): New file/macro.
Jim Meyering <jim@meyering.net>
parents:
diff changeset
75 # If $host_os does not start with an alphabetic string, use it unchanged.
71b22af0f0c7 (UTILS_HOST_OS): New file/macro.
Jim Meyering <jim@meyering.net>
parents:
diff changeset
76 *)
12421
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
77 os=$host_os;;
3468
71b22af0f0c7 (UTILS_HOST_OS): New file/macro.
Jim Meyering <jim@meyering.net>
parents:
diff changeset
78 esac
5045
325f3a7a5d79 Rename utils_ to gl_ in host-os.m4.
Paul Eggert <eggert@cs.ucla.edu>
parents: 4834
diff changeset
79 gl_cv_host_operating_system=$os]])
11007
f6cba5a556ce many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents: 7369
diff changeset
80 AC_DEFINE_UNQUOTED([HOST_OPERATING_SYSTEM],
5045
325f3a7a5d79 Rename utils_ to gl_ in host-os.m4.
Paul Eggert <eggert@cs.ucla.edu>
parents: 4834
diff changeset
81 "$gl_cv_host_operating_system",
3468
71b22af0f0c7 (UTILS_HOST_OS): New file/macro.
Jim Meyering <jim@meyering.net>
parents:
diff changeset
82 [The host operating system.])
71b22af0f0c7 (UTILS_HOST_OS): New file/macro.
Jim Meyering <jim@meyering.net>
parents:
diff changeset
83 ])