* 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.
This commit is contained in:
parent
a1ba22c71a
commit
14abd0fbf0
7 changed files with 657 additions and 608 deletions
|
@ -1,3 +1,12 @@
|
||||||
|
2003-01-04 Mark Kettenis <kettenis@gnu.org>
|
||||||
|
|
||||||
|
* 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.
|
||||||
|
|
||||||
2003-01-03 Andrew Cagney <ac131313@redhat.com>
|
2003-01-03 Andrew Cagney <ac131313@redhat.com>
|
||||||
|
|
||||||
* alpha-tdep.c: Use get_frame_saved_regs.
|
* alpha-tdep.c: Use get_frame_saved_regs.
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/* Enable GNU extensions on systems that have them. */
|
||||||
|
#ifndef _GNU_SOURCE
|
||||||
|
# undef _GNU_SOURCE
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Define if your struct reg has r_fs. */
|
/* Define if your struct reg has r_fs. */
|
||||||
#undef HAVE_STRUCT_REG_R_FS
|
#undef HAVE_STRUCT_REG_R_FS
|
||||||
|
|
||||||
|
@ -46,9 +51,6 @@
|
||||||
/* Define if <sys/procfs.h> has pr_siginfo64_t */
|
/* Define if <sys/procfs.h> has pr_siginfo64_t */
|
||||||
#undef HAVE_PR_SIGINFO64_T
|
#undef HAVE_PR_SIGINFO64_T
|
||||||
|
|
||||||
/* Define if the pread64 function is available. */
|
|
||||||
#undef HAVE_PREAD64
|
|
||||||
|
|
||||||
/* Define if <link.h> exists and defines struct link_map which has
|
/* Define if <link.h> exists and defines struct link_map which has
|
||||||
members with an ``l_'' prefix. (For Solaris, SVR4, and
|
members with an ``l_'' prefix. (For Solaris, SVR4, and
|
||||||
SVR4-like systems.) */
|
SVR4-like systems.) */
|
||||||
|
|
|
@ -918,3 +918,12 @@ size_t iconv();
|
||||||
fi
|
fi
|
||||||
AC_SUBST(LIBICONV)
|
AC_SUBST(LIBICONV)
|
||||||
])
|
])
|
||||||
|
|
||||||
|
# AC_GNU_SOURCE
|
||||||
|
# -------------
|
||||||
|
# FIXME: Remove thise once we start using Autoconf 2.5x (x>=4).
|
||||||
|
AC_DEFUN([AC_GNU_SOURCE],
|
||||||
|
[AC_BEFORE([$0], [AC_TRY_COMPILE])dnl
|
||||||
|
AC_BEFORE([$0], [AC_TRY_RUN])dnl
|
||||||
|
AC_DEFINE([_GNU_SOURCE])
|
||||||
|
])
|
||||||
|
|
153
gdb/aclocal.m4
vendored
153
gdb/aclocal.m4
vendored
|
@ -1,6 +1,6 @@
|
||||||
dnl aclocal.m4 generated automatically by aclocal 1.4
|
dnl aclocal.m4 generated automatically by aclocal 1.4-p5
|
||||||
|
|
||||||
dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
|
||||||
dnl This file is free software; the Free Software Foundation
|
dnl This file is free software; the Free Software Foundation
|
||||||
dnl gives unlimited permission to copy and/or distribute it,
|
dnl gives unlimited permission to copy and/or distribute it,
|
||||||
dnl with or without modifications, as long as this notice is preserved.
|
dnl with or without modifications, as long as this notice is preserved.
|
||||||
|
@ -753,74 +753,6 @@ ifelse(yes,no,[
|
||||||
AC_DEFUN([CY_GNU_GETTEXT],)
|
AC_DEFUN([CY_GNU_GETTEXT],)
|
||||||
])
|
])
|
||||||
|
|
||||||
dnl From Bruno Haible.
|
|
||||||
|
|
||||||
AC_DEFUN([AM_ICONV],
|
|
||||||
[
|
|
||||||
dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
|
|
||||||
dnl those with the standalone portable GNU libiconv installed).
|
|
||||||
|
|
||||||
AC_ARG_WITH([libiconv-prefix],
|
|
||||||
[ --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib], [
|
|
||||||
for dir in `echo "$withval" | tr : ' '`; do
|
|
||||||
if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
|
|
||||||
if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
|
|
||||||
done
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
|
|
||||||
am_cv_func_iconv="no, consider installing GNU libiconv"
|
|
||||||
am_cv_lib_iconv=no
|
|
||||||
AC_TRY_LINK([#include <stdlib.h>
|
|
||||||
#include <iconv.h>],
|
|
||||||
[iconv_t cd = iconv_open("","");
|
|
||||||
iconv(cd,NULL,NULL,NULL,NULL);
|
|
||||||
iconv_close(cd);],
|
|
||||||
am_cv_func_iconv=yes)
|
|
||||||
if test "$am_cv_func_iconv" != yes; then
|
|
||||||
am_save_LIBS="$LIBS"
|
|
||||||
LIBS="$LIBS -liconv"
|
|
||||||
AC_TRY_LINK([#include <stdlib.h>
|
|
||||||
#include <iconv.h>],
|
|
||||||
[iconv_t cd = iconv_open("","");
|
|
||||||
iconv(cd,NULL,NULL,NULL,NULL);
|
|
||||||
iconv_close(cd);],
|
|
||||||
am_cv_lib_iconv=yes
|
|
||||||
am_cv_func_iconv=yes)
|
|
||||||
LIBS="$am_save_LIBS"
|
|
||||||
fi
|
|
||||||
])
|
|
||||||
if test "$am_cv_func_iconv" = yes; then
|
|
||||||
AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
|
|
||||||
AC_MSG_CHECKING([for iconv declaration])
|
|
||||||
AC_CACHE_VAL(am_cv_proto_iconv, [
|
|
||||||
AC_TRY_COMPILE([
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <iconv.h>
|
|
||||||
extern
|
|
||||||
#ifdef __cplusplus
|
|
||||||
"C"
|
|
||||||
#endif
|
|
||||||
#if defined(__STDC__) || defined(__cplusplus)
|
|
||||||
size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
|
|
||||||
#else
|
|
||||||
size_t iconv();
|
|
||||||
#endif
|
|
||||||
], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
|
|
||||||
am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
|
|
||||||
am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
|
|
||||||
AC_MSG_RESULT([$]{ac_t:-
|
|
||||||
}[$]am_cv_proto_iconv)
|
|
||||||
AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
|
|
||||||
[Define as const if the declaration of iconv() needs const.])
|
|
||||||
fi
|
|
||||||
LIBICONV=
|
|
||||||
if test "$am_cv_lib_iconv" = yes; then
|
|
||||||
LIBICONV="-liconv"
|
|
||||||
fi
|
|
||||||
AC_SUBST(LIBICONV)
|
|
||||||
])
|
|
||||||
|
|
||||||
|
|
||||||
# Copyright 1996, 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
|
# Copyright 1996, 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
@ -927,12 +859,89 @@ case "x$am_cv_prog_cc_stdc" in
|
||||||
esac
|
esac
|
||||||
])
|
])
|
||||||
|
|
||||||
|
dnl From Bruno Haible.
|
||||||
|
|
||||||
|
AC_DEFUN([AM_ICONV],
|
||||||
|
[
|
||||||
|
dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
|
||||||
|
dnl those with the standalone portable GNU libiconv installed).
|
||||||
|
|
||||||
|
AC_ARG_WITH([libiconv-prefix],
|
||||||
|
[ --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib], [
|
||||||
|
for dir in `echo "$withval" | tr : ' '`; do
|
||||||
|
if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
|
||||||
|
if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
|
||||||
|
done
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
|
||||||
|
am_cv_func_iconv="no, consider installing GNU libiconv"
|
||||||
|
am_cv_lib_iconv=no
|
||||||
|
AC_TRY_LINK([#include <stdlib.h>
|
||||||
|
#include <iconv.h>],
|
||||||
|
[iconv_t cd = iconv_open("","");
|
||||||
|
iconv(cd,NULL,NULL,NULL,NULL);
|
||||||
|
iconv_close(cd);],
|
||||||
|
am_cv_func_iconv=yes)
|
||||||
|
if test "$am_cv_func_iconv" != yes; then
|
||||||
|
am_save_LIBS="$LIBS"
|
||||||
|
LIBS="$LIBS -liconv"
|
||||||
|
AC_TRY_LINK([#include <stdlib.h>
|
||||||
|
#include <iconv.h>],
|
||||||
|
[iconv_t cd = iconv_open("","");
|
||||||
|
iconv(cd,NULL,NULL,NULL,NULL);
|
||||||
|
iconv_close(cd);],
|
||||||
|
am_cv_lib_iconv=yes
|
||||||
|
am_cv_func_iconv=yes)
|
||||||
|
LIBS="$am_save_LIBS"
|
||||||
|
fi
|
||||||
|
])
|
||||||
|
if test "$am_cv_func_iconv" = yes; then
|
||||||
|
AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
|
||||||
|
AC_MSG_CHECKING([for iconv declaration])
|
||||||
|
AC_CACHE_VAL(am_cv_proto_iconv, [
|
||||||
|
AC_TRY_COMPILE([
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <iconv.h>
|
||||||
|
extern
|
||||||
|
#ifdef __cplusplus
|
||||||
|
"C"
|
||||||
|
#endif
|
||||||
|
#if defined(__STDC__) || defined(__cplusplus)
|
||||||
|
size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
|
||||||
|
#else
|
||||||
|
size_t iconv();
|
||||||
|
#endif
|
||||||
|
], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
|
||||||
|
am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
|
||||||
|
am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
|
||||||
|
AC_MSG_RESULT([$]{ac_t:-
|
||||||
|
}[$]am_cv_proto_iconv)
|
||||||
|
AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
|
||||||
|
[Define as const if the declaration of iconv() needs const.])
|
||||||
|
fi
|
||||||
|
LIBICONV=
|
||||||
|
if test "$am_cv_lib_iconv" = yes; then
|
||||||
|
LIBICONV="-liconv"
|
||||||
|
fi
|
||||||
|
AC_SUBST(LIBICONV)
|
||||||
|
])
|
||||||
|
|
||||||
|
# AC_GNU_SOURCE
|
||||||
|
# -------------
|
||||||
|
# FIXME: Remove thise once we start using Autoconf 2.5x (x>=4).
|
||||||
|
AC_DEFUN([AC_GNU_SOURCE],
|
||||||
|
[AC_BEFORE([$0], [AC_TRY_COMPILE])dnl
|
||||||
|
AC_BEFORE([$0], [AC_TRY_RUN])dnl
|
||||||
|
AC_DEFINE([_GNU_SOURCE])
|
||||||
|
])
|
||||||
|
|
||||||
# Add --enable-maintainer-mode option to configure.
|
# Add --enable-maintainer-mode option to configure.
|
||||||
# From Jim Meyering
|
# From Jim Meyering
|
||||||
|
|
||||||
# serial 1
|
# serial 1
|
||||||
|
|
||||||
AC_DEFUN(AM_MAINTAINER_MODE,
|
AC_DEFUN([AM_MAINTAINER_MODE],
|
||||||
[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
|
[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
|
||||||
dnl maintainer-mode is disabled by default
|
dnl maintainer-mode is disabled by default
|
||||||
AC_ARG_ENABLE(maintainer-mode,
|
AC_ARG_ENABLE(maintainer-mode,
|
||||||
|
@ -949,7 +958,7 @@ AC_DEFUN(AM_MAINTAINER_MODE,
|
||||||
|
|
||||||
# Define a conditional.
|
# Define a conditional.
|
||||||
|
|
||||||
AC_DEFUN(AM_CONDITIONAL,
|
AC_DEFUN([AM_CONDITIONAL],
|
||||||
[AC_SUBST($1_TRUE)
|
[AC_SUBST($1_TRUE)
|
||||||
AC_SUBST($1_FALSE)
|
AC_SUBST($1_FALSE)
|
||||||
if $2; then
|
if $2; then
|
||||||
|
|
|
@ -71,15 +71,17 @@
|
||||||
/* Define vfork as fork if vfork does not work. */
|
/* Define vfork as fork if vfork does not work. */
|
||||||
#undef vfork
|
#undef vfork
|
||||||
|
|
||||||
|
/* Enable GNU extensions on systems that have them. */
|
||||||
|
#ifndef _GNU_SOURCE
|
||||||
|
# undef _GNU_SOURCE
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Define if your struct reg has r_fs. */
|
/* Define if your struct reg has r_fs. */
|
||||||
#undef HAVE_STRUCT_REG_R_FS
|
#undef HAVE_STRUCT_REG_R_FS
|
||||||
|
|
||||||
/* Define if your struct reg has r_gs. */
|
/* Define if your struct reg has r_gs. */
|
||||||
#undef HAVE_STRUCT_REG_R_GS
|
#undef HAVE_STRUCT_REG_R_GS
|
||||||
|
|
||||||
/* Define if the pread64 function is available. */
|
|
||||||
#undef HAVE_PREAD64
|
|
||||||
|
|
||||||
/* Define if <link.h> exists and defines struct link_map which has
|
/* Define if <link.h> exists and defines struct link_map which has
|
||||||
members with an ``l_'' prefix. (For Solaris, SVR4, and
|
members with an ``l_'' prefix. (For Solaris, SVR4, and
|
||||||
SVR4-like systems.) */
|
SVR4-like systems.) */
|
||||||
|
@ -204,6 +206,9 @@
|
||||||
/* Define if you have the poll function. */
|
/* Define if you have the poll function. */
|
||||||
#undef HAVE_POLL
|
#undef HAVE_POLL
|
||||||
|
|
||||||
|
/* Define if you have the pread64 function. */
|
||||||
|
#undef HAVE_PREAD64
|
||||||
|
|
||||||
/* Define if you have the putenv function. */
|
/* Define if you have the putenv function. */
|
||||||
#undef HAVE_PUTENV
|
#undef HAVE_PUTENV
|
||||||
|
|
||||||
|
|
1056
gdb/configure
vendored
1056
gdb/configure
vendored
File diff suppressed because it is too large
Load diff
|
@ -26,6 +26,7 @@ AC_CONFIG_HEADER(config.h:config.in)
|
||||||
AM_MAINTAINER_MODE
|
AM_MAINTAINER_MODE
|
||||||
|
|
||||||
AC_PROG_CC
|
AC_PROG_CC
|
||||||
|
AC_GNU_SOURCE
|
||||||
AC_AIX
|
AC_AIX
|
||||||
AC_ISC_POSIX
|
AC_ISC_POSIX
|
||||||
AM_PROG_CC_STDC
|
AM_PROG_CC_STDC
|
||||||
|
@ -307,6 +308,7 @@ AC_FUNC_MMAP
|
||||||
AC_FUNC_VFORK
|
AC_FUNC_VFORK
|
||||||
AC_CHECK_FUNCS(canonicalize_file_name realpath)
|
AC_CHECK_FUNCS(canonicalize_file_name realpath)
|
||||||
AC_CHECK_FUNCS(poll)
|
AC_CHECK_FUNCS(poll)
|
||||||
|
AC_CHECK_FUNCS(pread64)
|
||||||
AC_CHECK_FUNCS(sbrk)
|
AC_CHECK_FUNCS(sbrk)
|
||||||
AC_CHECK_FUNCS(setpgid setpgrp)
|
AC_CHECK_FUNCS(setpgid setpgrp)
|
||||||
AC_CHECK_FUNCS(sigaction sigprocmask sigsetmask)
|
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 <thread_db.h> has the TD_NOTALLOC error code.])
|
[Define if <thread_db.h> has the TD_NOTALLOC error code.])
|
||||||
fi
|
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 <unistd.h>],
|
|
||||||
[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.
|
dnl Handle optional features that can be enabled.
|
||||||
|
|
||||||
# NOTE: Don't add -Wall or -Wunused, they both include
|
# NOTE: Don't add -Wall or -Wunused, they both include
|
||||||
|
|
Loading…
Add table
Reference in a new issue