1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703
|
dnl SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
dnl Process this file with autoconf to produce a configure script.
dnl Configure input file for Libabigail. -*-autoconf-*-
dnl
dnl Copyright (C) 2013-2025 Red Hat, Inc.
dnl Author: Dodji Seketeli
dnl
dnl This file is part of Libabigail.
dnl
dnl Libabigail version number is handled here with the major and minor
dnl version numbers.
m4_define([version_major], [2])
m4_define([version_minor], [9])
dnl Below are the numbers to handle libabigail.so's versionning
dnl following the libtool's versionning scheme to handle shared
dnl libraries' compatibility.
dnl
dnl Below are the rules to follow to update the three numbers
dnl (LIBABIGAIL_SO_CURRENT, LIBABIGAIL_SO_REVISION and LIBABIGAIL_SO_AGE):
dnl
dnl 1. If the library source code has changed at all since the last
dnl update, then increment LIBABIGAIL_SO_REVISION ('C:R:A' becomes
dnl 'C:R+1:A').
dnl
dnl 2. If any interfaces have been added, removed, or changed since
dnl the last update, increment LIBABIGAIL_SO_CURRENT, and set
dnl LIBABIGAIL_REVISION to 0.
dnl
dnl 3. If any interfaces have been added since the last public release,
dnl then increment LIBABIGAIL_SO_AGE.
dnl
dnl 4. If any interfaces have been removed or changed since the last
dnl public release, then set LIBABIGAIL_SO_AGE to 0.
m4_define([libabigail_so_current], [8])
m4_define([libabigail_so_revision], [0])
m4_define([libabigail_so_age], [0])
AC_INIT([libabigail],
[version_major.version_minor],
[http://sourceware.org/bugzilla],
[libabigail],
[http://sourceware.org/libabigail])
AC_PREREQ([2.63])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_SRCDIR([README])
AC_CONFIG_MACRO_DIR([m4])
dnl Include some autoconf macros to check for python modules.
dnl
dnl These macros are coming from the autoconf archive at
dnl http://www.gnu.org/software/autoconf-archive
dnl This one is for the AX_CHECK_PYTHON_MODULES() macro.
m4_include([autoconf-archive/ax_check_python_modules.m4])
dnl These two below are for the AX_PROG_PYTHON_VERSION() module.
m4_include([autoconf-archive/ax_compare_version.m4])
m4_include([autoconf-archive/ax_prog_python_version.m4])
dnl This one is to be able to run "make check-valgrind"
dnl and have unit tests run under der Valgrind.
m4_include([autoconf-archive/ax_valgrind_check.m4])
AM_INIT_AUTOMAKE([1.11.1 foreign subdir-objects dist-xz tar-ustar parallel-tests])
AM_MAINTAINER_MODE([enable])
AM_SILENT_RULES([yes])
dnl By default, the tar command used by 'make dist and make distcheck'
dnl is "tar --format=ustar -chf" where the "-h" option actually
dnl follows symbolic links. So it copies the targets of the symlinks
dnl that are present in the tarball. Unfortunately, there are
dnl tests that need to keep the symlinks intact in the tarball.
dnl
dnl So let's define a tar command without the -h option.
am__tar='tar --format=ustar -cf - "$$tardir"'
VERSION_MAJOR=version_major
VERSION_MINOR=version_minor
VERSION_REVISION=0
dnl The major version number of the abixml version should be changed
dnl only if a new version of libabigail cannot read an old version of
dnl abixml. This should be very rare and should be avoided as much as
dnl possible.
ABIXML_VERSION_MAJOR=2
dnl The minor version number of the abixml version should be changed
dnl each time and old version of libabigail can't handle a new version
dnl of abixml. Note however that when the major version number is
dnl changed, the minor version number should be set to zero.
ABIXML_VERSION_MINOR=4
LIBABIGAIL_SO_CURRENT=libabigail_so_current
LIBABIGAIL_SO_REVISION=libabigail_so_revision
LIBABIGAIL_SO_AGE=libabigail_so_age
AC_SUBST(VERSION_MAJOR)
AC_SUBST(VERSION_MINOR)
AC_SUBST(VERSION_REVISION)
AC_SUBST(ABIXML_VERSION_MAJOR)
AC_SUBST(ABIXML_VERSION_MINOR)
AC_SUBST(LIBABIGAIL_SO_CURRENT)
AC_SUBST(LIBABIGAIL_SO_REVISION)
AC_SUBST(LIBABIGAIL_SO_AGE)
dnl This VERSION_SUFFIX environment variable is to allow appending
dnl arbitrary text to the libabigail version string representation.
dnl That is useful to identify custom versions of the library
dnl (e.g. development versions or versions of a particular origin).
dnl
dnl The feature can be enabled by passing VERSION_SUFFIX to `configure`,
dnl e.g.
dnl
dnl $ configure VERSION_SUFFIX="-dev"
AC_SUBST(VERSION_SUFFIX)
AC_ARG_ENABLE(rpm,
AS_HELP_STRING([--enable-rpm=yes|no|auto],
[enable the support of rpm in abipkgdiff (default is auto)]),
ENABLE_RPM=$enableval,
ENABLE_RPM=auto)
# '--enable-rpm415' option name preserved for backwards compatibility.
AC_ARG_ENABLE(rpm415,
AS_HELP_STRING([--enable-rpm415=yes|no|auto],
[enable rpm/zstd in abipkgdiff testing (default is auto)]),
ENABLE_RPM_ZSTD=$enableval,
ENABLE_RPM_ZSTD=auto)
AC_ARG_ENABLE(debug-self-comparison,
AS_HELP_STRING([--enable-debug-self-comparison=yes|no],
[enable debugging of self comparison with 'abidw --debug-abidiff'(default is no)]),
ENABLE_DEBUG_SELF_COMPARISON=$enableval,
ENABLE_DEBUG_SELF_COMPARISON=no)
AC_ARG_ENABLE(debug-type-canonicalization,
AS_HELP_STRING([--enable-debug-type-canonicalization=yes|no],
[enable debugging of type canonicalization 'abidw --debug-tc'(default is no)]),
ENABLE_DEBUG_TYPE_CANONICALIZATION=$enableval,
ENABLE_DEBUG_TYPE_CANONICALIZATION=no)
AC_ARG_ENABLE(show-type-use-in-abilint,
AS_HELP_STRING([--enable-show-type-use-in-abilint=yes|no],
['enable abilint --show-type-use'(default is no)]),
ENABLE_SHOW_TYPE_USE_IN_ABILINT=$enableval,
ENABLE_SHOW_TYPE_USE_IN_ABILINT=no)
AC_ARG_ENABLE(deb,
AS_HELP_STRING([--enable-deb=yes|no|auto],
[enable the support of deb in abipkgdiff (default is auto)]),
ENABLE_DEB=$enableval,
ENABLE_DEB=auto)
AC_ARG_ENABLE(tar,
AS_HELP_STRING([--enable-tar=yes|no|auto],
[enable the support of GNU tar archives in abipkgdiff (default is auto)]),
ENABLE_TAR=$enableval,
ENABLE_TAR=auto)
AC_ARG_ENABLE(apidoc,
AS_HELP_STRING([--enable-apidoc=yes|no|auto],
[enable generation of the apidoc in html]),
ENABLE_APIDOC=$enableval,
ENABLE_APIDOC=auto)
AC_ARG_ENABLE(manual,
AS_HELP_STRING([--enable-manual=yes|no|auto],
[enable generation of the manual in html]),
ENABLE_MANUAL=$enableval,
ENABLE_MANUAL=auto)
AC_ARG_ENABLE([bash-completion],
AS_HELP_STRING([--enable-bash-completion=yes|no|auto],
[enable using completion files for tools]),
ENABLE_BASH_COMPLETION=$enableval,
ENABLE_BASH_COMPLETION=auto)
AC_ARG_ENABLE([fedabipkgdiff],
AS_HELP_STRING([--enable-fedabipkgdiff=yes|no|auto],
[enable the fedabipkgdiff tool]),
ENABLE_FEDABIPKGDIFF=$enableval,
ENABLE_FEDABIPKGDIFF=auto)
AC_ARG_ENABLE(abidb,
AS_HELP_STRING([--enable-abidb=yes|no|auto],
[enable the support of the abidb tool (default is auto)]),
ENABLE_ABIDB=$enableval,
ENABLE_ABIDB=auto)
AC_ARG_ENABLE([python3],
AS_HELP_STRING([--enable-python3=yes|no|auto],
[enable running abigail tools with python3 (default is auto)]),
ENABLE_PYTHON3=$enableval,
ENABLE_PYTHON3=auto)
AC_ARG_ENABLE(asan,
AS_HELP_STRING([--enable-asan=yes|no],
[enable the support of building with -fsanitize=address)]),
ENABLE_ASAN=$enableval,
ENABLE_ASAN=no)
AC_ARG_ENABLE(msan,
AS_HELP_STRING([--enable-msan=yes|no],
[enable the support of building with -fsanitize=memory)]),
ENABLE_MSAN=$enableval,
ENABLE_MSAN=no)
AC_ARG_ENABLE(tsan,
AS_HELP_STRING([--enable-tsan=yes|no],
[enable the support of building with -fsanitize=thread)]),
ENABLE_TSAN=$enableval,
ENABLE_TSAN=no)
AC_ARG_ENABLE(ubsan,
AS_HELP_STRING([--enable-ubsan=yes|no],
[enable the support of building with -fsanitize=undefined)]),
ENABLE_UBSAN=$enableval,
ENABLE_UBSAN=no)
dnl check if user has enabled CTF code
AC_ARG_ENABLE(ctf,
AS_HELP_STRING([--enable-ctf=yes|no],
[disable support of ctf files)]),
ENABLE_CTF=$enableval,
ENABLE_CTF=auto)
dnl check if user has enabled BTF code
AC_ARG_ENABLE(btf,
AS_HELP_STRING([--enable-btf=yes|no],
[disable support of btf files)]),
ENABLE_BTF=$enableval,
ENABLE_BTF=auto)
ENABLE_BIG_TESTS=no
AC_ARG_ENABLE(big-tests,
AS_HELP_STRING([--enable-big-tests=yes|no],
[enable the support of libabigail big tests (in the big-tests subdir)]),
ENABLE_BIG_TESTS=$enableval,
ENABLE_BIG_TESTS=no)
ENABLE_INLINED_XXHASH=no
AC_ARG_ENABLE(inlined-xxhash,
AS_HELP_STRING([--enable-inlined-xxhash=yes|no],
[enable the support the inlined-only version of the xxhash library]),
ENABLE_INLINED_XXHASH=$enableval,
ENABLE_INLINED_XXHASH=no)
WITH_DW_LIBS_PATH=auto
AC_ARG_WITH(libdw,
AS_HELP_STRING([--with-libdw=/path/to/libdw-library/prefix],
[Set the path to the libdw library prefix]),
WITH_DW_LIBS_PATH=$withval,
WITH_DW_LIBS_PATH=auto)
WITH_ELF_LIBS_PATH=auto
AC_ARG_WITH(libelf,
AS_HELP_STRING([--with-libelf=/path/to/libelf-library/prefix],
[Set the path to the libelf library prefix]),
WITH_ELF_LIBS_PATH=$withval,
WITH_ELF_LIBS_PATH=auto)
WITH_LIBXML2_PATH=auto
AC_ARG_WITH(libxml2,
AS_HELP_STRING([--with-libxml2=/path/to/libxml2-library/prefix],
[Set the path to the libxml2 library prefix]),
WITH_LIBXML2_PATH=$withval,
WITH_LIBXML2_PATH=auto)
dnl *************************************************
dnl check for dependencies
dnl *************************************************
AC_PROG_CXX
AC_CANONICAL_HOST
AC_USE_SYSTEM_EXTENSIONS
AC_PROG_INSTALL
LT_PREREQ([2.2])
LT_INIT
AC_LANG([C++])
AC_LANG_COMPILER_REQUIRE
dnl
dnl We use C++14. It has been the default in G++ since GCC 6. In el8
dnl (that we still support), we do have GCC 8.x with c++14 as the
dnl default, still.
dnl
CXX_STANDARD=c++14
dnl
dnl check if the c++ compiler has support __attribute__((visibility("hidden")))
dnl
AC_MSG_NOTICE([checking for GCC visibility attribute support ...])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
struct __attribute__((visibility("hidden"))) Foo
{
int m0;
Foo()
: m0()
{}
};
]])],
[SUPPORTS_GCC_VISIBILITY_ATTRIBUTE=yes],
[SUPPORTS_GCC_VISIBILITY_ATTRIBUTE=no]
)
if test x$SUPPORTS_GCC_VISIBILITY_ATTRIBUTE = xyes; then
AC_MSG_NOTICE([GCC visibility attribute is supported])
AC_DEFINE([HAS_GCC_VISIBILITY_ATTRIBUTE], 1,
[Defined if the compiler supports the attribution visibility syntax __attribute__((visibility("hidden")))])
VISIBILITY_FLAGS="-fvisibility=hidden"
else
AC_MSG_NOTICE([GCC visibility attribute is not supported])
VISIBILITY_FLAGS=
fi
AC_SUBST(VISIBILITY_FLAGS)
dnl glibc and BSD include fts into their libc, but musl does not so
dnl check if we need to explicitly link to the standalone musl-fts.
AC_SEARCH_LIBS([fts_open], [fts])
dnl Older glibc had a broken fts that didn't work with Large File Systems.
dnl We want the version that can handler LFS, but include workaround if we
dnl get a bad one. Add define to CFLAGS (not AC_DEFINE it) since we need to
dnl check it before including config.h (which might define _FILE_OFFSET_BITS).
AC_CACHE_CHECK([whether including fts.h with _FILE_OFFSET_BITS set breaks], ac_cv_bad_fts,
[AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
#define _FILE_OFFSET_BITS 64
#include <fts.h>
]])],
ac_cv_bad_fts=no, ac_cv_bad_fts=yes)])
AS_IF([test "x$ac_cv_bad_fts" = "xyes"],
[CFLAGS="$CFLAGS -DBAD_FTS=1",
CXXFLAGS="$CXXFLAGS -DBAD_FTS=1"])
dnl Check for dependency: libelf and libdw (elfutils). Note that we
dnl need to use at least elfutils 0.159 but at that time elfutils
dnl didnt have pkgconfig capabilities to easily query for its version.
dnl Those were added in version 0.165.
dnl look for libelf
ELF_LIBS_VERSION=0.165
SAVED_PKG_CONFIG_PATH=$PKG_CONFIG_PATH
if test $WITH_ELF_LIBS_PATH != xauto; then
export PKG_CONFIG_PATH="$WITH_ELF_LIBS_PATH/lib/pkgconfig:$PKG_CONFIG_PATH"
fi
AC_MSG_NOTICE([used PKG_CONFIG_PATH=$PKG_CONFIG_PATH to check for libelf]);
PKG_CHECK_MODULES(ELF, libelf >= $ELF_LIBS_VERSION)
if test $WITH_ELF_LIBS_PATH != xauto; then
PKG_CONFIG_PATH=$SAVED_PKG_CONFIG_PATH
fi
dnl Look for libdw
DW_LIBS_VERSION=0.165
SAVED_PKG_CONFIG_PATH=$PKG_CONFIG_PATH
if test $WITH_DW_LIBS_PATH != xauto; then
export PKG_CONFIG_PATH="$WITH_DW_LIBS_PATH/lib/pkgconfig:$PKG_CONFIG_PATH"
fi
AC_MSG_NOTICE([used PKG_CONFIG_PATH=$PKG_CONFIG_PATH to check for libdw]);
PKG_CHECK_MODULES(DW, libdw >= $DW_LIBS_VERSION)
if test $WITH_DW_LIBS_PATH != xauto; then
PKG_CONFIG_PATH=$SAVED_PKG_CONFIG_PATH
fi
dnl Allow users to compile with the NDEBUG macro defined,
dnl meaning they are compiling in a mode where the
dnl assert call does nothing. With the directive below,
dnl users just need to pass the --disable-assert
dnl option to configure.
AC_HEADER_ASSERT
AC_SUBST(DW_LIBS)
AC_SUBST(DW_CFLAGS)
AC_SUBST([ELF_LIBS])
AC_SUBST([ELF_CFLAGS])
dnl check for libctf presence if CTF code has been enabled by command line
dnl argument, and then define CTF flag (to build CTF file code) if libctf is
dnl found on the system
if test x$ENABLE_CTF != xno; then
CTF_HEADER=no
AC_CHECK_HEADER([ctf.h],
[CTF_HEADER=yes],
[AC_MSG_NOTICE([could not find ctf.h, going to disable CTF support])])
LIBCTF=
if test x$CTF_HEADER = xyes; then
AC_CHECK_LIB(ctf, ctf_open, [LIBCTF=yes], [LIBCTF=no])
fi
if test x$LIBCTF = xyes; then
dnl Test if struct struct ctf_dict_t is present.
AC_LANG(C++)
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include <ctf-api.h>
ctf_dict_t* c;]])],
[HAVE_CTF_DICT_T=yes],
[HAVE_CTF_DICT_T=no])
if test x$HAVE_CTF_DICT_T = xyes; then
AC_DEFINE([HAVE_CTF_DICT_T], 1, [struct ctf_dict_t is present])
fi
fi
if test x$HAVE_CTF_DICT_T = xno; then
AC_MSG_NOTICE([Some needed data structures are missing from ctf-api.h. Disabling CTF support.])
LIBCTF=no
fi
if test x$LIBCTF = xyes; then
AC_MSG_NOTICE([CTF support enabled])
AC_DEFINE([WITH_CTF], 1,
[Defined if user enables and system has the libctf library])
CTF_LIBS=-lctf
ENABLE_CTF=yes
else
AC_MSG_NOTICE([no suitable libctf found, CTF support was disabled])
ENABLE_CTF=no
fi
fi
dnl configure BTF usage
BPF_LIBS=
if test x$ENABLE_BTF != xno; then
AC_CHECK_HEADER([bpf/btf.h],
[HAS_BTF_HEADERS=yes],
[AC_MSG_NOTICE([could not find bpf/btf.h])])
if test x$HAS_BTF_HEADERS = xyes; then
AC_MSG_NOTICE([found BTF header file so enabling BTF support])
ENABLE_BTF=yes
AC_DEFINE([WITH_BTF], 1,
[Defined if user enabled BTF usage])
BPF_LIBS=-lbpf
else
AC_MSG_NOTICE([BTF support was disabled])
ENABLE_BTF=no
fi
dnl Test if various functions and structs are present.
if test x$ENABLE_BTF = xyes; then
dnl Test if struct btf_enum64 is present.
AC_CHECK_TYPE([struct btf_enum64],
[HAVE_BTF_ENUM64=yes],
[HAVE_BTF_ENUM64=no],
[#include <bpf/btf.h>])
if test x$HAVE_BTF_ENUM64 = xyes; then
AC_DEFINE([WITH_BTF_ENUM64], 1, [struct btf_enum64 is present])
fi
dnl Test if btf__get_nr_types is present
AC_CHECK_DECL([btf__get_nr_types],
[HAVE_BTF__GET_NR_TYPES=yes],
[HAVE_BTF__GET_NR_TYPES=no],
[#include <bpf/btf.h>])
if test x$HAVE_BTF__GET_NR_TYPES = xyes; then
AC_DEFINE(WITH_BTF__GET_NR_TYPES, 1, [The function btf__get_nr_types is present])
fi
dnl Test if btf__type_cnt is present
AC_CHECK_DECL([btf__type_cnt],
[HAVE_BTF__TYPE_CNT=yes],
[HAVE_BTF__TYPE_CNT=no],
[#include <bpf/btf.h>])
if test x$HAVE_BTF__TYPE_CNT = xyes; then
AC_DEFINE(WITH_BTF__TYPE_CNT, 1, [The function btf__type_cnt is present])
fi
dnl Test if BTF_KIND_TYPE_TAG exists
AC_CHECK_DECL([int kind = BTF_KIND_TYPE_TAG],
[HAVE_BTF_KIND_TYPE_TAG=yes],
[HAVE_BTF_KIND_TYPE_TAG=no],
[#include <bpf/btf.h>])
if test x$HAVE_BTF_KIND_TYPE_TAG = xyes; then
AC_DEFINE([WITH_BTF_KIND_TYPE_TAG], 1,
[The BTF_KIND_TYPE_TAG enumerator is present])
fi
dnl Test if BTF_KIND_DECL_TAG exists
AC_CHECK_DECL([int kind = BTF_KIND_DECL_TAG],
[HAVE_BTF_KIND_DECL_TAG=yes],
[HAVE_BTF_KIND_DECL_TAG=no],
[#include <bpf/btf.h>])
if test x$HAVE_BTF_KIND_DECL_TAG = xyes; then
AC_DEFINE([WITH_BTF_KIND_DECL_TAG], 1,
[The BTF_KIND_DECL_TAG enumerator is present])
fi
fi
fi
if test x$ENABLE_BIG_TESTS = xyes; then
AC_MSG_NOTICE([looking for $srcdir/big-tests ...]);
if test -d $srcdir/big-tests -o -L $srcdir/big-tests; then
AC_CONFIG_COMMANDS([create-big-tests-build-dir-and-configure],
[AC_MSG_NOTICE([Found $srcdir/big-tests!])
cd $ac_abs_top_srcdir/big-tests
autoreconf -i
cd $ac_abs_top_builddir
test -d big-tests || mkdir big-tests
cd big-tests
CTF_OPTS=
BTF_OPTS=
if test x$CTF_ENABLED = xyes; then CTF_OPTS="--enable-ctf"; fi;
if test x$BTF_ENABLED = xyes; then BTF_OPTS="--enable-btf"; fi;
AC_MSG_NOTICE([configuring $srcdir/big-tests --with-libabigail-tools-dir=$ac_abs_top_builddir/tools --with-libabigail-headers-dir=$ac_abs_top_srcdir/include $CTF_OPTS $BTF_OPTS])
$ac_abs_top_srcdir/big-tests/configure --with-libabigail-tools-dir=$ac_abs_top_builddir/tools --with-libabigail-headers-dir=$ac_abs_top_srcdir/include $CTF_OPTS $BTF_OPTS],
[CTF_ENABLED=$ENABLE_CTF
BTF_ENABLED=$ENABLE_BTF])
else
AC_MSG_ERROR([No sub-directory big-tests found. Please checkout libabigail-big-tests under a sub-directory named 'big-tests'])
fi
fi
dnl Check for dependency: libxml
LIBXML2_VERSION=2.6.22
SAVED_PKG_CONFIG_PATH=$PKG_CONFIG_PATH
if test $WITH_LIBXML2_PATH != xauto; then
export PKG_CONFIG_PATH="$WITH_LIBXML2_PATH/lib/pkgconfig:$PKG_CONFIG_PATH"
fi
AC_MSG_NOTICE([used PKG_CONFIG_PATH=$PKG_CONFIG_PATH to check for libxml2]);
PKG_CHECK_MODULES(XML, libxml-2.0 >= $LIBXML2_VERSION)
if test $WITH_LIBXML2_PATH != xauto; then
PKG_CONFIG_PATH=$SAVED_PKG_CONFIG_PATH
fi
AC_SUBST(LIBXML2_VERSION)
AC_SUBST(XML_LIBS)
AC_SUBST(XML_CFLAGS)
dnl Check for dependency: xxhash
XXHASH_VERSION=0.8.0
PKG_CHECK_MODULES(XXHASH, libxxhash >= $XXHASH_VERSION)
AC_SUBST(XXHASH_CFLAGS)
AC_SUBST(XXHASH_LIBS)
dnl Check for dependency: liblzma
LIBLZMA_VERSION=5.2.0
PKG_CHECK_MODULES(LZMA, liblzma >= $LIBLZMA_VERSION)
AC_SUBST(LZMA_CFLAGS)
AC_SUBST(LZMA_LIBS)
dnl Check for some programs like rm, mkdir, etc ...
AC_CHECK_PROG(HAS_RM, rm, yes, no)
if test x$HAS_RM = xno; then
AC_MSG_ERROR([could not find the program 'rm' installed])
fi
AC_CHECK_PROG(HAS_MKDIR, mkdir, yes, no)
if test x$HAS_MKDIR = xno; then
AC_MSG_ERROR([could not find the program 'mkdir' installed])
fi
dnl Check for the rpm2cpio and cpio programs
if test x$ENABLE_RPM = xyes -o x$ENABLE_RPM = xauto; then
AC_CHECK_PROG(HAS_RPM2CPIO, rpm2cpio, yes, no)
AC_CHECK_PROG(HAS_CPIO, cpio, yes, no)
AC_CHECK_PROG(HAS_RPM, rpm, yes, no)
if test x$HAS_RPM2CPIO = xyes -a x$HAS_CPIO = xyes -a x$HAS_RPM = xyes; then
ENABLE_RPM=yes
else
if test x$ENABLE_RPM = xyes; then
AC_MSG_ERROR([rpm support in abipkgdiff needs 'rpm2cpio', 'cpio' and 'rpm' programs to be installed])
fi
ENABLE_RPM=no
fi
fi
dnl Point to a rpm/zstd file, that is:
dnl $ rpm -qp --qf '%{PAYLOADCOMPRESSOR}\n' [rpm_zstd_file]
dnl zstd
m4_define([rpm_zstd_file], [tests/data/test-diff-pkg/mesa-libGLU-9.0.1-3.fc33.x86_64.rpm])
AC_CONFIG_SRCDIR([rpm_zstd_file])
if test x$ENABLE_RPM_ZSTD = xyes -o x$ENABLE_RPM_ZSTD = xauto; then
if test x$ENABLE_RPM = xno; then
if test x$ENABLE_RPM_ZSTD = xyes; then
AC_MSG_ERROR([rpm/zstd support needs rpm support])
fi
ENABLE_RPM_ZSTD=n/a
else
AC_MSG_CHECKING([for rpm/zstd support])
rpm2cpio > /dev/null 2>&AS_MESSAGE_LOG_FD "$srcdir"/rpm_zstd_file
if test $? -eq 0; then
enable_rpm_zstd=yes
else
enable_rpm_zstd=no
fi
AC_MSG_RESULT([$enable_rpm_zstd])
if test x$ENABLE_RPM_ZSTD:$enable_rpm_zstd = xyes:no; then
AC_MSG_ERROR([rpm/zstd support not available])
fi
ENABLE_RPM_ZSTD=$enable_rpm_zstd
fi
fi
if test x$ENABLE_RPM = xyes; then
AC_DEFINE([WITH_RPM], 1, [compile the rpm package support in abipkgdiff])
AC_MSG_NOTICE([rpm support in abipkgdiff is enabled]);
if test x$ENABLE_RPM_ZSTD = xyes; then
AC_DEFINE([WITH_RPM_ZSTD], 1, [has rpm/zstd support])
AC_MSG_NOTICE([rpm/zstd in abipkgdiff testing is enabled])
fi
else
AC_MSG_NOTICE([rpm support in abipkgdiff is disabled]);
fi
AM_CONDITIONAL(ENABLE_RPM, test x$ENABLE_RPM = xyes)
dnl There is a test that needs symlinks support in the distribution tarball. If symlinks are
dnl removed from the tarball, then the test should be disabled.
m4_define([symlink_file], [tests/data/test-diff-pkg/symlink-dir-test1/dir1/symlinks/foo.o])
if test -L "$srcdir"/symlink_file; then
AC_DEFINE([WITH_SYMLINKS_KEPT_IN_DIST], 1, [symbolic links are kept in the distribution tarball])
fi
dnl enable the debugging of self comparison when doing abidw --debug-abidiff <binary>
if test x$ENABLE_DEBUG_SELF_COMPARISON = xyes; then
AC_DEFINE([WITH_DEBUG_SELF_COMPARISON], 1, [compile support of debugging abidw --abidiff])
AC_MSG_NOTICE([support of debugging self comparison is enabled])
else
AC_MSG_NOTICE([support of debugging self comparison is disabled])
fi
AM_CONDITIONAL(ENABLE_DEBUG_SELF_COMPARISON, test x$ENABLE_DEBUG_SELF_COMPARISON = xyes)
dnl enable support of abilint --show-type-use <type-id>
if test x$ENABLE_SHOW_TYPE_USE_IN_ABILINT = xyes; then
AC_DEFINE([WITH_SHOW_TYPE_USE_IN_ABILINT], 1, [compile support of abilint --show-type-use])
AC_MSG_NOTICE([support of abilint --show-type-use <type-id> is enabled])
else
AC_MSG_NOTICE([support of abilint --show-type-use <type-id> is disabled])
fi
AM_CONDITIONAL(ENABLE_SHOW_TYPE_USE_IN_ABILINT, test x$ENABLE_SHOW_TYPE_USE_IN_ABILINT = xyes)
dnl enable the debugging of type canonicalization when doing abidw --debug-tc <binary>
if test x$ENABLE_DEBUG_TYPE_CANONICALIZATION = xyes; then
AC_DEFINE([WITH_DEBUG_TYPE_CANONICALIZATION],
1,
[compile support of debugging type canonicalization while using abidw --debug-tc])
AC_MSG_NOTICE([support of debugging type canonicalization is enabled])
else
AC_MSG_NOTICE([support of debugging type canonicalization is disabled])
fi
AM_CONDITIONAL(ENABLE_DEBUG_TYPE_CANONICALIZATION, test x$ENABLE_DEBUG_TYPE_CANONICALIZATION = xyes)
dnl Check for the dpkg program
if test x$ENABLE_DEB = xauto -o x$ENABLE_DEB = xyes; then
AC_CHECK_PROG(HAS_DPKG, dpkg, yes, no)
if test x$ENABLE_DEB = xauto; then
if test x$HAS_DPKG = xyes; then
ENABLE_DEB=yes
else
ENABLE_DEB=no
fi
fi
fi
if test x$ENABLE_DEB = xyes; then
AC_DEFINE([WITH_DEB], 1, [compile the deb package support in abipkgdiff])
AC_MSG_NOTICE(deb support in abipkgdiff is enabled);
else
AC_MSG_NOTICE(deb support in abipkgdiff is disabled);
fi
AM_CONDITIONAL(ENABLE_DEB, test x$ENABLE_DEB = xyes)
dnl Check for the tar program
if test x$ENABLE_TAR = xauto -o x$ENABLE_TAR = xyes; then
AC_CHECK_PROG(HAS_TAR, tar, yes, no)
if test x$ENABLE_TAR = xauto; then
if test x$HAS_TAR = xyes; then
ENABLE_TAR=yes
fi
fi
fi
if test x$ENABLE_TAR = xyes; then
AC_DEFINE([WITH_TAR], 1, [compile the GNU tar archive support in abipkgdiff])
AC_MSG_NOTICE(GNU tar support in abipkgdiff is enabled);
else
AC_MSG_NOTICE(GNU tar support in abipkgdiff is disabled);
fi
AM_CONDITIONAL(ENABLE_TAR, test x$ENABLE_TAR = xyes)
dnl Check for the bash-completion package
if test x$ENABLE_BASH_COMPLETION = xauto -o x$ENABLE_BASH_COMPLETION = xyes; then
AC_CHECK_PROG(HAS_BASH_COMPLETION, bash-completion, yes, no)
if test x$ENABLE_BASH_COMPLETION = xauto; then
if test x$HAS_BASH_COMPLETION = xyes; then
ENABLE_BASH_COMPLETION=yes
else
ENABLE_BASH_COMPLETION=no
fi
fi
fi
if test x$ENABLE_BASH_COMPLETION = xyes; then
AC_MSG_NOTICE(bash-completion support in libabigail is enabled);
else
AC_MSG_NOTICE(bash-completion support in libabigail is disabled);
fi
AM_CONDITIONAL(ENABLE_BASH_COMPLETION, test x$ENABLE_BASH_COMPLETION = xyes)
# The minimal python 2 version we want to support is 2.6.6 because EL6
# distributions have that version installed.
MINIMAL_PYTHON2_VERSION="2.6.6"
AC_PATH_PROG(PYTHON, python, no)
AX_PROG_PYTHON_VERSION($MINIMAL_PYTHON2_VERSION,
[MINIMAL_PYTHON_VERSION_FOUND=yes],
[MINIMAL_PYTHON_VERSION_FOUND=no])
# The minimal python 3 version we want to support is 3.5, which is
# available in Fedora releases and in EL7.
if test x$ENABLE_PYTHON3 != xno; then
AC_CHECK_PROGS(PYTHON3_INTERPRETER, [python3 python3.5 python3.6 python3.7], no)
else
PYTHON3_INTERPRETER=no
fi
if test x$ENABLE_PYTHON3 = xauto; then
if test x$PYTHON3_INTERPRETER != xno; then
ENABLE_PYTHON3=yes
else
# When enabling python3 is auto, tests only run if the
# python3 interpreter was found on the system. Otherwise,
# just ignore it.
ENABLE_PYTHON3=no
AC_MSG_NOTICE([Python 3 was not found. Skip running tests with Python 3.])
fi
fi
if test x$ENABLE_PYTHON3 = xyes; then
if test x$PYTHON3_INTERPRETER != xno; then
# We were asked to enable python3 implicitely (auto and
# python3 was found) or explicitly. So enable running tests
# using python3 then.
RUN_TESTS_WITH_PY3=yes
else
AC_MSG_ERROR([Python 3 was not found])
fi
fi
if test x$PYTHON3_INTERPRETER = xyes; then
MINIMAL_PYTHON_VERSION_FOUND=yes
fi
if test x$MINIMAL_PYTHON_VERSION_FOUND = xno; then
AC_MSG_NOTICE([no minimal version of python found])
if test x$PYTHON = xno; then
AC_MSG_NOTICE([python binary wasn't found])
if test x$PYTHON3_INTERPRETER != xno; then
AC_MSG_NOTICE([using $PYTHON3_INTERPRETER instead])
PYTHON=$PYTHON3_INTERPRETER
MINIMAL_PYTHON_VERSION_FOUND=yes
MISSING_FEDABIPKGDIFF_DEP=no
fi
fi
else
AC_MSG_NOTICE([a minimal version of python was found ...])
if test x$PYTHON3_INTERPRETER != xno; then
# We were instructed to use python3 and it's present on the
# system. Let's update the PYTHON variable that points to the
# actual python interpreter we are going to be using
AC_MSG_NOTICE([... and it was $PYTHON3_INTERPRETER])
PYTHON=$PYTHON3_INTERPRETER
fi
fi
dnl if --enable-fedabipkgdiff has the 'auto' value, then check for the required
dnl python modules. If they are present, then enable the fedabipkgdiff program.
dnl If they are not then disable the program.
dnl
dnl If --enable-fedabipkgdiff has the 'yes' value, then check for the required
dnl python modules and whatever dependency fedabipkgdiff needs. If they are
dnl not present then the configure script will error out.
if test x$ENABLE_FEDABIPKGDIFF = xauto -o x$ENABLE_FEDABIPKGDIFF = xyes; then
CHECK_DEPS_FOR_FEDABIPKGDIFF=yes
else
CHECK_DEPS_FOR_FEDABIPKGDIFF=no
fi
if test x$CHECK_DEPS_FOR_FEDABIPKGDIFF = xyes; then
MISSING_FEDABIPKGDIFF_DEP=no
if test x$ENABLE_FEDABIPKGDIFF = xyes; then
MISSING_FEDABIPKGDIFF_DEP_FATAL=yes
else
MISSING_FEDABIPKGDIFF_DEP_FATAL=no
fi
AC_PATH_PROG(WGET, wget, no)
if test x$WGET = xno; then
MISSING_FEDABIPKGDIFF_DEP=yes
if test x$MISSING_FEDABIPKGDIFF_DEP_FATAL = xyes; then
AC_MSG_ERROR(could not find the wget program)
else
AC_MSG_NOTICE([could not find the wget program])
AC_MSG_NOTICE([disabling fedabipkgdiff as a result])
fi
fi
if test x$MINIMAL_PYTHON_VERSION_FOUND = xno; then
MISSING_FEDABIPKGDIFF_DEP=yes
if test x$MISSING_FEDABIPKGDIFF_DEP_FATAL = xyes; then
AC_MSG_ERROR([could not find a python program of version at least $MINIMAL_PYTHON2_VERSION])
fi
fi
###################################################################
# Now we are going to check the presence of the required python
# modules using either python2 or python3 as required until now.
###################################################################
# Grrr, the urlparse python2 module got renamed in python3 as
# urllib.parse. Oh well.
if test x$PYTHON = xpython3; then
URLPARSE_MODULE=urllib.parse
IMPORT_MODULE=importlib.machinery
else
URLPARSE_MODULE=urlparse
IMPORT_MODULE=imp
fi
REQUIRED_PYTHON_MODULES_FOR_FEDABIPKGDIFF="\
argparse logging os re subprocess sys $URLPARSE_MODULE \
xdg koji rpm $IMPORT_MODULE tempfile mimetypes shutil six"
AX_CHECK_PYTHON_MODULES([$REQUIRED_PYTHON_MODULES_FOR_FEDABIPKGDIFF],
[$PYTHON],
[FOUND_ALL_PYTHON_MODULES=yes],
[FOUND_ALL_PYTHON_MODULES=no])
if test x$FOUND_ALL_PYTHON_MODULES = xno; then
MISSING_FEDABIPKGDIFF_DEP=yes
if test x$MISSING_FEDABIPKGDIFF_DEP_FATAL = xyes; then
AC_MSG_ERROR([missing python modules: $MISSING_PYTHON_MODULES]);
else
AC_MSG_NOTICE([missing python modules: $MISSING_PYTHON_MODULES])
AC_MSG_NOTICE([disabling fedabipkgdiff as a result])
fi
else
# On some old platforms, the koji client object doesn't have
# the required .read_config method. Alas, that module doesn't
# have any __version__ string either. So we do as well as we
# can to try and detect that case and disable fedabipkgdiff if
# necessary.
AC_MSG_CHECKING([if koji client is recent enough])
$PYTHON 2>&AS_MESSAGE_LOG_FD -c "
import koji
try:
koji.read_config('koji')
except koji.ConfigurationError:
# See 'tools/fedabipkgdiff'.
pass"
if test $? -eq 0; then
koji_version_check_ok=yes
else
koji_version_check_ok=no
fi
AC_MSG_RESULT([$koji_version_check_ok])
if test x$koji_version_check_ok = xno; then
MISSING_FEDABIPKGDIFF_DEP=yes
if test x$MISSING_FEDABIPKGDIFF_DEP_FATAL = xyes; then
AC_MSG_ERROR([unsuitable koji client])
else
AC_MSG_WARN([disabling fedabipkgdiff])
fi
fi
fi
if test x$MISSING_FEDABIPKGDIFF_DEP = xno; then
ENABLE_FEDABIPKGDIFF=yes
else
ENABLE_FEDABIPKGDIFF=no
fi
fi
dnl abidb checks
if test x$PYTHON3_INTERPRETER != xno -a x$ENABLE_ABIDB != xno; then
AX_CHECK_PYTHON_MODULES([git],
[$PYTHON],
[FOUND_ALL_PYTHON_MODULES=yes],
[FOUND_ALL_PYTHON_MODULES=no])
$PYTHON3_INTERPRETER -c "import sys; sys.exit(0 if sys.version_info >= (3, 9) else 1)"
if test $? -ne 0; then
AC_MSG_NOTICE([Python 3 version 3.9 or higher is required for abidb])
AC_MSG_WARN([disabling abidb as a result])
ENABLE_ABIDB=no
else
AC_MSG_NOTICE([Found Python 3 version at 3.9 or higher. Great for abidb!])
fi
if test x$ENABLE_ABIDB = xno; then
pass
elif test x$ENABLE_ABIDB != xno -a x$FOUND_ALL_PYTHON_MODULES = xno; then
AC_MSG_NOTICE([missing python modules: $MISSING_PYTHON_MODULES])
AC_MSG_WARN([disabling abidb as a result])
ENABLE_ABIDB=no
else
ENABLE_ABIDB=yes
dnl search for optional modules, just for autoconf reporting purposes
AX_CHECK_PYTHON_MODULES([libarchive],
[$PYTHON],
[FOUND_ALL_OPTIONAL_PYTHON_MODULES=yes],
[FOUND_ALL_OPTIONAL_PYTHON_MODULES=no])
if test x$FOUND_ALL_OPTIONAL_PYTHON_MODULES = xno; then
AC_MSG_WARN([missing optional python modules for abidb: $MISSING_PYTHON_MODULES])
else
AC_MSG_NOTICE([found all optional python modules for abidb])
fi
fi
else
AC_MSG_NOTICE([disabling abidb])
fi
AM_CONDITIONAL(ENABLE_ABIDB, test x$ENABLE_ABIDB = xyes)
AM_CONDITIONAL(ENABLE_FEDABIPKGDIFF, test x$ENABLE_FEDABIPKGDIFF = xyes)
AM_CONDITIONAL(ENABLE_RUNNING_TESTS_WITH_PY3, test x$RUN_TESTS_WITH_PY3 = xyes)
AM_CONDITIONAL(ENABLE_PYTHON3_INTERPRETER, test x$PYTHON3_INTERPRETER != xno)
AC_SUBST(PYTHON)
DEPS_CPPFLAGS="$XML_CFLAGS $XXHASH_CFLAGS $ELF_CFLAGS $DW_CFLAGS $LZMA_CFLAGS"
AC_SUBST(DEPS_CPPFLAGS)
dnl Check for the presence of doxygen program
if test x$ENABLE_APIDOC != xno; then
AC_CHECK_PROG(FOUND_DOXYGEN, doxygen, yes, no)
if test x$ENABLE_APIDOC = xauto; then
if test x$FOUND_DOXYGEN = xyes; then
ENABLE_APIDOC=yes
else
ENABLE_APIDOC=no
fi
fi
fi
AM_CONDITIONAL(ENABLE_APIDOC, test x$ENABLE_APIDOC = xyes)
dnl Check for the presence of the sphinx-build program
if test x$ENABLE_MANUAL != xno; then
AC_CHECK_PROG(FOUND_SPHINX_BUILD, sphinx-build, yes, no)
if test x$ENABLE_MANUAL = xauto; then
if test x$FOUND_SPHINX_BUILD = xyes; then
ENABLE_MANUAL=yes
else
ENABLE_MANUAL=no
fi
fi
fi
AM_CONDITIONAL(ENABLE_MANUAL, test x$ENABLE_MANUAL = xyes)
dnl Check for the presence of Valgrind and do the plumbing to allow
dnl the running of "make check-valgrind".
AX_VALGRIND_DFLT(memcheck, on)
AX_VALGRIND_DFLT(helgrind, on)
AX_VALGRIND_DFLT(drd, off)
AX_VALGRIND_DFLT(sgcheck, off)
AX_VALGRIND_CHECK
dnl Set the list of libraries libabigail depends on
DEPS_LIBS="$XML_LIBS $ELF_LIBS $DW_LIBS $CTF_LIBS $BPF_LIBS $LZMA_LIBS"
if test x$ENABLE_INLINED_XXHASH = xno; then
DEPS_LIBS="$DEPS_LIBS $XXHASH_LIBS"
fi
AC_SUBST(DEPS_LIBS)
if test x$ABIGAIL_DEVEL != x; then
CFLAGS="-g -Og -Wall -Wextra -Werror -D_FORTIFY_SOURCE=2"
CXXFLAGS="-g -Og -Wall -Wextra -Werror -D_FORTIFY_SOURCE=2 -D_GLIBCXX_DEBUG"
fi
if test x$ABIGAIL_DEBUG != x; then
CFLAGS="$CFLAGS -Og -g3 -ggdb"
CXXFLAGS="$CXXFLAGS -Og -g3 -ggdb"
fi
if test x$ABIGAIL_NO_OPTIMIZATION_DEBUG != x; then
CFLAGS="-g -O0 -Wall -Wextra -Werror"
CXXFLAGS="-g -O0 -Wall -Wextra -Werror"
fi
if test x$ENABLE_ASAN = xyes; then
CFLAGS="$CFLAGS -fsanitize=address"
CXXFLAGS="$CXXFLAGS -fsanitize=address"
fi
if test x$ENABLE_MSAN = xyes; then
CFLAGS="$CFLAGS -fsanitize=memory -fsanitize-memory-track-origins"
CXXFLAGS="$CXXFLAGS -fsanitize=memory -fsanitize-memory-track-origins"
fi
if test x$ENABLE_TSAN = xyes; then
CFLAGS="$CFLAGS -fsanitize=thread"
CXXFLAGS="$CXXFLAGS -fsanitize=thread"
fi
if test x$ENABLE_UBSAN = xyes; then
CFLAGS="$CFLAGS -fsanitize=undefined"
CXXFLAGS="$CXXFLAGS -fsanitize=undefined"
fi
dnl If the user asked then let's use inlined xxhash functions.
if test x$ENABLE_INLINED_XXHASH = xyes; then
CFLAGS="$CFLAGS -DXXH_INLINE_ALL=1"
CXXFLAGS="$CXXFLAGS -DXXH_INLINE_ALL=1"
fi
dnl Set a few Automake conditionals
AM_CONDITIONAL([CTF_READER],[test "x$ENABLE_CTF" = "xyes"])
AM_CONDITIONAL([BTF_READER],[test "x$ENABLE_BTF" = "xyes"])
dnl Set the level of C++ standard we use.
CXXFLAGS="$CXXFLAGS -std=$CXX_STANDARD"
dnl Check if several decls and constant are defined in dependant
dnl libraries
HAS_EM_AARCH64=no
AC_CHECK_DECL([EM_AARCH64],
[HAS_EM_AARCH64=yes],
[HAS_EM_AARCH64=no],
[[#include <elf.h>]])
if test x$HAS_EM_AARCH64 = xyes; then
AC_DEFINE([HAVE_EM_AARCH64_MACRO],
1,
[Defined to 1 if elf.h has EM_AARCH64 macro defined])
fi
HAS_EM_TILEPRO=no
AC_CHECK_DECL([EM_TILEPRO],
[HAS_EM_TILEPRO=yes],
[HAS_EM_TILEPRO=no],
[[#include <elf.h>]])
if test x$HAS_EM_TILEPRO = xyes; then
AC_DEFINE([HAVE_EM_TILEPRO_MACRO],
1,
[Defined to 1 if elf.h has EM_TILEPR0 macro defined])
fi
HAS_EM_TILEGX=no
AC_CHECK_DECL([EM_TILEGX],
[HAS_EM_TILEGX=yes],
[HAS_EM_TILEGX=no],
[[#include <elf.h>]])
if test x$HAS_EM_TILEGX = xyes; then
AC_DEFINE([HAVE_EM_TILEGX_MACRO],
1,
[Defined to 1 if elf.h has EM_TILEGX macro defined])
fi
HAS_EM_RISCV=no
AC_CHECK_DECL([EM_RISCV],
[HAS_EM_RISCV=yes],
[HAS_EM_RISCV=no],
[[#include <elf.h>]])
if test x$HAS_EM_RISCV = xyes; then
AC_DEFINE([HAVE_EM_RISCV_MACRO],
1,
[Defined to 1 if elf.h has EM_RISCV macro defined])
fi
HAS_R_AARCH64_ABS64=no
AC_CHECK_DECL([R_AARCH64_ABS64],
[HAS_R_AARCH64_ABS64=yes],
[HAS_R_AARCH64_ABS64=no],
[[#include <elf.h>]])
if test x$HAS_R_AARCH64_ABS64 = xyes; then
AC_DEFINE([HAVE_R_AARCH64_ABS64_MACRO],
1,
[Defined to 1 if elf.h has R_AARCH64_ABS64 macro defined])
fi
HAS_R_AARCH64_PREL32=no
AC_CHECK_DECL([R_AARCH64_PREL32],
[HAS_R_AARCH64_PREL32=yes],
[HAS_R_AARCH64_PREL32=no],
[[#include <elf.h>]])
if test x$HAS_R_AARCH64_PREL32 = xyes; then
AC_DEFINE([HAVE_R_AARCH64_PREL32_MACRO],
1,
[Defined to 1 if elf.h has R_AARCH64_PREL32 macro defined])
fi
HAS_DW_LANG_UPC=no
AC_CHECK_DECL([DW_LANG_UPC],
[HAS_DW_LANG_UPC=yes],
[HAS_DW_LANG_UPC=no],
[[#include <dwarf.h>]])
if test x$HAS_DW_LANG_UPC = xyes; then
AC_DEFINE([HAVE_DW_LANG_UPC_enumerator],
1,
[Define to 1 if dwarf.h has the DW_LANG_UPC enumerator])
fi
HAS_DW_LANG_D=no
AC_CHECK_DECL([DW_LANG_D],
[HAS_DW_LANG_D=yes],
[HAS_DW_LANG_D=no],
[[#include <dwarf.h>]])
if test x$HAS_DW_LANG_D = xyes; then
AC_DEFINE([HAVE_DW_LANG_D_enumerator],
1,
[Define to 1 if dwarf.h has the DW_LANG_D enumerator])
fi
HAS_DW_LANG_Python=no
AC_CHECK_DECL([DW_LANG_Python],
[HAS_DW_LANG_Python=yes],
[HAS_DW_LANG_Python=no],
[[#include <dwarf.h>]])
if test x$HAS_DW_LANG_Python = xyes; then
AC_DEFINE([HAVE_DW_LANG_Python_enumerator],
1,
[Define to 1 if dwarf.h has the DW_LANG_Python enumerator])
fi
HAS_DW_LANG_Go=no
AC_CHECK_DECL([DW_LANG_Go],
[HAS_DW_LANG_Go=yes],
[HAS_DW_LANG_Go=no],
[[#include <dwarf.h>]])
if test x$HAS_DW_LANG_Go = xyes; then
AC_DEFINE([HAVE_DW_LANG_Go_enumerator],
1,
[Define to 1 if dwarf.h has the DW_LANG_Go enumerator])
fi
HAS_DW_LANG_C11=no
AC_CHECK_DECL([DW_LANG_C11],
[HAS_DW_LANG_C11=yes],
[HAS_DW_LANG_C11=no],
[[#include <dwarf.h>]])
if test x$HAS_DW_LANG_C11 = xyes; then
AC_DEFINE([HAVE_DW_LANG_C11_enumerator],
1,
[Define to 1 if dwarf.h has the DW_LANG_C11 enumerator])
fi
HAS_DW_LANG_C_plus_plus_03=no
AC_CHECK_DECL([DW_LANG_C_plus_plus_03],
[HAS_DW_LANG_C_plus_plus_03=yes],
[HAS_DW_LANG_C_plus_plus_03=no],
[[#include <dwarf.h>]])
if test x$HAS_DW_LANG_C_plus_plus_03 = xyes; then
AC_DEFINE([HAVE_DW_LANG_C_plus_plus_03_enumerator],
1,
[Define to 1 if dwarf.h has the DW_LANG_C_plus_plus_03 enumerator])
fi
HAS_DW_LANG_C_plus_plus_11=no
AC_CHECK_DECL([DW_LANG_C_plus_plus_11],
[HAS_DW_LANG_C_plus_plus_11=yes],
[HAS_DW_LANG_C_plus_plus_11=no],
[[#include <dwarf.h>]])
if test x$HAS_DW_LANG_C_plus_plus_11 = xyes; then
AC_DEFINE([HAVE_DW_LANG_C_plus_plus_11_enumerator],
1,
[Define to 1 if dwarf.h has the DW_LANG_C_plus_plus_11 enumerator])
fi
HAS_DW_LANG_C_plus_plus_14=no
AC_CHECK_DECL([DW_LANG_C_plus_plus_14],
[HAS_DW_LANG_C_plus_plus_14=yes],
[HAS_DW_LANG_C_plus_plus_14=no],
[[#include <dwarf.h>]])
if test x$HAS_DW_LANG_C_plus_plus_14 = xyes; then
AC_DEFINE([HAVE_DW_LANG_C_plus_plus_14_enumerator],
1,
[Define to 1 if dwarf.h has the DW_LANG_C_plus_plus_14 enumerator])
fi
HAS_DW_LANG_Mips_Assembler=no
AC_CHECK_DECL([DW_LANG_Mips_Assembler],
[HAS_DW_LANG_Mips_Assembler=yes],
[HAS_DW_LANG_Mips_Assembler=no],
[[#include <dwarf.h>]])
if test x$HAS_DW_LANG_Mips_Assembler = xyes; then
AC_DEFINE([HAVE_DW_LANG_Mips_Assembler_enumerator],
1,
[Define to 1 if dwarf.h has the DW_LANG_Mips_Assembler enumerator])
fi
HAS_DW_LANG_Rust=no
AC_CHECK_DECL([DW_LANG_Rust],
[HAS_DW_LANG_Rust=yes],
[HAS_DW_LANG_Rust=no],
[[#include <dwarf.h>]])
if test x$HAS_DW_LANG_Rust = xyes; then
AC_DEFINE([HAVE_DW_LANG_Rust_enumerator],
1,
[Define to 1 if dwarf.h has the DW_LANG_Rust enumerator])
fi
HAS_DW_LANG_OCaml=no
AC_CHECK_DECL([DW_LANG_OCaml],
[HAS_DW_LANG_OCaml=yes],
[HAS_DW_LANG_OCaml=no],
[[#include <dwarf.h>]])
if test x$HAS_DW_LANG_OCaml = xyes; then
AC_DEFINE([HAVE_DW_LANG_OCaml_enumerator],
1,
[Define to 1 if dwarf.h has the DW_LANG_OCaml enumerator])
fi
HAS_DW_LANG_Kotlin=no
AC_CHECK_DECL([DW_LANG_Kotlin],
[HAS_DW_LANG_Kotlin=yes],
[HAS_DW_LANG_Kotlin=no],
[[#include <dwarf.h>]])
if test x$HAS_DW_LANG_Kotlin = xyes; then
AC_DEFINE([HAVE_DW_LANG_Kotlin_enumerator],
1,
[Define to 1 if dwarf.h has the DW_LANG_Kotlin enumerator])
fi
HAS_DW_LANG_Zig=no
AC_CHECK_DECL([DW_LANG_Zig],
[HAS_DW_LANG_Zig=yes],
[HAS_DW_LANG_Zig=no],
[[#include <dwarf.h>]])
if test x$HAS_DW_LANG_Zig = xyes; then
AC_DEFINE([HAVE_DW_LANG_Zig_enumerator],
1,
[Define to 1 if dwarf.h has the DW_LANG_Zig enumerator])
fi
HAS_DW_LANG_Crystal=no
AC_CHECK_DECL([DW_LANG_Crystal],
[HAS_DW_LANG_Crystal=yes],
[HAS_DW_LANG_Crystal=no],
[[#include <dwarf.h>]])
if test x$HAS_DW_LANG_Crystal = xyes; then
AC_DEFINE([HAVE_DW_LANG_Crystal_enumerator],
1,
[Define to 1 if dwarf.h has the DW_LANG_Crystal enumerator])
fi
HAS_DW_LANG_C_plus_plus_17=no
AC_CHECK_DECL([DW_LANG_C_plus_plus_17],
[HAS_DW_LANG_C_plus_plus_17=yes],
[HAS_DW_LANG_C_plus_plus_17=no],
[[#include <dwarf.h>]])
if test x$HAS_DW_LANG_C_plus_plus_17 = xyes; then
AC_DEFINE([HAVE_DW_LANG_C_plus_plus_17_enumerator],
1,
[Define to 1 if dwarf.h has the DW_LANG_C_plus_plus_17 enumerator])
fi
HAS_DW_LANG_C_plus_plus_20=no
AC_CHECK_DECL([DW_LANG_C_plus_plus_20],
[HAS_DW_LANG_C_plus_plus_20=yes],
[HAS_DW_LANG_C_plus_plus_20=no],
[[#include <dwarf.h>]])
if test x$HAS_DW_LANG_C_plus_plus_20 = xyes; then
AC_DEFINE([HAVE_DW_LANG_C_plus_plus_20_enumerator],
1,
[Define to 1 if dwarf.h has the DW_LANG_C_plus_plus_20 enumerator])
fi
HAS_DW_LANG_C17=no
AC_CHECK_DECL([DW_LANG_C17],
[HAS_DW_LANG_C17=yes],
[HAS_DW_LANG_C17=no],
[[#include <dwarf.h>]])
if test x$HAS_DW_LANG_C17 = xyes; then
AC_DEFINE([HAVE_DW_LANG_C17_enumerator],
1,
[Define to 1 if dwarf.h has the DW_LANG_C17 enumerator])
fi
HAS_DW_LANG_Fortran18=no
AC_CHECK_DECL([DW_LANG_Fortran18],
[HAS_DW_LANG_Fortran18=yes],
[HAS_DW_LANG_Fortran18=no],
[[#include <dwarf.h>]])
if test x$HAS_DW_LANG_Fortran18 = xyes; then
AC_DEFINE([HAVE_DW_LANG_Fortran18_enumerator],
1,
[Define to 1 if dwarf.h has the DW_LANG_Fortran18 enumerator])
fi
HAS_DW_LANG_Ada2005=no
AC_CHECK_DECL([DW_LANG_Ada2005],
[HAS_DW_LANG_Ada2005=yes],
[HAS_DW_LANG_Ada2005=no],
[[#include <dwarf.h>]])
if test x$HAS_DW_LANG_Ada2005 = xyes; then
AC_DEFINE([HAVE_DW_LANG_Ada2005_enumerator],
1,
[Define to 1 if dwarf.h has the DW_LANG_Ada2005 enumerator])
fi
HAS_DW_LANG_Ada2012=no
AC_CHECK_DECL([DW_LANG_Ada2012],
[HAS_DW_LANG_Ada2012=yes],
[HAS_DW_LANG_Ada2012=no],
[[#include <dwarf.h>]])
if test x$HAS_DW_LANG_Ada2012 = xyes; then
AC_DEFINE([HAVE_DW_LANG_Ada2012_enumerator],
1,
[Define to 1 if dwarf.h has the DW_LANG_Ada2012 enumerator])
fi
HAS_DW_LANG_HIP=no
AC_CHECK_DECL([DW_LANG_HIP],
[HAS_DW_LANG_HIP=yes],
[HAS_DW_LANG_HIP=no],
[[#include <dwarf.h>]])
if test x$HAS_DW_LANG_HIP = xyes; then
AC_DEFINE([HAVE_DW_LANG_HIP_enumerator],
1,
[Define to 1 if dwarf.h has the DW_LANG_HIP enumerator])
fi
HAS_DW_LANG_Assembly=no
AC_CHECK_DECL([DW_LANG_Assembly],
[HAS_DW_LANG_Assembly=yes],
[HAS_DW_LANG_Assembly=no],
[[#include <dwarf.h>]])
if test x$HAS_DW_LANG_Assembly = xyes; then
AC_DEFINE([HAVE_DW_LANG_Assembly_enumerator],
1,
[Define to 1 if dwarf.h has the DW_LANG_Assembly enumerator])
fi
HAS_DW_LANG_C_sharp=no
AC_CHECK_DECL([DW_LANG_C_sharp],
[HAS_DW_LANG_C_sharp=yes],
[HAS_DW_LANG_C_sharp=no],
[[#include <dwarf.h>]])
if test x$HAS_DW_LANG_C_sharp = xyes; then
AC_DEFINE([HAVE_DW_LANG_C_sharp_enumerator],
1,
[Define to 1 if dwarf.h has the DW_LANG_C_sharp enumerator])
fi
HAS_DW_LANG_Mojo=no
AC_CHECK_DECL([DW_LANG_Mojo],
[HAS_DW_LANG_Mojo=yes],
[HAS_DW_LANG_Mojo=no],
[[#include <dwarf.h>]])
if test x$HAS_DW_LANG_Mojo = xyes; then
AC_DEFINE([HAVE_DW_LANG_Mojo_enumerator],
1,
[Define to 1 if dwarf.h has the DW_LANG_Mojo enumerator])
fi
HAS_DW_LANG_GLSL=no
AC_CHECK_DECL([DW_LANG_GLSL],
[HAS_DW_LANG_GLSL=yes],
[HAS_DW_LANG_GLSL=no],
[[#include <dwarf.h>]])
if test x$HAS_DW_LANG_GLSL = xyes; then
AC_DEFINE([HAVE_DW_LANG_GLSL_enumerator],
1,
[Define to 1 if dwarf.h has the DW_LANG_GLSL enumerator])
fi
HAS_DW_LANG_GLSL_ES=no
AC_CHECK_DECL([DW_LANG_GLSL_ES],
[HAS_DW_LANG_GLSL_ES=yes],
[HAS_DW_LANG_GLSL_ES=no],
[[#include <dwarf.h>]])
if test x$HAS_DW_LANG_GLSL_ES = xyes; then
AC_DEFINE([HAVE_DW_LANG_GLSL_ES_enumerator],
1,
[Define to 1 if dwarf.h has the DW_LANG_GLSL_ES enumerator])
fi
HAS_DW_LANG_HLSL=no
AC_CHECK_DECL([DW_LANG_HLSL],
[HAS_DW_LANG_HLSL=yes],
[HAS_DW_LANG_HLSL=no],
[[#include <dwarf.h>]])
if test x$HAS_DW_LANG_HLSL = xyes; then
AC_DEFINE([HAVE_DW_LANG_HLSL_enumerator],
1,
[Define to 1 if dwarf.h has the DW_LANG_HLSL enumerator])
fi
HAS_DW_LANG_OpenCL_CPP=no
AC_CHECK_DECL([DW_LANG_OpenCL_CPP],
[HAS_DW_LANG_OpenCL_CPP=yes],
[HAS_DW_LANG_OpenCL_CPP=no],
[[#include <dwarf.h>]])
if test x$HAS_DW_LANG_OpenCL_CPP = xyes; then
AC_DEFINE([HAVE_DW_LANG_OpenCL_CPP_enumerator],
1,
[Define to 1 if dwarf.h has the DW_LANG_OpenCL_CPP enumerator])
fi
HAS_DW_LANG_CPP_for_OpenCL=no
AC_CHECK_DECL([DW_LANG_CPP_for_OpenCL],
[HAS_DW_LANG_CPP_for_OpenCL=yes],
[HAS_DW_LANG_CPP_for_OpenCL=no],
[[#include <dwarf.h>]])
if test x$HAS_DW_LANG_CPP_for_OpenCL = xyes; then
AC_DEFINE([HAVE_DW_LANG_CPP_for_OpenCL_enumerator],
1,
[Define to 1 if dwarf.h has the DW_LANG_CPP_for_OpenCL enumerator])
fi
HAS_DW_LANG_SYCL=no
AC_CHECK_DECL([DW_LANG_SYCL],
[HAS_DW_LANG_SYCL=yes],
[HAS_DW_LANG_SYCL=no],
[[#include <dwarf.h>]])
if test x$HAS_DW_LANG_SYCL = xyes; then
AC_DEFINE([HAVE_DW_LANG_SYCL_enumerator],
1,
[Define to 1 if dwarf.h has the DW_LANG_SYCL enumerator])
fi
HAS_DW_LANG_C_plus_plus_23=no
AC_CHECK_DECL([DW_LANG_C_plus_plus_23],
[HAS_DW_LANG_C_plus_plus_23=yes],
[HAS_DW_LANG_C_plus_plus_23=no],
[[#include <dwarf.h>]])
if test x$HAS_DW_LANG_C_plus_plus_23 = xyes; then
AC_DEFINE([HAVE_DW_LANG_C_plus_plus_23_enumerator],
1,
[Define to 1 if dwarf.h has the DW_LANG_C_plus_plus_23 enumerator])
fi
HAS_DW_LANG_Odin=no
AC_CHECK_DECL([DW_LANG_Odin],
[HAS_DW_LANG_Odin=yes],
[HAS_DW_LANG_Odin=no],
[[#include <dwarf.h>]])
if test x$HAS_DW_LANG_Odin = xyes; then
AC_DEFINE([HAVE_DW_LANG_Odin_enumerator],
1,
[Define to 1 if dwarf.h has the DW_LANG_Odin enumerator])
fi
HAS_DW_LANG_P4=no
AC_CHECK_DECL([DW_LANG_P4],
[HAS_DW_LANG_P4=yes],
[HAS_DW_LANG_P4=no],
[[#include <dwarf.h>]])
if test x$HAS_DW_LANG_P4 = xyes; then
AC_DEFINE([HAVE_DW_LANG_P4_enumerator],
1,
[Define to 1 if dwarf.h has the DW_LANG_P4 enumerator])
fi
HAS_DW_LANG_Metal=no
AC_CHECK_DECL([DW_LANG_Metal],
[HAS_DW_LANG_Metal=yes],
[HAS_DW_LANG_Metal=no],
[[#include <dwarf.h>]])
if test x$HAS_DW_LANG_Metal = xyes; then
AC_DEFINE([HAVE_DW_LANG_Metal_enumerator],
1,
[Define to 1 if dwarf.h has the DW_LANG_Metal enumerator])
fi
HAS_DW_LANG_C23=no
AC_CHECK_DECL([DW_LANG_C23],
[HAS_DW_LANG_C23=yes],
[HAS_DW_LANG_C23=no],
[[#include <dwarf.h>]])
if test x$HAS_DW_LANG_C23 = xyes; then
AC_DEFINE([HAVE_DW_LANG_C23_enumerator],
1,
[Define to 1 if dwarf.h has the DW_LANG_C23 enumerator])
fi
HAS_DW_LANG_Fortran23=no
AC_CHECK_DECL([DW_LANG_Fortran23],
[HAS_DW_LANG_Fortran23=yes],
[HAS_DW_LANG_Fortran23=no],
[[#include <dwarf.h>]])
if test x$HAS_DW_LANG_Fortran23 = xyes; then
AC_DEFINE([HAVE_DW_LANG_Fortran23_enumerator],
1,
[Define to 1 if dwarf.h has the DW_LANG_Fortran23 enumerator])
fi
HAS_DW_LANG_Ruby=no
AC_CHECK_DECL([DW_LANG_Ruby],
[HAS_DW_LANG_Ruby=yes],
[HAS_DW_LANG_Ruby=no],
[[#include <dwarf.h>]])
if test x$HAS_DW_LANG_Ruby = xyes; then
AC_DEFINE([HAVE_DW_LANG_Ruby_enumerator],
1,
[Define to 1 if dwarf.h has the DW_LANG_Ruby enumerator])
fi
HAS_DW_LANG_Move=no
AC_CHECK_DECL([DW_LANG_Move],
[HAS_DW_LANG_Move=yes],
[HAS_DW_LANG_Move=no],
[[#include <dwarf.h>]])
if test x$HAS_DW_LANG_Move = xyes; then
AC_DEFINE([HAVE_DW_LANG_Move_enumerator],
1,
[Define to 1 if dwarf.h has the DW_LANG_Move enumerator])
fi
HAS_DW_LANG_Hylo=no
AC_CHECK_DECL([DW_LANG_Hylo],
[HAS_DW_LANG_Hylo=yes],
[HAS_DW_LANG_Hylo=no],
[[#include <dwarf.h>]])
if test x$HAS_DW_LANG_Hylo = xyes; then
AC_DEFINE([HAVE_DW_LANG_Hylo_enumerator],
1,
[Define to 1 if dwarf.h has the DW_LANG_Hylo enumerator])
fi
HAS_DW_FORM_strx1=no
HAS_DW_FORM_strx2=no
HAS_DW_FORM_strx3=no
HAS_DW_FORM_strx4=no
HAS_DW_FORM_line_strp=no
AC_CHECK_DECL([DW_FORM_strx1],
[HAS_DW_FORM_strx1=yes],
[HAS_DW_FORM_strx1=no],
[[#include <dwarf.h>]])
if test x$HAS_DW_FORM_strx1 = xyes; then
AC_DEFINE([HAVE_DW_FORM_strx1],
1,
[Define to 1 if dwarf.h has the DW_FORM_strx1 enumerator])
fi
AC_CHECK_DECL([DW_FORM_strx2],
[HAS_DW_FORM_strx2=yes],
[HAS_DW_FORM_strx2=no],
[[#include <dwarf.h>]])
if test x$HAS_DW_FORM_strx2 = xyes; then
AC_DEFINE([HAVE_DW_FORM_strx2],
1,
[Define to 1 if dwarf.h has the DW_FORM_strx2 enumerator])
fi
AC_CHECK_DECL([DW_FORM_strx3],
[HAS_DW_FORM_strx3=yes],
[HAS_DW_FORM_strx3=no],
[[#include <dwarf.h>]])
if test x$HAS_DW_FORM_strx3 = xyes; then
AC_DEFINE([HAVE_DW_FORM_strx3],
1,
[Define to 1 if dwarf.h has the DW_FORM_strx3 enumerator])
fi
AC_CHECK_DECL([DW_FORM_strx4],
[HAS_DW_FORM_strx4=yes],
[HAS_DW_FORM_strx4=no],
[[#include <dwarf.h>]])
if test x$HAS_DW_FORM_strx4 = xyes; then
AC_DEFINE([HAVE_DW_FORM_strx4],
1,
[Define to 1 if dwarf.h has the DW_FORM_strx4 enumerator])
fi
AC_CHECK_DECL([DW_FORM_line_strp],
[HAS_DW_FORM_line_strp=yes],
[HAS_DW_FORM_line_strp=no],
[[#include <dwarf.h>]])
if test x$HAS_DW_FORM_line_strp = xyes; then
AC_DEFINE([HAVE_DW_FORM_line_strp],
1,
[Define to 1 if dwarf.h has the DW_FORM_line_strp enumerator])
fi
if test x$HAS_DW_FORM_strx1 = xyes -a \
x$HAS_DW_FORM_strx2 = xyes -a \
x$HAS_DW_FORM_strx3 = xyes -a \
x$HAS_DW_FORM_strx4 = xyes ; then
AC_DEFINE([HAVE_DW_FORM_strx],
1,
[Define to 1 if dwarf.h has the DW_FORM_strx enumerators])
fi
dnl Set large files support
AC_SYS_LARGEFILE
AC_CONFIG_FILES([Makefile
libabigail.pc
include/Makefile
include/abg-version.h
doc/Makefile
doc/manuals/Makefile
src/Makefile
tools/Makefile
tests/Makefile
tests/data/Makefile
bash-completion/Makefile])
dnl Some test scripts are generated by autofoo.
AC_CONFIG_FILES([tests/runtestcanonicalizetypes.sh],
[chmod +x tests/runtestcanonicalizetypes.sh])
AC_CONFIG_FILES([tests/runtestslowselfcompare.sh],
[chmod +x tests/runtestslowselfcompare.sh])
AC_CONFIG_FILES([tests/mockfedabipkgdiff],
[chmod +x tests/mockfedabipkgdiff])
AC_CONFIG_FILES([tests/runtestfedabipkgdiff.py],
[chmod +x tests/runtestfedabipkgdiff.py])
AC_CONFIG_FILES([tests/runtestfedabipkgdiffpy3.sh],
[chmod +x tests/runtestfedabipkgdiffpy3.sh])
AC_CONFIG_FILES([tests/runtestdefaultsupprs.py],
[chmod +x tests/runtestdefaultsupprs.py])
AC_CONFIG_FILES([tests/runtestdefaultsupprspy3.sh],
[chmod +x tests/runtestdefaultsupprspy3.sh])
AC_CONFIG_FILES([tests/runtestabidb1.sh],
[chmod +x tests/runtestabidb1.sh])
AC_CONFIG_FILES([tests/runtestabidb2.sh],
[chmod +x tests/runtestabidb2.sh])
AC_OUTPUT
AC_MSG_NOTICE([
=====================================================================
Libabigail: $VERSION_MAJOR.$VERSION_MINOR.$VERSION_REVISION$VERSION_SUFFIX
=====================================================================
Here is the configuration of the package:
Prefix : ${prefix}
Source code location : ${srcdir}
C Compiler : ${CC}
C++ Compiler : ${CXX}
GCC visibility attribute supported : ${SUPPORTS_GCC_VISIBILITY_ATTRIBUTE}
CXXFLAGS : ${CXXFLAGS}
ELF_LIBS : ${ELF_LIBS}
ELF_CFLAGS : ${ELF_CFLAGS}
DW_LIBS : ${DW_LIBS}
DW_CFLAGS : ${DW_CFLAGS}
XML_LIBS $ ${XML_LIBS}
XML_CFLAGS $ ${XML_CFLAGS}
DEPS_LIBS $ ${DEPS_LIBS}
Python : ${PYTHON}
OPTIONAL FEATURES:
C++ standard level : ${CXX_STANDARD}
Enable inlined-only xxhash library : ${ENABLE_INLINED_XXHASH}
Enable rpm support in abipkgdiff : ${ENABLE_RPM}
Enable rpm/zstd in abipkgdiff testing : ${ENABLE_RPM_ZSTD}
Enable abilint --show-type-use <type-id> : ${ENABLE_SHOW_TYPE_USE_IN_ABILINT}
Enable self comparison debugging : ${ENABLE_DEBUG_SELF_COMPARISON}
Enable type canonicalization debugging : ${ENABLE_DEBUG_TYPE_CANONICALIZATION}
Enable deb support in abipkgdiff : ${ENABLE_DEB}
Enable GNU tar archive support in abipkgdiff : ${ENABLE_TAR}
Enable bash completion : ${ENABLE_BASH_COMPLETION}
Enable fedabipkgdiff : ${ENABLE_FEDABIPKGDIFF}
Enable abidb : ${ENABLE_ABIDB}
Enable python 3 : ${ENABLE_PYTHON3}
Enable CTF front-end : ${ENABLE_CTF}
Enable BTF front-end : ${ENABLE_BTF}
Enable Big Libabigail tests : ${ENABLE_BIG_TESTS}
Enable running tests under Valgrind : ${enable_valgrind}
Enable build with -fsanitize=address : ${ENABLE_ASAN}
Enable build with -fsanitize=memory : ${ENABLE_MSAN}
Enable build with -fsanitize=thread : ${ENABLE_TSAN}
Enable build with -fsanitize=undefined : ${ENABLE_UBSAN}
Generate html apidoc : ${ENABLE_APIDOC}
Generate html manual : ${ENABLE_MANUAL}
])
|