-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathacinclude.m4
54 lines (52 loc) · 1.92 KB
/
acinclude.m4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
dnl acinclude.m4
dnl
dnl Local Autoconf macro definitions
dnl
dnl (C) Copyright 2012 Fred Gleason <[email protected]>
dnl
dnl This program is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License version 2 as
dnl published by the Free Software Foundation.
dnl
dnl This program is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
dnl GNU General Public License for more details.
dnl
dnl You should have received a copy of the GNU General Public
dnl License along with this program; if not, write to the Free Software
dnl Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
dnl
dnl AR_GCC_TARGET()
dnl
dnl Get gcc(1)'s idea of the target architecture, distribution and os.
dnl The following variables are set:
dnl $ar_gcc_arch = Target Architecture (i586, XF86_64, etc)
dnl $ar_gcc_distro = Target Distribution (suse, slackware, etc)
dnl $ar_gcc_os = Target Operating System (linux, solaris, etc)
dnl
AC_DEFUN([AR_GCC_TARGET],[AC_REQUIRE([AC_PROG_CC])]
[
AC_MSG_CHECKING(target architecture)
ar_gcc_arch=$(./get_target.sh $CC $AWK arch)
ar_gcc_distro=$(./get_target.sh $CC $AWK distro)
ar_gcc_os=$(./get_target.sh $CC $AWK os)
AC_MSG_RESULT([$ar_gcc_arch-$ar_gcc_distro-$ar_gcc_os])
]
)
dnl AR_GET_DISTRO()
dnl
dnl Try to determine the name and version of the distribution running
dnl on the host machine, based on entries in '/etc/'.
dnl The following variables are set:
dnl $ar_distro_name = Distribution Name (SuSE, Debian, etc)
dnl $ar_distro_version = Distribution Version (10.3, 3.1, etc)
dnl
AC_DEFUN([AR_GET_DISTRO],[]
[
AC_MSG_CHECKING(distribution)
ar_distro_name=$(./get_distro.sh NAME $AWK)
ar_distro_version=$(./get_distro.sh VERSION $AWK)
AC_MSG_RESULT([$ar_distro_name $ar_distro_version])
]
)