Autotools: a Practitioner's Guide to Autoconf, Automake and Libtool 01/06/2008 18:52
Total Page:16
File Type:pdf, Size:1020Kb
Autotools: a practitioner's guide to Autoconf, Automake and Libtool 01/06/2008 18:52 REVIEWS NEWSLETTERS ADVERTISE SPONSORS HELP FSM WRITE FOR US CONTACTS ABOUT © COLUMNS COMMUNITY POSTS ISSUES BOOKS FORUM FS NEWS Home Static Code Analysis Tool Source Code Analysis Deliver bug-free source code. Download whitepaper from Coverity. Tool Autotools: a practitioner's guide Coverity.com Covers 100% of the UK Software Developers execution path to resolve to Autoconf, Automake and Experienced software developers ASP.NET, SQL, C#, defects. Get free trial. Expertise Coverity.com Libtool www.pbcsystems.co.uk by John Calcote Process Mapping Software Free programming MS Visio Process Library solutions with web-enabled magazine keyword search There are few people who would deny that Autoconf, www.triaster.co.uk Claim a free subscription UK Scrum Training to VSJ The UK's leading Automake and Libtool have revolutionized the free software Certified Scrum Master training throughout the UK and developer title world. While there are many thousands of Autotools Europe www.vsj.co.uk advocates, some developers absolutely hate the Autotools, www.agilebear.com NI Graphical with a passion. Why? Let me try to explain with an analogy. Programming Powerful, Intuitive In the early 1990!s I was working on the final stages of my Programming w/ LabVIEW- Online Tutorials bachelor!s degree in computer science at Brigham Young & Evals. University. I took a 400-level computer graphics class, wherein www.ni.com I was introduced to C++, and the object-oriented programming Debug Trace Monitor paradigm. For the next 5 years, I had a love-hate relationship Collect diagnostics output with C++. I was a pretty good C coder by that time, and I from C#, VB.NET, VB6, thought I could easily pick up C++, as close in syntax as it was VBA, Script, COM, ... www.devtracer.com to C. How wrong I was. I fought late into the night, more often than I!d care to recall, with the C++ compiler over performance issues. Jobs at Sophos Career opportunities at The problem was that the most fundamental differences Sophos in IT, Software Development & Testing between C++ and C are not obvious to the casual observer. www.sophos.com/careers Most of these differences are buried deep within the C++ language specification, rather than on the surface, in the language syntax. The C++ compiler generates code beneath Tracking Worms,Spam and From the FSM staff... Malware ... the covers at a level never even conceived of by C compiler How to Restore Lost writers. This level of code generation provides functionality in a The Top 10 Everything Bookmarks in ... few lines of C++ code that requires dozens of lines of C code. (Dave). The good, the bad Google Adsense for RSS and the ugly. Oh, yes—you can write object-oriented software in C. But you Feeds Coming ... are required to manage all of the details yourself. In C++, Free Software news (Dave & Bridget). All about free these details are taken care of for you by the compiler. The software -- free as in advantages should be clear. freedom! Book Reviews: Illiterarty But this high-level functionality comes at a price—you have to Best voted (Bridget). Book reviews, contents learn to understand what the compiler is doing for you, so you blogs, and short stories. can write your code in a way that complements it. Not Open letter to surprisingly, often the most intuitive thing to do in this situation standards professionals, for the new C++ programmer is to inadvertently write code that developers, and works against the underlying infrastructure generated by the Hot topics - last 60 activists compiler. days Pieter Hintjens, 2008-05-13 The 2008 Google And therein lies the problem. Just as there were many Installing an all-in-one printer device in Debian Summer of Code: 21 programmers then (I won!t call them software engineers—that Projects I'm Excited Ryan Cartwright, 2008-05-05 title comes with experience, not from a college degree) About Things you miss with Andrew Min, 2008-05-13 complaining of the nightmare that was C++, so likewise there GNU/Linux The Bizarre Cathedral - are many programmers today complaining of the nightmare Ryan Cartwright, 2008-05-01 6 that is the Autotools. The differences between make and Why Microsoft should not Ryan Cartwright, 2008-05-25 http://www.freesoftwaremagazine.com/books/autotools_a_guide_to_autoconf_automake_libtool Page 1 of 9 Autotools: a practitioner's guide to Autoconf, Automake and Libtool 01/06/2008 18:52 that is the Autotools. The differences between make and Why Microsoft should not Ryan Cartwright, 2008-05-25 Automake are very similar to the differences between C and lose (and free software Digital Rights will still win) Management (DRM): is C++. The most basic single-line Makefile.am generates a Buzz authors Ryan Cartwright, 2008-04-21 it in its death throes? Makefile.in file (an Autoconf template) containing nearly 350 Marco Marongiu Drigg (the pligg Gary Richmond, 2008-05-07 lines of make script. Pieter Hintjens alternative) vs. Pligg: why drascus321 should people switch? Tony Mobily, 2008-04-13 Who should read this book dogboi Beyond Synaptic - using Richard Rothwell This book is written for the open source software package apt for better package management maintainer. I!m purposely not using the terms “free software” or All news Ryan Cartwright, 2008-04-03 “proprietary software that!s free”. The use of the term “open source” is critical in this context. You see, open source defines ! "# $%!&%": Party time with Ubuntu… Hot topics - last 21 a type of software distribution channel. One in which the days primary method of obtaining software functionality is Sridhar Dhanapalan: Open downloading a source archive, unpacking, building and CeBIT Dubious ads in Free Software Magazine installing the built products on your system. Free software may Martin Meredith: Welcome to the Family, Synergy Tony Mobily, 2008-05-25 be published in binary form. Proprietary software may be given Stephen Stalcup: Next The Bizarre Cathedral - 6 away. But open source software implies source-level Membershp meeting for the Ryan Cartwright, 2008-05-25 distribution. Americas Open letter to standards professionals, Source-level distribution relegates a particular portion of the Andres Rodriguez: Hello Planet Ubuntu!! developers, and activists responsibility of software development to the end-user that more Pieter Hintjens, 2008-05-13 has traditionally been assumed by the software developer. But The Bizarre Cathedral - 4 end-users are not developers, so most of them won!t know Ryan Cartwright, 2008-05-11 how to properly build your package. What to do, what to do… The most widely adopted approach from the earliest days of the open source movement was to make the package build process as simple as possible for the end user, such that she could perform a few well-known steps and have your package DEDICATED SERVER cleanly installed on her system. Odiogo Most packages are built using makefiles, and the make utility is as pervasive a tool as anything else that!s available. It!s very easy to type make—but that!s not the problem. The problem crops up when the package doesn!t build successfully, because of some unanticipated difference between the user!s system and the developer!s system. Thus was born the ubiquitous configure script—initially a simple shell script that configured the end-user!s environment 14 20 Essential KDE so that the make utility could successfully build a source Applications - Review package on the end-user!s system. Hand-coded configure 14 10 Reasons to Love Debian scripts helped, but they weren!t the final answer. They fixed 16 Burn Your CDs and about 65 percent of the problems resulting from system DVDs! K3b Review configuration differences—and they were a pain in the neck to 17 Novell’s Moonlight: Crippled and Defective write properly. Dozens of changes were made incrementally by Design™ over a period of years, until the script would work properly on 18 India Appeals Against most systems anyone cared about. But the entire process was OOXML, Joining Brazil, South Africa, Maybe clearly in need of an upgrade. More 17 Wiping your disk drive Do you have any idea of the number of build-breaking clean differences there are between existing systems today? Neither 20 Dear Google: Is AGPL Evil? do I, but there is a handful of developers in the world who 19 Slashdot: World’s know a large percentage of these differences. Between them Third-Largest Population Appeals and the free software community, the Autotools were born. ISO’s Decision The Autotools were designed to create configure scripts and Get this widget » makefiles that work correctly and provide significant chunks of valuable end-user functionality under most circumstances, and on most systems—even systems not initially considered (or even known about) by the package maintainer. http://www.freesoftwaremagazine.com/books/autotools_a_guide_to_autoconf_automake_libtool Page 2 of 9 Autotools: a practitioner's guide to Autoconf, Automake and Libtool 01/06/2008 18:52 So, returning to that passionate hate felt by some developers toward the Autotools: If you get your head screwed on straight about the primary purpose of the Autotools, then hate quickly turns into respect—and even appreciation. Often the root of such hate is a simple misunderstanding of the rationale behind the Autotools. The purpose of the Autotools is not to make life simpler for the package maintainer (although it really does in the long run). The purpose of the Autotools is to make life simpler for the end-user. To drive my point home, I!ll wager that you!ll never see a Linux distribution packager spouting hateful sentiment on the Autotools mailing lists.