Live data from Hacker News

Introduction to the Autotools (2012)

dwheeler.com

11–20 of 57 posts

Re: Introduction to the Autotools (2012)

#11
post #3

This documentation and video is good if you want to use autotools. But in 2016, you should really be asking yourself if autotools is the right choice. It is rather baroque, and there are many other choices these days that provide similar functionality for less developer time and effort.

what are the alternatives?

Re: Introduction to the Autotools (2012)

#12
post #4
post #3

This documentation and video is good if you want to use autotools. But in 2016, you should really be asking yourself if autotools is the right choice. It is rather baroque, and there are many other choices these days that provide similar functionality for less developer time and effort.

Could you provide some examples of other choices that you speak of? Thank you.

Cmake and Scons

Re: Introduction to the Autotools (2012)

#13
post #6

This is awesome. Have just been strugglingh to get started with this the past few evenings. Will take this as my guide. Thanks for posting! BTW, good place to start learning the relevant parts of GCC?

If youre just starting something and not maintaining something older you should really take a look into CMake

Re: Introduction to the Autotools (2012)

#14
post #4
post #3

This documentation and video is good if you want to use autotools. But in 2016, you should really be asking yourself if autotools is the right choice. It is rather baroque, and there are many other choices these days that provide similar functionality for less developer time and effort.

Could you provide some examples of other choices that you speak of? Thank you.

Perhaps CMake?

Re: Introduction to the Autotools (2012)

#15
Not coming from active c/cpp development, but learned it at University, I had to deal with autotools just last week. I have to admit I was facing a steep learning curve. All I wanted to do is adjusting some build parameters of an existing OS project (like adding compiler flags etc), which has several sub projects and is also calling non cpp-compilers (mono). Normally I'm an extremely fast learner, but this gave me something to chew on a few hours. I was frustrated and gave up when I accomplished 85% of what I originally wanted to achieve (because time didn't permit to spend more on this). I don't mean to say these tools are hard to comprehend/master in general, but for folks like me coming from other software ecosystems it seems it's a tough bit. At least it was for me :)

Re: Introduction to the Autotools (2012)

#16
post #10
post #7

Earlier quoted context omitted.

To elaborate on "baroque": autotools spends a lot of time and effort on detecting behaviours which (a) no new Unix system has exhibited for at least two decades, and (b) your code almost certainly isn't going to be able to handle anyway. Autotools was great once, but the world has moved on. Write code which is POSIX compliant and skip the whole mess.

As a user building packages I like autotools because of its uniformity. If I want to change the install root I use "--prefix". If I want to crosscompile I can set "--build" and "--host". If I need to set a compiler flag, autotools actually observes CFLAGS. A few years ago I was trying to install a python extension and I couldn't figure out how to set a cflag on the native code it was compiling. It ignored CC, CFLAGS,…

Weird. CC and CFLAGS should both work with standard distutils.

Re: Introduction to the Autotools (2012)

#17
post #3

This documentation and video is good if you want to use autotools. But in 2016, you should really be asking yourself if autotools is the right choice. It is rather baroque, and there are many other choices these days that provide similar functionality for less developer time and effort.

All of the supposed replacements usually have a better interface but way worse functionality. Even just simple things like setting the installation prefix and finding shared libraries don't work as well or are left out. I do a lot of distro packaging work, and the GNU build system is by far the easiest to deal with.

What the Autotools could benefit greatly from is a new UI. We can all agree that M4 sucks big time.

Re: Introduction to the Autotools (2012)

#18
post #6

This is awesome. Have just been strugglingh to get started with this the past few evenings. Will take this as my guide. Thanks for posting! BTW, good place to start learning the relevant parts of GCC?

If youre just starting something and not maintaining something older you should really take a look into CMake

Thanks for your recommendation!

Yes, I am just starting something small and new. And am now jumping the cliff of learning C, gcc, make, autotools, and gnulib-tool, of course all at the same time. Talking about a heap overflow ;)

Is it correct that CMake is a replacement for GNU Make? So far, GNU Make has not posed a problem. Can CMake assume some roles of the other tools as well? I am looking to have this interesting ride a little less bumpy.

Re: Introduction to the Autotools (2012)

#19
post #15

Not coming from active c/cpp development, but learned it at University, I had to deal with autotools just last week. I have to admit I was facing a steep learning curve. All I wanted to do is adjusting some build parameters of an existing OS project (like adding compiler flags etc), which has several sub projects and is also calling non cpp-compilers (mono). Normally I'm an extremely fast learner, but this gave me so…

Setting compiler flags with autoconf should be simple:

     ./configure CC=gcc44 CXX=g++44 CFLAGS="-m32" CXXFLAGS="-m32"
If that doesn't work something is wrong with the implementation.

Re: Introduction to the Autotools (2012)

#20
post #4
post #3

This documentation and video is good if you want to use autotools. But in 2016, you should really be asking yourself if autotools is the right choice. It is rather baroque, and there are many other choices these days that provide similar functionality for less developer time and effort.

Could you provide some examples of other choices that you speak of? Thank you.

Premake (https://premake.github.io/)
Post reply on HN