𝔖 Scriptorium
✦   LIBER   ✦

πŸ“

Autotools: A Practitioner's Guide to GNU Autoconf, Automake, and Libtool

✍ Scribed by John Calcote


Publisher
No Starch Press
Year
2010
Tongue
English
Leaves
364
Edition
1
Category
Library

⬇  Acquire This Volume

No coin nor oath required. For personal study only.

✦ Synopsis


The GNU Autotools make it easy for developers to create software that is portable across many UNIX-like operating systems. Thousands of open source software packages use the Autotools, but the learning curve is unfortunately steep, and it can be difficult for a beginner to find anything more than basic reference material on using the powerful software suite.

In Autotools, author John Calcote begins with an overview of high-level concepts; then tackles more advanced topics, like using the M4 macro processor with Autoconf, extending the Automake framework, and building Java and C# sources.

You'll learn how to:

  • Master the Autotools build system to maximize your software's portability
  • Generate Autoconf configuration scripts to simplify the compilation process
  • Produce portable makefiles with Automake
  • Build cross-platform software libraries with Libtool
  • Write your own Autoconf macros

Autotools also includes a variety of complete projects that you're encouraged to work through to gain a real-world sense of how to become an Autotools practitioner. For example, you'll turn the FLAIM and Jupiter projects' hand-coded, makefile-based build systems into a powerful Autotools-based build system.

✦ Table of Contents


Brief Contents......Page 9
Contents in Detail......Page 11
Foreword......Page 17
Preface......Page 19
Introduction......Page 23
How This Book Is Organized......Page 24
Autotools Versions Used in This Book......Page 25
1: A Brief Introduction to the GNU Autotools......Page 27
When Should You Not Use the Autotools?......Page 28
Apple Platforms and Mac OS X......Page 29
The Choice of Language......Page 30
Generating Your Package Build System......Page 31
Autoconf......Page 32
Automake......Page 35
Libtool......Page 37
Building Your Package......Page 39
Installing the Most Up-to-Date Autotools......Page 42
Summary......Page 44
2: Understanding the GNU Coding Standards......Page 45
Creating a New Project Directory Structure......Page 46
Project Structure......Page 47
Makefile Basics......Page 48
Creating a Source Distribution Archive......Page 58
Automatically Testing a Distribution......Page 62
Unit Testing, Anyone?......Page 63
Installing Products......Page 64
The Filesystem Hierarchy Standard......Page 70
Supporting Standard Targets and Variables......Page 71
Getting Your Project into a Linux Distro......Page 74
Build vs. Installation Prefix Overrides......Page 76
User Variables......Page 78
Configuring Your Package......Page 80
Summary......Page 81
3: Configuring Your Project with Autoconf......Page 83
Autoconf Configuration Scripts......Page 84
The Shortest configure.ac File......Page 85
The Nature of M4 Macros......Page 86
Executing autoconf......Page 87
Executing configure......Page 88
Executing config.status......Page 89
Adding Some Real Functionality......Page 90
Generating Files from Templates......Page 93
Adding VPATH Build Functionality......Page 94
Let's Take a Breather......Page 96
An Even Quicker Start with autoscan......Page 97
Initialization and Package Information......Page 102
The Instantiating Macros......Page 104
Back to Remote Builds for a Moment......Page 113
Summary......Page 114
4: More Fun with Autoconf: Configuring User Options......Page 115
Substitutions and Definitions......Page 116
Checking for Compilers......Page 117
Checking for Other Programs......Page 119
A Common Problem with Autoconf......Page 121
Checks for Libraries and Header Files......Page 124
Supporting Optional Features and Packages......Page 133
Checks for Type and Structure Definitions......Page 138
The AC_OUTPUT Macro......Page 142
Summary......Page 143
5: Automatic Makefiles with Automake......Page 145
Getting Down to Business......Page 146
What's in a Makefile.am File?......Page 151
Analyzing Our New Build System......Page 152
Unit Tests: Supporting make check......Page 159
Reducing Complexity with Convenience Libraries......Page 160
Building the New Library......Page 164
What Goes into a Distribution?......Page 166
Maintainer Mode......Page 167
Cutting Through the Noise......Page 168
Summary......Page 170
6: Building Libraries with Libtool......Page 171
How Shared Libraries Work......Page 172
Using Libtool......Page 176
Adding Shared Libraries to Jupiter......Page 178
Summary......Page 196
7: Library Interface Versioning and Runtime Dynamic Linking......Page 197
System-Specific Versioning......Page 198
The Libtool Library Versioning Scheme......Page 202
Using libltdl......Page 207
Summary......Page 220
8: FLAIM: An Autotools Example......Page 221
Why FLAIM?......Page 222
An Initial Look......Page 223
Getting Started......Page 225
The FLAIM Subprojects......Page 230
Designing the XFLAIM Build System......Page 244
Summary......Page 253
9: FLAIM Part II: Pushing the Envelope......Page 255
Building Java Sources Using the Autotools......Page 256
Building the C# Sources......Page 265
Configuring Compiler Options......Page 269
Hooking Doxygen into the Build Process......Page 271
Adding Nonstandard Targets......Page 273
Summary......Page 276
10: Using the M4 Macro Processor with Autoconf......Page 277
M4 Text Processing......Page 278
The Recursive Nature of M4......Page 282
Autoconf and M4......Page 285
Writing Autoconf Macros......Page 286
Diagnosing Problems......Page 294
Summary......Page 295
11: A Catalog of Tips and Reusable Solutions for Creating Great Projects......Page 297
Item 1: Keeping Private Details out of Public Interfaces......Page 298
Item 2: Implementing Recursive Extension Targets......Page 302
Item 3: Using a Repository Revision Number in a Package Version......Page 305
Item 4: Ensuring Your Distribution Packages Are Clean......Page 307
Item 5: Hacking Autoconf Macros......Page 308
Item 6: Cross-Compiling......Page 313
Item 7: Emulating Autoconf Text Replacement Techniques......Page 319
Item 8: Using the ac-archive Project......Page 324
Item 9: Using pkg-config with Autotools......Page 325
Item 11: Using Generated Source Code......Page 328
Item 12: Disabling Undesirable Targets......Page 335
Item 13: Watch Those Tab Characters!......Page 336
Item 14: Packaging Choices......Page 337
Wrapping Up......Page 338
Index......Page 339

