summaryrefslogtreecommitdiff
path: root/gdb/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/configure.in')
-rw-r--r--gdb/configure.in25
1 files changed, 25 insertions, 0 deletions
diff --git a/gdb/configure.in b/gdb/configure.in
index 07aab351423..38792e03396 100644
--- a/gdb/configure.in
+++ b/gdb/configure.in
@@ -357,6 +357,12 @@ AC_CHECK_HEADERS(curses.h ncurses.h term.h)
# unconditionally, so what's the point in checking these?
AC_CHECK_HEADERS(ctype.h time.h)
+# ------------------------- #
+# Checks for declarations. #
+# ------------------------- #
+
+gcc_AC_CHECK_DECLS(getopt)
+
# ------------------ #
# Checks for types. #
# ------------------ #
@@ -384,6 +390,7 @@ AC_CHECK_FUNCS(sbrk)
AC_CHECK_FUNCS(setpgid setpgrp)
AC_CHECK_FUNCS(sigaction sigprocmask sigsetmask)
AC_CHECK_FUNCS(socketpair)
+AC_CHECK_FUNCS(syscall)
dnl AC_FUNC_SETPGRP does not work when cross compiling
dnl Instead, assume we will have a prototype for setpgrp if cross compiling.
@@ -911,6 +918,24 @@ if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
[Define if <thread_db.h> has the TD_NOTALLOC error code.])
fi
+dnl See if we have a sys/syscall header file that has __NR_tkill.
+if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then
+ AC_CACHE_CHECK([whether <sys/syscall.h> has __NR_tkill],
+ gdb_cv_sys_syscall_h_has_tkill,
+ AC_TRY_COMPILE(
+ [#include <sys/syscall.h>],
+ [int i = __NR_tkill;],
+ gdb_cv_sys_syscall_h_has_tkill=yes,
+ gdb_cv_sys_syscall_h_has_tkill=no
+ )
+ )
+fi
+dnl See if we can issue tkill syscall.
+if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes" && test "x$ac_cv_func_syscall" = "xyes"; then
+ AC_DEFINE(HAVE_TKILL_SYSCALL, 1,
+ [Define if we can use the tkill syscall.])
+fi
+
dnl Handle optional features that can be enabled.
AC_ARG_WITH(sysroot,