TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Autotools Mythbuster

90 pointsby nbaksalyarover 9 years ago

13 comments

zuzunover 9 years ago
If you want to get started with autotools, try to build yourself a minimal autotools project. Once you have a working stub, you already took the biggest hurdle.<p>You only need to focus on two files: configure.ac, where you check for features, and Makefile.am, where you list your build targets and their sources. You can also write normal Makefile rules there.<p>After editing these files, run `autreconf -fi` to create&#x2F;update the configure and Makefile script. Then run<p><pre><code> .&#x2F;configure make </code></pre> to build your project. Have a look at Appendix A&#x2F;Basic Autotoolization on the submitted website or checkout libabc by Poettering&#x2F;Sievers:<p>1. <a href="https:&#x2F;&#x2F;autotools.io&#x2F;whosafraid.html#idm117385102076160" rel="nofollow">https:&#x2F;&#x2F;autotools.io&#x2F;whosafraid.html#idm117385102076160</a><p>2. <a href="http:&#x2F;&#x2F;0pointer.de&#x2F;blog&#x2F;projects&#x2F;libabc.html" rel="nofollow">http:&#x2F;&#x2F;0pointer.de&#x2F;blog&#x2F;projects&#x2F;libabc.html</a>
DasIchover 9 years ago
Learning about autotools is an amazing source of fremdscham. The whole compilation&#x2F;packaging stuff is hard to get right but autotools looks like someone completely gave up on producing a good, decent or even bad solution and just tried whatever didn&#x27;t completely and utterly fail at the task. That everyone else just kind of seemed to go with it... there are just no words to describe how embarrassing that looks.
评论 #10753231 未加载
评论 #10751992 未加载
评论 #10751859 未加载
评论 #10751855 未加载
评论 #10751856 未加载
评论 #10751950 未加载
falcolasover 9 years ago
While it&#x27;s quite popular to bash autotools, how about instead working towards a successor? One that&#x27;s as easy for the end user to use as autotools, but with less technical debit.<p>It&#x27;s a hard problem, as evidenced by the inherent complexity in autotools, but there are a lot of smart folks who could apply their effort towards that goal.
评论 #10751911 未加载
评论 #10752468 未加载
评论 #10752097 未加载
评论 #10751890 未加载
评论 #10752380 未加载
评论 #10752321 未加载
评论 #10752106 未加载
评论 #10751896 未加载
dankohn1over 9 years ago
Could anyone speak to why you would use Autotools today in a new project rather than gyp [0] (created by the Chrome team because Autotools sucks) or waf [1]? How many people really have a requirement to support more than just Windows, OS X, and Linux? I can understand not wanting to rip out a working Autotools implementation of a legacy project, but it&#x27;s greenfield use should decline to zero.<p>[0] <a href="https:&#x2F;&#x2F;gyp.gsrc.io&#x2F;" rel="nofollow">https:&#x2F;&#x2F;gyp.gsrc.io&#x2F;</a> [1] <a href="https:&#x2F;&#x2F;github.com&#x2F;waf-project&#x2F;waf" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;waf-project&#x2F;waf</a>
评论 #10754198 未加载
评论 #10754062 未加载
notacowardover 9 years ago
This looks like a really useful guide through autotool hell, which is a fantastic thing to have, but it&#x27;s not clear what <i>myths</i> are being busted so the name seems like a bit of a misnomer. Perhaps &quot;Autotools Life Preserver&quot; or something would be more accurate.
MichaelMoser123over 9 years ago
GNU make has macros too, but these were added much later than 1991; Interesting if make macros were available earlier, would people have used them instead of autotools ?<p>Thank you for the link on autotools, i will try to apply it if i am ever forced to do something with autoconf&#x2F;autotools.
评论 #10752661 未加载
评论 #10752949 未加载
hendryover 9 years ago
Please please please do not use .&#x2F;configure aka autohell.<p>Study the Makefiles in <a href="http:&#x2F;&#x2F;git.suckless.org&#x2F;" rel="nofollow">http:&#x2F;&#x2F;git.suckless.org&#x2F;</a><p>Straightforward &amp; fast.
评论 #10752686 未加载
jokoonover 9 years ago
I confess that I don&#x27;t even know how to write a makefile, but reading the comments here, should I understand that cmake is better than autotools? Or should I learn autotools instead of cmake?<p>Since cmake is more adopted, isn&#x27;t cmake better ?
评论 #10756425 未加载
raverbashingover 9 years ago
One of the first lines<p>&quot;...the language used to write the configure.ac is called M4sh, to make clear that it&#x27;s based off both sh and the macro language M4. &quot;<p>Tip: don&#x27;t use Autotools
评论 #10751810 未加载
评论 #10751819 未加载
chris_wotover 9 years ago
Oh brother... this would have been good when I was developing in LibreOffice!
jherikoover 9 years ago
there is only one myth that needs busting. that these tools solve any real problems that can&#x27;t be solved better.
J_Darnleyover 9 years ago
Just what I want, a 900KiB configure file that doesn&#x27;t even work. I&#x27;m looking at you lame! And then a make process that doesn&#x27;t STFU!
akerroover 9 years ago
<a href="http:&#x2F;&#x2F;freecode.com&#x2F;articles&#x2F;stop-the-autoconf-insanity-why-we-need-a-new-build-system" rel="nofollow">http:&#x2F;&#x2F;freecode.com&#x2F;articles&#x2F;stop-the-autoconf-insanity-why-...</a>