2013-05-07 10:42:53 +00:00
|
|
|
m4_define([version_major], [0])
|
|
|
|
m4_define([version_minor], [1])
|
|
|
|
m4_define([version_revision],[0])
|
|
|
|
|
2013-02-28 10:42:57 +00:00
|
|
|
AC_INIT([libabigail],
|
2013-05-07 10:42:53 +00:00
|
|
|
[version_major.version_minor.version_revision],
|
2013-02-28 10:42:57 +00:00
|
|
|
[http://sourceware.org/bugzilla],
|
|
|
|
[libabigail],
|
|
|
|
[http://sourceware.org/libabigail])
|
|
|
|
|
|
|
|
AC_PREREQ([2.63])
|
2014-09-09 10:36:24 +00:00
|
|
|
AC_CONFIG_AUX_DIR([build-aux])
|
2013-02-28 10:42:57 +00:00
|
|
|
AC_CONFIG_HEADER([config.h])
|
|
|
|
AC_CONFIG_SRCDIR([README])
|
|
|
|
AC_CONFIG_MACRO_DIR([m4])
|
|
|
|
|
2014-09-09 10:48:39 +00:00
|
|
|
AM_INIT_AUTOMAKE([1.11.1 foreign subdir-objects])
|
2013-02-28 10:42:57 +00:00
|
|
|
AM_MAINTAINER_MODE([enable])
|
|
|
|
|
|
|
|
AM_SILENT_RULES([yes])
|
|
|
|
|
2013-05-07 10:42:53 +00:00
|
|
|
VERSION_MAJOR=version_major
|
|
|
|
VERSION_MINOR=version_minor
|
|
|
|
VERSION_REVISION=version_revision
|
|
|
|
|
|
|
|
AC_SUBST(VERSION_MAJOR)
|
|
|
|
AC_SUBST(VERSION_MINOR)
|
|
|
|
AC_SUBST(VERSION_REVISION)
|
|
|
|
|
2014-08-31 08:34:11 +00:00
|
|
|
ENABLE_ZIP_ARCHIVE=auto
|
|
|
|
AC_ARG_ENABLE(zip-archive,
|
|
|
|
AS_HELP_STRING([--enable-zip-archive=yes|no|auto],
|
|
|
|
[enable bundling of TUs in zip archives (default is auto)]),
|
|
|
|
ENABLE_ZIP_ARCHIVE=$enableval,
|
|
|
|
ENABLE_ZIP_ARCHIVE=auto)
|
|
|
|
|
|
|
|
|
Parse type-decl and namespace-decl elements
* configure.ac: Add libxml2 dependencies.
* src/abg-corpus.{h,cc}: New files.
* src/abg-hash.{h,cc}: Likewise.
* src/abg-libxml-utils.{h,cc}: Likewise.
* src/abg-reader.{h,cc}: Likewise.
* src/abg-serialize.{h,cc}: Likewise.
* src/abg-writer.h: Likewise.
* src/Makefile.am: Build the new files above.
* src/abg-ir.h (class location): Add public accessors for the value, and
a truth operator. Make the methods be inline.
(class decl_base): Renamed decl into this. Renamed what_decl_kind
into what_kind. Renamed get_context into get_scope. Add virtual
destructor, accessors for location and name.
(class {scope_decl, type_base, type_decl} ): Add virtual dtor.
Re-style.
(struct {decl_base_hash, type_decl_hash}): New hashing functors.
(class {scope_type_decl, namespace_decl}): Add virtual dtor.
* src/abg-ir.cc (location::*): Remove location definitions. There
are now inline in the header.
(class decl_base): Renamed decl into this. Remove most of the
definitions from here as their are now inline in the header.
(scope_decl::~scope_decl, type_base::~type_base)
(type_decl::~type_decl, scope_type_decl::~scope_type_decl): New
definitions.
2013-03-08 12:49:05 +00:00
|
|
|
dnl *************************************************
|
|
|
|
dnl Here is the list of versions of the dependencies
|
|
|
|
dnl *************************************************
|
|
|
|
|
2013-02-28 10:42:57 +00:00
|
|
|
AC_PROG_CXX
|
|
|
|
AC_USE_SYSTEM_EXTENSIONS
|
|
|
|
AC_PROG_INSTALL
|
|
|
|
|
|
|
|
LT_PREREQ([2.2])
|
|
|
|
LT_INIT
|
|
|
|
|
|
|
|
AC_LANG([C++])
|
|
|
|
AC_LANG_COMPILER_REQUIRE
|
|
|
|
|
2013-12-07 07:07:54 +00:00
|
|
|
dnl Check for dependency: libdw (elfutils)
|
|
|
|
DW_LIBS=
|
|
|
|
AC_CHECK_LIB(dw, dwfl_begin, [DW_LIBS=-ldw])
|
|
|
|
AC_CHECK_HEADER(elfutils/libdwfl.h,
|
|
|
|
[],
|
|
|
|
[AC_MSG_ERROR([could not find elfutils/libdwfl.h installed])])
|
2014-09-09 12:53:41 +00:00
|
|
|
AC_CHECK_LIB([elf], [elf_end], [ELF_LIBS="-lelf"])
|
|
|
|
AC_CHECK_HEADER([libelf.h],
|
|
|
|
[],
|
|
|
|
[AC_MSG_ERROR([could not find libelf.h])])
|
2013-12-07 07:07:54 +00:00
|
|
|
|
|
|
|
if test x$DW_LIBS = x; then
|
|
|
|
AC_MSG_ERROR([could not find elfutils dwarf library installed])
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_SUBST(DW_LIBS)
|
2014-09-09 12:53:41 +00:00
|
|
|
AC_SUBST([ELF_LIBS])
|
2013-12-07 07:07:54 +00:00
|
|
|
|
2013-03-27 19:07:03 +00:00
|
|
|
dnl Check for dependency: libxml
|
|
|
|
LIBXML2_VERSION=2.6.22
|
|
|
|
PKG_CHECK_MODULES(XML, libxml-2.0 >= $LIBXML2_VERSION)
|
2013-08-22 14:57:42 +00:00
|
|
|
|
|
|
|
AC_SUBST(LIBXML2_VERSION)
|
2013-03-27 19:07:03 +00:00
|
|
|
AC_SUBST(XML_LIBS)
|
|
|
|
AC_SUBST(XML_CFLAGS)
|
Parse type-decl and namespace-decl elements
* configure.ac: Add libxml2 dependencies.
* src/abg-corpus.{h,cc}: New files.
* src/abg-hash.{h,cc}: Likewise.
* src/abg-libxml-utils.{h,cc}: Likewise.
* src/abg-reader.{h,cc}: Likewise.
* src/abg-serialize.{h,cc}: Likewise.
* src/abg-writer.h: Likewise.
* src/Makefile.am: Build the new files above.
* src/abg-ir.h (class location): Add public accessors for the value, and
a truth operator. Make the methods be inline.
(class decl_base): Renamed decl into this. Renamed what_decl_kind
into what_kind. Renamed get_context into get_scope. Add virtual
destructor, accessors for location and name.
(class {scope_decl, type_base, type_decl} ): Add virtual dtor.
Re-style.
(struct {decl_base_hash, type_decl_hash}): New hashing functors.
(class {scope_type_decl, namespace_decl}): Add virtual dtor.
* src/abg-ir.cc (location::*): Remove location definitions. There
are now inline in the header.
(class decl_base): Renamed decl into this. Remove most of the
definitions from here as their are now inline in the header.
(scope_decl::~scope_decl, type_base::~type_base)
(type_decl::~type_decl, scope_type_decl::~scope_type_decl): New
definitions.
2013-03-08 12:49:05 +00:00
|
|
|
|
2013-08-27 13:18:59 +00:00
|
|
|
dnl Check for dependency: libzip
|
|
|
|
LIBZIP_VERSION=0.10
|
|
|
|
|
2014-08-31 08:34:11 +00:00
|
|
|
HAS_LIBZIP=no
|
|
|
|
# The below doesn't seem to work on my box for a reason. Let's write
|
|
|
|
# the damn thing by hand:
|
|
|
|
# PKG_CHECK_EXISTS([libzip >= $LIBZIP_VERSION], [HAS_LIBZIP=yes], [HAS_LIBZIP=no])
|
|
|
|
|
|
|
|
if $PKG_CONFIG --exists --print-errors "libzip >= $LIBZIP_VERSION"; then
|
|
|
|
AC_MSG_NOTICE(found libzip version $LIBZIP_VERSION)
|
|
|
|
HAS_LIBZIP=yes
|
|
|
|
else
|
|
|
|
AC_MSG_NOTICE(no libzip >= $LIBZIP_VERSION has been found)
|
|
|
|
HAS_LIBZIP=no
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test x$ENABLE_ZIP_ARCHIVE = xauto; then
|
|
|
|
if test x$HAS_LIBZIP = xyes; then
|
|
|
|
ENABLE_ZIP_ARCHIVE=yes;
|
|
|
|
else
|
|
|
|
ENABLE_ZIP_ARCHIVE=no
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test x$ENABLE_ZIP_ARCHIVE = xyes; then
|
|
|
|
AC_MSG_NOTICE(the zip-archive feature is enabled)
|
|
|
|
else
|
|
|
|
AC_MSG_NOTICE(the zip-archive feature is disabled)
|
|
|
|
fi
|
|
|
|
|
|
|
|
FOUND_LIBZIP=no
|
|
|
|
if test x$ENABLE_ZIP_ARCHIVE = xyes; then
|
|
|
|
PKG_CHECK_MODULES(LIBZIP, libzip >= $LIBZIP_VERSION)
|
|
|
|
FOUND_LIBZIP=yes
|
|
|
|
AC_SUBST(LIBZIP_VERSION)
|
|
|
|
AC_SUBST(LIBZIP_LIBS)
|
|
|
|
AC_SUBST(LIBZIP_CFLAGS)
|
|
|
|
AC_DEFINE([WITH_ZIP_ARCHIVE], 1, [compile the zip archive support])
|
|
|
|
AC_DEFINE([HAVE_LIBZIP], 1, [Defined to 1 if the libzip library is available])
|
|
|
|
fi
|
2013-08-27 13:18:59 +00:00
|
|
|
|
2014-08-31 08:34:11 +00:00
|
|
|
AM_CONDITIONAL(ENABLE_ZIP_ARCHIVE, test x$ENABLE_ZIP_ARCHIVE = xyes)
|
2013-08-27 13:18:59 +00:00
|
|
|
DEPS_CPPFLAGS="$XML_CFLAGS $LIBZIP_CFLAGS"
|
|
|
|
AC_SUBST(DEPS_CPPFLAGS)
|
|
|
|
|
2014-09-09 12:53:41 +00:00
|
|
|
DEPS_LIBS="$XML_LIBS $LIBZIP_LIBS $DW_LIBS $ELF_LIBS"
|
2013-08-27 13:18:59 +00:00
|
|
|
AC_SUBST(DEPS_LIBS)
|
|
|
|
|
2013-03-21 22:42:41 +00:00
|
|
|
if test x$ABIGAIL_DEVEL != x; then
|
2014-09-09 10:52:07 +00:00
|
|
|
CFLAGS="-g -Wall -Wextra -Werror"
|
|
|
|
CXXFLAGS="-g -Wall -Wextra -Werror"
|
2013-03-21 22:42:41 +00:00
|
|
|
fi
|
|
|
|
|
2013-02-28 10:42:57 +00:00
|
|
|
AC_CONFIG_FILES([Makefile
|
2013-08-22 14:57:42 +00:00
|
|
|
libabigail.pc
|
2013-07-19 05:40:48 +00:00
|
|
|
include/Makefile
|
2013-08-22 15:07:07 +00:00
|
|
|
include/abg-version.h
|
2013-04-03 06:23:33 +00:00
|
|
|
doc/Makefile
|
2013-03-21 22:42:41 +00:00
|
|
|
src/Makefile
|
2013-08-29 15:08:47 +00:00
|
|
|
tools/Makefile
|
2013-03-21 22:42:41 +00:00
|
|
|
tests/Makefile])
|
2013-02-28 10:42:57 +00:00
|
|
|
|
|
|
|
AC_OUTPUT
|
2014-08-31 09:17:03 +00:00
|
|
|
|
|
|
|
AC_MSG_NOTICE([
|
|
|
|
=====================================================================
|
|
|
|
Libabigail: $VERSION_MAJOR.$VERSION_MINOR.$VERSION_REVISION
|
|
|
|
=====================================================================
|
|
|
|
|
|
|
|
Here is the configuration of the package:
|
|
|
|
|
|
|
|
Prefix : ${prefix}
|
|
|
|
Source code location : ${srcdir}
|
|
|
|
C Compiler : ${CC}
|
|
|
|
C++ Compiler : ${CXX}
|
|
|
|
|
|
|
|
OPTIONAL FEATURES:
|
|
|
|
Enable zip archives : ${ENABLE_ZIP_ARCHIVE}
|
|
|
|
|
|
|
|
])
|