It can be difficult to make a software program portable: the C compiler 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 preprocessor directives (#ifdef); but because of the wide variety of build environments this approach quickly becomes unmanageable. Autotools is designed to address this problem more manageably.
Autotools is part of the GNU toolchain and is widely used in many free software and open source packages. Its component tools are free software, licensed under the GNU General Public License with special license exceptions[1][2] permitting its use with proprietary software.
Autotools consists of the GNU utilities Autoconf, Automake, and Libtool.[4] Other related tools frequently used alongside it include GNU make, GNU gettext, pkg-config, and the GNU Compiler Collection (GCC).
Autoconf generates a configure script based on the contents of a configure.ac file, which characterizes a particular body of source code. The configure script, when run, scans the build environment and generates a subordinate config.status script which, in turn, converts other input files and most commonly Makefile.in into output files (Makefile), which are appropriate for that build environment. Finally, the make program uses Makefile to generate executable programs from source code.
Autoconf comes with several auxiliary programs such as autoheader, which is used to help manage C header files; autoscan, which can create an initial input file for Autoconf; and ifnames, which can list C pre-processor identifiers used in the program.
Automake helps to create portable Makefiles, which are in turn processed with the make utility. It takes its input as Makefile.am, and turns it into Makefile.in, which is used by the configure script to generate the file Makefile 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.
Libtool helps manage the creation of static and dynamic libraries on various Unix-like operating systems. Libtool accomplishes this by abstracting the library-creation process, hiding differences between various systems (e.g. Linux systems vs. Solaris).
Autotools assists software developers to write cross-platform 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 configure script (which has no dependencies other than the presence of a Bourne-compatible shell), and then a make program.[5] They do not need to have the Autotools themselves installed on the computer.
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 Microsoft Windows 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 Unix-like system which provides the Bourne shell as a standard component. One can install the Cygwin or MSYS system on top of Windows to provide a Unix-like compatibility layer, though, allowing configure scripts to run. Cygwin also provides the GNU Compiler Collection, GNU make, 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 MinGW version of GCC.
Although the developer is expected to provide a configure 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 autoreconf.
The autoconf-generated configure 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 Cygwin, which, due to its lack of a native fork system call, may execute configure scripts considerably slower than Linux.[7]
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 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.
the 31,085 lines of configure for libtool still check if .mw-parser-output .monospacedfont-family:monospace,monospace and 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.
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[9] of the Autotools, 2nd Edition: A Practitioner's Guide to GNU Autoconf, Automake, and Libtool, opined:[10]
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 keeps users from being able to make the changes they need to accomplish their unique project-specific build goals.
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 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.
Whether you have an at-home or on-site workshop, you need professional auto mechanic tools to get the job done right. Sears carries thousands of name brand Craftsman and Stanley mechanics' tools and sets ranging from nut drivers to screwdrivers. Invest in individual torque wrenches for removing lug nuts from your tires, or consider a 154-piece Craftsman mechanics' tool kit that contains sockets, wrenches and hex keys. From tap and die sets to locking pliers and ratchets, we have every tool necessary to fulfill your automotive maintenance needs.
Along with auto mechanic tool sets, you should have Eastwood or Phoenix Systems auto body repair kits in your garage or workshop. With an air compressor and an Eastwood powder-coating gun kit, you can coat smaller car parts efficiently. Remove dents and dings from your front and back bumpers with the Martin Tools body and fender kit. You have access to Mityvac Silverline Elite automotive repair and diagnostic kits for checking fluid transfer and brake bleeding. We also have Eastwood upholstery kits for installing seat covers in your vehicles.
When your car lights dim and stop working, come to Sears for replacement car lights and miscellaneous lighting accessories. We have halogen headlamps for Toyota, Chevy and other popular car makes and models. You can even find headlight lamps for the Dodge Caliber or the Nissan Altima. You have access to LED taillights from Luminex and Spyder Auto to customize your vehicle. We provide driver- and passenger-side replacement taillights, and you can even find LED fog lights for your motorcycle. Whether you need interior light bulbs or exterior headlamps, we have car replacement lights for your particular vehicle.
Install your new replacement lights easily with personalized mechanics tools from Craftsman and Stanley. You benefit from having a complete 540-piece mechanics' tool set that features everything from socket wrenches to nut drivers. You also have smaller sets to choose from, such as the Craftsman 283-piece tool set that comes with a convenient toolbox for storing and organizing your pieces. With the GearWrench 18-piece Dr. Socket set, you have a portable tool kit for loosening and tightening nuts and bolts on your car.
You need professional auto mechanic tools for changing lug nuts or for removing individual parts from your car engine. Repair chipped paint and dents in your car fenders with an auto body repair kit, and find the exact replacement car lights you need for your specific make and model. Shop Sears' online inventory for personalized mechanics tools and name brand automotive accessories for your professional or at home workshop.
Recently, I switched my development environment from Windows to Linux. So far, I have only used Visual Studio for C++ development, so many concepts, like make and Autotools, are new to me. I have read the GNU makefile documentation and got almost an idea about it. But I am kind of confused about Autotools.
Autoconf easily scans an existing tree to find its dependencies and create a configure script that will run under almost any kind of shell. The configure script allows the user to control the build behavior (i.e. --with-foo, --without-foo, --prefix, --sysconfdir, etc..) as well as doing checks to ensure that the system can compile the program.
By providing a short template that describes what programs will be built and what objects need to be linked to build them, Makefiles that adhere to GNU coding standards can automatically be created. This includes dependency handling and all of the required GNU targets.
b1e95dc632