From 14abd0fbf038d0e7cd2f76061538c309b5fd8ca9 Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Sat, 4 Jan 2003 00:34:43 +0000 Subject: * configure.in: Call AC_GNU_SOURCE. Check for pread64 using AC_CHECK_FUNCS and remove the old check for pread64. * acinclude.m4 (AC_GNU_SOURCE): New macro. * acconfig.h (_GNU_SOURCE): Add. (HAVE_PREAD64): Remove. * configure, aclocal.m4, config.in: Regenerated. --- gdb/configure.in | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) (limited to 'gdb/configure.in') diff --git a/gdb/configure.in b/gdb/configure.in index 4b3c995..7bfe6df 100644 --- a/gdb/configure.in +++ b/gdb/configure.in @@ -26,6 +26,7 @@ AC_CONFIG_HEADER(config.h:config.in) AM_MAINTAINER_MODE AC_PROG_CC +AC_GNU_SOURCE AC_AIX AC_ISC_POSIX AM_PROG_CC_STDC @@ -307,6 +308,7 @@ AC_FUNC_MMAP AC_FUNC_VFORK AC_CHECK_FUNCS(canonicalize_file_name realpath) AC_CHECK_FUNCS(poll) +AC_CHECK_FUNCS(pread64) AC_CHECK_FUNCS(sbrk) AC_CHECK_FUNCS(setpgid setpgrp) AC_CHECK_FUNCS(sigaction sigprocmask sigsetmask) @@ -826,23 +828,6 @@ if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then [Define if has the TD_NOTALLOC error code.]) fi -dnl linux-proc.c wants to use pread64, which may require special CFLAGS -dnl -D_BSD_SOURCE is normally assumed but we have to specify it because of -dnl -D_XOPEN_SOURCE=500. -if test $host = $target; then - case $target in - *-linux*) - save_CFLAGS=$CFLAGS - CFLAGS="$CFLAGS -D_BSD_SOURCE -D_XOPEN_SOURCE=500 -D_LARGEFILE64_SOURCE" - AC_TRY_LINK([#include ], - [pread64 (0, NULL, 0, 0);], - [ENABLE_CFLAGS="$ENABLE_CFLAGS -D_BSD_SOURCE -D_XOPEN_SOURCE=500 -D_LARGEFILE64_SOURCE" - AC_DEFINE(HAVE_PREAD64)], []) - CFLAGS=$save_CFLAGS - ;; - esac -fi - dnl Handle optional features that can be enabled. # NOTE: Don't add -Wall or -Wunused, they both include -- cgit v1.1