Are you over 18 and want to see adult content?
More Annotations
![A complete backup of hattoricollector.com](https://www.archivebay.com/archive/4f105afc-da6d-43d3-a15f-d035c1bb477b.png)
A complete backup of hattoricollector.com
Are you over 18 and want to see adult content?
![A complete backup of callydesign.blogspot.com](https://www.archivebay.com/archive/28c95e89-84f2-47b5-8ead-ba91fe5474bd.png)
A complete backup of callydesign.blogspot.com
Are you over 18 and want to see adult content?
![A complete backup of jorgevega.com.ar](https://www.archivebay.com/archive/67677079-63d4-4cb5-a799-3c59d7748042.png)
A complete backup of jorgevega.com.ar
Are you over 18 and want to see adult content?
![A complete backup of divehardtours.com](https://www.archivebay.com/archive/7cbd03a4-29ae-44ce-9e65-3ec355edd20e.png)
A complete backup of divehardtours.com
Are you over 18 and want to see adult content?
![A complete backup of e-lawyersonline.com](https://www.archivebay.com/archive/d4808a85-dbfd-4081-850f-8dd18eb9cfa5.png)
A complete backup of e-lawyersonline.com
Are you over 18 and want to see adult content?
![A complete backup of patriothealthalliance.com](https://www.archivebay.com/archive/6a318175-642d-46cd-b995-a0bc0a7e7576.png)
A complete backup of patriothealthalliance.com
Are you over 18 and want to see adult content?
![A complete backup of film-bearbeitung24.de](https://www.archivebay.com/archive/3fe8110b-7137-4309-bb1a-bc313b720cf7.png)
A complete backup of film-bearbeitung24.de
Are you over 18 and want to see adult content?
![A complete backup of dientuquocdoanh.com](https://www.archivebay.com/archive/750ce5fd-7cd3-44ba-adc4-607e4f662aad.png)
A complete backup of dientuquocdoanh.com
Are you over 18 and want to see adult content?
![A complete backup of woodlandpools.com](https://www.archivebay.com/archive/56668873-e45a-4d48-88b8-c4d3144832e1.png)
A complete backup of woodlandpools.com
Are you over 18 and want to see adult content?
![A complete backup of boutiques-theophile.com](https://www.archivebay.com/archive/e62da5fb-1a11-43af-8053-d8bfc58d3235.png)
A complete backup of boutiques-theophile.com
Are you over 18 and want to see adult content?
Favourite Annotations
![A complete backup of holandawaanta.nl](https://www.archivebay.com/archive2/7459926d-b84b-41eb-9787-3fae4a2574bd.png)
A complete backup of holandawaanta.nl
Are you over 18 and want to see adult content?
![A complete backup of greenpeace.org.uk](https://www.archivebay.com/archive2/2d10c16b-a695-4289-ae9d-37bb9fa9822d.png)
A complete backup of greenpeace.org.uk
Are you over 18 and want to see adult content?
![A complete backup of theenergycase.com](https://www.archivebay.com/archive2/8ef30adf-9da5-4f7e-8d4f-66ba9004639c.png)
A complete backup of theenergycase.com
Are you over 18 and want to see adult content?
Text
3. ADDING OPTIONS
3. Adding Options. 3. Adding Options. One of the most important features available to developers who use autoconf is certainly the ability to add new options to the ./configure execution, to provide optional build-time support to users. Unfortunately, because of the importance of this feature, it's also one the most commonly misused. APPENDIX A. WHO'S AFRAID OF AUTOTOOLS? 1. Basic Autotoolization. 2. Adding libtool. While the whole guide is designed toward explaining the mechanisms and the behaviour of autotools, it was never meant, by itself, to be a tutorial. This appendix should cover those basis, by providing an easy path on writing an autotools build system for your project. 1. BasicAutotoolization.
3. SILENT BUILDING WITH AUTOMAKE 3. Silent Building with Automake. The “classical” Makefiles generated by automake up to and including version 1.11 have always been very verbose, during build, printing the full command line of every stage. Albeit this is very helpful during debugging, the practise has been criticised, especially as the Linux kernel, andother build systems
6. CONDITIONAL BUILDS 6. Conditional Builds. It is common for source files or build flags to only be needed conditionally, for example if they are only needed on particular host operating systems, or they implement an optional feature. To implement conditionality, automake provides the AM_CONDITIONAL macro, and conditional blocks in Makefile.am files. 3. THE PKG_CHECK_MODULES MACRO 3. The PKG_CHECK_MODULES Macro. The main interface between autoconf and pkg-config is the PKG_CHECK_MODULES macro, which provides a very basic and easy way to check for the presence of a given package in the system. Nonetheless, there are some 2. CANONICAL SYSTEMS 2. Canonical Systems. 2. Canonical Systems. When using autoconf, there are three system definitions (or machine definitions) that are used to identify the “actors” in the build process; each definition relates to a similarly-named variable which will be illustrated in detail later. These three definitions are: The system that is going to AUTOTOOLS MYTHBUSTER Autotools Mythbuster is a no-nonsense guide to Autotools, written with the idea of providing a full, integrated view of the tools in the GNU build chain: autoconf, automake, libtool, pkg-config, and so on. Instead of providing a full detailing of the workings of the components, which most consumers are not interested on, this guide focuses on building useful, solid and distribution-friendly 6. AUTOCONF BUILDING BLOCKS: MACROS 6. Autoconf Building Blocks: Macros. The configuration stages of different software packages are never entirely unique. There are repetitive, similar (if not outright identical) tasks that have to be completed for different packages, with more or less sharing between them. To avoid repeating the same code over and over, most programming 4. FINDING LIBRARIES 4. Finding Libraries. 4.1. Searching For System Libraries. When using autoconf for portability, it's necessary to consider that some functions, even standard system ones, are often in different libraries on different operating systems. For instance, the dlopen () function is in libdl on GNU/Linux, and in the standard C library on FreeBSD and 5. CUSTOM AUTOCONF TESTS 5. Custom Autoconf Tests. 5. Custom Autoconf Tests. While autoconf provides a number of pre-written tests to identify presence of headers, symbols and libraries, they obviously don't cover the whole range of possible situations that software developers might be facing to recognise the environment that their software is being built on.3. ADDING OPTIONS
3. Adding Options. 3. Adding Options. One of the most important features available to developers who use autoconf is certainly the ability to add new options to the ./configure execution, to provide optional build-time support to users. Unfortunately, because of the importance of this feature, it's also one the most commonly misused. APPENDIX A. WHO'S AFRAID OF AUTOTOOLS? 1. Basic Autotoolization. 2. Adding libtool. While the whole guide is designed toward explaining the mechanisms and the behaviour of autotools, it was never meant, by itself, to be a tutorial. This appendix should cover those basis, by providing an easy path on writing an autotools build system for your project. 1. BasicAutotoolization.
3. SILENT BUILDING WITH AUTOMAKE 3. Silent Building with Automake. The “classical” Makefiles generated by automake up to and including version 1.11 have always been very verbose, during build, printing the full command line of every stage. Albeit this is very helpful during debugging, the practise has been criticised, especially as the Linux kernel, andother build systems
6. CONDITIONAL BUILDS 6. Conditional Builds. It is common for source files or build flags to only be needed conditionally, for example if they are only needed on particular host operating systems, or they implement an optional feature. To implement conditionality, automake provides the AM_CONDITIONAL macro, and conditional blocks in Makefile.am files. 3. THE PKG_CHECK_MODULES MACRO 3. The PKG_CHECK_MODULES Macro. The main interface between autoconf and pkg-config is the PKG_CHECK_MODULES macro, which provides a very basic and easy way to check for the presence of a given package in the system. Nonetheless, there are some 2. CANONICAL SYSTEMS 2. Canonical Systems. 2. Canonical Systems. When using autoconf, there are three system definitions (or machine definitions) that are used to identify the “actors” in the build process; each definition relates to a similarly-named variable which will be illustrated in detail later. These three definitions are: The system that is going to AUTOTOOLS MYTHBUSTER Autotools Mythbuster is a no-nonsense guide to Autotools, written with the idea of providing a full, integrated view of the tools in the GNU build chain: autoconf, automake, libtool, pkg-config, and so on. Instead of providing a full detailing of the workings of the components, which most consumers are not interested on, this guide focuses on building useful, solid and distribution-friendly CHAPTER 1. CONFIGURING THE BUILD Caching Results. Configuring the build consists of running a series of tests to identify the build environment and the presence of the required tools and libraries. It is a crucial step in allowing portability between different operating systems to detect this build environment system. In the autotools chain, this is done by theautoconf tool.
APPENDIX A. WHO'S AFRAID OF AUTOTOOLS? 1. Basic Autotoolization. 2. Adding libtool. While the whole guide is designed toward explaining the mechanisms and the behaviour of autotools, it was never meant, by itself, to be a tutorial. This appendix should cover those basis, by providing an easy path on writing an autotools build system for your project. 1. BasicAutotoolization.
5. CUSTOM AUTOCONF TESTS 5. Custom Autoconf Tests. 5. Custom Autoconf Tests. While autoconf provides a number of pre-written tests to identify presence of headers, symbols and libraries, they obviously don't cover the whole range of possible situations that software developers might be facing to recognise the environment that their software is being built on. 3. SILENT BUILDING WITH AUTOMAKE 3. Silent Building with Automake. The “classical” Makefiles generated by automake up to and including version 1.11 have always been very verbose, during build, printing the full command line of every stage. Albeit this is very helpful during debugging, the practise has been criticised, especially as the Linux kernel, andother build systems
APPENDIX C. FURTHER READINGS Appendix C. Further Readings. While the goal of this guide is to provide a comprehensive and extensive documentation on autotools and all tools related to them, it will take a long time before it can be said to be self-sufficient. Until that time, I'd like to point out some further readings that will provide pointers, or referencematerial
1. LIBTOOL WRAPPERS
1. libtool wrappers. 1. libtool. wrappers. When building programs with the help of libtool, your targets in the build directory consist of shell scripts, instead of the final ELF executable files. These shell scripts are designed to workaround some limitations present when working with shared objects in different operating systems. 5. MAINTAINER MODE AND THE MISSING SCRIPT 5. Maintainer mode and the missing script. It is common, both during the development of a project, or during the packaging phase, to edit the source files of the build system, configure.ac , Makefile.am and so on. Depending on which files are modified, it is possible that one or more tools of the Autotools stack need to be executed to produce a CHAPTER 4. DEPENDENCY DISCOVERY A no-nonsense guide to Autotools by Diego Elio Pettenò. Discovering the presence of libraries through autoconf as described in Section 4, “Finding Libraries” is somewhat limiting; it does not allow for the library to provide specific information about the flags it needs to compile against (such as threading flags), nor does it allow us to properly pass other libraries we need to link to. 2. NON-RECURSIVE AUTOMAKE One of the common criticisms of automake is that most projects that make use of it use multiple Makefile.am files, one per sub-directory of the project, causing pollution, confusion and further problems. For quite a while, though, automake supports non-recursive builds, with a single Makefile.am (or at least a reduced number of those). AUTOTOOLS MYTHBUSTER Autotools Mythbuster is a no-nonsense guide to Autotools, written with the idea of providing a full, integrated view of the tools in the GNU build chain: autoconf, automake, libtool, pkg-config, and so on. Instead of providing a full detailing of the workings of the components, which most consumers are not interested on, this guide focuses on building useful, solid and distribution-friendly 6. AUTOCONF BUILDING BLOCKS: MACROS 6. Autoconf Building Blocks: Macros. The configuration stages of different software packages are never entirely unique. There are repetitive, similar (if not outright identical) tasks that have to be completed for different packages, with more or less sharing between them. To avoid repeating the same code over and over, most programming 4. FINDING LIBRARIES 4. Finding Libraries. 4.1. Searching For System Libraries. When using autoconf for portability, it's necessary to consider that some functions, even standard system ones, are often in different libraries on different operating systems. For instance, the dlopen () function is in libdl on GNU/Linux, and in the standard C library on FreeBSD and 5. CUSTOM AUTOCONF TESTS 5. Custom Autoconf Tests. 5. Custom Autoconf Tests. While autoconf provides a number of pre-written tests to identify presence of headers, symbols and libraries, they obviously don't cover the whole range of possible situations that software developers might be facing to recognise the environment that their software is being built on.3. ADDING OPTIONS
3. Adding Options. 3. Adding Options. One of the most important features available to developers who use autoconf is certainly the ability to add new options to the ./configure execution, to provide optional build-time support to users. Unfortunately, because of the importance of this feature, it's also one the most commonly misused. APPENDIX A. WHO'S AFRAID OF AUTOTOOLS? 1. Basic Autotoolization. 2. Adding libtool. While the whole guide is designed toward explaining the mechanisms and the behaviour of autotools, it was never meant, by itself, to be a tutorial. This appendix should cover those basis, by providing an easy path on writing an autotools build system for your project. 1. BasicAutotoolization.
3. SILENT BUILDING WITH AUTOMAKE 3. Silent Building with Automake. The “classical” Makefiles generated by automake up to and including version 1.11 have always been very verbose, during build, printing the full command line of every stage. Albeit this is very helpful during debugging, the practise has been criticised, especially as the Linux kernel, andother build systems
6. CONDITIONAL BUILDS 6. Conditional Builds. It is common for source files or build flags to only be needed conditionally, for example if they are only needed on particular host operating systems, or they implement an optional feature. To implement conditionality, automake provides the AM_CONDITIONAL macro, and conditional blocks in Makefile.am files. 3. THE PKG_CHECK_MODULES MACRO 3. The PKG_CHECK_MODULES Macro. The main interface between autoconf and pkg-config is the PKG_CHECK_MODULES macro, which provides a very basic and easy way to check for the presence of a given package in the system. Nonetheless, there are some 2. CANONICAL SYSTEMS 2. Canonical Systems. 2. Canonical Systems. When using autoconf, there are three system definitions (or machine definitions) that are used to identify the “actors” in the build process; each definition relates to a similarly-named variable which will be illustrated in detail later. These three definitions are: The system that is going to AUTOTOOLS MYTHBUSTER Autotools Mythbuster is a no-nonsense guide to Autotools, written with the idea of providing a full, integrated view of the tools in the GNU build chain: autoconf, automake, libtool, pkg-config, and so on. Instead of providing a full detailing of the workings of the components, which most consumers are not interested on, this guide focuses on building useful, solid and distribution-friendly 6. AUTOCONF BUILDING BLOCKS: MACROS 6. Autoconf Building Blocks: Macros. The configuration stages of different software packages are never entirely unique. There are repetitive, similar (if not outright identical) tasks that have to be completed for different packages, with more or less sharing between them. To avoid repeating the same code over and over, most programming 4. FINDING LIBRARIES 4. Finding Libraries. 4.1. Searching For System Libraries. When using autoconf for portability, it's necessary to consider that some functions, even standard system ones, are often in different libraries on different operating systems. For instance, the dlopen () function is in libdl on GNU/Linux, and in the standard C library on FreeBSD and 5. CUSTOM AUTOCONF TESTS 5. Custom Autoconf Tests. 5. Custom Autoconf Tests. While autoconf provides a number of pre-written tests to identify presence of headers, symbols and libraries, they obviously don't cover the whole range of possible situations that software developers might be facing to recognise the environment that their software is being built on.3. ADDING OPTIONS
3. Adding Options. 3. Adding Options. One of the most important features available to developers who use autoconf is certainly the ability to add new options to the ./configure execution, to provide optional build-time support to users. Unfortunately, because of the importance of this feature, it's also one the most commonly misused. APPENDIX A. WHO'S AFRAID OF AUTOTOOLS? 1. Basic Autotoolization. 2. Adding libtool. While the whole guide is designed toward explaining the mechanisms and the behaviour of autotools, it was never meant, by itself, to be a tutorial. This appendix should cover those basis, by providing an easy path on writing an autotools build system for your project. 1. BasicAutotoolization.
3. SILENT BUILDING WITH AUTOMAKE 3. Silent Building with Automake. The “classical” Makefiles generated by automake up to and including version 1.11 have always been very verbose, during build, printing the full command line of every stage. Albeit this is very helpful during debugging, the practise has been criticised, especially as the Linux kernel, andother build systems
6. CONDITIONAL BUILDS 6. Conditional Builds. It is common for source files or build flags to only be needed conditionally, for example if they are only needed on particular host operating systems, or they implement an optional feature. To implement conditionality, automake provides the AM_CONDITIONAL macro, and conditional blocks in Makefile.am files. 3. THE PKG_CHECK_MODULES MACRO 3. The PKG_CHECK_MODULES Macro. The main interface between autoconf and pkg-config is the PKG_CHECK_MODULES macro, which provides a very basic and easy way to check for the presence of a given package in the system. Nonetheless, there are some 2. CANONICAL SYSTEMS 2. Canonical Systems. 2. Canonical Systems. When using autoconf, there are three system definitions (or machine definitions) that are used to identify the “actors” in the build process; each definition relates to a similarly-named variable which will be illustrated in detail later. These three definitions are: The system that is going to AUTOTOOLS MYTHBUSTER Autotools Mythbuster is a no-nonsense guide to Autotools, written with the idea of providing a full, integrated view of the tools in the GNU build chain: autoconf, automake, libtool, pkg-config, and so on. Instead of providing a full detailing of the workings of the components, which most consumers are not interested on, this guide focuses on building useful, solid and distribution-friendly CHAPTER 1. CONFIGURING THE BUILD Caching Results. Configuring the build consists of running a series of tests to identify the build environment and the presence of the required tools and libraries. It is a crucial step in allowing portability between different operating systems to detect this build environment system. In the autotools chain, this is done by theautoconf tool.
APPENDIX A. WHO'S AFRAID OF AUTOTOOLS? 1. Basic Autotoolization. 2. Adding libtool. While the whole guide is designed toward explaining the mechanisms and the behaviour of autotools, it was never meant, by itself, to be a tutorial. This appendix should cover those basis, by providing an easy path on writing an autotools build system for your project. 1. BasicAutotoolization.
5. CUSTOM AUTOCONF TESTS 5. Custom Autoconf Tests. 5. Custom Autoconf Tests. While autoconf provides a number of pre-written tests to identify presence of headers, symbols and libraries, they obviously don't cover the whole range of possible situations that software developers might be facing to recognise the environment that their software is being built on. 3. SILENT BUILDING WITH AUTOMAKE 3. Silent Building with Automake. The “classical” Makefiles generated by automake up to and including version 1.11 have always been very verbose, during build, printing the full command line of every stage. Albeit this is very helpful during debugging, the practise has been criticised, especially as the Linux kernel, andother build systems
APPENDIX C. FURTHER READINGS Appendix C. Further Readings. While the goal of this guide is to provide a comprehensive and extensive documentation on autotools and all tools related to them, it will take a long time before it can be said to be self-sufficient. Until that time, I'd like to point out some further readings that will provide pointers, or referencematerial
1. LIBTOOL WRAPPERS
1. libtool wrappers. 1. libtool. wrappers. When building programs with the help of libtool, your targets in the build directory consist of shell scripts, instead of the final ELF executable files. These shell scripts are designed to workaround some limitations present when working with shared objects in different operating systems. 5. MAINTAINER MODE AND THE MISSING SCRIPT 5. Maintainer mode and the missing script. It is common, both during the development of a project, or during the packaging phase, to edit the source files of the build system, configure.ac , Makefile.am and so on. Depending on which files are modified, it is possible that one or more tools of the Autotools stack need to be executed to produce a CHAPTER 4. DEPENDENCY DISCOVERY A no-nonsense guide to Autotools by Diego Elio Pettenò. Discovering the presence of libraries through autoconf as described in Section 4, “Finding Libraries” is somewhat limiting; it does not allow for the library to provide specific information about the flags it needs to compile against (such as threading flags), nor does it allow us to properly pass other libraries we need to link to. 2. NON-RECURSIVE AUTOMAKE One of the common criticisms of automake is that most projects that make use of it use multiple Makefile.am files, one per sub-directory of the project, causing pollution, confusion and further problems. For quite a while, though, automake supports non-recursive builds, with a single Makefile.am (or at least a reduced number of those). AUTOTOOLS MYTHBUSTER Autotools Mythbuster is a no-nonsense guide to Autotools, written with the idea of providing a full, integrated view of the tools in the GNU build chain: autoconf, automake, libtool, pkg-config, and so on. Instead of providing a full detailing of the workings of the components, which most consumers are not interested on, this guide focuses on building useful, solid and distribution-friendly 6. AUTOCONF BUILDING BLOCKS: MACROS Note. While there is no functional requirement for that, the guide will assume that all your macro files are inside the m4/ directory; this is the most common directory used to keep the macro files, and for the principle of least surprise, you probably want to also put yours there.. Some projects use other directory names (autoconf/, ac-macros/, ) but this often adds more work for the3. ADDING OPTIONS
A no-nonsense guide to Autotools by Diego Elio Pettenò. For declaring the arguments with --enable and --with prefixes, you have two different macros that work in basically the same way: AC_ARG_ENABLE and AC_ARG_WITH.Because they work in the same way, the following explanation will only talk about the former, but the same applies forthe latter.
APPENDIX C. FURTHER READINGS A no-nonsense guide to Autotools by Diego Elio Pettenò. While the goal of this guide is to provide a comprehensive and extensive documentation on autotools and all tools related to them, it will take a long time before it can be said to be self-sufficient. 4. FINDING LIBRARIES When using autoconf for portability, it's necessary to consider that some functions, even standard system ones, are often in different libraries on different operating systems. For instance, the dlopen() function is in libdl on GNU/Linux, and in the standard C library on FreeBSD and other BSD-derived systems.. This is one of the most common things to test, but the commonly-documented solution 3. THE PKG_CHECK_MODULES MACRO The main interface between autoconf and pkg-config is the PKG_CHECK_MODULES macro, which provides a very basic and easy way to check for the presence of a given package in the system. Nonetheless, there are some caveats that require attention when using the macro. CHAPTER 4. DEPENDENCY DISCOVERY A no-nonsense guide to Autotools by Diego Elio Pettenò. Discovering the presence of libraries through autoconf as described in Section 4, “Finding Libraries” is somewhat limiting; it does not allow for the library to provide specific information about the flags it needs to compile against (such as threading flags), nor does it allow us to properly pass other libraries we need to link to. 2. CANONICAL SYSTEMS A no-nonsense guide to Autotools by Diego Elio Pettenò. The system definitions used by autoconf (but also by other packages like GCC and Binutils) are simple tuples in the form of strings.These are designed to provide, in a format easy to parse with “glob masks”; 3. SILENT BUILDING WITH AUTOMAKE Since the feature of building with silent rules is only available starting from automake 1.11, enabling the feature in configure.ac, through either the macro call or the silent-rules option is going to stop all the older versions from building the project. If this is actually a desirable situation, you can also add the 1.11 token to AM_INIT_AUTOMAKE to declare that at least version 1.11 of 4. LIBRARY VERSIONING Developers working on Linux workstations will probably have noticed that most libraries built through libtool have three numbers at the end of their name, such as libfoo.so.0.0.0; this brings to an unfortunately incorrect implication that the version of the shared object uses the full three components.This is not the case. The version of the library is the one indicated in the DT_SONAME tag AUTOTOOLS MYTHBUSTER Autotools Mythbuster is a no-nonsense guide to Autotools, written with the idea of providing a full, integrated view of the tools in the GNU build chain: autoconf, automake, libtool, pkg-config, and so on. Instead of providing a full detailing of the workings of the components, which most consumers are not interested on, this guide focuses on building useful, solid and distribution-friendly 6. AUTOCONF BUILDING BLOCKS: MACROS Note. While there is no functional requirement for that, the guide will assume that all your macro files are inside the m4/ directory; this is the most common directory used to keep the macro files, and for the principle of least surprise, you probably want to also put yours there.. Some projects use other directory names (autoconf/, ac-macros/, ) but this often adds more work for the3. ADDING OPTIONS
A no-nonsense guide to Autotools by Diego Elio Pettenò. For declaring the arguments with --enable and --with prefixes, you have two different macros that work in basically the same way: AC_ARG_ENABLE and AC_ARG_WITH.Because they work in the same way, the following explanation will only talk about the former, but the same applies forthe latter.
APPENDIX C. FURTHER READINGS A no-nonsense guide to Autotools by Diego Elio Pettenò. While the goal of this guide is to provide a comprehensive and extensive documentation on autotools and all tools related to them, it will take a long time before it can be said to be self-sufficient. 4. FINDING LIBRARIES When using autoconf for portability, it's necessary to consider that some functions, even standard system ones, are often in different libraries on different operating systems. For instance, the dlopen() function is in libdl on GNU/Linux, and in the standard C library on FreeBSD and other BSD-derived systems.. This is one of the most common things to test, but the commonly-documented solution 3. THE PKG_CHECK_MODULES MACRO The main interface between autoconf and pkg-config is the PKG_CHECK_MODULES macro, which provides a very basic and easy way to check for the presence of a given package in the system. Nonetheless, there are some caveats that require attention when using the macro. CHAPTER 4. DEPENDENCY DISCOVERY A no-nonsense guide to Autotools by Diego Elio Pettenò. Discovering the presence of libraries through autoconf as described in Section 4, “Finding Libraries” is somewhat limiting; it does not allow for the library to provide specific information about the flags it needs to compile against (such as threading flags), nor does it allow us to properly pass other libraries we need to link to. 2. CANONICAL SYSTEMS A no-nonsense guide to Autotools by Diego Elio Pettenò. The system definitions used by autoconf (but also by other packages like GCC and Binutils) are simple tuples in the form of strings.These are designed to provide, in a format easy to parse with “glob masks”; 3. SILENT BUILDING WITH AUTOMAKE Since the feature of building with silent rules is only available starting from automake 1.11, enabling the feature in configure.ac, through either the macro call or the silent-rules option is going to stop all the older versions from building the project. If this is actually a desirable situation, you can also add the 1.11 token to AM_INIT_AUTOMAKE to declare that at least version 1.11 of 4. LIBRARY VERSIONING Developers working on Linux workstations will probably have noticed that most libraries built through libtool have three numbers at the end of their name, such as libfoo.so.0.0.0; this brings to an unfortunately incorrect implication that the version of the shared object uses the full three components.This is not the case. The version of the library is the one indicated in the DT_SONAME tag CHAPTER 1. CONFIGURING THE BUILD A no-nonsense guide to Autotools by Diego Elio Pettenò. Configuring the build consists of running a series of tests to identify the build environment and the presence of the required tools and libraries.PREFACE - AUTOTOOLS
This book is an organised collection of documentation on the suite of software usually referred to as autotools; this suite, developed by the GNU project, consists of tools such as autoconf, automake, libtool and other tools that were introduced by FreeDesktop.org, such as APPENDIX C. FURTHER READINGS A no-nonsense guide to Autotools by Diego Elio Pettenò. While the goal of this guide is to provide a comprehensive and extensive documentation on autotools and all tools related to them, it will take a long time before it can be said to be self-sufficient. APPENDIX A. WHO'S AFRAID OF AUTOTOOLS? As already described in the rest of this guide, the name “Autotools”, we refer to a number of different tools. If you have a very simple program (not hellow-simple, but still simple), you definitely want to use at the very least two: autoconf and automake.While you could use 5. CUSTOM AUTOCONF TESTS While autoconf provides a number of pre-written tests to identify presence of headers, symbols and libraries, they obviously don't cover the whole range of possible situations that software developers might be facing to recognise the environment that their software is being built on.. For this reason, autoconf also provides interfaces to write custom testing routines, which can be divided in CHAPTER 4. DEPENDENCY DISCOVERY A no-nonsense guide to Autotools by Diego Elio Pettenò. Discovering the presence of libraries through autoconf as described in Section 4, “Finding Libraries” is somewhat limiting; it does not allow for the library to provide specific information about the flags it needs to compile against (such as threading flags), nor does it allow us to properly pass other libraries we need to link to. 1. AVAILABLE OPTIONS A no-nonsense guide to Autotools by Diego Elio Pettenò. Among different projects, automake is used with different options and settings. Some of the most important projects have their own flavour settings supported by automake directly, as a single option, these are gnu (the default), cygnus (removed in automake 1.13), gnits and the final foreign which is meant as a "none of the above" option.INDEX
A no-nonsense guide to Autotools by Diego Elio Pettenò. P pkg-config, Dependency discovery — pkg-config PKG_CHECK_MODULES (macro), The PKG_CHECK_MODULES Macro PKG_CHECK_VAR (macro), Additional Variables PKG_CONFIG_LIBDIR (variable), Search paths PKG_CONFIG_PATH (variable), Search paths Portable Executable 2. CHANGES IN AUTOMAKE RELEASE A no-nonsense guide to Autotools by Diego Elio Pettenò. Unsupported and changed behaviour in automake starting from version 1.14 . The AM_PROG_CC_C_O macro has been deprecated, and its use now is a no-op. Instead, the compile script is now required for all builds, and the tests executed by this macro have been bolted on the AC_PROG_CC basicmacro instead.
2. NON-RECURSIVE AUTOMAKE One of the common criticisms of automake is that most projects that make use of it use multiple Makefile.am files, one per sub-directory of the project, causing pollution, confusion and further problems. For quite a while, though, automake supports non-recursive builds, with a single Makefile.am (or at least a reduced number of those). AUTOTOOLS MYTHBUSTER Autotools Mythbuster is a no-nonsense guide to Autotools, written with the idea of providing a full, integrated view of the tools in the GNU build chain: autoconf, automake, libtool, pkg-config, and so on. Instead of providing a full detailing of the workings of the components, which most consumers are not interested on, this guide focuses on building useful, solid and distribution-friendly 6. AUTOCONF BUILDING BLOCKS: MACROS 6. Autoconf Building Blocks: Macros. The configuration stages of different software packages are never entirely unique. There are repetitive, similar (if not outright identical) tasks that have to be completed for different packages, with more or less sharing between them. To avoid repeating the same code over and over, most programming 4. FINDING LIBRARIES 4. Finding Libraries. 4.1. Searching For System Libraries. When using autoconf for portability, it's necessary to consider that some functions, even standard system ones, are often in different libraries on different operating systems. For instance, the dlopen () function is in libdl on GNU/Linux, and in the standard C library on FreeBSD and 3. SILENT BUILDING WITH AUTOMAKE 3. Silent Building with Automake. The “classical” Makefiles generated by automake up to and including version 1.11 have always been very verbose, during build, printing the full command line of every stage. Albeit this is very helpful during debugging, the practise has been criticised, especially as the Linux kernel, andother build systems
3. ADDING OPTIONS
3. Adding Options. 3. Adding Options. One of the most important features available to developers who use autoconf is certainly the ability to add new options to the ./configure execution, to provide optional build-time support to users. Unfortunately, because of the importance of this feature, it's also one the most commonly misused. 6. CONDITIONAL BUILDS 6. Conditional Builds. It is common for source files or build flags to only be needed conditionally, for example if they are only needed on particular host operating systems, or they implement an optional feature. To implement conditionality, automake provides the AM_CONDITIONAL macro, and conditional blocks in Makefile.am files. 3. THE PKG_CHECK_MODULES MACRO 3. The PKG_CHECK_MODULES Macro. The main interface between autoconf and pkg-config is the PKG_CHECK_MODULES macro, which provides a very basic and easy way to check for the presence of a given package in the system. Nonetheless, there are some 4. LIBRARY VERSIONING 4. Library Versioning. One of the hardest part during the development of a library package is handling of version information, as it relates to the binary interface exposed by said libraries and is, thus, governed by those rules rather than what is a more human readable release version. To understand what libtool support, in term ofversion
2. CANONICAL SYSTEMS 2. Canonical Systems. 2. Canonical Systems. When using autoconf, there are three system definitions (or machine definitions) that are used to identify the “actors” in the build process; each definition relates to a similarly-named variable which will be illustrated in detail later. These three definitions are: The system that is going to 3. EXPOSING AND HIDING SYMBOLS 3. Exposing and Hiding Symbols. 3. Exposing and Hiding Symbols. For shared objects to be helpful, both in case of dynamic libraries and plugins, they have to expose (or export) an interface to the other programs. This interface is composed of named functions and data symbols, that can be accessed either by linking to the library or byusing
AUTOTOOLS MYTHBUSTER Autotools Mythbuster is a no-nonsense guide to Autotools, written with the idea of providing a full, integrated view of the tools in the GNU build chain: autoconf, automake, libtool, pkg-config, and so on. Instead of providing a full detailing of the workings of the components, which most consumers are not interested on, this guide focuses on building useful, solid and distribution-friendly 6. AUTOCONF BUILDING BLOCKS: MACROS 6. Autoconf Building Blocks: Macros. The configuration stages of different software packages are never entirely unique. There are repetitive, similar (if not outright identical) tasks that have to be completed for different packages, with more or less sharing between them. To avoid repeating the same code over and over, most programming 4. FINDING LIBRARIES 4. Finding Libraries. 4.1. Searching For System Libraries. When using autoconf for portability, it's necessary to consider that some functions, even standard system ones, are often in different libraries on different operating systems. For instance, the dlopen () function is in libdl on GNU/Linux, and in the standard C library on FreeBSD and 3. SILENT BUILDING WITH AUTOMAKE 3. Silent Building with Automake. The “classical” Makefiles generated by automake up to and including version 1.11 have always been very verbose, during build, printing the full command line of every stage. Albeit this is very helpful during debugging, the practise has been criticised, especially as the Linux kernel, andother build systems
3. ADDING OPTIONS
3. Adding Options. 3. Adding Options. One of the most important features available to developers who use autoconf is certainly the ability to add new options to the ./configure execution, to provide optional build-time support to users. Unfortunately, because of the importance of this feature, it's also one the most commonly misused. 6. CONDITIONAL BUILDS 6. Conditional Builds. It is common for source files or build flags to only be needed conditionally, for example if they are only needed on particular host operating systems, or they implement an optional feature. To implement conditionality, automake provides the AM_CONDITIONAL macro, and conditional blocks in Makefile.am files. 3. THE PKG_CHECK_MODULES MACRO 3. The PKG_CHECK_MODULES Macro. The main interface between autoconf and pkg-config is the PKG_CHECK_MODULES macro, which provides a very basic and easy way to check for the presence of a given package in the system. Nonetheless, there are some 4. LIBRARY VERSIONING 4. Library Versioning. One of the hardest part during the development of a library package is handling of version information, as it relates to the binary interface exposed by said libraries and is, thus, governed by those rules rather than what is a more human readable release version. To understand what libtool support, in term ofversion
2. CANONICAL SYSTEMS 2. Canonical Systems. 2. Canonical Systems. When using autoconf, there are three system definitions (or machine definitions) that are used to identify the “actors” in the build process; each definition relates to a similarly-named variable which will be illustrated in detail later. These three definitions are: The system that is going to 3. EXPOSING AND HIDING SYMBOLS 3. Exposing and Hiding Symbols. 3. Exposing and Hiding Symbols. For shared objects to be helpful, both in case of dynamic libraries and plugins, they have to expose (or export) an interface to the other programs. This interface is composed of named functions and data symbols, that can be accessed either by linking to the library or byusing
CHAPTER 1. CONFIGURING THE BUILD Caching Results. Configuring the build consists of running a series of tests to identify the build environment and the presence of the required tools and libraries. It is a crucial step in allowing portability between different operating systems to detect this build environment system. In the autotools chain, this is done by theautoconf tool.
3. SILENT BUILDING WITH AUTOMAKE 3. Silent Building with Automake. The “classical” Makefiles generated by automake up to and including version 1.11 have always been very verbose, during build, printing the full command line of every stage. Albeit this is very helpful during debugging, the practise has been criticised, especially as the Linux kernel, andother build systems
1. AVAILABLE OPTIONS 1. Available options. There is a series of options that can be given to automake, to change its default behaviour to something that more suits the need of the single project. These options are usually passed to the AM_INIT_AUTOMAKE macro, but most can also be passed via the variable AUTOMAKE_OPTIONS in the top-level Makefile.am. APPENDIX A. WHO'S AFRAID OF AUTOTOOLS? 1. Basic Autotoolization. 2. Adding libtool. While the whole guide is designed toward explaining the mechanisms and the behaviour of autotools, it was never meant, by itself, to be a tutorial. This appendix should cover those basis, by providing an easy path on writing an autotools build system for your project. 1. BasicAutotoolization.
5. CUSTOM AUTOCONF TESTS 5. Custom Autoconf Tests. 5. Custom Autoconf Tests. While autoconf provides a number of pre-written tests to identify presence of headers, symbols and libraries, they obviously don't cover the whole range of possible situations that software developers might be facing to recognise the environment that their software is being built on.1. LIBTOOL WRAPPERS
1. libtool wrappers. 1. libtool. wrappers. When building programs with the help of libtool, your targets in the build directory consist of shell scripts, instead of the final ELF executable files. These shell scripts are designed to workaround some limitations present when working with shared objects in different operating systems.1. M4SH - AUTOTOOLS
1. M4sh. 1. M4sh. While the result of the autoconf stage is a complete script compatible with POSIX sh , the language used to write the configure.ac is called M4sh, to make clear that it's based off both sh and the macro language M4. The reason the M4sh language is often confused with simple sh syntax is because it actually is based on that 3. EXPOSING AND HIDING SYMBOLS 3. Exposing and Hiding Symbols. 3. Exposing and Hiding Symbols. For shared objects to be helpful, both in case of dynamic libraries and plugins, they have to expose (or export) an interface to the other programs. This interface is composed of named functions and data symbols, that can be accessed either by linking to the library or byusing
5. MAINTAINER MODE AND THE MISSING SCRIPT 5. Maintainer mode and the missing script. It is common, both during the development of a project, or during the packaging phase, to edit the source files of the build system, configure.ac , Makefile.am and so on. Depending on which files are modified, it is possible that one or more tools of the Autotools stack need to be executed to produce a 4. ADDITIONAL VARIABLES 4. Additional Variables. As seen in Section 1, “File Format of *.pc Files”, pkg-config allows the definition of arbitrary variables, in addition to the fixed-meaning keywords. The use of arbitrary variables is often used to provide information decided at build-time but not necessarily consumed by AUTOTOOLS MYTHBUSTER Autotools Mythbuster is a no-nonsense guide to Autotools, written with the idea of providing a full, integrated view of the tools in the GNU build chain: autoconf, automake, libtool, pkg-config, and so on. Instead of providing a full detailing of the workings of the components, which most consumers are not interested on, this guide focuses on building useful, solid and distribution-friendly 6. AUTOCONF BUILDING BLOCKS: MACROS 6. Autoconf Building Blocks: Macros. The configuration stages of different software packages are never entirely unique. There are repetitive, similar (if not outright identical) tasks that have to be completed for different packages, with more or less sharing between them. To avoid repeating the same code over and over, most programming CHAPTER 1. CONFIGURING THE BUILD Caching Results. Configuring the build consists of running a series of tests to identify the build environment and the presence of the required tools and libraries. It is a crucial step in allowing portability between different operating systems to detect this build environment system. In the autotools chain, this is done by theautoconf tool.
4. FINDING LIBRARIES 4. Finding Libraries. 4.1. Searching For System Libraries. When using autoconf for portability, it's necessary to consider that some functions, even standard system ones, are often in different libraries on different operating systems. For instance, the dlopen () function is in libdl on GNU/Linux, and in the standard C library on FreeBSD and 3. SILENT BUILDING WITH AUTOMAKE 3. Silent Building with Automake. The “classical” Makefiles generated by automake up to and including version 1.11 have always been very verbose, during build, printing the full command line of every stage. Albeit this is very helpful during debugging, the practise has been criticised, especially as the Linux kernel, andother build systems
6. CONDITIONAL BUILDS 6. Conditional Builds. It is common for source files or build flags to only be needed conditionally, for example if they are only needed on particular host operating systems, or they implement an optional feature. To implement conditionality, automake provides the AM_CONDITIONAL macro, and conditional blocks in Makefile.am files.3. ADDING OPTIONS
3. Adding Options. 3. Adding Options. One of the most important features available to developers who use autoconf is certainly the ability to add new options to the ./configure execution, to provide optional build-time support to users. Unfortunately, because of the importance of this feature, it's also one the most commonly misused. 3. THE PKG_CHECK_MODULES MACRO 3. The PKG_CHECK_MODULES Macro. The main interface between autoconf and pkg-config is the PKG_CHECK_MODULES macro, which provides a very basic and easy way to check for the presence of a given package in the system. Nonetheless, there are some 2. CANONICAL SYSTEMS 2. Canonical Systems. 2. Canonical Systems. When using autoconf, there are three system definitions (or machine definitions) that are used to identify the “actors” in the build process; each definition relates to a similarly-named variable which will be illustrated in detail later. These three definitions are: The system that is going to 3. EXPOSING AND HIDING SYMBOLS 3. Exposing and Hiding Symbols. 3. Exposing and Hiding Symbols. For shared objects to be helpful, both in case of dynamic libraries and plugins, they have to expose (or export) an interface to the other programs. This interface is composed of named functions and data symbols, that can be accessed either by linking to the library or byusing
AUTOTOOLS MYTHBUSTER Autotools Mythbuster is a no-nonsense guide to Autotools, written with the idea of providing a full, integrated view of the tools in the GNU build chain: autoconf, automake, libtool, pkg-config, and so on. Instead of providing a full detailing of the workings of the components, which most consumers are not interested on, this guide focuses on building useful, solid and distribution-friendly 6. AUTOCONF BUILDING BLOCKS: MACROS 6. Autoconf Building Blocks: Macros. The configuration stages of different software packages are never entirely unique. There are repetitive, similar (if not outright identical) tasks that have to be completed for different packages, with more or less sharing between them. To avoid repeating the same code over and over, most programming CHAPTER 1. CONFIGURING THE BUILD Caching Results. Configuring the build consists of running a series of tests to identify the build environment and the presence of the required tools and libraries. It is a crucial step in allowing portability between different operating systems to detect this build environment system. In the autotools chain, this is done by theautoconf tool.
4. FINDING LIBRARIES 4. Finding Libraries. 4.1. Searching For System Libraries. When using autoconf for portability, it's necessary to consider that some functions, even standard system ones, are often in different libraries on different operating systems. For instance, the dlopen () function is in libdl on GNU/Linux, and in the standard C library on FreeBSD and 3. SILENT BUILDING WITH AUTOMAKE 3. Silent Building with Automake. The “classical” Makefiles generated by automake up to and including version 1.11 have always been very verbose, during build, printing the full command line of every stage. Albeit this is very helpful during debugging, the practise has been criticised, especially as the Linux kernel, andother build systems
6. CONDITIONAL BUILDS 6. Conditional Builds. It is common for source files or build flags to only be needed conditionally, for example if they are only needed on particular host operating systems, or they implement an optional feature. To implement conditionality, automake provides the AM_CONDITIONAL macro, and conditional blocks in Makefile.am files.3. ADDING OPTIONS
3. Adding Options. 3. Adding Options. One of the most important features available to developers who use autoconf is certainly the ability to add new options to the ./configure execution, to provide optional build-time support to users. Unfortunately, because of the importance of this feature, it's also one the most commonly misused. 3. THE PKG_CHECK_MODULES MACRO 3. The PKG_CHECK_MODULES Macro. The main interface between autoconf and pkg-config is the PKG_CHECK_MODULES macro, which provides a very basic and easy way to check for the presence of a given package in the system. Nonetheless, there are some 2. CANONICAL SYSTEMS 2. Canonical Systems. 2. Canonical Systems. When using autoconf, there are three system definitions (or machine definitions) that are used to identify the “actors” in the build process; each definition relates to a similarly-named variable which will be illustrated in detail later. These three definitions are: The system that is going to 3. EXPOSING AND HIDING SYMBOLS 3. Exposing and Hiding Symbols. 3. Exposing and Hiding Symbols. For shared objects to be helpful, both in case of dynamic libraries and plugins, they have to expose (or export) an interface to the other programs. This interface is composed of named functions and data symbols, that can be accessed either by linking to the library or byusing
CHAPTER 1. CONFIGURING THE BUILD Caching Results. Configuring the build consists of running a series of tests to identify the build environment and the presence of the required tools and libraries. It is a crucial step in allowing portability between different operating systems to detect this build environment system. In the autotools chain, this is done by theautoconf tool.
3. SILENT BUILDING WITH AUTOMAKE 3. Silent Building with Automake. The “classical” Makefiles generated by automake up to and including version 1.11 have always been very verbose, during build, printing the full command line of every stage. Albeit this is very helpful during debugging, the practise has been criticised, especially as the Linux kernel, andother build systems
APPENDIX A. WHO'S AFRAID OF AUTOTOOLS? 1. Basic Autotoolization. 2. Adding libtool. While the whole guide is designed toward explaining the mechanisms and the behaviour of autotools, it was never meant, by itself, to be a tutorial. This appendix should cover those basis, by providing an easy path on writing an autotools build system for your project. 1. BasicAutotoolization.
1. AVAILABLE OPTIONS 1. Available options. There is a series of options that can be given to automake, to change its default behaviour to something that more suits the need of the single project. These options are usually passed to the AM_INIT_AUTOMAKE macro, but most can also be passed via the variable AUTOMAKE_OPTIONS in the top-level Makefile.am.1. LIBTOOL WRAPPERS
1. libtool wrappers. 1. libtool. wrappers. When building programs with the help of libtool, your targets in the build directory consist of shell scripts, instead of the final ELF executable files. These shell scripts are designed to workaround some limitations present when working with shared objects in different operating systems. 5. CUSTOM AUTOCONF TESTS 5. Custom Autoconf Tests. 5. Custom Autoconf Tests. While autoconf provides a number of pre-written tests to identify presence of headers, symbols and libraries, they obviously don't cover the whole range of possible situations that software developers might be facing to recognise the environment that their software is being built on. 3. EXPOSING AND HIDING SYMBOLS 3. Exposing and Hiding Symbols. 3. Exposing and Hiding Symbols. For shared objects to be helpful, both in case of dynamic libraries and plugins, they have to expose (or export) an interface to the other programs. This interface is composed of named functions and data symbols, that can be accessed either by linking to the library or byusing
1. M4SH - AUTOTOOLS
1. M4sh. 1. M4sh. While the result of the autoconf stage is a complete script compatible with POSIX sh , the language used to write the configure.ac is called M4sh, to make clear that it's based off both sh and the macro language M4. The reason the M4sh language is often confused with simple sh syntax is because it actually is based on that 5. MAINTAINER MODE AND THE MISSING SCRIPT 5. Maintainer mode and the missing script. It is common, both during the development of a project, or during the packaging phase, to edit the source files of the build system, configure.ac , Makefile.am and so on. Depending on which files are modified, it is possible that one or more tools of the Autotools stack need to be executed to produce a 5. SUPPORTING CROSS-COMPILATION 5. Supporting Cross-Compilation. The design of the current pkg-config application and the interface of PKG_PROG_PKG_CONFIG allows them to be instrumental in proper cross-compilation of software, when used correctly. This only requires following a few simple rules. 5.1. AUTOTOOLS MYTHBUSTER Autotools Mythbuster is a no-nonsense guide to Autotools, written with the idea of providing a full, integrated view of the tools in the GNU build chain: autoconf, automake, libtool, pkg-config, and so on. Instead of providing a full detailing of the workings of the components, which most consumers are not interested on, this guide focuses on building useful, solid and distribution-friendly CHAPTER 1. CONFIGURING THE BUILD Caching Results. Configuring the build consists of running a series of tests to identify the build environment and the presence of the required tools and libraries. It is a crucial step in allowing portability between different operating systems to detect this build environment system. In the autotools chain, this is done by theautoconf tool.
6. AUTOCONF BUILDING BLOCKS: MACROS 6. Autoconf Building Blocks: Macros. The configuration stages of different software packages are never entirely unique. There are repetitive, similar (if not outright identical) tasks that have to be completed for different packages, with more or less sharing between them. To avoid repeating the same code over and over, most programming 4. FINDING LIBRARIES 4. Finding Libraries. 4.1. Searching For System Libraries. When using autoconf for portability, it's necessary to consider that some functions, even standard system ones, are often in different libraries on different operating systems. For instance, the dlopen () function is in libdl on GNU/Linux, and in the standard C library on FreeBSD and APPENDIX A. WHO'S AFRAID OF AUTOTOOLS? 1. Basic Autotoolization. 2. Adding libtool. While the whole guide is designed toward explaining the mechanisms and the behaviour of autotools, it was never meant, by itself, to be a tutorial. This appendix should cover those basis, by providing an easy path on writing an autotools build system for your project. 1. BasicAutotoolization.
3. SILENT BUILDING WITH AUTOMAKE 3. Silent Building with Automake. The “classical” Makefiles generated by automake up to and including version 1.11 have always been very verbose, during build, printing the full command line of every stage. Albeit this is very helpful during debugging, the practise has been criticised, especially as the Linux kernel, andother build systems
3. THE PKG_CHECK_MODULES MACRO 3. The PKG_CHECK_MODULES Macro. The main interface between autoconf and pkg-config is the PKG_CHECK_MODULES macro, which provides a very basic and easy way to check for the presence of a given package in the system. Nonetheless, there are some 6. CONDITIONAL BUILDS 6. Conditional Builds. It is common for source files or build flags to only be needed conditionally, for example if they are only needed on particular host operating systems, or they implement an optional feature. To implement conditionality, automake provides the AM_CONDITIONAL macro, and conditional blocks in Makefile.am files.3. ADDING OPTIONS
3. Adding Options. 3. Adding Options. One of the most important features available to developers who use autoconf is certainly the ability to add new options to the ./configure execution, to provide optional build-time support to users. Unfortunately, because of the importance of this feature, it's also one the most commonly misused. CHAPTER 4. DEPENDENCY DISCOVERY A no-nonsense guide to Autotools by Diego Elio Pettenò. Discovering the presence of libraries through autoconf as described in Section 4, “Finding Libraries” is somewhat limiting; it does not allow for the library to provide specific information about the flags it needs to compile against (such as threading flags), nor does it allow us to properly pass other libraries we need to link to. AUTOTOOLS MYTHBUSTER Autotools Mythbuster is a no-nonsense guide to Autotools, written with the idea of providing a full, integrated view of the tools in the GNU build chain: autoconf, automake, libtool, pkg-config, and so on. Instead of providing a full detailing of the workings of the components, which most consumers are not interested on, this guide focuses on building useful, solid and distribution-friendly CHAPTER 1. CONFIGURING THE BUILD Caching Results. Configuring the build consists of running a series of tests to identify the build environment and the presence of the required tools and libraries. It is a crucial step in allowing portability between different operating systems to detect this build environment system. In the autotools chain, this is done by theautoconf tool.
6. AUTOCONF BUILDING BLOCKS: MACROS 6. Autoconf Building Blocks: Macros. The configuration stages of different software packages are never entirely unique. There are repetitive, similar (if not outright identical) tasks that have to be completed for different packages, with more or less sharing between them. To avoid repeating the same code over and over, most programming 4. FINDING LIBRARIES 4. Finding Libraries. 4.1. Searching For System Libraries. When using autoconf for portability, it's necessary to consider that some functions, even standard system ones, are often in different libraries on different operating systems. For instance, the dlopen () function is in libdl on GNU/Linux, and in the standard C library on FreeBSD and APPENDIX A. WHO'S AFRAID OF AUTOTOOLS? 1. Basic Autotoolization. 2. Adding libtool. While the whole guide is designed toward explaining the mechanisms and the behaviour of autotools, it was never meant, by itself, to be a tutorial. This appendix should cover those basis, by providing an easy path on writing an autotools build system for your project. 1. BasicAutotoolization.
3. SILENT BUILDING WITH AUTOMAKE 3. Silent Building with Automake. The “classical” Makefiles generated by automake up to and including version 1.11 have always been very verbose, during build, printing the full command line of every stage. Albeit this is very helpful during debugging, the practise has been criticised, especially as the Linux kernel, andother build systems
3. THE PKG_CHECK_MODULES MACRO 3. The PKG_CHECK_MODULES Macro. The main interface between autoconf and pkg-config is the PKG_CHECK_MODULES macro, which provides a very basic and easy way to check for the presence of a given package in the system. Nonetheless, there are some 6. CONDITIONAL BUILDS 6. Conditional Builds. It is common for source files or build flags to only be needed conditionally, for example if they are only needed on particular host operating systems, or they implement an optional feature. To implement conditionality, automake provides the AM_CONDITIONAL macro, and conditional blocks in Makefile.am files.3. ADDING OPTIONS
3. Adding Options. 3. Adding Options. One of the most important features available to developers who use autoconf is certainly the ability to add new options to the ./configure execution, to provide optional build-time support to users. Unfortunately, because of the importance of this feature, it's also one the most commonly misused. CHAPTER 4. DEPENDENCY DISCOVERY A no-nonsense guide to Autotools by Diego Elio Pettenò. Discovering the presence of libraries through autoconf as described in Section 4, “Finding Libraries” is somewhat limiting; it does not allow for the library to provide specific information about the flags it needs to compile against (such as threading flags), nor does it allow us to properly pass other libraries we need to link to. AUTOTOOLS MYTHBUSTER Autotools Mythbuster is a no-nonsense guide to Autotools, written with the idea of providing a full, integrated view of the tools in the GNU build chain: autoconf, automake, libtool, pkg-config, and so on. Instead of providing a full detailing of the workings of the components, which most consumers are not interested on, this guide focuses on building useful, solid and distribution-friendly APPENDIX A. WHO'S AFRAID OF AUTOTOOLS? 1. Basic Autotoolization. 2. Adding libtool. While the whole guide is designed toward explaining the mechanisms and the behaviour of autotools, it was never meant, by itself, to be a tutorial. This appendix should cover those basis, by providing an easy path on writing an autotools build system for your project. 1. BasicAutotoolization.
5. CUSTOM AUTOCONF TESTS 5. Custom Autoconf Tests. 5. Custom Autoconf Tests. While autoconf provides a number of pre-written tests to identify presence of headers, symbols and libraries, they obviously don't cover the whole range of possible situations that software developers might be facing to recognise the environment that their software is being built on. APPENDIX C. FURTHER READINGS Appendix C. Further Readings. While the goal of this guide is to provide a comprehensive and extensive documentation on autotools and all tools related to them, it will take a long time before it can be said to be self-sufficient. Until that time, I'd like to point out some further readings that will provide pointers, or referencematerial
2. CHANGES IN AUTOMAKE RELEASE 2.5. automake 2.0. Starting with version 1.13, automake versioning scheme has changes so that backward-incompatible changes are only present in major version. The next major version of automake is version 2.0. This new version was promised for 2013, but has not been released yet as of writing in 2016.1. LIBTOOL WRAPPERS
1. libtool wrappers. 1. libtool. wrappers. When building programs with the help of libtool, your targets in the build directory consist of shell scripts, instead of the final ELF executable files. These shell scripts are designed to workaround some limitations present when working with shared objects in different operating systems. 2. CANONICAL SYSTEMS 2. Canonical Systems. 2. Canonical Systems. When using autoconf, there are three system definitions (or machine definitions) that are used to identify the “actors” in the build process; each definition relates to a similarly-named variable which will be illustrated in detail later. These three definitions are: The system that is going to 5. MAINTAINER MODE AND THE MISSING SCRIPT 5. Maintainer mode and the missing script. It is common, both during the development of a project, or during the packaging phase, to edit the source files of the build system, configure.ac , Makefile.am and so on. Depending on which files are modified, it is possible that one or more tools of the Autotools stack need to be executed to produce a CHAPTER 4. DEPENDENCY DISCOVERY A no-nonsense guide to Autotools by Diego Elio Pettenò. Discovering the presence of libraries through autoconf as described in Section 4, “Finding Libraries” is somewhat limiting; it does not allow for the library to provide specific information about the flags it needs to compile against (such as threading flags), nor does it allow us to properly pass other libraries we need to link to. 2. NON-RECURSIVE AUTOMAKE One of the common criticisms of automake is that most projects that make use of it use multiple Makefile.am files, one per sub-directory of the project, causing pollution, confusion and further problems. For quite a while, though, automake supports non-recursive builds, with a single Makefile.am (or at least a reduced number of those). AUTOTOOLS MYTHBUSTER Autotools Mythbuster is a no-nonsense guide to Autotools, written with the idea of providing a full, integrated view of the tools in the GNU build chain: autoconf, automake, libtool, pkg-config, and so on. Instead of providing a full detailing of the workings of the components, which most consumers are not interested on, this guide focuses on building useful, solid and distribution-friendly 6. AUTOCONF BUILDING BLOCKS: MACROS 6. Autoconf Building Blocks: Macros. The configuration stages of different software packages are never entirely unique. There are repetitive, similar (if not outright identical) tasks that have to be completed for different packages, with more or less sharing between them. To avoid repeating the same code over and over, most programming 5. CUSTOM AUTOCONF TESTS 5. Custom Autoconf Tests. 5. Custom Autoconf Tests. While autoconf provides a number of pre-written tests to identify presence of headers, symbols and libraries, they obviously don't cover the whole range of possible situations that software developers might be facing to recognise the environment that their software is being built on. 4. FINDING LIBRARIES 4. Finding Libraries. 4.1. Searching For System Libraries. When using autoconf for portability, it's necessary to consider that some functions, even standard system ones, are often in different libraries on different operating systems. For instance, the dlopen () function is in libdl on GNU/Linux, and in the standard C library on FreeBSD and APPENDIX A. WHO'S AFRAID OF AUTOTOOLS? 1. Basic Autotoolization. 2. Adding libtool. While the whole guide is designed toward explaining the mechanisms and the behaviour of autotools, it was never meant, by itself, to be a tutorial. This appendix should cover those basis, by providing an easy path on writing an autotools build system for your project. 1. BasicAutotoolization.
3. ADDING OPTIONS
3. Adding Options. 3. Adding Options. One of the most important features available to developers who use autoconf is certainly the ability to add new options to the ./configure execution, to provide optional build-time support to users. Unfortunately, because of the importance of this feature, it's also one the most commonly misused. APPENDIX C. FURTHER READINGS Appendix C. Further Readings. While the goal of this guide is to provide a comprehensive and extensive documentation on autotools and all tools related to them, it will take a long time before it can be said to be self-sufficient. Until that time, I'd like to point out some further readings that will provide pointers, or referencematerial
3. THE PKG_CHECK_MODULES MACRO 3. The PKG_CHECK_MODULES Macro. The main interface between autoconf and pkg-config is the PKG_CHECK_MODULES macro, which provides a very basic and easy way to check for the presence of a given package in the system. Nonetheless, there are some 2. CANONICAL SYSTEMS 2. Canonical Systems. 2. Canonical Systems. When using autoconf, there are three system definitions (or machine definitions) that are used to identify the “actors” in the build process; each definition relates to a similarly-named variable which will be illustrated in detail later. These three definitions are: The system that is going to CHAPTER 4. DEPENDENCY DISCOVERY A no-nonsense guide to Autotools by Diego Elio Pettenò. Discovering the presence of libraries through autoconf as described in Section 4, “Finding Libraries” is somewhat limiting; it does not allow for the library to provide specific information about the flags it needs to compile against (such as threading flags), nor does it allow us to properly pass other libraries we need to link to. AUTOTOOLS MYTHBUSTER Autotools Mythbuster is a no-nonsense guide to Autotools, written with the idea of providing a full, integrated view of the tools in the GNU build chain: autoconf, automake, libtool, pkg-config, and so on. Instead of providing a full detailing of the workings of the components, which most consumers are not interested on, this guide focuses on building useful, solid and distribution-friendly 6. AUTOCONF BUILDING BLOCKS: MACROS 6. Autoconf Building Blocks: Macros. The configuration stages of different software packages are never entirely unique. There are repetitive, similar (if not outright identical) tasks that have to be completed for different packages, with more or less sharing between them. To avoid repeating the same code over and over, most programming 5. CUSTOM AUTOCONF TESTS 5. Custom Autoconf Tests. 5. Custom Autoconf Tests. While autoconf provides a number of pre-written tests to identify presence of headers, symbols and libraries, they obviously don't cover the whole range of possible situations that software developers might be facing to recognise the environment that their software is being built on. 4. FINDING LIBRARIES 4. Finding Libraries. 4.1. Searching For System Libraries. When using autoconf for portability, it's necessary to consider that some functions, even standard system ones, are often in different libraries on different operating systems. For instance, the dlopen () function is in libdl on GNU/Linux, and in the standard C library on FreeBSD and APPENDIX A. WHO'S AFRAID OF AUTOTOOLS? 1. Basic Autotoolization. 2. Adding libtool. While the whole guide is designed toward explaining the mechanisms and the behaviour of autotools, it was never meant, by itself, to be a tutorial. This appendix should cover those basis, by providing an easy path on writing an autotools build system for your project. 1. BasicAutotoolization.
3. ADDING OPTIONS
3. Adding Options. 3. Adding Options. One of the most important features available to developers who use autoconf is certainly the ability to add new options to the ./configure execution, to provide optional build-time support to users. Unfortunately, because of the importance of this feature, it's also one the most commonly misused. APPENDIX C. FURTHER READINGS Appendix C. Further Readings. While the goal of this guide is to provide a comprehensive and extensive documentation on autotools and all tools related to them, it will take a long time before it can be said to be self-sufficient. Until that time, I'd like to point out some further readings that will provide pointers, or referencematerial
3. THE PKG_CHECK_MODULES MACRO 3. The PKG_CHECK_MODULES Macro. The main interface between autoconf and pkg-config is the PKG_CHECK_MODULES macro, which provides a very basic and easy way to check for the presence of a given package in the system. Nonetheless, there are some 2. CANONICAL SYSTEMS 2. Canonical Systems. 2. Canonical Systems. When using autoconf, there are three system definitions (or machine definitions) that are used to identify the “actors” in the build process; each definition relates to a similarly-named variable which will be illustrated in detail later. These three definitions are: The system that is going to CHAPTER 4. DEPENDENCY DISCOVERY A no-nonsense guide to Autotools by Diego Elio Pettenò. Discovering the presence of libraries through autoconf as described in Section 4, “Finding Libraries” is somewhat limiting; it does not allow for the library to provide specific information about the flags it needs to compile against (such as threading flags), nor does it allow us to properly pass other libraries we need to link to. AUTOTOOLS MYTHBUSTER Autotools Mythbuster is a no-nonsense guide to Autotools, written with the idea of providing a full, integrated view of the tools in the GNU build chain: autoconf, automake, libtool, pkg-config, and so on. Instead of providing a full detailing of the workings of the components, which most consumers are not interested on, this guide focuses on building useful, solid and distribution-friendlyPREFACE - AUTOTOOLS
1. Foreword. This book is an organised collection of documentation on the suite of software usually referred to as autotools; this suite, developed by the GNU project, consists of tools such as autoconf, automake , libtool and other tools that were introduced by FreeDesktop.org, such as pkg-config . This collection finds its rootsin my blog.
APPENDIX C. FURTHER READINGS Appendix C. Further Readings. While the goal of this guide is to provide a comprehensive and extensive documentation on autotools and all tools related to them, it will take a long time before it can be said to be self-sufficient. Until that time, I'd like to point out some further readings that will provide pointers, or referencematerial
CHAPTER 3. BUILDING ALL KINDS OF LIBRARIES A no-nonsense guide to Autotools by Diego Elio Pettenò. While autotools are vastly considered black magic, because they tend to show a black box abstracting lots of details about compilers, makefiles and dependencies, the component that can be truly said to be black magic is certainly libtool. The libtool script is a huge script that allows the developers to ignore, at least partially, all1. LIBTOOL WRAPPERS
1. libtool wrappers. 1. libtool. wrappers. When building programs with the help of libtool, your targets in the build directory consist of shell scripts, instead of the final ELF executable files. These shell scripts are designed to workaround some limitations present when working with shared objects in different operating systems. 2. CHANGES IN AUTOMAKE RELEASE 2.5. automake 2.0. Starting with version 1.13, automake versioning scheme has changes so that backward-incompatible changes are only present in major version. The next major version of automake is version 2.0. This new version was promised for 2013, but has not been released yet as of writing in 2016. CHAPTER 5. FORWARD PORTING NOTES 1. Changes in autoconf releases. 2. Changes in automake release. 3. Changes in libtool releases. Like most software, autoconf , automake and the rest of the autotools family are not set in stone. Each new release strives to improve itself and the way it is used. This causes a phenomenon of "bit-rotting", similar to the one caused by compilers 6. CONDITIONAL BUILDS 6. Conditional Builds. It is common for source files or build flags to only be needed conditionally, for example if they are only needed on particular host operating systems, or they implement an optional feature. To implement conditionality, automake provides the AM_CONDITIONAL macro, and conditional blocks in Makefile.am files. CHAPTER 2. HARNESSING MAKE Chapter 2. Harnessing Make — automake Table of Contents. 1. Available options 2. Non-recursive Automake 3. Silent Building withAutomake
1. M4SH - AUTOTOOLS
1. M4sh. 1. M4sh. While the result of the autoconf stage is a complete script compatible with POSIX sh , the language used to write the configure.ac is called M4sh, to make clear that it's based off both sh and the macro language M4. The reason the M4sh language is often confused with simple sh syntax is because it actually is based on that Autotools MythbusterNext
AUTOTOOLS MYTHBUSTER DIEGO ELIO “FLAMEEYES” PETTENÒ Author and Publisherlicense.
ABSTRACT
Autotools Mythbuster is a no-nonsense guide to Autotools, written with the idea of providing a full, integrated view of the tools in the GNU build chain: autoconf, automake, libtool, pkg-config, and so on. Instead of providing a full detailing of the workings of the components, which most consumers are not interested on, this guide focuses on building useful, solid and distribution-friendly packages, that developers can submit to distributions without having to jump through hoops to get them accepted. Autotools Mythbuster is available as an eBook for those who want to read or reference it online. Profits from its sales are used to pay for hosting and domain name registration. You can find the book on all major Amazon websites, as well as Kobo and their franchises.*
Amazon (US, UK, CA)
*
Amazon Germany
*
Amazon France
*
Amazon Italy
-------------------------TABLE OF CONTENTS
* Preface
* 1. Foreword * 2. Why another guide about autotools? * 3. How doesthis work?
* 1. Configuring The Build — autoconf * 1. M4sh * 2. Canonical Systems* 3. Adding Options
* 4. Finding Libraries * 5. Custom Autoconf Tests * 6. Autoconf Building Blocks: Macros * 7. Caching Results * 2. Harnessing Make — automake * 1. Available options * 2. Non-recursive Automake * 3. Silent Building with Automake * 4. Parallel Building Tricks * 5. Maintainer mode and the missing script * 6. Conditional Builds * 3. Building All Kinds of Libraries — libtool * 1. libtool wrappers * 2. Building plugins * 3. Exposing and Hiding Symbols * 4. Library Versioning * 5. Notes on Windows Support * 6. Libtool Archives * 4. Dependency discovery — pkg-config * 1. File Format of *.pc Files * 2. Dependencies * 3. The PKG_CHECK_MODULES Macro * 4. Additional Variables * 5. Supporting Cross-Compilation * 5. Forward Porting Notes * 1. Changes in autoconf releases * 2. Changes in automake release * 3. Changes in libtool releases * Glossary * Index * A. Who's afraid of Autotools? * 1. Basic Autotoolization * 2.Adding libtool
* B. License
* C. Further Readings * D. ExamplesLIST OF EXAMPLES
* 1.1. Using AC_ARG_ENABLE without actions * 1.2. Using AC_ARG_WITH to declare automatic dependencies. * 1.3. Looking for two common system libraries with AC_SEARCH_LIBS * 1.4. header present but cannot be compiled: wrong language dialect* 1.5. Including an
External Macro File without automake * 2.1. Passing simple automake options * 2.2. Grouping tests together in a non-recursive Makefile.am* 2.3. Using Silent
Rules Without Forcing Automake 1.11 * 2.4. Silent Custom Rule to Generate a File * 2.5. Common case of broken install-exec-local target (directory assumed to be present) * 2.6. Common case of broken install-exec-local target (directory created on a race condition) * 2.7. Correct install-exec-local using AC_PROG_MKDIR_P* 2.8. Suggested
configuration for automake maintainer mode* 2.9. Using
AM_CONDITIONAL with configure Options * 3.1. building a test program optimised for in-place execution * 3.2. Buildsystem changes for bundled libltdl * 3.3. Checking for libltdl * 3.4. Building plug-ins for dlopen() usage * 3.5. Exposing symbols for plugins with fixed interface * 3.6. Exposing symbols for plugins with variable interface * 3.7. Exposing only the public interface of a library via -export-symbols-regex* 3.8.
Library versions for PE DLL * 4.1. Simple project's template file and configure.ac code.* 4.2. Example of
module specifications for PKG_CHECK_MODULES* 4.3. Reading
target path for plugins via PKG_CHECK_VAR * 4.4. Common pkg-config wrapper script for cross-compilation* 5.1. Safe
conversion of a configure.ac relying on AM_C_PROTOTYPES without de-ANSI-fication. * 5.2. Properly Fix missing C++ support with libtool 2.2 * D.1. configure.c.ac * D.2. configure.c99.ac* D.3.
thisonlyworksonc99.h Autotools Mythbuster by Diego Elio Pettenò. Licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.
Based on a work at autotools.io .Details
Copyright © 2024 ArchiveBay.com. All rights reserved. Terms of Use | Privacy Policy | DMCA | 2021 | Feedback | Advertising | RSS 2.0