This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Patch for binutils configure cleanup
- From: Steve Ellcey <sje at cup dot hp dot com>
- To: binutils at sourceware dot org
- Date: Thu, 30 Jun 2005 09:40:12 -0700 (PDT)
- Subject: Patch for binutils configure cleanup
- Reply-to: sje at cup dot hp dot com
This is another patch to use the new features of autoconf 2.5*. This
one is for the binutils subdirectory. It replaces uses of
BFD_NEED_DECLARATION with AC_CHECK_DECLS and it replaces the expanded
version of bfd/warning.m4 with AM_BINUTILS_WARNINGS.
Tested on ia64 hpux with no regressions.
OK for checkin?
Steve Ellcey
sje@cup.hp.com
binutils/ChangeLog
2005-06-30 Steve Ellcey <sje@cup.hp.com>
* configure.in (AM_BINUTILS_WARNINGS): Add.
(BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
* configure: Regenerate.
* config.in: Regenerate.
* objdump.c (NEED_DECLARATION_*): Replace with !HAVE_DECL_*.
* bucomm.h: (NEED_DECLARATION_*): Ditto.
*** src.orig/binutils/configure.in Thu Jun 30 09:16:16 2005
--- src/binutils/configure.in Thu Jun 30 09:15:39 2005
*************** AC_ARG_ENABLE(commonbfdlib,
*** 29,77 ****
*) AC_MSG_ERROR([bad value ${enableval} for BFD commonbfdlib option]) ;;
esac])dnl
! dnl FIXME: The following is bfd/warning.m4 contents expanded
! dnl When converting to current autotools, please replace with
! dnl AM_BINUTILS_WARNINGS
! WARN_CFLAGS="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
!
! AC_ARG_ENABLE(werror,
! [ --enable-werror treat compile warnings as errors],
! [case "${enableval}" in
! yes | y) ERROR_ON_WARNING="yes" ;;
! no | n) ERROR_ON_WARNING="no" ;;
! *) AC_MSG_ERROR(bad value ${enableval} for --enable-werror) ;;
! esac])
!
! # Enable -Werror by default when using gcc
! if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
! ERROR_ON_WARNING=yes
! fi
!
! NO_WERROR=
! if test "${ERROR_ON_WARNING}" = yes ; then
! WARN_CFLAGS="$WARN_CFLAGS -Werror"
! NO_WERROR="-Wno-error"
! fi
- AC_ARG_ENABLE(build-warnings,
- [ --enable-build-warnings Enable build-time compiler warnings],
- [case "${enableval}" in
- yes) ;;
- no) WARN_CFLAGS="-w";;
- ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- WARN_CFLAGS="${WARN_CFLAGS} ${t}";;
- *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- WARN_CFLAGS="${t} ${WARN_CFLAGS}";;
- *) WARN_CFLAGS=`echo "${enableval}" | sed -e "s/,/ /g"`;;
- esac])
-
- if test x"$silent" != x"yes" && test x"$WARN_CFLAGS" != x""; then
- echo "Setting warning flags = $WARN_CFLAGS" 6>&1
- fi
-
- AC_SUBST(WARN_CFLAGS)
- AC_SUBST(NO_WERROR)
-
AM_CONFIG_HEADER(config.h:config.in)
if test -z "$target" ; then
--- 29,36 ----
*) AC_MSG_ERROR([bad value ${enableval} for BFD commonbfdlib option]) ;;
esac])dnl
! AM_BINUTILS_WARNINGS
AM_CONFIG_HEADER(config.h:config.in)
if test -z "$target" ; then
*************** if test $bu_cv_header_utime_h = yes; the
*** 212,223 ****
AC_DEFINE(HAVE_GOOD_UTIME_H, 1, [Does <utime.h> define struct utimbuf?])
fi
! BFD_NEED_DECLARATION(fprintf)
! BFD_NEED_DECLARATION(strstr)
! BFD_NEED_DECLARATION(sbrk)
! BFD_NEED_DECLARATION(getenv)
! BFD_NEED_DECLARATION(environ)
! AC_CHECK_DECLS(getc_unlocked)
BFD_BINARY_FOPEN
--- 171,177 ----
AC_DEFINE(HAVE_GOOD_UTIME_H, 1, [Does <utime.h> define struct utimbuf?])
fi
! AC_CHECK_DECLS([fprintf, strstr, sbrk, getenv, environ, getc_unlocked])
BFD_BINARY_FOPEN
*** src.orig/binutils/objdump.c Thu Jun 30 09:16:23 2005
--- src/binutils/objdump.c Thu Jun 30 09:15:49 2005
***************
*** 65,71 ****
#define BYTES_IN_WORD 32
#include "aout/aout64.h"
! #ifdef NEED_DECLARATION_FPRINTF
/* This is needed by init_disassemble_info(). */
extern int fprintf (FILE *, const char *, ...);
#endif
--- 65,71 ----
#define BYTES_IN_WORD 32
#include "aout/aout64.h"
! #if !HAVE_DECL_FPRINTF
/* This is needed by init_disassemble_info(). */
extern int fprintf (FILE *, const char *, ...);
#endif
*** src.orig/binutils/bucomm.h Thu Jun 30 09:16:30 2005
--- src/binutils/bucomm.h Thu Jun 30 09:15:56 2005
*************** extern char *strrchr ();
*** 72,92 ****
#endif
#endif
! #ifdef NEED_DECLARATION_STRSTR
extern char *strstr ();
#endif
#ifdef HAVE_SBRK
! #ifdef NEED_DECLARATION_SBRK
extern char *sbrk ();
#endif
#endif
! #ifdef NEED_DECLARATION_GETENV
extern char *getenv ();
#endif
! #ifdef NEED_DECLARATION_ENVIRON
extern char **environ;
#endif
--- 72,92 ----
#endif
#endif
! #if !HAVE_DECL_STRSTR
extern char *strstr ();
#endif
#ifdef HAVE_SBRK
! #if !HAVE_DECL_SBRK
extern char *sbrk ();
#endif
#endif
! #if !HAVE_DECL_GETENV
extern char *getenv ();
#endif
! #if !HAVE_DECL_ENVIRON
extern char **environ;
#endif