Debian Codegraph @

config/bfd64.m4

raw
1 dnl
2 dnl Copyright (C) 2012-2022 Free Software Foundation, Inc.
3 dnl
4 dnl This file is free software; you can redistribute it and/or modify
5 dnl it under the terms of the GNU General Public License as published by
6 dnl the Free Software Foundation; either version 3 of the License, or
7 dnl (at your option) any later version.
8 dnl
9 dnl This program is distributed in the hope that it will be useful,
10 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
11 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 dnl GNU General Public License for more details.
13 dnl
14 dnl You should have received a copy of the GNU General Public License
15 dnl along with this program; see the file COPYING3. If not see
16 dnl <http://www.gnu.org/licenses/>.
17 dnl
18
19 dnl Make sure your module depends on `all-bfd' when invoking this macro.
20 AC_DEFUN([BFD_64_BIT], [dnl
21 # See whether 64-bit bfd lib has been enabled.
22 OLD_CPPFLAGS=$CPPFLAGS
23 # Put the old CPPFLAGS last, in case the user's CPPFLAGS point somewhere
24 # with bfd, with -I/foo/include. We always want our bfd.
25 CPPFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CPPFLAGS"
26 # Note we cannot cache the result of this check because BFD64 may change
27 # when a secondary target has been added or removed and we have no access
28 # to this information here.
29 AC_MSG_CHECKING([whether BFD is 64-bit])
30 AC_EGREP_CPP([HAVE_BFD64],
31 AC_LANG_PROGRAM(
32 [#include "bfd.h"],
33 [dnl
34 #ifdef BFD64
35 HAVE_BFD64
36 #endif]),
37 [have_64_bit_bfd=yes],
38 [have_64_bit_bfd=no])
39 AC_MSG_RESULT([$have_64_bit_bfd])
40 CPPFLAGS=$OLD_CPPFLAGS])