dnl Process this file with autoconf to produce a configure script.
dnl
-AC_PREREQ(2.57)
-AC_INIT(ar.c)
+AC_PREREQ(2.59)
+AC_INIT
+AC_CONFIG_SRCDIR(ar.c)
-AC_CANONICAL_SYSTEM
+AC_CANONICAL_TARGET
AC_ISC_POSIX
changequote(,)dnl
AC_PROG_CC
AC_GNU_SOURCE
-AC_PROG_LIBTOOL
+AC_USE_SYSTEM_EXTENSIONS
+
+ACX_LARGEFILE
+LT_INIT
AC_ARG_ENABLE(targets,
[ --enable-targets alternative target configurations],
[case "${enableval}" in
- yes | "") AC_ERROR(enable-targets option must specify target names or 'all')
+ yes | "") AC_MSG_ERROR(enable-targets option must specify target names or 'all')
;;
no) enable_targets= ;;
*) enable_targets=$enableval ;;
esac])dnl
-AC_ARG_ENABLE(commonbfdlib,
-[ --enable-commonbfdlib build shared BFD/opcodes/libiberty library],
-[case "${enableval}" in
- yes) commonbfdlib=true ;;
- no) commonbfdlib=false ;;
- *) AC_MSG_ERROR([bad value ${enableval} for BFD commonbfdlib option]) ;;
-esac])dnl
AM_BINUTILS_WARNINGS
-AM_CONFIG_HEADER(config.h:config.in)
+AC_CONFIG_HEADERS(config.h:config.in)
if test -z "$target" ; then
AC_MSG_ERROR(Unrecognized target system type; please check config.sub.)
AC_PROG_YACC
AM_PROG_LEX
-ALL_LINGUAS="fr tr ja es sv da zh_CN ru ro rw zh_TW fi vi uk sk"
+ALL_LINGUAS="da es fi fr id ja ro ru rw sk sv tr uk vi zh_CN zh_TW"
ZW_GNU_GETTEXT_SISTER_DIR
AM_PO_SUBDIRS
AC_DEFINE([HAVE_MKDTEMP], 1,
[Define to 1 if you have the `mkdtemp' function.]))
-# Check whether fopen64 is available and whether _LARGEFILE64_SOURCE
-# needs to be defined for it
-AC_MSG_CHECKING([for fopen64])
-AC_CACHE_VAL(bu_cv_have_fopen64,
-[AC_TRY_LINK([#include <stdio.h>], [FILE *f = fopen64 ("/tmp/foo","r");],
-bu_cv_have_fopen64=yes,
-[saved_CPPFLAGS=$CPPFLAGS
- CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE"
- AC_TRY_LINK([#include <stdio.h>], [FILE *f = fopen64 ("/tmp/foo","r");],
-bu_cv_have_fopen64="need -D_LARGEFILE64_SOURCE",
-bu_cv_have_fopen64=no)
- CPPFLAGS=$saved_CPPFLAGS])])
-AC_MSG_RESULT($bu_cv_have_fopen64)
-if test "$bu_cv_have_fopen64" != no; then
- AC_DEFINE([HAVE_FOPEN64], 1,
- [Is fopen64 available?])
-fi
-AC_MSG_CHECKING([for stat64])
-AC_CACHE_VAL(bu_cv_have_stat64,
-[AC_TRY_LINK([#include <sys/stat.h>], [struct stat64 st; stat64 ("/tmp/foo", &st);],
-bu_cv_have_stat64=yes,
-[saved_CPPFLAGS=$CPPFLAGS
- CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE"
- AC_TRY_LINK([#include <sys/stat.h>], [struct stat64 st; stat64 ("/tmp/foo", &st);],
-bu_cv_have_stat64="need -D_LARGEFILE64_SOURCE",
-bu_cv_have_stat64=no)
- CPPFLAGS=$saved_CPPFLAGS])])
-AC_MSG_RESULT($bu_cv_have_stat64)
-if test "$bu_cv_have_stat64" != no; then
- AC_DEFINE([HAVE_STAT64], 1,
- [Is stat64 available?])
-fi
-if test "$bu_cv_have_fopen64" = "need -D_LARGEFILE64_SOURCE" \
- || test "$bu_cv_have_stat64" = "need -D_LARGEFILE64_SOURCE"; then
- AC_DEFINE([_LARGEFILE64_SOURCE], 1,
- [Enable LFS])
- CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE"
-fi
-
# Some systems have frexp only in -lm, not in -lc.
AC_SEARCH_LIBS(frexp, m)
AC_MSG_CHECKING(for time_t in time.h)
AC_CACHE_VAL(bu_cv_decl_time_t_time_h,
-[AC_TRY_COMPILE([#include <time.h>], [time_t i;],
+[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <time.h>], [time_t i;])],
bu_cv_decl_time_t_time_h=yes, bu_cv_decl_time_t_time_h=no)])
AC_MSG_RESULT($bu_cv_decl_time_t_time_h)
if test $bu_cv_decl_time_t_time_h = yes; then
AC_MSG_CHECKING(for time_t in sys/types.h)
AC_CACHE_VAL(bu_cv_decl_time_t_types_h,
-[AC_TRY_COMPILE([#include <sys/types.h>], [time_t i;],
+[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <sys/types.h>], [time_t i;])],
bu_cv_decl_time_t_types_h=yes, bu_cv_decl_time_t_types_h=no)])
AC_MSG_RESULT($bu_cv_decl_time_t_types_h)
if test $bu_cv_decl_time_t_types_h = yes; then
AC_MSG_CHECKING(for a known getopt prototype in unistd.h)
AC_CACHE_VAL(bu_cv_decl_getopt_unistd_h,
-[AC_TRY_COMPILE([#include <unistd.h>], [extern int getopt (int, char *const*, const char *);],
+[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <unistd.h>], [extern int getopt (int, char *const*, const char *);])],
bu_cv_decl_getopt_unistd_h=yes, bu_cv_decl_getopt_unistd_h=no)])
AC_MSG_RESULT($bu_cv_decl_getopt_unistd_h)
if test $bu_cv_decl_getopt_unistd_h = yes; then
# by default.
AC_MSG_CHECKING([for utime.h])
AC_CACHE_VAL(bu_cv_header_utime_h,
-[AC_TRY_COMPILE([#include <sys/types.h>
+[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <sys/types.h>
#ifdef HAVE_TIME_H
#include <time.h>
#endif
#include <utime.h>],
-[struct utimbuf s;],
+[struct utimbuf s;])],
bu_cv_header_utime_h=yes, bu_cv_header_utime_h=no)])
AC_MSG_RESULT($bu_cv_header_utime_h)
if test $bu_cv_header_utime_h = yes; then
AC_CHECK_DECLS([fprintf, stpcpy, strstr, sbrk, getenv, environ, getc_unlocked,
snprintf, vsnprintf])
+# Link in zlib if we can. This allows us to read compressed debug
+# sections. This is used only by readelf.c (objdump uses bfd for
+# reading compressed sections).
+AC_SEARCH_LIBS(zlibVersion, z, [AC_CHECK_HEADERS(zlib.h)])
+
BFD_BINARY_FOPEN
# target-specific stuff:
BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)'
;;
- arm-wince-pe* | arm-*-wince)
+ arm-wince-pe* | arm-*-wince | arm*-*-cegcc* | arm*-*-mingw32ce*)
BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
if test -z "$DLLTOOL_DEFAULT"; then
DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_ARM_WINCE"
powerpc*-aix5.[01])
changequote([,])dnl
;;
- powerpc*-aix5.*)
+changequote(,)dnl
+ powerpc*-aix[5-9].*)
+changequote([,])dnl
OBJDUMP_DEFS="-DAIX_WEAK_SUPPORT"
;;
powerpc*-*-pe* | powerpc*-*-cygwin*)
[Define to 1 if user symbol names have a leading underscore, 0 if not.])
# Emulation
-for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
-do
- # Canonicalize the secondary target names.
- result=`$ac_config_sub $targ_alias 2>/dev/null`
- if test -n "$result"; then
- targ=$result
- else
- targ=$targ_alias
- fi
-
- . ${srcdir}/configure.tgt
-
- EMULATION=$targ_emul
- EMULATION_VECTOR=$targ_emul_vector
-done
+targ=$target
+. ${srcdir}/configure.tgt
+EMULATION=$targ_emul
+EMULATION_VECTOR=$targ_emul_vector
AC_SUBST(EMULATION)
AC_SUBST(EMULATION_VECTOR)
AC_SUBST(datarootdir)
AC_SUBST(docdir)
AC_SUBST(htmldir)
+AC_SUBST(pdfdir)
-AC_OUTPUT(Makefile doc/Makefile po/Makefile.in:po/Make-in)
+AC_CONFIG_FILES(Makefile doc/Makefile po/Makefile.in:po/Make-in)
+AC_OUTPUT