Move gdb-dlfcn.[ch] to gdbsupport/
[deliverable/binutils-gdb.git] / gdb / gdbsupport / common.m4
CommitLineData
3266f10b 1dnl Autoconf configure snippets for common.
42a4f53d 2dnl Copyright (C) 1995-2019 Free Software Foundation, Inc.
3266f10b
TT
3dnl
4dnl This file is part of GDB.
5dnl
6dnl This program is free software; you can redistribute it and/or modify
7dnl it under the terms of the GNU General Public License as published by
8dnl the Free Software Foundation; either version 3 of the License, or
9dnl (at your option) any later version.
10dnl
11dnl This program is distributed in the hope that it will be useful,
12dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
13dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14dnl GNU General Public License for more details.
15dnl
16dnl You should have received a copy of the GNU General Public License
17dnl along with this program. If not, see <http://www.gnu.org/licenses/>.
18
19dnl Invoke configury needed by the files in 'common'.
20AC_DEFUN([GDB_AC_COMMON], [
21 AC_HEADER_STDC
3266f10b
TT
22 AC_FUNC_ALLOCA
23
24 dnl Note that this requires codeset.m4, which is included
25 dnl by the users of common.m4.
26 AM_LANGINFO_CODESET
27
28 AC_CHECK_HEADERS(linux/perf_event.h locale.h memory.h signal.h dnl
44122162 29 sys/resource.h sys/socket.h dnl
3266f10b 30 sys/un.h sys/wait.h dnl
be628ab8 31 thread_db.h wait.h dnl
2d41fa11
SDJ
32 termios.h dnl
33 dlfcn.h)
3266f10b 34
f348d89a 35 AC_CHECK_FUNCS([fdwalk getrlimit pipe pipe2 socketpair sigaction])
3266f10b
TT
36
37 AC_CHECK_DECLS([strerror, strstr])
e9bcb658
GB
38
39 dnl Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't
40 dnl do since sigsetjmp might only be defined as a macro.
41AC_CACHE_CHECK([for sigsetjmp], gdb_cv_func_sigsetjmp,
42[AC_TRY_COMPILE([
43#include <setjmp.h>
44], [sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);],
45gdb_cv_func_sigsetjmp=yes, gdb_cv_func_sigsetjmp=no)])
46if test $gdb_cv_func_sigsetjmp = yes; then
47 AC_DEFINE(HAVE_SIGSETJMP, 1, [Define if sigsetjmp is available. ])
48fi
3266f10b 49])
This page took 0.493673 seconds and 4 git commands to generate.