From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28300 invoked by alias); 10 Jan 2005 20:02:08 -0000 Mailing-List: contact binutils-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sources.redhat.com Received: (qmail 28212 invoked from network); 10 Jan 2005 20:01:57 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 10 Jan 2005 20:01:57 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id j0AK1qSo028336 for ; Mon, 10 Jan 2005 15:01:52 -0500 Received: from localhost.redhat.com (to-dhcp51.toronto.redhat.com [172.16.14.151]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id j0AK1pr05463; Mon, 10 Jan 2005 15:01:52 -0500 Received: from [127.0.0.1] (localhost.localdomain [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 390F97D79; Mon, 10 Jan 2005 15:00:42 -0500 (EST) Message-ID: <41E2DEE8.8010204@gnu.org> Date: Mon, 10 Jan 2005 20:02:00 -0000 From: Andrew Cagney User-Agent: Mozilla Thunderbird 0.8 (X11/20041020) MIME-Version: 1.0 To: binutils@sources.redhat.com Subject: [rfa] Move some autoconf macros to bfd/bfd.m4? Content-Type: multipart/mixed; boundary="------------040905040304040909020406" X-SW-Source: 2005-01/txt/msg00099.txt.bz2 This is a multi-part message in MIME format. --------------040905040304040909020406 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 348 GDB uses a number of autoconf macros found in bfd/acinclude.m4. It accesses them by sucking in the entire contents of that file (creating sinclude hell). This patch moves those macros to a new file bfd/bfd.m4 so that GDB can include them directly. After aclocal/autoconf this still rebuilt on a PPC and amd64 GNU/Linux systems. Ok? Andrew --------------040905040304040909020406 Content-Type: text/plain; name="diffs" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="diffs" Content-length: 5279 2005-01-10 Andrew Cagney * bfd.m4: New file. * acinclude.m4: Move BFD_NEED_DECLARATION, BFD_HAVE_SYS_PROCFS_TYPE and BFD_HAVE_SYS_PROCFS_TYPE_MEMBER to the new file bfd.m4. Include bfd.m4. * aclocal.m4: Re-generate. * configure: Re-generate. Index: acinclude.m4 =================================================================== RCS file: /cvs/src/src/bfd/acinclude.m4,v retrieving revision 1.12 diff -p -u -r1.12 acinclude.m4 --- acinclude.m4 11 Sep 2004 20:22:49 -0000 1.12 +++ acinclude.m4 10 Jan 2005 19:57:00 -0000 @@ -1,5 +1,6 @@ sinclude(../config/accross.m4) sinclude(../config/acx.m4) +sinclude(bfd.m4) dnl See whether we need to use fopen-bin.h rather than fopen-same.h. AC_DEFUN([BFD_BINARY_FOPEN], @@ -44,73 +45,6 @@ else fi AC_SUBST(EXEEXT_FOR_BUILD)])dnl -dnl See whether we need a declaration for a function. -AC_DEFUN([BFD_NEED_DECLARATION], -[AC_MSG_CHECKING([whether $1 must be declared]) -AC_CACHE_VAL(bfd_cv_decl_needed_$1, -[AC_TRY_COMPILE([ -#include -#ifdef HAVE_STRING_H -#include -#else -#ifdef HAVE_STRINGS_H -#include -#endif -#endif -#ifdef HAVE_STDLIB_H -#include -#endif -#ifdef HAVE_UNISTD_H -#include -#endif], -[char *(*pfn) = (char *(*)) $1], -bfd_cv_decl_needed_$1=no, bfd_cv_decl_needed_$1=yes)]) -AC_MSG_RESULT($bfd_cv_decl_needed_$1) -if test $bfd_cv_decl_needed_$1 = yes; then - AC_DEFINE([NEED_DECLARATION_]translit($1, [a-z], [A-Z]), 1, - [Define if $1 is not declared in system header files.]) -fi -])dnl - -dnl Check for existence of a type $1 in sys/procfs.h - -AC_DEFUN([BFD_HAVE_SYS_PROCFS_TYPE], -[AC_MSG_CHECKING([for $1 in sys/procfs.h]) - AC_CACHE_VAL(bfd_cv_have_sys_procfs_type_$1, - [AC_TRY_COMPILE([ -#define _SYSCALL32 -#include ], - [$1 avar], - bfd_cv_have_sys_procfs_type_$1=yes, - bfd_cv_have_sys_procfs_type_$1=no - )]) - if test $bfd_cv_have_sys_procfs_type_$1 = yes; then - AC_DEFINE([HAVE_]translit($1, [a-z], [A-Z]), 1, - [Define if has $1.]) - fi - AC_MSG_RESULT($bfd_cv_have_sys_procfs_type_$1) -]) - - -dnl Check for existence of member $2 in type $1 in sys/procfs.h - -AC_DEFUN([BFD_HAVE_SYS_PROCFS_TYPE_MEMBER], -[AC_MSG_CHECKING([for $1.$2 in sys/procfs.h]) - AC_CACHE_VAL(bfd_cv_have_sys_procfs_type_member_$1_$2, - [AC_TRY_COMPILE([ -#define _SYSCALL32 -#include ], - [$1 avar; void* aref = (void*) &avar.$2], - bfd_cv_have_sys_procfs_type_member_$1_$2=yes, - bfd_cv_have_sys_procfs_type_member_$1_$2=no - )]) - if test $bfd_cv_have_sys_procfs_type_member_$1_$2 = yes; then - AC_DEFINE([HAVE_]translit($1, [a-z], [A-Z])[_]translit($2, [a-z], [A-Z]), 1, - [Define if has $1.$2.]) - fi - AC_MSG_RESULT($bfd_cv_have_sys_procfs_type_member_$1_$2) -]) - sinclude(../libtool.m4) dnl The lines below arrange for aclocal not to bring libtool.m4 dnl AM_PROG_LIBTOOL into aclocal.m4, while still arranging for automake Index: bfd.m4 =================================================================== RCS file: bfd.m4 diff -N bfd.m4 --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ bfd.m4 10 Jan 2005 19:57:00 -0000 @@ -0,0 +1,72 @@ +dnl This file was derived from acinclude.m4. + + +dnl See whether we need a declaration for a function. + +AC_DEFUN([BFD_NEED_DECLARATION], +[AC_MSG_CHECKING([whether $1 must be declared]) +AC_CACHE_VAL(bfd_cv_decl_needed_$1, +[AC_TRY_COMPILE([ +#include +#ifdef HAVE_STRING_H +#include +#else +#ifdef HAVE_STRINGS_H +#include +#endif +#endif +#ifdef HAVE_STDLIB_H +#include +#endif +#ifdef HAVE_UNISTD_H +#include +#endif], +[char *(*pfn) = (char *(*)) $1], +bfd_cv_decl_needed_$1=no, bfd_cv_decl_needed_$1=yes)]) +AC_MSG_RESULT($bfd_cv_decl_needed_$1) +if test $bfd_cv_decl_needed_$1 = yes; then + AC_DEFINE([NEED_DECLARATION_]translit($1, [a-z], [A-Z]), 1, + [Define if $1 is not declared in system header files.]) +fi +])dnl + + +dnl Check for existence of a type $1 in sys/procfs.h + +AC_DEFUN([BFD_HAVE_SYS_PROCFS_TYPE], +[AC_MSG_CHECKING([for $1 in sys/procfs.h]) + AC_CACHE_VAL(bfd_cv_have_sys_procfs_type_$1, + [AC_TRY_COMPILE([ +#define _SYSCALL32 +#include ], + [$1 avar], + bfd_cv_have_sys_procfs_type_$1=yes, + bfd_cv_have_sys_procfs_type_$1=no + )]) + if test $bfd_cv_have_sys_procfs_type_$1 = yes; then + AC_DEFINE([HAVE_]translit($1, [a-z], [A-Z]), 1, + [Define if has $1.]) + fi + AC_MSG_RESULT($bfd_cv_have_sys_procfs_type_$1) +]) + + +dnl Check for existence of member $2 in type $1 in sys/procfs.h + +AC_DEFUN([BFD_HAVE_SYS_PROCFS_TYPE_MEMBER], +[AC_MSG_CHECKING([for $1.$2 in sys/procfs.h]) + AC_CACHE_VAL(bfd_cv_have_sys_procfs_type_member_$1_$2, + [AC_TRY_COMPILE([ +#define _SYSCALL32 +#include ], + [$1 avar; void* aref = (void*) &avar.$2], + bfd_cv_have_sys_procfs_type_member_$1_$2=yes, + bfd_cv_have_sys_procfs_type_member_$1_$2=no + )]) + if test $bfd_cv_have_sys_procfs_type_member_$1_$2 = yes; then + AC_DEFINE([HAVE_]translit($1, [a-z], [A-Z])[_]translit($2, [a-z], [A-Z]), 1, + [Define if has $1.$2.]) + fi + AC_MSG_RESULT($bfd_cv_have_sys_procfs_type_member_$1_$2) +]) + --------------040905040304040909020406--