| 1 | dnl gdb/gdbserver/configure.in uses BFD_HAVE_SYS_PROCFS_TYPE. |
| 2 | sinclude(../../bfd/bfd.m4) |
| 3 | |
| 4 | sinclude(../acx_configure_dir.m4) |
| 5 | |
| 6 | # This gets GDB_AC_LIBMCHECK. |
| 7 | sinclude(../libmcheck.m4) |
| 8 | |
| 9 | dnl This gets autoconf bugfixes |
| 10 | sinclude(../../config/override.m4) |
| 11 | |
| 12 | dnl For ACX_PKGVERSION and ACX_BUGURL. |
| 13 | sinclude(../../config/acx.m4) |
| 14 | |
| 15 | m4_include(../../config/depstand.m4) |
| 16 | m4_include(../../config/lead-dot.m4) |
| 17 | |
| 18 | dnl codeset.m4 is needed for common.m4, but not for |
| 19 | dnl anything else in gdbserver. |
| 20 | m4_include(../../config/codeset.m4) |
| 21 | m4_include(../common/common.m4) |
| 22 | |
| 23 | dnl For libiberty_INIT. |
| 24 | m4_include(../libiberty.m4) |
| 25 | |
| 26 | dnl For --enable-build-with-cxx and COMPILER. |
| 27 | m4_include(../build-with-cxx.m4) |
| 28 | |
| 29 | dnl For GDB_AC_PTRACE. |
| 30 | m4_include(../ptrace.m4) |
| 31 | |
| 32 | dnl Check for existence of a type $1 in libthread_db.h |
| 33 | dnl Based on BFD_HAVE_SYS_PROCFS_TYPE in bfd/bfd.m4. |
| 34 | |
| 35 | AC_DEFUN([GDBSERVER_HAVE_THREAD_DB_TYPE], |
| 36 | [AC_MSG_CHECKING([for $1 in thread_db.h]) |
| 37 | AC_CACHE_VAL(gdbserver_cv_have_thread_db_type_$1, |
| 38 | [AC_TRY_COMPILE([ |
| 39 | #include <thread_db.h>], |
| 40 | [$1 avar], |
| 41 | gdbserver_cv_have_thread_db_type_$1=yes, |
| 42 | gdbserver_cv_have_thread_db_type_$1=no |
| 43 | )]) |
| 44 | if test $gdbserver_cv_have_thread_db_type_$1 = yes; then |
| 45 | AC_DEFINE([HAVE_]translit($1, [a-z], [A-Z]), 1, |
| 46 | [Define if <thread_db.h> has $1.]) |
| 47 | fi |
| 48 | AC_MSG_RESULT($gdbserver_cv_have_thread_db_type_$1) |
| 49 | ]) |