If at configure time the libabigail source tarball detects that
rpm2cpio and cpio are present then it enables the support for rpm
files. Users can explicitly enable or disable that support by passing
--enable-rpm or --disable-rpm to configure.
Similarly if it detects that dpkg is present at configure time then it
enables the support for deb files. Users can explicitly enable or
disable that support by passing --enable-deb or --disable-deb to
configure.
* config.h.in: Define WITH_DEB and WITH_RPM pre-processor macros.
* configure.ac: Add --enable-{rpm,deb} switches. Check for
rpm2cpio and cpio programs, unless --disable-rpm was provided. If
they are found and if --enable-rpm=auto was provided, then
consider that --enable-rpm=yes was provided. In that case, set
the WITH_RPM macro to 1. Otherwise, undefine that macro.
Similarly, check for dpkg unless --disable-deb was provided. If
it's found and if --enable-deb=auto was provided, consider that
--enable-deb=yes was provided. In that case, set the WITH_DEB
macro to 1. Otherwise, undefine that macro. Define the
ENABLE_RPM and ENABLE_DEB conditional automake variables, if the
rpm resp. deb support is enabled. Emit a notice about the rpm and
deb features being enabled or not, at the end of the configure
process.
* tests/test-diff-pkg.cc: Include the config.h header.
(in_out_spec): Guard rpm tests by the WITH_RPM macro. Similarly,
guard deb tests by the WITH_DEB macro.
* tools/abipkgdiff.cc: Include the config.h header.
(extract_rpm): Guard this function definition with the WITH_RPM
macro.
(extract_deb): Guard this function definition with the WITH_DEB
macro.
(extract_package): Guard the handling of rpm packages with the
WITH_RPM macro and the handling of deb package with the WITH_DEB
macro. If a package not-support package format is encountered,
emit an appropriate error message and error out.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
Mattias Klose reported that building libabigail in the Debian build
system raised an error because the libabigail binaries were built
without the Large File Support (LFS), as described by
https://lintian.debian.org/tags/binary-file-built-without-LFS-support.html.
This just calls the configure macro AC_SYS_LARGEFILE for that.
* configure.ac: Call the AC_SYS_LARGEFILE autoconf macro.
* config.h.in: Update.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
Macros EM_AARCH64, EM_TILEPRO and EM_TILEGX were defined in diffrent
commits and release of glibc which is glibc 2.16 and 2.17 in elf/elf.h
file. Compiling libabigail was failing duing to undefined behaviour of
above macros in older glibc release. To solve it, configure.ac checks
whether these macros are defined or not and sets accordinlgy
HAVE_EM_AARCH64_MACRO, HAVE_EM_TILEPRO_MACRO and HAVE_EM_TILEGX_MACRO
macros.
* config.h.in: Generated autoheader by configure.ac
for added macros
* configure.ac: Defining HAVE_EM_AARCH64_MACRO,
HAVE_EM_TILEPRO_MACRO and HAVE_EM_TILEGX_MACRO to check
whether EM_AARCH64, EM_TILEPRO and EM_TILEGX macros are defined
in elf.h or not
* src/abg-dwarf-reader.cc (e_machine_to_string): Look for
EM_AARCH64, EM_TILEPRO and EM_TILEGX macros only
if they are defined in elf.h
Signed-off-by: Sinny Kumari <sinny@redhat.com>
* configure.ac: Define a new --enable-cxx11 switch to control the
use of the C++-11 compiler. Define a WITH_CXX11 C macro and an
automake ENABLE_CXX11 variable.
* config.h.in: Initialize the new WITH_CXX11 C macro.
* src/Makefile.am: Include the files coded in C++-11 only if the
ENABLE_CXX11 automake variable is defined.
* tests/Makefile.am: Likewise, build the runtestsvg test program
only if C++-11 usage is enabled.
* include/abg-diff-utils.h (class d_path_vec): Remove useless
usage of the 'typename' keyword.
* include/abg-fwd.h (is_enum_type): Renamed is_enum into this,
because of a name clash with a tr1 function when not using C++-11.
(is_pointer_type): Likewise, renamed is_pointer into this because
of a name clash with a tr1 function when not using C++-11.
* src/abg-comp-filter.cc (has_harmless_name_change): Adjust for
the is_enum -> is_enum_type change.
* src/abg-comparison.cc (type_suppression::suppresses_diff):
Likewise.
(class function_suppression::priv): Add a missing "class" keyword
in friend declaration.
(diff_context::diff_has_been_traversed)
(diff_context::mark_diff_as_traversed): Do not use the C++-11
specific type uintptr_t.
* src/abg-dwarf-reader.cc (create_default_dwfl): Do not use
designated initializers. Sigh. This is handy though.
(expr_result::abs): Cast the argument of std::abs to avoid
ambiguous call.
(finish_member_function_reading): Adjust for the is_pointer ->
is_pointer_type renaming.
* src/abg-hash.cc (scope_decl:#️⃣:operator)
(class_decl::base_spec:#️⃣:operator)
(type_composition:#️⃣:operator): Use std::tr1::hash string,
rather than the C++-11 specific std::hash function.
* src/abg-ini.cc (read_sections, write_sections): Make
std::ifstream constructor take a const char* rather than a string.
* src/abg-ir.cc (is_enum_type, is_pointer_type): Renamed is_enum
into is_enum_type and is_pointer into is_pointer_type.
* src/abg-writer.cc (write_translation_unit): Remove useless
typename keyword. Make ofstream take a const char* rather than a
string.
(write_namespace_decl): Remove useless typename keyword.
(write_corpus_to_native_xml_file): Make ofstream take a const
char* rather than a string.
* tests/test-abidiff.cc (main): Make ofstream take a const char*
rather than a string.
* tests/test-diff-dwarf.cc (main): Likewise.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
* configure.ac: Support a new --enable-zip-archive option. By
default its value is set to the 'auto', meaning that if libzip is
installed, that turns the option on -- just like if
--enable-zip-archive was called with the value 'yes'; if libzip is
not installed, that turns the option off -- just like if
--enable-zip-archive was called with the value 'no'. If libzip is
detected, the pre-processor macro HAVE_LIBZIP is set to 1. If
--enable-zip-archive is turned on, the pre-processor macro
WITH_ZIP_ARCHIVE is set to 1.
* config.h.in (HAVE_LIBZIP, WITH_ZIP): New define.
* src/abg-corpus.cc: Include config.h. Guard the inclusion of
abg-libzip-utils.h with the WITH_ZIP_ARCHIVE macro. Likewise for
the use of declarations coming from abg-libzip-utils.h.
* src/abg-libzip-utils.cc: Include config.h. Guard the file's
content with the WITH_ZIP_ARCHIVE macro.
* src/abg-reader.cc: Include config.h. Guard the inclusion of
abg-libzip-utils.h with the WITH_ZIP_ARCHIVE. Likewise for the
use of declarations coming from abg-libzip-utils.h.
* src/abg-writer.cc: Likewise.
* tests/Makefile.am: Build runtestwritereadarchive and runtestdot
only if zip archives are supported.
* tools/Makefile.am: The biar program is built only if
zip archives are supported.
* tools/bidiff.cc: Handle zip archives only if the
WITH_ZIP_ARCHIVE macros is defined.
* tools/bilint.cc: Likewise.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>