✦ Subjects


Π‘ΠΈΠ±Π»ΠΈΠΎΡ‚Π΅ΠΊΠ°;ΠšΠΎΠΌΠΏΡŒΡŽΡ‚Π΅Ρ€Π½Π°Ρ Π»ΠΈΡ‚Π΅Ρ€Π°Ρ‚ΡƒΡ€Π°;Linux / Unix;


πŸ“œ SIMILAR VOLUMES


Autotools: A Practitioner's Guide to GNU
✍ John Calcote πŸ“‚ Library πŸ“… 2010 πŸ› No Starch Press 🌐 English

<p>The GNU Autotools make it easy for developers to create software that is portable across many UNIX-like operating systems. Thousands of open source software packages use the Autotools, but the learning curve is unfortunately steep, and it can be difficult for a beginner to find anything more than

Autotools: A practitioner's guide to GNU
✍ John Calcote πŸ“‚ Library πŸ“… 2019 πŸ› No Starch Press 🌐 English

The long awaited update to the practitioner's guide to GNU Autoconf, Automake, and Libtool The GNU Autotools make it easy for developers to create software that is portable across many Unix-like operating systems, and even Windows. Although the Autotools are used by thousands of open source softw

Autotools: A Practitioner's Guide to GNU
✍ John Calcote πŸ“‚ Library πŸ“… 2019 πŸ› No Starch Press 🌐 English

The long awaited update to the practitioner's guide to GNU Autoconf, Automake, and Libtool The GNU Autotools make it easy for developers to create software that is portable across many Unix-like operating systems, and even Windows. Although the Autotools are used by thousands of open source softw

Autotools: A Practioner's Guide to GNU A
✍ John Calcote πŸ“‚ Library πŸ“… 2010 πŸ› No Starch Press 🌐 English

The GNU Autotools make it easy for developers to create software that is portable across many UNIX-like operating systems. Thousands of open source software packages use the Autotools, but the learning curve is unfortunately steep, and it can be difficult for a beginner to find anything more than ba

Autotools: A Practioner's Guide to GNU A
✍ John Calcote πŸ“‚ Library πŸ“… 2010 πŸ› No Starch Press 🌐 English

<p>The GNU Autotools make it easy for developers to create software that is portable across many UNIX-like operating systems. Thousands of open source software packages use the Autotools, but the learning curve is unfortunately steep, and it can be difficult for a beginner to find anything more than