aboutsummaryrefslogtreecommitdiff
path: root/bfd/configure.in
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1995-09-08 15:50:29 +0000
committerIan Lance Taylor <ian@airs.com>1995-09-08 15:50:29 +0000
commit1dff79026a659ca1ae5613cf98c2b62a5c0f98a4 (patch)
treef9b96639d95fbff4f350de752a901f7707f0a1c7 /bfd/configure.in
parent824155e843914bf6c1d8269030f9f6442333f065 (diff)
downloadgdb-1dff79026a659ca1ae5613cf98c2b62a5c0f98a4.zip
gdb-1dff79026a659ca1ae5613cf98c2b62a5c0f98a4.tar.gz
gdb-1dff79026a659ca1ae5613cf98c2b62a5c0f98a4.tar.bz2
* configure.in: Only check for <sys/procfs.h> on a native system,
and make sure it defines prstatus_t. * configure: Rebuild.
Diffstat (limited to 'bfd/configure.in')
-rw-r--r--bfd/configure.in16
1 files changed, 15 insertions, 1 deletions
diff --git a/bfd/configure.in b/bfd/configure.in
index daeb682..5808c96 100644
--- a/bfd/configure.in
+++ b/bfd/configure.in
@@ -53,7 +53,7 @@ AC_SUBST(HOST_64BIT_LONG)
BFD_CC_FOR_BUILD
AC_CHECK_HEADERS(stddef.h string.h strings.h stdlib.h time.h unistd.h)
-AC_CHECK_HEADERS(fcntl.h sys/file.h sys/procfs.h)
+AC_CHECK_HEADERS(fcntl.h sys/file.h)
AC_CHECK_FUNCS(fcntl)
BFD_BINARY_FOPEN
@@ -237,6 +237,20 @@ changequote([,])dnl
rs6000-core.o) COREFLAG="$COREFLAG -DAIX_CORE" ;;
trad-core.o) COREFLAG="$COREFLAG -DTRAD_CORE" ;;
esac
+
+ # The ELF code uses the native <sys/procfs.h> to handle core files.
+ # Define HAVE_SYS_PROCFS_H if the file exists and defines
+ # prstatus_t.
+ AC_MSG_CHECKING([for sys/procfs.h])
+ AC_CACHE_VAL(bfd_cv_header_sys_procfs_h,
+ [AC_TRY_COMPILE([#include <sys/procfs.h>],
+ [prstatus_t t;],
+ bfd_cv_header_sys_procfs_h=yes, bfd_cv_header_sys_procfs_h=no)])
+ AC_MSG_RESULT($bfd_cv_header_sys_procfs_h)
+ if test $bfd_cv_header_sys_procfs_h = yes; then
+ AC_DEFINE(HAVE_SYS_PROCFS_H)
+ fi
+
fi
AC_SUBST(COREFILE)
AC_SUBST(COREFLAG)