Set no file contents PT_LOAD p_offset to first page
[deliverable/binutils-gdb.git] / bfd / bfd.m4
CommitLineData
8fb84ecc 1dnl This file was derived from acinclude.m4.
5bf135a7 2dnl
82704155 3dnl Copyright (C) 2012-2019 Free Software Foundation, Inc.
5bf135a7
NC
4dnl
5dnl This file is free software; you can redistribute it and/or modify
6dnl it under the terms of the GNU General Public License as published by
7dnl the Free Software Foundation; either version 3 of the License, or
8dnl (at your option) any later version.
1b786873 9dnl
5bf135a7
NC
10dnl This program is distributed in the hope that it will be useful,
11dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
12dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13dnl GNU General Public License for more details.
1b786873 14dnl
5bf135a7
NC
15dnl You should have received a copy of the GNU General Public License
16dnl along with this program; see the file COPYING3. If not see
17dnl <http://www.gnu.org/licenses/>.
18dnl
8fb84ecc 19
8fb84ecc
AC
20dnl Check for existence of a type $1 in sys/procfs.h
21
22AC_DEFUN([BFD_HAVE_SYS_PROCFS_TYPE],
23[AC_MSG_CHECKING([for $1 in sys/procfs.h])
24 AC_CACHE_VAL(bfd_cv_have_sys_procfs_type_$1,
25 [AC_TRY_COMPILE([
26#define _SYSCALL32
16231b7b
DG
27/* Needed for new procfs interface on sparc-solaris. */
28#define _STRUCTURED_PROC 1
8fb84ecc
AC
29#include <sys/procfs.h>],
30 [$1 avar],
31 bfd_cv_have_sys_procfs_type_$1=yes,
32 bfd_cv_have_sys_procfs_type_$1=no
33 )])
34 if test $bfd_cv_have_sys_procfs_type_$1 = yes; then
35 AC_DEFINE([HAVE_]translit($1, [a-z], [A-Z]), 1,
36 [Define if <sys/procfs.h> has $1.])
37 fi
38 AC_MSG_RESULT($bfd_cv_have_sys_procfs_type_$1)
39])
40
8fb84ecc
AC
41dnl Check for existence of member $2 in type $1 in sys/procfs.h
42
43AC_DEFUN([BFD_HAVE_SYS_PROCFS_TYPE_MEMBER],
44[AC_MSG_CHECKING([for $1.$2 in sys/procfs.h])
45 AC_CACHE_VAL(bfd_cv_have_sys_procfs_type_member_$1_$2,
46 [AC_TRY_COMPILE([
47#define _SYSCALL32
16231b7b
DG
48/* Needed for new procfs interface on sparc-solaris. */
49#define _STRUCTURED_PROC 1
8fb84ecc
AC
50#include <sys/procfs.h>],
51 [$1 avar; void* aref = (void*) &avar.$2],
52 bfd_cv_have_sys_procfs_type_member_$1_$2=yes,
53 bfd_cv_have_sys_procfs_type_member_$1_$2=no
54 )])
55 if test $bfd_cv_have_sys_procfs_type_member_$1_$2 = yes; then
56 AC_DEFINE([HAVE_]translit($1, [a-z], [A-Z])[_]translit($2, [a-z], [A-Z]), 1,
57 [Define if <sys/procfs.h> has $1.$2.])
58 fi
59 AC_MSG_RESULT($bfd_cv_have_sys_procfs_type_member_$1_$2)
60])
61
This page took 0.671068 seconds and 4 git commands to generate.