blob: 056a851c883be36757cfe9dbf23eb2050e00be16 [file] [log] [blame]
Dodji Seketelic80f7922020-05-29 16:26:04 +02001# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
Dodji Seketeli2313dd12020-12-01 21:42:08 +01002m4_define([version_major], [2])
Dodji Seketelic7572892021-10-05 11:08:49 +02003m4_define([version_minor], [1])
Dodji Seketelie4fefbd2013-05-07 12:42:53 +02004
Dodji Seketelid7d371a2013-02-28 11:42:57 +01005AC_INIT([libabigail],
Dodji Seketelicbf3c5d2017-11-06 00:32:36 +01006 [version_major.version_minor],
Dodji Seketelid7d371a2013-02-28 11:42:57 +01007 [http://sourceware.org/bugzilla],
8 [libabigail],
9 [http://sourceware.org/libabigail])
10
11AC_PREREQ([2.63])
Jan Engelhardt0b1224f2014-09-09 12:36:24 +020012AC_CONFIG_AUX_DIR([build-aux])
Dodji Seketelid7d371a2013-02-28 11:42:57 +010013AC_CONFIG_HEADER([config.h])
14AC_CONFIG_SRCDIR([README])
15AC_CONFIG_MACRO_DIR([m4])
16
Chenxiong Qi57dcfb12016-02-09 18:05:33 +080017dnl Include some autoconf macros to check for python modules.
18dnl
19dnl These macros are coming from the autoconf archive at
20dnl http://www.gnu.org/software/autoconf-archive
21
Dodji Seketeli38ac2a82016-06-03 16:36:52 +020022dnl This one is for the AX_CHECK_PYTHON_MODULES() macro.
23m4_include([autoconf-archive/ax_check_python_modules.m4])
Chenxiong Qi57dcfb12016-02-09 18:05:33 +080024
25dnl These two below are for the AX_PROG_PYTHON_VERSION() module.
26m4_include([autoconf-archive/ax_compare_version.m4])
27m4_include([autoconf-archive/ax_prog_python_version.m4])
28
Dodji Seketeli3dbe8422016-05-21 02:09:50 +020029dnl This one is to be able to run "make check-valgrind"
30dnl and have unit tests run under der Valgrind.
31m4_include([autoconf-archive/ax_valgrind_check.m4])
32
Dodji Seketeli05615c92014-12-27 12:54:28 +010033AM_INIT_AUTOMAKE([1.11.1 foreign subdir-objects tar-ustar parallel-tests])
Dodji Seketelid7d371a2013-02-28 11:42:57 +010034AM_MAINTAINER_MODE([enable])
35
36AM_SILENT_RULES([yes])
37
Dodji Seketelie4fefbd2013-05-07 12:42:53 +020038VERSION_MAJOR=version_major
39VERSION_MINOR=version_minor
Dodji Seketeli2df84dd2018-01-09 18:03:42 +010040VERSION_REVISION=0
Dodji Seketeli522cc622021-11-12 09:47:03 +010041ABIXML_VERSION_MAJOR=2
42ABIXML_VERSION_MINOR=1
Dodji Seketelie4fefbd2013-05-07 12:42:53 +020043
44AC_SUBST(VERSION_MAJOR)
45AC_SUBST(VERSION_MINOR)
46AC_SUBST(VERSION_REVISION)
Dodji Seketeli522cc622021-11-12 09:47:03 +010047AC_SUBST(ABIXML_VERSION_MAJOR)
48AC_SUBST(ABIXML_VERSION_MINOR)
Dodji Seketelie4fefbd2013-05-07 12:42:53 +020049
Matthias Maennichade58f92019-12-15 23:51:51 +000050dnl This VERSION_SUFFIX environment variable is to allow appending
51dnl arbitrary text to the libabigail version string representation.
52dnl That is useful to identify custom versions of the library
53dnl (e.g. development versions or versions of a particular origin).
54dnl
55dnl The feature can be enabled by passing VERSION_SUFFIX to `configure`,
56dnl e.g.
57dnl
58dnl $ configure VERSION_SUFFIX="-dev"
59AC_SUBST(VERSION_SUFFIX)
60
Dodji Seketeli28090ba2015-08-14 12:49:57 +020061AC_ARG_ENABLE(rpm,
62 AS_HELP_STRING([--enable-rpm=yes|no|auto],
Dodji Seketeli72b42c32015-08-22 14:27:37 +020063 [enable the support of rpm in abipkgdiff (default is auto)]),
Dodji Seketeli28090ba2015-08-14 12:49:57 +020064 ENABLE_RPM=$enableval,
65 ENABLE_RPM=auto)
66
Thomas Schwinge70154552021-12-10 17:52:46 +010067# '--enable-rpm415' option name preserved for backwards compatibility.
Dodji Seketelie1a1fd92020-12-01 11:26:27 +010068AC_ARG_ENABLE(rpm415,
69 AS_HELP_STRING([--enable-rpm415=yes|no|auto],
Thomas Schwinge70154552021-12-10 17:52:46 +010070 [enable rpm/zstd in abipkgdiff testing (default is auto)]),
71 ENABLE_RPM_ZSTD=$enableval,
72 ENABLE_RPM_ZSTD=auto)
Dodji Seketelie1a1fd92020-12-01 11:26:27 +010073
Giuliano Procidae5a13c82022-01-10 10:58:17 +000074AC_ARG_ENABLE(debug-self-comparison,
75 AS_HELP_STRING([--enable-debug-self-comparison=yes|no],
76 [enable debugging of self comparison with 'abidw --debug-abidiff'(default is no)]),
77 ENABLE_DEBUG_SELF_COMPARISON=$enableval,
78 ENABLE_DEBUG_SELF_COMPARISON=no)
79
Dodji Seketeli623391a2021-10-14 12:12:01 +020080AC_ARG_ENABLE(debug-type-canonicalization,
81 AS_HELP_STRING([--enable-debug-type-canonicalization=yes|no],
82 [enable debugging of type canonicalization 'abidw --debug-tc'(default is no)]),
83 ENABLE_DEBUG_TYPE_CANONICALIZATION=$enableval,
84 ENABLE_DEBUG_TYPE_CANONICALIZATION=no)
85
Dodji Seketeli28090ba2015-08-14 12:49:57 +020086AC_ARG_ENABLE(deb,
Roland McGrath5cfa9af2016-03-18 10:25:49 -070087 AS_HELP_STRING([--enable-deb=yes|no|auto],
Dodji Seketeli72b42c32015-08-22 14:27:37 +020088 [enable the support of deb in abipkgdiff (default is auto)]),
Dodji Seketeli28090ba2015-08-14 12:49:57 +020089 ENABLE_DEB=$enableval,
90 ENABLE_DEB=auto)
91
Dodji Seketeli585fc4c2015-08-22 13:59:18 +020092AC_ARG_ENABLE(tar,
93 AS_HELP_STRING([--enable-tar=yes|no|auto],
94 [enable the support of GNU tar archives in abipkgdiff (default is auto)]),
95 ENABLE_TAR=$enableval,
96 ENABLE_TAR=auto)
97
Dodji Seketeli52a33572014-11-19 17:08:10 +010098AC_ARG_ENABLE(apidoc,
99 AS_HELP_STRING([--enable-apidoc=yes|no|auto],
100 [enable generation of the apidoc in html]),
101 ENABLE_APIDOC=$enableval,
102 ENABLE_APIDOC=auto)
103
104AC_ARG_ENABLE(manual,
105 AS_HELP_STRING([--enable-manual=yes|no|auto],
106 [enable generation of the manual in html]),
107 ENABLE_MANUAL=$enableval,
108 ENABLE_MANUAL=auto)
109
Ondrej Opralac738b5c2015-11-14 18:32:01 +0100110AC_ARG_ENABLE([bash-completion],
111 AS_HELP_STRING([--enable-bash-completion=yes|no|auto],
112 [enable using completion files for tools]),
113 ENABLE_BASH_COMPLETION=$enableval,
114 ENABLE_BASH_COMPLETION=auto)
115
Chenxiong Qi57dcfb12016-02-09 18:05:33 +0800116AC_ARG_ENABLE([fedabipkgdiff],
117 AS_HELP_STRING([--enable-fedabipkgdiff=yes|no|auto],
118 [enable the fedabipkgdiff tool]),
119 ENABLE_FEDABIPKGDIFF=$enableval,
120 ENABLE_FEDABIPKGDIFF=auto)
121
Chenxiong Qi1ac0c052018-03-25 15:34:59 +0800122AC_ARG_ENABLE([python3],
123 AS_HELP_STRING([--enable-python3=yes|no|auto],
124 [enable running abigail tools with python3 (default is auto)]),
125 ENABLE_PYTHON3=$enableval,
126 ENABLE_PYTHON3=auto)
127
Dodji Seketeli39f02b62019-04-18 15:46:34 +0200128AC_ARG_ENABLE(asan,
129 AS_HELP_STRING([--enable-asan=yes|no],
130 [enable the support of building with -fsanitize=address)]),
131 ENABLE_ASAN=$enableval,
132 ENABLE_ASAN=no)
133
Matthias Maennich5f70e6b2020-03-18 00:18:37 +0100134AC_ARG_ENABLE(msan,
135 AS_HELP_STRING([--enable-msan=yes|no],
136 [enable the support of building with -fsanitize=memory)]),
137 ENABLE_MSAN=$enableval,
138 ENABLE_MSAN=no)
139
Matthias Maennich059a59a2020-03-12 12:31:57 +0100140AC_ARG_ENABLE(tsan,
141 AS_HELP_STRING([--enable-tsan=yes|no],
142 [enable the support of building with -fsanitize=thread)]),
143 ENABLE_TSAN=$enableval,
144 ENABLE_TSAN=no)
145
Dodji Seketeli39f02b62019-04-18 15:46:34 +0200146AC_ARG_ENABLE(ubsan,
147 AS_HELP_STRING([--enable-ubsan=yes|no],
148 [enable the support of building with -fsanitize=undefined)]),
149 ENABLE_UBSAN=$enableval,
150 ENABLE_UBSAN=no)
151
Jose E. Marchesi via Libabigail8c22f5f2021-10-29 00:51:32 +0200152dnl check if user has enabled CTF code
153AC_ARG_ENABLE(ctf,
154 AS_HELP_STRING([--enable-ctf=yes|no],
155 [disable support of ctf files)]),
156 ENABLE_CTF=$enableval,
157 ENABLE_CTF=no)
158
Giuliano Procida2ec38c22021-05-24 11:03:15 +0100159AC_ARG_ENABLE(cxx17,
160 AS_HELP_STRING([--enable-cxx17=yes|no],
161 [enable features that use the C++17 compiler]),
162 ENABLE_CXX17=$enableval,
163 ENABLE_CXX17=no)
164
Dodji Seketeli8e225db2013-03-08 13:49:05 +0100165dnl *************************************************
Dodji Seketeli9d601b22015-08-14 12:46:36 +0200166dnl check for dependencies
Dodji Seketeli8e225db2013-03-08 13:49:05 +0100167dnl *************************************************
168
Dodji Seketelid7d371a2013-02-28 11:42:57 +0100169AC_PROG_CXX
170AC_USE_SYSTEM_EXTENSIONS
171AC_PROG_INSTALL
172
173LT_PREREQ([2.2])
174LT_INIT
175
176AC_LANG([C++])
177AC_LANG_COMPILER_REQUIRE
178
Dodji Seketelia126e922016-07-22 11:01:41 +0200179dnl
Giuliano Procida2ec38c22021-05-24 11:03:15 +0100180dnl We use C++11 or C++17 if enabled
Dodji Seketeli4f8c9b12020-12-03 10:53:08 +0100181dnl
182CXX_STANDARD=c++11
183
184dnl
Dodji Seketelia126e922016-07-22 11:01:41 +0200185dnl check if the c++ compiler has support __attribute__((visibility("hidden")))
186dnl
187AC_MSG_NOTICE([checking for GCC visibility attribute support ...])
188AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
189struct __attribute__((visibility("hidden"))) Foo
190{
191 int m0;
192
193 Foo()
194 : m0()
195 {}
196};
197 ]])],
198 [SUPPORTS_GCC_VISIBILITY_ATTRIBUTE=yes],
199 [SUPPORTS_GCC_VISIBILITY_ATTRIBUTE=no]
200)
201
202if test x$SUPPORTS_GCC_VISIBILITY_ATTRIBUTE = xyes; then
203 AC_MSG_NOTICE([GCC visibility attribute is supported])
204 AC_DEFINE([HAS_GCC_VISIBILITY_ATTRIBUTE], 1,
205 [Defined if the compiler supports the attribution visibility syntax __attribute__((visibility("hidden")))])
Dodji Seketeli103a6eb2016-07-27 12:18:58 +0200206 VISIBILITY_FLAGS="-fvisibility=hidden"
Dodji Seketelia126e922016-07-22 11:01:41 +0200207else
208 AC_MSG_NOTICE([GCC visibility attribute is not supported])
Dodji Seketeli103a6eb2016-07-27 12:18:58 +0200209 VISIBILITY_FLAGS=
Dodji Seketelia126e922016-07-22 11:01:41 +0200210fi
211
Dodji Seketeli103a6eb2016-07-27 12:18:58 +0200212AC_SUBST(VISIBILITY_FLAGS)
213
Dodji Seketeli2c33f162017-11-13 12:52:07 +0100214dnl Older glibc had a broken fts that didn't work with Large File Systems.
215dnl We want the version that can handler LFS, but include workaround if we
216dnl get a bad one. Add define to CFLAGS (not AC_DEFINE it) since we need to
217dnl check it before including config.h (which might define _FILE_OFFSET_BITS).
218AC_CACHE_CHECK([whether including fts.h with _FILE_OFFSET_BITS set breaks], ac_cv_bad_fts,
219 [AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
220 #define _FILE_OFFSET_BITS 64
221 #include <fts.h>
222 ]])],
223 ac_cv_bad_fts=no, ac_cv_bad_fts=yes)])
224AS_IF([test "x$ac_cv_bad_fts" = "xyes"],
225 [CFLAGS="$CFLAGS -DBAD_FTS=1",
226 CXXFLAGS="$CXXFLAGS -DBAD_FTS=1"])
227
Dodji Seketeli929db0a2015-01-07 13:45:53 +0100228dnl Check for dependency: libelf, libdw, libebl (elfutils)
Dodji Seketeli5a80db02016-02-11 12:37:03 +0100229dnl Note that we need to use at least elfutils 0.159 but
230dnl at that time elfutils didnt have pkgconfig capabilities
231dnl to easily query for its version.
Dodji Seketeli929db0a2015-01-07 13:45:53 +0100232ELF_LIBS=
Jan Engelhardtf505d052014-09-09 14:53:41 +0200233AC_CHECK_LIB([elf], [elf_end], [ELF_LIBS="-lelf"])
234AC_CHECK_HEADER([libelf.h],
235 [],
236 [AC_MSG_ERROR([could not find libelf.h])])
Dodji Seketelibd1af4c2013-12-07 08:07:54 +0100237
Dodji Seketeli929db0a2015-01-07 13:45:53 +0100238DW_LIBS=
239AC_CHECK_LIB(dw, dwfl_begin, [DW_LIBS=-ldw])
Dodji Seketelice5e4882016-05-22 11:39:33 +0200240AC_CHECK_LIB(dw, dwarf_getalt,
241 [FOUND_DWARF_GETALT_IN_LIBDW=yes],
242 [FOUND_DWARF_GETALT_IN_LIBDW=no])
243
Dodji Seketeli929db0a2015-01-07 13:45:53 +0100244AC_CHECK_HEADER(elfutils/libdwfl.h,
245 [],
246 [AC_MSG_ERROR([could not find elfutils/libdwfl.h installed])])
247
Dodji Seketeliad873232019-01-09 15:22:01 +0100248dnl Allow users to compile with the NDEBUG macro defined,
249dnl meaning they are compiling in a mode where the
250dnl assert call does nothing. With the directive below,
251dnl users just need to pass the --disable-assert
252dnl option to configure.
253AC_HEADER_ASSERT
254
Dodji Seketeli929db0a2015-01-07 13:45:53 +0100255if test x$ELF_LIBS = x; then
256 AC_MSG_ERROR([could not find elfutils elf library installed])
257fi
258
Dodji Seketelibd1af4c2013-12-07 08:07:54 +0100259if test x$DW_LIBS = x; then
260 AC_MSG_ERROR([could not find elfutils dwarf library installed])
261fi
262
Dodji Seketeliae1cade2016-10-27 16:05:35 +0200263if test x$FOUND_DWARF_GETALT_IN_LIBDW = xyes; then
Dodji Seketelice5e4882016-05-22 11:39:33 +0200264 AC_DEFINE([LIBDW_HAS_DWARF_GETALT], 1,
265 [Defined if libdw has the function dwarf_getalt])
266fi
267
Dodji Seketelibd1af4c2013-12-07 08:07:54 +0100268AC_SUBST(DW_LIBS)
Jan Engelhardtf505d052014-09-09 14:53:41 +0200269AC_SUBST([ELF_LIBS])
Dodji Seketelibd1af4c2013-12-07 08:07:54 +0100270
Jose E. Marchesi via Libabigail8c22f5f2021-10-29 00:51:32 +0200271dnl check for libctf presence if CTF code has been enabled by command line
272dnl argument, and then define CTF flag (to build CTF file code) if libctf is
273dnl found on the system
274CTF_LIBS=
275if test x$ENABLE_CTF = xyes; then
276 LIBCTF=
277 AC_CHECK_LIB(ctf, ctf_open, [LIBCTF=yes], [LIBCTF=no])
278 if test x$LIBCTF = xyes; then
279 AC_MSG_NOTICE([activating CTF code])
280 AC_DEFINE([WITH_CTF], 1,
281 [Defined if user enables and system has the libctf library])
282 CTF_LIBS=-lctf
283 else
284 AC_MSG_NOTICE([CTF enabled but no libctf found])
285 ENABLE_CTF=no
286 fi
287fi
288
Benjamin Kosnik342b9322013-03-27 12:07:03 -0700289dnl Check for dependency: libxml
290LIBXML2_VERSION=2.6.22
291PKG_CHECK_MODULES(XML, libxml-2.0 >= $LIBXML2_VERSION)
Dodji Seketeli849b5982013-08-22 16:57:42 +0200292
293AC_SUBST(LIBXML2_VERSION)
Benjamin Kosnik342b9322013-03-27 12:07:03 -0700294AC_SUBST(XML_LIBS)
295AC_SUBST(XML_CFLAGS)
Dodji Seketeli8e225db2013-03-08 13:49:05 +0100296
Dodji Seketeli393fe312015-08-14 12:48:35 +0200297dnl Check for some programs like rm, mkdir, etc ...
298AC_CHECK_PROG(HAS_RM, rm, yes, no)
299if test x$HAS_RM = xno; then
300 AC_MSG_ERROR([could not find the program 'rm' installed])
301fi
302
303AC_CHECK_PROG(HAS_MKDIR, mkdir, yes, no)
304if test x$HAS_MKDIR = xno; then
305 AC_MSG_ERROR([could not find the program 'mkdir' installed])
306fi
307
Dodji Seketeli28090ba2015-08-14 12:49:57 +0200308dnl Check for the rpm2cpio and cpio programs
309if test x$ENABLE_RPM = xyes -o x$ENABLE_RPM = xauto; then
310 AC_CHECK_PROG(HAS_RPM2CPIO, rpm2cpio, yes, no)
311 AC_CHECK_PROG(HAS_CPIO, cpio, yes, no)
Dodji Seketeli7642dc12018-03-29 13:28:29 +0200312 AC_CHECK_PROG(HAS_RPM, rpm, yes, no)
Roland McGrath5cfa9af2016-03-18 10:25:49 -0700313
Dodji Seketeli7642dc12018-03-29 13:28:29 +0200314 if test x$HAS_RPM2CPIO = xyes -a x$HAS_CPIO = xyes -a x$HAS_RPM = xyes; then
Ondrej Opralac7ec20a2016-12-12 16:37:54 +0100315 ENABLE_RPM=yes
316 else
317 if test x$ENABLE_RPM = xyes; then
Dodji Seketeli7642dc12018-03-29 13:28:29 +0200318 AC_MSG_ERROR([rpm support in abipkgdiff needs 'rpm2cpio', 'cpio' and 'rpm' programs to be installed])
Dodji Seketeli28090ba2015-08-14 12:49:57 +0200319 fi
Ondrej Opralac7ec20a2016-12-12 16:37:54 +0100320 ENABLE_RPM=no
Dodji Seketeli28090ba2015-08-14 12:49:57 +0200321 fi
322fi
323
Thomas Schwinge70154552021-12-10 17:52:46 +0100324dnl Point to a rpm/zstd file, that is:
325dnl $ rpm -qp --qf '%{PAYLOADCOMPRESSOR}\n' [rpm_zstd_file]
326dnl zstd
327m4_define([rpm_zstd_file], [tests/data/test-diff-pkg/mesa-libGLU-9.0.1-3.fc33.x86_64.rpm])
328AC_CONFIG_SRCDIR([rpm_zstd_file])
329if test x$ENABLE_RPM_ZSTD = xyes -o x$ENABLE_RPM_ZSTD = xauto; then
330 if test x$ENABLE_RPM = xno; then
331 if test x$ENABLE_RPM_ZSTD = xyes; then
332 AC_MSG_ERROR([rpm/zstd support needs rpm support])
333 fi
334 ENABLE_RPM_ZSTD=n/a
335 else
336 AC_MSG_CHECKING([for rpm/zstd support])
337 rpm2cpio > /dev/null 2>&AS_MESSAGE_LOG_FD "$srcdir"/rpm_zstd_file
338 if test $? -eq 0; then
339 enable_rpm_zstd=yes
340 else
341 enable_rpm_zstd=no
342 fi
343 AC_MSG_RESULT([$enable_rpm_zstd])
344 if test x$ENABLE_RPM_ZSTD:$enable_rpm_zstd = xyes:no; then
345 AC_MSG_ERROR([rpm/zstd support not available])
346 fi
347 ENABLE_RPM_ZSTD=$enable_rpm_zstd
348 fi
Dodji Seketelic2ce1a32020-11-23 10:48:01 +0100349fi
350
Dodji Seketeli28090ba2015-08-14 12:49:57 +0200351if test x$ENABLE_RPM = xyes; then
352 AC_DEFINE([WITH_RPM], 1, [compile the rpm package support in abipkgdiff])
Dodji Seketelic2ce1a32020-11-23 10:48:01 +0100353 AC_MSG_NOTICE([rpm support in abipkgdiff is enabled]);
354
Thomas Schwinge70154552021-12-10 17:52:46 +0100355 if test x$ENABLE_RPM_ZSTD = xyes; then
356 AC_DEFINE([WITH_RPM_ZSTD], 1, [has rpm/zstd support])
357 AC_MSG_NOTICE([rpm/zstd in abipkgdiff testing is enabled])
Dodji Seketelic2ce1a32020-11-23 10:48:01 +0100358 fi
Dodji Seketeli28090ba2015-08-14 12:49:57 +0200359else
Dodji Seketelic2ce1a32020-11-23 10:48:01 +0100360 AC_MSG_NOTICE([rpm support in abipkgdiff is disabled]);
Dodji Seketeli28090ba2015-08-14 12:49:57 +0200361fi
362
363AM_CONDITIONAL(ENABLE_RPM, test x$ENABLE_RPM = xyes)
364
Giuliano Procidae5a13c82022-01-10 10:58:17 +0000365dnl enable the debugging of self comparison when doing abidw --debug-abidiff <binary>
366if test x$ENABLE_DEBUG_SELF_COMPARISON = xyes; then
367 AC_DEFINE([WITH_DEBUG_SELF_COMPARISON], 1, [compile support of debugging abidw --abidiff])
368 AC_MSG_NOTICE([support of debugging self comparison is enabled])
369else
370 AC_MSG_NOTICE([support of debugging self comparison is disabled])
371fi
372
373AM_CONDITIONAL(ENABLE_DEBUG_SELF_COMPARISON, test x$ENABLE_DEBUG_SELF_COMPARISON = xyes)
374
Dodji Seketeli623391a2021-10-14 12:12:01 +0200375dnl enable the debugging of type canonicalization when doing abidw --debug-tc <binary>
376if test x$ENABLE_DEBUG_TYPE_CANONICALIZATION = xyes; then
377 AC_DEFINE([WITH_DEBUG_TYPE_CANONICALIZATION],
378 1,
379 [compile support of debugging type canonicalization while using abidw --debug-tc])
380 AC_MSG_NOTICE([support of debugging type canonicalization is enabled])
381else
382 AC_MSG_NOTICE([support of debugging type canonicalization is disabled])
383fi
384
385AM_CONDITIONAL(ENABLE_DEBUG_TYPE_CANONICALIZATION, test x$ENABLE_DEBUG_TYPE_CANONICALIZATION = xyes)
386
Dodji Seketeli28090ba2015-08-14 12:49:57 +0200387dnl Check for the dpkg program
388if test x$ENABLE_DEB = xauto -o x$ENABLE_DEB = xyes; then
389 AC_CHECK_PROG(HAS_DPKG, dpkg, yes, no)
390
391 if test x$ENABLE_DEB = xauto; then
392 if test x$HAS_DPKG = xyes; then
393 ENABLE_DEB=yes
Dodji Seketeli95de84b2015-10-15 12:51:33 +0200394 else
395 ENABLE_DEB=no
Dodji Seketeli28090ba2015-08-14 12:49:57 +0200396 fi
397 fi
398fi
399
400if test x$ENABLE_DEB = xyes; then
401 AC_DEFINE([WITH_DEB], 1, [compile the deb package support in abipkgdiff])
402 AC_MSG_NOTICE(deb support in abipkgdiff is enabled);
403else
404 AC_MSG_NOTICE(deb support in abipkgdiff is disabled);
405fi
406
407AM_CONDITIONAL(ENABLE_DEB, test x$ENABLE_DEB = xyes)
408
Dodji Seketeli585fc4c2015-08-22 13:59:18 +0200409dnl Check for the tar program
410if test x$ENABLE_TAR = xauto -o x$ENABLE_TAR = xyes; then
411 AC_CHECK_PROG(HAS_TAR, tar, yes, no)
412
413 if test x$ENABLE_TAR = xauto; then
414 if test x$HAS_TAR = xyes; then
415 ENABLE_TAR=yes
416 fi
417 fi
418fi
419
420if test x$ENABLE_TAR = xyes; then
421 AC_DEFINE([WITH_TAR], 1, [compile the GNU tar archive support in abipkgdiff])
422 AC_MSG_NOTICE(GNU tar support in abipkgdiff is enabled);
423else
424 AC_MSG_NOTICE(GNU tar support in abipkgdiff is disabled);
425fi
426
427AM_CONDITIONAL(ENABLE_TAR, test x$ENABLE_TAR = xyes)
428
Ondrej Opralac738b5c2015-11-14 18:32:01 +0100429dnl Check for the bash-completion package
430if test x$ENABLE_BASH_COMPLETION = xauto -o x$ENABLE_BASH_COMPLETION = xyes; then
431 AC_CHECK_PROG(HAS_BASH_COMPLETION, bash-completion, yes, no)
432
433 if test x$ENABLE_BASH_COMPLETION = xauto; then
434 if test x$HAS_BASH_COMPLETION = xyes; then
435 ENABLE_BASH_COMPLETION=yes
Dodji Seketelica218812016-05-21 03:01:32 +0200436 else
437 ENABLE_BASH_COMPLETION=no
Ondrej Opralac738b5c2015-11-14 18:32:01 +0100438 fi
439 fi
440fi
441
442if test x$ENABLE_BASH_COMPLETION = xyes; then
443 AC_MSG_NOTICE(bash-completion support in libabigail is enabled);
444else
445 AC_MSG_NOTICE(bash-completion support in libabigail is disabled);
446fi
447
448AM_CONDITIONAL(ENABLE_BASH_COMPLETION, test x$ENABLE_BASH_COMPLETION = xyes)
449
Dodji Seketeli4b2dac62018-07-17 12:11:02 +0200450# The minimal python 2 version we want to support is 2.6.6 because EL6
451# distributions have that version installed.
452MINIMAL_PYTHON2_VERSION="2.6.6"
453
454AC_PATH_PROG(PYTHON, python, no)
455AX_PROG_PYTHON_VERSION($MINIMAL_PYTHON2_VERSION,
456 [MINIMAL_PYTHON_VERSION_FOUND=yes],
457 [MINIMAL_PYTHON_VERSION_FOUND=no])
458
459# The minimal python 3 version we want to support is 3.5, which is
460# available in Fedora releases and in EL7.
461if test x$ENABLE_PYTHON3 != xno; then
462 AC_CHECK_PROGS(PYTHON3_INTERPRETER, [python3 python3.5 python3.6 python3.7], no)
463else
464 PYTHON3_INTERPRETER=no
465fi
466
467if test x$ENABLE_PYTHON3 = xauto; then
468 if test x$PYTHON3_INTERPRETER != xno; then
469 ENABLE_PYTHON3=yes
470 else
471 # When enabling python3 is auto, tests only run if the
472 # python3 interpreter was found on the system. Otherwise,
473 # just ignore it.
474 ENABLE_PYTHON3=no
475 AC_MSG_NOTICE([Python 3 was not found. Skip running tests with Python 3.])
476 fi
477fi
478
479if test x$ENABLE_PYTHON3 = xyes; then
480 if test x$PYTHON3_INTERPRETER != xno; then
481 # We were asked to enable python3 implicitely (auto and
482 # python3 was found) or explicitly. So enable running tests
483 # using python3 then.
484 RUN_TESTS_WITH_PY3=yes
485 else
486 AC_MSG_ERROR([Python 3 was not found])
487 fi
488fi
489
490if test x$PYTHON3_INTERPRETER = xyes; then
491 MINIMAL_PYTHON_VERSION_FOUND=yes
492fi
493
494if test x$MINIMAL_PYTHON_VERSION_FOUND = xno; then
495 AC_MSG_NOTICE([no minimal version of python found])
496 if test x$PYTHON = xno; then
497 AC_MSG_NOTICE([python binary wasn't found])
498 if test x$PYTHON3_INTERPRETER != xno; then
499 AC_MSG_NOTICE([using $PYTHON3_INTERPRETER instead])
500 PYTHON=$PYTHON3_INTERPRETER
501 MINIMAL_PYTHON_VERSION_FOUND=yes
502 MISSING_FEDABIPKGDIFF_DEP=no
503 fi
504 fi
505else
506 AC_MSG_NOTICE([a minimal version of python was found ...])
507 if test x$PYTHON3_INTERPRETER != xno; then
508 # We were instructed to use python3 and it's present on the
509 # system. Let's update the PYTHON variable that points to the
510 # actual python interpreter we are going to be using
511 AC_MSG_NOTICE([... and it was $PYTHON3_INTERPRETER])
512 PYTHON=$PYTHON3_INTERPRETER
513 fi
514fi
515
Chenxiong Qi57dcfb12016-02-09 18:05:33 +0800516dnl if --enable-fedabipkgdiff has the 'auto' value, then check for the required
517dnl python modules. If they are present, then enable the fedabipkgdiff program.
518dnl If they are not then disable the program.
519dnl
520dnl If --enable-fedabipkgdiff has the 'yes' value, then check for the required
521dnl python modules and whatever dependency fedabipkgdiff needs. If they are
522dnl not present then the configure script will error out.
523
524if test x$ENABLE_FEDABIPKGDIFF = xauto -o x$ENABLE_FEDABIPKGDIFF = xyes; then
525 CHECK_DEPS_FOR_FEDABIPKGDIFF=yes
526else
527 CHECK_DEPS_FOR_FEDABIPKGDIFF=no
528fi
529
530if test x$CHECK_DEPS_FOR_FEDABIPKGDIFF = xyes; then
Dodji Seketelice293c22016-09-12 12:09:59 +0200531 MISSING_FEDABIPKGDIFF_DEP=no
532
Chenxiong Qi57dcfb12016-02-09 18:05:33 +0800533 if test x$ENABLE_FEDABIPKGDIFF = xyes; then
Dodji Seketelice293c22016-09-12 12:09:59 +0200534 MISSING_FEDABIPKGDIFF_DEP_FATAL=yes
535 else
536 MISSING_FEDABIPKGDIFF_DEP_FATAL=no
Chenxiong Qi57dcfb12016-02-09 18:05:33 +0800537 fi
538
539 AC_PATH_PROG(WGET, wget, no)
540
Dodji Seketelice293c22016-09-12 12:09:59 +0200541 if test x$WGET = xno; then
Thomas Schwinge7d30a3d2021-12-11 19:18:52 +0100542 MISSING_FEDABIPKGDIFF_DEP=yes
Dodji Seketelice293c22016-09-12 12:09:59 +0200543 if test x$MISSING_FEDABIPKGDIFF_DEP_FATAL = xyes; then
544 AC_MSG_ERROR(could not find the wget program)
545 else
Dodji Seketelia44a4c12016-11-23 13:13:19 +0100546 AC_MSG_NOTICE([could not find the wget program])
547 AC_MSG_NOTICE([disabling fedabipkgdiff as a result])
Dodji Seketelice293c22016-09-12 12:09:59 +0200548 fi
Chenxiong Qi57dcfb12016-02-09 18:05:33 +0800549 fi
550
Chenxiong Qi57dcfb12016-02-09 18:05:33 +0800551 if test x$MINIMAL_PYTHON_VERSION_FOUND = xno; then
Dodji Seketelice293c22016-09-12 12:09:59 +0200552 MISSING_FEDABIPKGDIFF_DEP=yes
553 if test x$MISSING_FEDABIPKGDIFF_DEP_FATAL = xyes; then
Chenxiong Qi1ac0c052018-03-25 15:34:59 +0800554 AC_MSG_ERROR([could not find a python program of version at least $MINIMAL_PYTHON2_VERSION])
555 fi
Chenxiong Qi57dcfb12016-02-09 18:05:33 +0800556 fi
557
Chenxiong Qi1ac0c052018-03-25 15:34:59 +0800558 ###################################################################
559 # Now we are going to check the presence of the required python
560 # modules using either python2 or python3 as required until now.
561 ###################################################################
562
563 # Grrr, the urlparse python2 module got renamed in python3 as
564 # urllib.parse. Oh well.
565 if test x$PYTHON = xpython3; then
566 URLPARSE_MODULE=urllib.parse
567 else
568 URLPARSE_MODULE=urlparse
569 fi
570
Dodji Seketeli38ac2a82016-06-03 16:36:52 +0200571 REQUIRED_PYTHON_MODULES_FOR_FEDABIPKGDIFF="\
Chenxiong Qi1ac0c052018-03-25 15:34:59 +0800572 argparse logging os re subprocess sys $URLPARSE_MODULE \
573 xdg koji mock rpm imp tempfile mimetypes shutil six"
Chenxiong Qi57dcfb12016-02-09 18:05:33 +0800574
Thomas Schwinge7d30a3d2021-12-11 19:18:52 +0100575 AX_CHECK_PYTHON_MODULES([$REQUIRED_PYTHON_MODULES_FOR_FEDABIPKGDIFF],
576 [$PYTHON],
577 [FOUND_ALL_PYTHON_MODULES=yes],
578 [FOUND_ALL_PYTHON_MODULES=no])
Dodji Seketeli38ac2a82016-06-03 16:36:52 +0200579
Thomas Schwinge7d30a3d2021-12-11 19:18:52 +0100580 if test x$FOUND_ALL_PYTHON_MODULES = xno; then
581 MISSING_FEDABIPKGDIFF_DEP=yes
582 if test x$MISSING_FEDABIPKGDIFF_DEP_FATAL = xyes; then
583 AC_MSG_ERROR([missing python modules: $MISSING_PYTHON_MODULES]);
Dodji Seketeli38ac2a82016-06-03 16:36:52 +0200584 else
Thomas Schwinge7d30a3d2021-12-11 19:18:52 +0100585 AC_MSG_NOTICE([missing python modules: $MISSING_PYTHON_MODULES])
586 AC_MSG_NOTICE([disabling fedabipkgdiff as a result])
Dodji Seketeli38ac2a82016-06-03 16:36:52 +0200587 fi
Thomas Schwinge7d30a3d2021-12-11 19:18:52 +0100588 else
589 # On some old platforms, the koji client object doesn't have
590 # the required .read_config method. Alas, that module doesn't
591 # have any __version__ string either. So we do as well as we
592 # can to try and detect that case and disable fedabipkgdiff if
593 # necessary.
594 AC_MSG_CHECKING([if koji client is recent enough])
595 $PYTHON 2>&AS_MESSAGE_LOG_FD -c "
Chenxiong Qi57dcfb12016-02-09 18:05:33 +0800596import koji
Thomas Schwingefeb441e2021-12-17 23:16:26 +0100597try:
598 koji.read_config('koji')
599except koji.ConfigurationError:
600 # See 'tools/fedabipkgdiff'.
601 pass"
Thomas Schwinge7d30a3d2021-12-11 19:18:52 +0100602 if test $? -eq 0; then
603 koji_version_check_ok=yes
604 else
605 koji_version_check_ok=no
Chenxiong Qi57dcfb12016-02-09 18:05:33 +0800606 fi
Thomas Schwinge7d30a3d2021-12-11 19:18:52 +0100607 AC_MSG_RESULT([$koji_version_check_ok])
608 if test x$koji_version_check_ok = xno; then
609 MISSING_FEDABIPKGDIFF_DEP=yes
610 if test x$MISSING_FEDABIPKGDIFF_DEP_FATAL = xyes; then
611 AC_MSG_ERROR([unsuitable koji client])
612 else
613 AC_MSG_WARN([disabling fedabipkgdiff])
614 fi
615 fi
616 fi
617
618 if test x$MISSING_FEDABIPKGDIFF_DEP = xno; then
619 ENABLE_FEDABIPKGDIFF=yes
620 else
621 ENABLE_FEDABIPKGDIFF=no
Chenxiong Qi57dcfb12016-02-09 18:05:33 +0800622 fi
623fi
624
625AM_CONDITIONAL(ENABLE_FEDABIPKGDIFF, test x$ENABLE_FEDABIPKGDIFF = xyes)
Chenxiong Qi1ac0c052018-03-25 15:34:59 +0800626AM_CONDITIONAL(ENABLE_RUNNING_TESTS_WITH_PY3, test x$RUN_TESTS_WITH_PY3 = xyes)
627AM_CONDITIONAL(ENABLE_PYTHON3_INTERPRETER, test x$PYTHON3_INTERPRETER != xno)
Dodji Seketeli899cc4b2018-05-16 14:24:31 +0200628AC_SUBST(PYTHON)
Chenxiong Qi57dcfb12016-02-09 18:05:33 +0800629
Ben Woodard via Libabigail05d33d62021-03-12 11:42:41 -0800630DEPS_CPPFLAGS="$XML_CFLAGS"
Dodji Seketelic57e9502013-08-27 15:18:59 +0200631AC_SUBST(DEPS_CPPFLAGS)
632
Dodji Seketeli52a33572014-11-19 17:08:10 +0100633dnl Check for the presence of doxygen program
634
635if test x$ENABLE_APIDOC != xno; then
636 AC_CHECK_PROG(FOUND_DOXYGEN, doxygen, yes, no)
637 if test x$ENABLE_APIDOC = xauto; then
638 if test x$FOUND_DOXYGEN = xyes; then
639 ENABLE_APIDOC=yes
640 else
641 ENABLE_APIDOC=no
642 fi
643 fi
644fi
645AM_CONDITIONAL(ENABLE_APIDOC, test x$ENABLE_APIDOC = xyes)
646
647dnl Check for the presence of the sphinx-build program
648
649if test x$ENABLE_MANUAL != xno; then
650 AC_CHECK_PROG(FOUND_SPHINX_BUILD, sphinx-build, yes, no)
651 if test x$ENABLE_MANUAL = xauto; then
652 if test x$FOUND_SPHINX_BUILD = xyes; then
653 ENABLE_MANUAL=yes
654 else
655 ENABLE_MANUAL=no
656 fi
657 fi
658fi
659AM_CONDITIONAL(ENABLE_MANUAL, test x$ENABLE_MANUAL = xyes)
660
Dodji Seketeli3dbe8422016-05-21 02:09:50 +0200661dnl Check for the presence of Valgrind and do the plumbing to allow
662dnl the running of "make check-valgrind".
663AX_VALGRIND_DFLT(memcheck, on)
664AX_VALGRIND_DFLT(helgrind, on)
665AX_VALGRIND_DFLT(drd, off)
666AX_VALGRIND_DFLT(sgcheck, off)
667
668AX_VALGRIND_CHECK
669
Giuliano Procida2ec38c22021-05-24 11:03:15 +0100670dnl Handle conditional use of a C++17 compiler
671if test x$ENABLE_CXX17 = xyes; then
672 CXX_STANDARD=c++17
673fi
674AM_CONDITIONAL(ENABLE_CXX17, test x$ENABLE_CXX17 = xyes)
675
Dodji Seketeli52a33572014-11-19 17:08:10 +0100676dnl Set the list of libraries libabigail depends on
677
Jose E. Marchesi via Libabigail8c22f5f2021-10-29 00:51:32 +0200678DEPS_LIBS="$XML_LIBS $ELF_LIBS $DW_LIBS $CTF_LIBS"
Dodji Seketelic57e9502013-08-27 15:18:59 +0200679AC_SUBST(DEPS_LIBS)
680
Dodji Seketelifc27d102013-03-21 23:42:41 +0100681if test x$ABIGAIL_DEVEL != x; then
Dodji Seketeli84f37402020-05-18 12:01:14 +0200682 CFLAGS="-g -Og -Wall -Wextra -Werror -D_FORTIFY_SOURCE=2"
683 CXXFLAGS="-g -Og -Wall -Wextra -Werror -D_FORTIFY_SOURCE=2 -D_GLIBCXX_DEBUG"
Dodji Seketeli39f02b62019-04-18 15:46:34 +0200684fi
685
Matthias Maennich6c238412020-05-15 11:19:55 +0200686if test x$ABIGAIL_DEBUG != x; then
687 CFLAGS="$CFLAGS -Og -g3 -ggdb"
688 CXXFLAGS="$CXXFLAGS -Og -g3 -ggdb"
689fi
690
Dodji Seketeli8d7ffe32020-10-13 18:15:05 +0200691if test x$ABIGAIL_NO_OPTIMIZATION_DEBUG != x; then
692 CFLAGS="-g -O0 -Wall -Wextra -Werror"
693 CXXFLAGS="-g -O0 -Wall -Wextra -Werror"
694fi
695
Dodji Seketeli39f02b62019-04-18 15:46:34 +0200696if test x$ENABLE_ASAN = xyes; then
697 CFLAGS="$CFLAGS -fsanitize=address"
698 CXXFLAGS="$CXXFLAGS -fsanitize=address"
699fi
700
Matthias Maennich5f70e6b2020-03-18 00:18:37 +0100701if test x$ENABLE_MSAN = xyes; then
702 CFLAGS="$CFLAGS -fsanitize=memory -fsanitize-memory-track-origins"
703 CXXFLAGS="$CXXFLAGS -fsanitize=memory -fsanitize-memory-track-origins"
704fi
705
Matthias Maennich059a59a2020-03-12 12:31:57 +0100706if test x$ENABLE_TSAN = xyes; then
707 CFLAGS="$CFLAGS -fsanitize=thread"
708 CXXFLAGS="$CXXFLAGS -fsanitize=thread"
709fi
710
Dodji Seketeli39f02b62019-04-18 15:46:34 +0200711if test x$ENABLE_UBSAN = xyes; then
712 CFLAGS="$CFLAGS -fsanitize=undefined"
713 CXXFLAGS="$CXXFLAGS -fsanitize=undefined"
Dodji Seketelifc27d102013-03-21 23:42:41 +0100714fi
715
Jose E. Marchesi via Libabigail8c22f5f2021-10-29 00:51:32 +0200716dnl Set a few Automake conditionals
717
718AM_CONDITIONAL([CTF_READER],[test "x$ENABLE_CTF" = "xyes"])
719
Dodji Seketeli4f8c9b12020-12-03 10:53:08 +0100720dnl Set the level of C++ standard we use.
721CXXFLAGS="$CXXFLAGS -std=$CXX_STANDARD"
722
Dodji Seketeliffec27f2019-01-18 11:21:48 +0100723dnl Check if several decls and constant are defined in dependant
724dnl libraries
Sinny Kumari388f9902015-03-31 15:46:45 +0530725HAS_EM_AARCH64=no
726AC_CHECK_DECL([EM_AARCH64],
727 [HAS_EM_AARCH64=yes],
728 [HAS_EM_AARCH64=no],
729 [[#include <elf.h>]])
730
731if test x$HAS_EM_AARCH64 = xyes; then
732 AC_DEFINE([HAVE_EM_AARCH64_MACRO],
733 1,
734 [Defined to 1 if elf.h has EM_AARCH64 macro defined])
735fi
736
737HAS_EM_TILEPRO=no
738AC_CHECK_DECL([EM_TILEPRO],
739 [HAS_EM_TILEPRO=yes],
740 [HAS_EM_TILEPRO=no],
741 [[#include <elf.h>]])
742
743if test x$HAS_EM_TILEPRO = xyes; then
744 AC_DEFINE([HAVE_EM_TILEPRO_MACRO],
745 1,
746 [Defined to 1 if elf.h has EM_TILEPR0 macro defined])
747fi
748
749HAS_EM_TILEGX=no
750AC_CHECK_DECL([EM_TILEGX],
751 [HAS_EM_TILEGX=yes],
752 [HAS_EM_TILEGX=no],
753 [[#include <elf.h>]])
754
755if test x$HAS_EM_TILEGX = xyes; then
756 AC_DEFINE([HAVE_EM_TILEGX_MACRO],
757 1,
758 [Defined to 1 if elf.h has EM_TILEGX macro defined])
759fi
760
Dodji Seketelice0d10d2019-09-18 09:16:27 +0200761HAS_R_AARCH64_ABS64=no
762AC_CHECK_DECL([R_AARCH64_ABS64],
763 [HAS_R_AARCH64_ABS64=yes],
764 [HAS_R_AARCH64_ABS64=no],
765 [[#include <elf.h>]])
766
767if test x$HAS_R_AARCH64_ABS64 = xyes; then
768 AC_DEFINE([HAVE_R_AARCH64_ABS64_MACRO],
769 1,
770 [Defined to 1 if elf.h has R_AARCH64_ABS64 macro defined])
771fi
772
773HAS_R_AARCH64_PREL32=no
774AC_CHECK_DECL([R_AARCH64_PREL32],
775 [HAS_R_AARCH64_PREL32=yes],
776 [HAS_R_AARCH64_PREL32=no],
777 [[#include <elf.h>]])
778
779if test x$HAS_R_AARCH64_PREL32 = xyes; then
780 AC_DEFINE([HAVE_R_AARCH64_PREL32_MACRO],
781 1,
782 [Defined to 1 if elf.h has R_AARCH64_PREL32 macro defined])
783fi
784
Dodji Seketeliffec27f2019-01-18 11:21:48 +0100785HAS_DW_LANG_UPC=no
786AC_CHECK_DECL([DW_LANG_UPC],
787 [HAS_DW_LANG_UPC=yes],
788 [HAS_DW_LANG_UPC=no],
789 [[#include <dwarf.h>]])
790if test x$HAS_DW_LANG_UPC = xyes; then
791 AC_DEFINE([HAVE_DW_LANG_UPC_enumerator],
792 1,
793 [Define to 1 if dwarf.h has the DW_LANG_UPC enumerator])
794fi
795
796HAS_DW_LANG_D=no
797AC_CHECK_DECL([DW_LANG_D],
798 [HAS_DW_LANG_D=yes],
799 [HAS_DW_LANG_D=no],
800 [[#include <dwarf.h>]])
801if test x$HAS_DW_LANG_D = xyes; then
802 AC_DEFINE([HAVE_DW_LANG_D_enumerator],
803 1,
804 [Define to 1 if dwarf.h has the DW_LANG_D enumerator])
805fi
806
807HAS_DW_LANG_Python=no
808AC_CHECK_DECL([DW_LANG_Python],
809 [HAS_DW_LANG_Python=yes],
810 [HAS_DW_LANG_Python=no],
811 [[#include <dwarf.h>]])
812if test x$HAS_DW_LANG_Python = xyes; then
813 AC_DEFINE([HAVE_DW_LANG_Python_enumerator],
814 1,
815 [Define to 1 if dwarf.h has the DW_LANG_Python enumerator])
816fi
817
818HAS_DW_LANG_Go=no
819AC_CHECK_DECL([DW_LANG_Go],
820 [HAS_DW_LANG_Go=yes],
821 [HAS_DW_LANG_Go=no],
822 [[#include <dwarf.h>]])
823if test x$HAS_DW_LANG_Go = xyes; then
824 AC_DEFINE([HAVE_DW_LANG_Go_enumerator],
825 1,
826 [Define to 1 if dwarf.h has the DW_LANG_Go enumerator])
827fi
828
829HAS_DW_LANG_C11=no
830AC_CHECK_DECL([DW_LANG_C11],
831 [HAS_DW_LANG_C11=yes],
832 [HAS_DW_LANG_C11=no],
833 [[#include <dwarf.h>]])
834if test x$HAS_DW_LANG_C11 = xyes; then
835 AC_DEFINE([HAVE_DW_LANG_C11_enumerator],
836 1,
837 [Define to 1 if dwarf.h has the DW_LANG_C11 enumerator])
838fi
839
840HAS_DW_LANG_C_plus_plus_03=no
841AC_CHECK_DECL([DW_LANG_C_plus_plus_03],
842 [HAS_DW_LANG_C_plus_plus_03=yes],
843 [HAS_DW_LANG_C_plus_plus_03=no],
844 [[#include <dwarf.h>]])
845if test x$HAS_DW_LANG_C_plus_plus_03 = xyes; then
846 AC_DEFINE([HAVE_DW_LANG_C_plus_plus_03_enumerator],
847 1,
848 [Define to 1 if dwarf.h has the DW_LANG_C_plus_plus_03 enumerator])
849fi
850
851HAS_DW_LANG_C_plus_plus_11=no
852AC_CHECK_DECL([DW_LANG_C_plus_plus_11],
853 [HAS_DW_LANG_C_plus_plus_11=yes],
854 [HAS_DW_LANG_C_plus_plus_11=no],
855 [[#include <dwarf.h>]])
856if test x$HAS_DW_LANG_C_plus_plus_11 = xyes; then
857 AC_DEFINE([HAVE_DW_LANG_C_plus_plus_11_enumerator],
858 1,
859 [Define to 1 if dwarf.h has the DW_LANG_C_plus_plus_11 enumerator])
860fi
861
862HAS_DW_LANG_C_plus_plus_14=no
863AC_CHECK_DECL([DW_LANG_C_plus_plus_14],
864 [HAS_DW_LANG_C_plus_plus_14=yes],
865 [HAS_DW_LANG_C_plus_plus_14=no],
866 [[#include <dwarf.h>]])
867if test x$HAS_DW_LANG_C_plus_plus_14 = xyes; then
868 AC_DEFINE([HAVE_DW_LANG_C_plus_plus_14_enumerator],
869 1,
870 [Define to 1 if dwarf.h has the DW_LANG_C_plus_plus_14 enumerator])
871fi
872
873HAS_DW_LANG_Mips_Assembler=no
874AC_CHECK_DECL([DW_LANG_Mips_Assembler],
875 [HAS_DW_LANG_Mips_Assembler=yes],
876 [HAS_DW_LANG_Mips_Assembler=no],
877 [[#include <dwarf.h>]])
878if test x$HAS_DW_LANG_Mips_Assembler = xyes; then
879 AC_DEFINE([HAVE_DW_LANG_Mips_Assembler_enumerator],
880 1,
881 [Define to 1 if dwarf.h has the DW_LANG_Mips_Assembler enumerator])
882fi
883
884HAS_DW_LANG_Rust=no
885AC_CHECK_DECL([DW_LANG_Rust],
Dodji Seketeli6e9b2ae2019-01-24 10:31:57 +0100886 [HAS_DW_LANG_Rust=yes],
887 [HAS_DW_LANG_Rust=no],
Dodji Seketeliffec27f2019-01-18 11:21:48 +0100888 [[#include <dwarf.h>]])
889
890if test x$HAS_DW_LANG_Rust = xyes; then
891 AC_DEFINE([HAVE_DW_LANG_Rust_enumerator],
892 1,
893 [Define to 1 if dwarf.h has the DW_LANG_Rust enumerator])
894fi
895
Dodji Seketeli568dee12019-09-30 17:36:58 +0200896HAS_DW_FORM_strx1=no
897HAS_DW_FORM_strx2=no
898HAS_DW_FORM_strx3=no
899HAS_DW_FORM_strx4=no
Dodji Seketeli43c59da2021-02-08 12:03:19 +0100900HAS_DW_FORM_line_strp=no
Dodji Seketeli568dee12019-09-30 17:36:58 +0200901
902AC_CHECK_DECL([DW_FORM_strx1],
903 [HAS_DW_FORM_strx1=yes],
904 [HAS_DW_FORM_strx1=no],
905 [[#include <dwarf.h>]])
906
907if test x$HAS_DW_FORM_strx1 = xyes; then
908 AC_DEFINE([HAVE_DW_FORM_strx1],
909 1,
910 [Define to 1 if dwarf.h has the DW_FORM_strx1 enumerator])
911fi
912
913AC_CHECK_DECL([DW_FORM_strx2],
914 [HAS_DW_FORM_strx2=yes],
915 [HAS_DW_FORM_strx2=no],
916 [[#include <dwarf.h>]])
917
918if test x$HAS_DW_FORM_strx2 = xyes; then
919 AC_DEFINE([HAVE_DW_FORM_strx2],
920 1,
921 [Define to 1 if dwarf.h has the DW_FORM_strx2 enumerator])
922fi
923
924AC_CHECK_DECL([DW_FORM_strx3],
925 [HAS_DW_FORM_strx3=yes],
926 [HAS_DW_FORM_strx3=no],
927 [[#include <dwarf.h>]])
928
929if test x$HAS_DW_FORM_strx3 = xyes; then
930 AC_DEFINE([HAVE_DW_FORM_strx3],
931 1,
932 [Define to 1 if dwarf.h has the DW_FORM_strx3 enumerator])
933fi
934
935AC_CHECK_DECL([DW_FORM_strx4],
936 [HAS_DW_FORM_strx4=yes],
937 [HAS_DW_FORM_strx4=no],
938 [[#include <dwarf.h>]])
939
940if test x$HAS_DW_FORM_strx4 = xyes; then
941 AC_DEFINE([HAVE_DW_FORM_strx4],
942 1,
943 [Define to 1 if dwarf.h has the DW_FORM_strx4 enumerator])
944fi
945
Dodji Seketeli43c59da2021-02-08 12:03:19 +0100946AC_CHECK_DECL([DW_FORM_line_strp],
947 [HAS_DW_FORM_line_strp=yes],
948 [HAS_DW_FORM_line_strp=no],
949 [[#include <dwarf.h>]])
950
951if test x$HAS_DW_FORM_line_strp = xyes; then
952 AC_DEFINE([HAVE_DW_FORM_line_strp],
953 1,
954 [Define to 1 if dwarf.h has the DW_FORM_line_strp enumerator])
955fi
956
Dodji Seketeli1f53d1f2019-10-01 16:50:37 +0200957if test x$HAS_DW_FORM_strx1 = xyes -a \
958 x$HAS_DW_FORM_strx2 = xyes -a \
959 x$HAS_DW_FORM_strx3 = xyes -a \
960 x$HAS_DW_FORM_strx4 = xyes ; then
Dodji Seketeli568dee12019-09-30 17:36:58 +0200961 AC_DEFINE([HAVE_DW_FORM_strx],
962 1,
963 [Define to 1 if dwarf.h has the DW_FORM_strx enumerators])
964fi
965
Dodji Seketeli944025e2015-06-23 12:30:27 +0200966dnl Set large files support
967AC_SYS_LARGEFILE
968
Dodji Seketelid7d371a2013-02-28 11:42:57 +0100969AC_CONFIG_FILES([Makefile
Dodji Seketeli849b5982013-08-22 16:57:42 +0200970libabigail.pc
Dodji Seketeli7fbe6a92014-11-18 23:32:50 +0100971 include/Makefile
972 include/abg-version.h
973 doc/Makefile
974 doc/manuals/Makefile
975 src/Makefile
976 tools/Makefile
Dodji Seketeli5c19aa12014-11-20 11:26:30 +0100977 tests/Makefile
Ondrej Opralac738b5c2015-11-14 18:32:01 +0100978 tests/data/Makefile
979 bash-completion/Makefile])
Dodji Seketelid7d371a2013-02-28 11:42:57 +0100980
Dodji Seketeli8b28d172015-02-13 20:20:57 +0100981dnl Some test scripts are generated by autofoo.
Chenxiong Qi57dcfb12016-02-09 18:05:33 +0800982AC_CONFIG_FILES([tests/runtestcanonicalizetypes.sh],
983 [chmod +x tests/runtestcanonicalizetypes.sh])
Dodji Seketelicac59a12020-11-16 12:22:05 +0100984 AC_CONFIG_FILES([tests/runtestslowselfcompare.sh],
985 [chmod +x tests/runtestslowselfcompare.sh])
Chenxiong Qi1a00cad2016-07-06 17:51:13 +0800986AC_CONFIG_FILES([tests/mockfedabipkgdiff],
987 [chmod +x tests/mockfedabipkgdiff])
Chenxiong Qi57dcfb12016-02-09 18:05:33 +0800988AC_CONFIG_FILES([tests/runtestfedabipkgdiff.py],
989 [chmod +x tests/runtestfedabipkgdiff.py])
Chenxiong Qi1ac0c052018-03-25 15:34:59 +0800990AC_CONFIG_FILES([tests/runtestfedabipkgdiffpy3.sh],
991 [chmod +x tests/runtestfedabipkgdiffpy3.sh])
Dodji Seketelib36ca152016-05-30 10:37:48 +0200992AC_CONFIG_FILES([tests/runtestdefaultsupprs.py],
993 [chmod +x tests/runtestdefaultsupprs.py])
Chenxiong Qi1ac0c052018-03-25 15:34:59 +0800994AC_CONFIG_FILES([tests/runtestdefaultsupprspy3.sh],
995 [chmod +x tests/runtestdefaultsupprspy3.sh])
Dodji Seketeli8b28d172015-02-13 20:20:57 +0100996
Dodji Seketelid7d371a2013-02-28 11:42:57 +0100997AC_OUTPUT
Dodji Seketelie6e76802014-08-31 11:17:03 +0200998
999AC_MSG_NOTICE([
1000=====================================================================
Matthias Maennichade58f92019-12-15 23:51:51 +00001001 Libabigail: $VERSION_MAJOR.$VERSION_MINOR.$VERSION_REVISION$VERSION_SUFFIX
Dodji Seketelie6e76802014-08-31 11:17:03 +02001002=====================================================================
1003
1004 Here is the configuration of the package:
1005
Dodji Seketeli585fc4c2015-08-22 13:59:18 +02001006 Prefix : ${prefix}
1007 Source code location : ${srcdir}
1008 C Compiler : ${CC}
1009 C++ Compiler : ${CXX}
Dodji Seketelia126e922016-07-22 11:01:41 +02001010 GCC visibility attribute supported : ${SUPPORTS_GCC_VISIBILITY_ATTRIBUTE}
Dodji Seketeli4f8c9b12020-12-03 10:53:08 +01001011 CXXFLAGS : ${CXXFLAGS}
Chenxiong Qi1ac0c052018-03-25 15:34:59 +08001012 Python : ${PYTHON}
Dodji Seketelie6e76802014-08-31 11:17:03 +02001013
1014 OPTIONAL FEATURES:
Dodji Seketeli4f8c9b12020-12-03 10:53:08 +01001015 C++ standard level : ${CXX_STANDARD}
Dodji Seketelice5e4882016-05-22 11:39:33 +02001016 libdw has the dwarf_getalt function : ${FOUND_DWARF_GETALT_IN_LIBDW}
Dodji Seketeli585fc4c2015-08-22 13:59:18 +02001017 Enable rpm support in abipkgdiff : ${ENABLE_RPM}
Thomas Schwinge70154552021-12-10 17:52:46 +01001018 Enable rpm/zstd in abipkgdiff testing : ${ENABLE_RPM_ZSTD}
Giuliano Procidae5a13c82022-01-10 10:58:17 +00001019 Enable self comparison debugging : ${ENABLE_DEBUG_SELF_COMPARISON}
Dodji Seketeli623391a2021-10-14 12:12:01 +02001020 Enable type canonicalization debugging : ${ENABLE_DEBUG_TYPE_CANONICALIZATION}
Dodji Seketeli585fc4c2015-08-22 13:59:18 +02001021 Enable deb support in abipkgdiff : ${ENABLE_DEB}
1022 Enable GNU tar archive support in abipkgdiff : ${ENABLE_TAR}
Ondrej Opralac738b5c2015-11-14 18:32:01 +01001023 Enable bash completion : ${ENABLE_BASH_COMPLETION}
Dodji Seketelib28cb4e2016-05-21 03:02:19 +02001024 Enable fedabipkgdiff : ${ENABLE_FEDABIPKGDIFF}
Chenxiong Qi1ac0c052018-03-25 15:34:59 +08001025 Enable python 3 : ${ENABLE_PYTHON3}
Jose E. Marchesi via Libabigail8c22f5f2021-10-29 00:51:32 +02001026 Enable CTF front-end : ${ENABLE_CTF}
Dodji Seketeli3dbe8422016-05-21 02:09:50 +02001027 Enable running tests under Valgrind : ${enable_valgrind}
Dodji Seketeli39f02b62019-04-18 15:46:34 +02001028 Enable build with -fsanitize=address : ${ENABLE_ASAN}
Matthias Maennich5f70e6b2020-03-18 00:18:37 +01001029 Enable build with -fsanitize=memory : ${ENABLE_MSAN}
Matthias Maennich059a59a2020-03-12 12:31:57 +01001030 Enable build with -fsanitize=thread : ${ENABLE_TSAN}
Dodji Seketeli39f02b62019-04-18 15:46:34 +02001031 Enable build with -fsanitize=undefined : ${ENABLE_UBSAN}
Dodji Seketeli585fc4c2015-08-22 13:59:18 +02001032 Generate html apidoc : ${ENABLE_APIDOC}
1033 Generate html manual : ${ENABLE_MANUAL}
Dodji Seketelie6e76802014-08-31 11:17:03 +02001034])