]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/kyua/m4/uname.m4
Import tzdata 2020a
[FreeBSD/FreeBSD.git] / contrib / kyua / m4 / uname.m4
1 dnl Copyright 2010 The Kyua Authors.
2 dnl All rights reserved.
3 dnl
4 dnl Redistribution and use in source and binary forms, with or without
5 dnl modification, are permitted provided that the following conditions are
6 dnl met:
7 dnl
8 dnl * Redistributions of source code must retain the above copyright
9 dnl   notice, this list of conditions and the following disclaimer.
10 dnl * Redistributions in binary form must reproduce the above copyright
11 dnl   notice, this list of conditions and the following disclaimer in the
12 dnl   documentation and/or other materials provided with the distribution.
13 dnl * Neither the name of Google Inc. nor the names of its contributors
14 dnl   may be used to endorse or promote products derived from this software
15 dnl   without specific prior written permission.
16 dnl
17 dnl THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18 dnl "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19 dnl LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20 dnl A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21 dnl OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22 dnl SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23 dnl LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 dnl DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 dnl THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 dnl (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27 dnl OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
29 dnl
30 dnl KYUA_UNAME_ARCHITECTURE
31 dnl
32 dnl Checks for the current architecture name (aka processor type) and defines
33 dnl the KYUA_ARCHITECTURE macro to its value.
34 dnl
35 AC_DEFUN([KYUA_UNAME_ARCHITECTURE], [
36     AC_MSG_CHECKING([for architecture name])
37     AC_ARG_VAR([KYUA_ARCHITECTURE],
38                [Name of the system architecture (aka processor type)])
39     if test x"${KYUA_ARCHITECTURE-unset}" = x"unset"; then
40         KYUA_ARCHITECTURE="$(uname -p)"
41     fi
42     AC_DEFINE_UNQUOTED([KYUA_ARCHITECTURE], "${KYUA_ARCHITECTURE}",
43                        [Name of the system architecture (aka processor type)])
44     AC_MSG_RESULT([${KYUA_ARCHITECTURE}])
45 ])
46
47 dnl
48 dnl KYUA_UNAME_PLATFORM
49 dnl
50 dnl Checks for the current platform name (aka machine name) and defines
51 dnl the KYUA_PLATFORM macro to its value.
52 dnl
53 AC_DEFUN([KYUA_UNAME_PLATFORM], [
54     AC_MSG_CHECKING([for platform name])
55     AC_ARG_VAR([KYUA_PLATFORM],
56                [Name of the system platform (aka machine name)])
57     if test x"${KYUA_PLATFORM-unset}" = x"unset"; then
58         KYUA_PLATFORM="$(uname -m)"
59     fi
60     AC_DEFINE_UNQUOTED([KYUA_PLATFORM], "${KYUA_PLATFORM}",
61                        [Name of the system platform (aka machine name)])
62     AC_MSG_RESULT([${KYUA_PLATFORM}])
63 ])