dnl Process this file with autoconf to produce a configure script.
dnl
-dnl Copyright (C) 2012-2021 Free Software Foundation, Inc.
+dnl Copyright (C) 2012-2023 Free Software Foundation, Inc.
dnl
dnl This file is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE
+AM_SILENT_RULES([yes])
AC_PROG_CC
AC_GNU_SOURCE
[Have readelf and objdump follow debug links by default])
+
+
+AC_ARG_ENABLE(colored-disassembly,
+[AS_HELP_STRING([--enable-colored-disassembly],
+ [Have objdump use colors in its disassembly by default])], [
+if test "${enableval}" = no; then
+ default_for_colored_disassembly=0
+else
+ default_for_colored_disassembly=1
+fi], [default_for_colored_disassembly=0])
+
+AC_DEFINE_UNQUOTED(DEFAULT_FOR_COLORED_DISASSEMBLY, $default_for_colored_disassembly,
+ [Have objdump use colors in its disassembly by default])
+
+
AC_DEBUGINFOD
GCC_ENABLE([libctf], [yes], [], [Handle .ctf type-info sections])
esac
AC_SUBST(DEMANGLER_NAME)
-AC_CHECK_SIZEOF([long])
-AC_CHECK_SIZEOF([long long])
-
# We use headers from include/ that check various HAVE_*_H macros, thus
# should ensure they are set by configure. This is true even when C99
# guarantees they are available.
sys/stat.h sys/time.h sys/types.h unistd.h)
AC_HEADER_SYS_WAIT
AC_FUNC_MMAP
-AC_CHECK_FUNCS(getc_unlocked mkdtemp mkstemp sbrk utimensat utimes)
+AC_CHECK_FUNCS(fseeko fseeko64 getc_unlocked mkdtemp mkstemp utimensat utimes)
AC_MSG_CHECKING([for mbstate_t])
AC_TRY_COMPILE([#include <wchar.h>],
AC_DEFINE(HAVE_GOOD_UTIME_H, 1, [Does <utime.h> define struct utimbuf?])
fi
-AC_CHECK_DECLS([asprintf, environ, getc_unlocked, sbrk, stpcpy])
+AC_CHECK_DECLS([asprintf, environ, getc_unlocked, stpcpy, strnlen])
-# Link in zlib if we can. This allows us to read compressed debug
+# Link in zlib/zstd 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).
AM_ZLIB
+AC_ZSTD
BFD_BINARY_FOPEN
+# Support for the msgpack C library.
+AC_ARG_WITH([msgpack],
+ AC_HELP_STRING([--with-msgpack], [Enable msgpack support (auto/yes/no)]),
+ [],
+ [with_msgpack=auto])
+
+AS_IF([test "$with_msgpack" != no],
+ [PKG_CHECK_MODULES(MSGPACK, msgpack,
+ [AC_DEFINE([HAVE_MSGPACK], [1], [Define to 1 if msgpack is available.])],
+ [AS_IF([test "$with_msgpack" = yes],
+ [AC_MSG_ERROR([--with-msgpack was given, but msgpack is missing or unusable.])])])])
+
# target-specific stuff:
# Canonicalize the secondary target names.
fi
DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_I386"
BUILD_DLLWRAP='$(DLLWRAP_PROG)$(EXEEXT)'
- od_vectors="$od_vectors objdump_private_desc_xcoff"
+ od_vectors="$od_vectors objdump_private_desc_xcoff objdump_private_desc_pe"
else
case $targ in
*-*-hms*) BUILD_SRCONV='$(SRCONV_PROG)' ;;
esac
case $targ in
+ aarch64-*-mingw*)
+ BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
+ if test -z "$DLLTOOL_DEFAULT"; then
+ DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_AARCH64"
+ fi
+ DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_AARCH64"
+ BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
+ BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)'
+ BUILD_DLLWRAP='$(DLLWRAP_PROG)$(EXEEXT)'
+ ;;
arm-wince-pe* | arm-*-wince | arm*-*-cegcc* | arm*-*-mingw32ce*)
BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
if test -z "$DLLTOOL_DEFAULT"; then
BUILD_DLLWRAP='$(DLLWRAP_PROG)$(EXEEXT)'
;;
changequote(,)dnl
- i[3-7]86-*-pe* | i[3-7]86-*-cygwin* | i[3-7]86-*-mingw32** | i[3-7]86-*-netbsdpe*)
+ i[3-7]86-*-pe* | i[3-7]86-*-cygwin* | i[3-7]86-*-mingw32**)
changequote([,])dnl
BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
if test -z "$DLLTOOL_DEFAULT"; then
spu-*-*)
BUILD_MISC="${BUILD_MISC} "'bin2c$(EXEEXT_FOR_BUILD)'
;;
- mips*-*-pe)
- BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
- if test -z "$DLLTOOL_DEFAULT"; then
- DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_MIPS"
- fi
- DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MIPS"
- BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
- BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)'
- ;;
mcore-*-pe)
BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
if test -z "$DLLTOOL_DEFAULT"; then
powerpc*-*-aix* | rs6000-*-aix*)
od_vectors="$od_vectors objdump_private_desc_xcoff"
;;
+ *-*-pe* | *-*-cygwin* | *-*-mingw*)
+ od_vectors="$od_vectors objdump_private_desc_pe"
+ ;;
*-*-darwin*)
od_vectors="$od_vectors objdump_private_desc_mach_o"
;;
od_files="$od_files od-elf32_avr" ;;
objdump_private_desc_xcoff)
od_files="$od_files od-xcoff" ;;
+ objdump_private_desc_pe)
+ od_files="$od_files od-pe" ;;
objdump_private_desc_mach_o)
od_files="$od_files od-macho" ;;
*) AC_MSG_ERROR(*** unknown private vector $i) ;;
AC_SUBST(htmldir)
AC_SUBST(pdfdir)
-AC_CONFIG_FILES(Makefile doc/Makefile po/Makefile.in:po/Make-in)
+AC_CONFIG_FILES(Makefile po/Makefile.in:po/Make-in)
AC_OUTPUT
GNU_MAKE_JOBSERVER