Knowledge (XXG)

GNU Autotools

Source 📝

799: 367: 140: 36: 786:
shortcomings of some "do-all" (except what I want) tool function. This is simply not an issue with the Autotools. As someone mentioned earlier in this thread, you can drop shell script into a configure.ac file, and make script into a Makefile.am file. That is the very definition of transparency. No other tool in existence allows this level of flexibility.
781:
The Autotools are actually more transparent than any other build tools out there. All these other tools' (cmake, maven, etc) - that purport to be so much simpler because they insulate the user from the underlying details of the build process - these tool's primary failure is that this very insulation
743:
The idea is that the configure script performs approximately 200 automated tests, so that the user is not burdened with configuring libtool manually. This is a horribly bad idea, already much criticized back in the 1980s when it appeared, as it allows source code to pretend to be portable behind the
315:
differs from system to system; certain library functions are missing on some systems; header files may have different names; shared libraries may be compiled and installed in different ways. One way to handle platform differences is to write conditional code, with code blocks selected by means of
785:
Anyone who has nothing but good things to say about this aspect of cmake, maven, gradle, or whatever, has simply not worked on a project that requires them to move far enough away from the defaults. I've used them all and I've spent hours in frustration trying to determine how to work around the
693:
script for the end-user, occasionally the user may wish to re-generate the configure script itself. Such working might be necessary if the user wishes to amend the source code itself. Such users would need to have Autotools installed, and to use components such as its
566:
output. It also performs automatic dependency tracking; every time a source file is compiled, the list of dependencies (e.g., C header files) is recorded. Later, any time make is run and a dependency appears to have changed, the dependent files will be rebuilt.
772:
Although critics of the Autotools frequently advocate for alternatives that provide greater simplicity to their users, some have argued that this is not necessarily a good thing. John Calcote, author of the
832: 646:
Cross-compiling software to run on a Windows host from a Linux or other Unix-like build system is also possible, using MinGW, however native compilation is often desirable on operating systems (such as the
621:
software and make it available to a much wider user community, including in its source code form to those users who wish to build the software themselves. In most cases users simply run the supplied
705:
can be slow because it executes programs such as a C compiler many times in order to test whether various libraries, header files, and language features are present. This particularly affects
320:); but because of the wide variety of build environments this approach quickly becomes unmanageable. Autotools is designed to address this problem more manageably. 840: 651:
family of systems) that cannot run Bourne shell scripts on their own. This makes building such software on the Windows operating system a bit harder than on a
682:, and other software that provides a nearly complete Unix-like system within Windows; MSYS also provides GNU make and other tools designed to work with the 744:
veneer of the configure script, rather than actually having the quality of portability to begin with. It is a travesty that the configure idea survived.
1130: 768:
exist, even though the Unixen, which lacked them, had neither sufficient memory to execute libtool nor disks big enough for its 16-MB source code.
960: 804: 861: 1051: 812: 119: 1135: 298: 594: 57: 53: 100: 1125: 72: 173: 79: 782:
keeps users from being able to make the changes they need to accomplish their unique project-specific build goals.
602: 340: 251: 452:
The complexity of Autotools reflects the variety of circumstances under which a body of source code may be built.
46: 1115: 1120: 935: 521: 196: 162: 86: 710: 675: 403: 510: 192: 68: 690: 671: 614: 344: 231: 1072: 667: 586: 332: 1033: 764: 758: 215: 964: 490:. (For this reason source code using Autotools is normally distributed without the files that 736: 648: 1023: 291: 246: 203: 366: 93: 749: 748:
Kamp sketches the history of the build system in the portability problems inherent in the
640: 583: 551: 391: 911: 478:
If the body of source code is copied to another computer then it is sufficient to re-run
460:, which only re-compiles that part of the body of the source code affected by the change. 350:
The GNU Build System makes it possible to build many programs using a two-step process:
636:
program. They do not need to have the Autotools themselves installed on the computer.
618: 579: 208: 886: 1109: 775:
Autotools, 2nd Edition: A Practitioner's Guide to GNU Autoconf, Automake, and Libtool
655:
system which provides the Bourne shell as a standard component. One can install the
336: 328: 324: 1037: 986: 639:
It can be used both for building native programs on the build machine and also for
626: 629: 524: 295: 139: 35: 597:
the library-creation process, hiding differences between various systems (e.g.
794: 399: 312: 157: 147: 1098: 263: 1028: 1011: 727: 664: 652: 590: 305: 429:
script, when run, scans the build environment and generates a subordinate
679: 543: 414: 383: 379: 17: 732: 575: 395: 387: 301: 1052:"Autotools, 2nd Edition by John Calcote | Penguin Random House Canada" 706: 656: 433:
script which, in turn, converts other input files and most commonly
441:), which are appropriate for that build environment. Finally, the 714: 683: 598: 535:, which can list C pre-processor identifiers used in the program. 425:
file, which characterizes a particular body of source code. The
660: 505:
files need to be changed and all subsequent steps also followed.
390:. Other related tools frequently used alongside it include GNU 625:
script (which has no dependencies other than the presence of a
497:
If the body of source code is changed more fundamentally, then
833:"Savannah Git Hosting - autoconf.git/blob - COPYING.EXCEPTION" 509:
To process files, autoconf uses the GNU implementation of the
375: 220: 29: 562:, which is used by the configure script to generate the file 311:
It can be difficult to make a software program portable: the
456:
If a source code file is changed then it suffices to re-run
531:, which can create an initial input file for Autoconf; and 756:
the 31,085 lines of configure for libtool still check if
713:, may execute configure scripts considerably slower than 752:, and bemoans the need for such build systems to exist: 343:
with special license exceptions permitting its use with
516:
Autoconf comes with several auxiliary programs such as
987:"Robert Ögren - Slow shell script execution on Cygwin" 887:"The GNU configure and build system - Introduction" 258: 245: 237: 227: 214: 202: 188: 172: 156: 146: 60:. Unsourced material may be challenged and removed. 449:to generate executable programs from source code. 593:operating systems. Libtool accomplishes this by 689:Although the developer is expected to provide a 779: 754: 741: 8: 467:file has changed then it suffices to re-run 132: 674:scripts to run. Cygwin also provides the 131: 1027: 120:Learn how and when to remove this message 550:s, which are in turn processed with the 365: 824: 961:"Cross Compilation with GNU Autotools" 663:system on top of Windows to provide a 709:, which, due to its lack of a native 370:Flow diagram of autoconf and automake 7: 912:"Learning the GNU development tools" 805:Free and open-source software portal 58:adding citations to reliable sources 335:packages. Its component tools are 421:script based on the contents of a 25: 1012:"A Generation Lost in the Bazaar" 813:List of build automation software 739:criticized the GNU Build System: 1073:"Re: Future plans for Autotools" 797: 750:multitude of 1980s Unix variants 554:utility. It takes its input as 138: 34: 520:, which is used to help manage 45:needs additional citations for 1131:Software using the GPL license 1: 578:helps manage the creation of 294:designed to assist in making 936:"automake: GNU Build System" 27:GNU software packaging tools 1010:Kamp, Poul-Henning (2012). 916:Autotoolset.sourceforge.net 862:"libtool.git - GNU Libtool" 327:and is widely used in many 1152: 374:Autotools consists of the 341:GNU General Public License 252:GNU General Public License 546:helps to create portable 323:Autotools is part of the 316:preprocessor directives ( 184: 168: 137: 643:to other architectures. 163:Free Software Foundation 1029:10.1145/2346916.2349257 701:The autoconf-generated 676:GNU Compiler Collection 404:GNU Compiler Collection 1136:Unix programming tools 788: 770: 746: 371: 193:M4 (computer language) 369: 339:, licensed under the 1126:GNU Project software 866:Git.savannah.gnu.org 837:Git.savannah.gnu.org 558:, and turns it into 345:proprietary software 286:, also known as the 232:GNU Operating System 54:improve this article 967:on October 13, 2008 670:, though, allowing 668:compatibility layer 615:software developers 437:into output files ( 134: 759:<sys/stat.h> 725:In his column for 613:Autotools assists 372: 148:Original author(s) 737:Poul-Henning Kamp 649:Microsoft Windows 627:Bourne-compatible 292:programming tools 280: 279: 130: 129: 122: 104: 16:(Redirected from 1143: 1116:Build automation 1102: 1101: 1099:Official website 1084: 1083: 1081: 1079: 1069: 1063: 1062: 1060: 1058: 1048: 1042: 1041: 1031: 1007: 1001: 1000: 998: 997: 983: 977: 976: 974: 972: 963:. Archived from 957: 951: 950: 948: 947: 932: 926: 925: 923: 922: 908: 902: 901: 899: 898: 883: 877: 876: 874: 873: 858: 852: 851: 849: 848: 839:. Archived from 829: 807: 802: 801: 800: 767: 765:<stdlib.h> 761: 711:fork system call 704: 686:version of GCC. 635: 624: 565: 561: 557: 549: 534: 530: 519: 504: 500: 493: 489: 485: 481: 474: 470: 466: 459: 448: 444: 440: 436: 432: 428: 424: 420: 319: 290:, is a suite of 288:GNU Build System 276: 273: 271: 269: 267: 265: 204:Operating system 142: 135: 125: 118: 114: 111: 105: 103: 62: 38: 30: 21: 1151: 1150: 1146: 1145: 1144: 1142: 1141: 1140: 1121:Compiling tools 1106: 1105: 1097: 1096: 1093: 1088: 1087: 1077: 1075: 1071: 1070: 1066: 1056: 1054: 1050: 1049: 1045: 1009: 1008: 1004: 995: 993: 985: 984: 980: 970: 968: 959: 958: 954: 945: 943: 934: 933: 929: 920: 918: 910: 909: 905: 896: 894: 885: 884: 880: 871: 869: 860: 859: 855: 846: 844: 831: 830: 826: 821: 803: 798: 796: 793: 763: 757: 723: 702: 641:cross-compiling 633: 622: 611: 573: 563: 559: 555: 547: 541: 532: 528: 517: 502: 498: 491: 487: 483: 479: 472: 468: 464: 457: 446: 442: 438: 434: 430: 426: 422: 418: 412: 364: 317: 262: 180: 126: 115: 109: 106: 69:"GNU Autotools" 63: 61: 51: 39: 28: 23: 22: 15: 12: 11: 5: 1149: 1147: 1139: 1138: 1133: 1128: 1123: 1118: 1108: 1107: 1104: 1103: 1092: 1091:External links 1089: 1086: 1085: 1064: 1043: 1002: 978: 952: 927: 903: 878: 853: 823: 822: 820: 817: 816: 815: 809: 808: 792: 789: 722: 719: 632:), and then a 619:cross-platform 610: 607: 572: 569: 540: 537: 513:macro system. 507: 506: 495: 476: 461: 411: 408: 363: 360: 278: 277: 260: 256: 255: 249: 243: 242: 239: 235: 234: 229: 225: 224: 218: 212: 211: 209:Cross-platform 206: 200: 199: 190: 186: 185: 182: 181: 178: 176: 174:Stable release 170: 169: 166: 165: 160: 154: 153: 150: 144: 143: 128: 127: 110:September 2009 42: 40: 33: 26: 24: 14: 13: 10: 9: 6: 4: 3: 2: 1148: 1137: 1134: 1132: 1129: 1127: 1124: 1122: 1119: 1117: 1114: 1113: 1111: 1100: 1095: 1094: 1090: 1074: 1068: 1065: 1053: 1047: 1044: 1039: 1035: 1030: 1025: 1021: 1017: 1013: 1006: 1003: 992: 988: 982: 979: 971:September 24, 966: 962: 956: 953: 941: 937: 931: 928: 917: 913: 907: 904: 892: 888: 882: 879: 867: 863: 857: 854: 843:on 2011-07-21 842: 838: 834: 828: 825: 818: 814: 811: 810: 806: 795: 790: 787: 783: 778: 776: 769: 766: 760: 753: 751: 745: 740: 738: 734: 730: 729: 720: 718: 716: 712: 708: 699: 697: 692: 687: 685: 681: 677: 673: 669: 666: 662: 658: 654: 650: 644: 642: 637: 631: 628: 620: 616: 608: 606: 604: 600: 596: 592: 588: 585: 581: 577: 570: 568: 553: 545: 538: 536: 526: 523: 514: 512: 496: 484:config.status 477: 469:config.status 462: 455: 454: 453: 450: 445:program uses 431:config.status 416: 409: 407: 405: 401: 397: 393: 389: 385: 381: 377: 368: 361: 359: 357: 353: 348: 346: 342: 338: 337:free software 334: 330: 329:free software 326: 325:GNU toolchain 321: 314: 309: 307: 303: 300: 297: 293: 289: 285: 284:GNU Autotools 275: 261: 257: 253: 250: 248: 244: 240: 236: 233: 230: 228:Included with 226: 222: 219: 217: 213: 210: 207: 205: 201: 198: 194: 191: 187: 183: 177: 175: 171: 167: 164: 161: 159: 155: 151: 149: 145: 141: 136: 133:GNU Autotools 124: 121: 113: 102: 99: 95: 92: 88: 85: 81: 78: 74: 71: –  70: 66: 65:Find sources: 59: 55: 49: 48: 43:This article 41: 37: 32: 31: 19: 1076:. Retrieved 1067: 1055:. Retrieved 1046: 1022:(8): 20–23. 1019: 1015: 1005: 994:. Retrieved 990: 981: 969:. Retrieved 965:the original 955: 944:. Retrieved 942:. 2014-12-31 939: 930: 919:. Retrieved 915: 906: 895:. Retrieved 893:. 1998-07-01 890: 881: 870:. Retrieved 868:. 2005-01-08 865: 856: 845:. Retrieved 841:the original 836: 827: 784: 780: 774: 771: 755: 747: 742: 726: 724: 700: 695: 688: 645: 638: 612: 601:systems vs. 574: 542: 525:header files 515: 508: 499:configure.ac 482:(which runs 451: 423:configure.ac 417:generates a 413: 373: 355: 354:followed by 351: 349: 322: 310: 287: 283: 281: 238:Available in 179:Multiple 158:Developer(s) 116: 107: 97: 90: 83: 76: 64: 52:Please help 47:verification 44: 1078:January 22, 1057:January 22, 595:abstracting 589:on various 560:Makefile.in 556:Makefile.am 494:generates.) 435:Makefile.in 333:open source 296:source code 1110:Categories 996:2016-04-01 991:Cygwin.com 946:2016-04-01 921:2016-04-01 897:2016-04-01 872:2016-04-01 847:2016-04-01 819:References 777:, opined: 735:developer 696:autoreconf 518:autoheader 402:, and the 400:pkg-config 378:utilities 362:Components 313:C compiler 223:and others 189:Written in 80:newspapers 1016:ACM Queue 728:ACM Queue 721:Criticism 703:configure 691:configure 672:configure 665:Unix-like 653:Unix-like 623:configure 617:to write 591:Unix-like 587:libraries 492:configure 480:configure 427:configure 419:configure 352:configure 308:systems. 306:Unix-like 272:/software 270:/software 254:version 2 152:Community 18:Autotools 1038:11656592 891:Airs.com 791:See also 680:GNU make 564:Makefile 548:Makefile 544:Automake 539:Automake 529:autoscan 501:and the 447:Makefile 439:Makefile 415:Autoconf 410:Autoconf 384:Automake 380:Autoconf 304:to many 302:portable 299:packages 216:Platform 940:Gnu.org 733:FreeBSD 603:Solaris 584:dynamic 576:Libtool 571:Libtool 533:ifnames 406:(GCC). 396:gettext 388:Libtool 259:Website 247:License 241:English 94:scholar 1036:  707:Cygwin 657:Cygwin 580:static 486:) and 394:, GNU 386:, and 318:#ifdef 96:  89:  82:  75:  67:  1034:S2CID 715:Linux 684:MinGW 630:shell 609:Usage 599:Linux 463:If a 274:.html 101:JSTOR 87:books 1080:2021 1059:2021 973:2008 762:and 661:MSYS 634:make 582:and 552:make 488:make 473:make 471:and 458:make 443:make 392:make 356:make 331:and 282:The 268:.org 266:.gnu 73:news 1024:doi 659:or 605:). 503:.in 465:.in 376:GNU 264:www 221:GNU 56:by 1112:: 1032:. 1020:10 1018:. 1014:. 989:. 938:. 914:. 889:. 864:. 835:. 731:, 717:. 698:. 678:, 527:; 511:m4 398:, 382:, 358:. 347:. 195:, 1082:. 1061:. 1040:. 1026:: 999:. 975:. 949:. 924:. 900:. 875:. 850:. 522:C 475:. 197:C 123:) 117:( 112:) 108:( 98:· 91:· 84:· 77:· 50:. 20:)

Index

Autotools

verification
improve this article
adding citations to reliable sources
"GNU Autotools"
news
newspapers
books
scholar
JSTOR
Learn how and when to remove this message
GNU logo
Original author(s)
Developer(s)
Free Software Foundation
Stable release
M4 (computer language)
C
Operating system
Cross-platform
Platform
GNU
GNU Operating System
License
GNU General Public License
www.gnu.org/software/software.html
programming tools
source code
packages

Text is available under the Creative Commons Attribution-ShareAlike License. Additional terms may apply.