Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I know the difference between autoconf and its generated ./configure target.

Your comment overall indicated to me that you were talking about automake, not autoconf. But if not, fair enough.

E.g. you talk about "learn the generating language instead of the Make language". I know you were using that as an example, but there's no general non-horrible replacement for autoconf that you can write by hand, as opposed to automake where you can write a portable Makefile

You can of course write a bunch of ad-hoc shellscripts & C test programs to probe your system, but this is going to be a lot nastier and buggier than just using autoconf to achieve the same goal.

You also don't generally need autoconf to build projects you clone from source control in the same way that you need automake (because that actually makes the Makefile).

The output of autoconf is generally just a file full of variables the Makefile includes, if you don't have that file you can just manually specify anything that differs from the Makefile defaults, e.g. NO_IPV6=YesPlease or whatever.

The Git project, whose autoconf recipe I've contributed to, is a good example of this. You can "git clone" it and just issue "make" and it works, but if the default config doesn't work then "make configure && make" generally solves it, but you can also just e.g. do "make NO_IPV6=YesPlease" if it was lack of IPv6 that was causing the compilation failure. It'll then get your NO_IPV6 variable from the command-line instead of from the ./configure generated config.mak.autogen.



The output of autoconf is generally just a file full of variables the Makefile includes

You may just be using a terminology I don't recognize, but like 'kazinator', I think you are missing a step.

The Git project, whose autoconf recipe I've contributed to, is a good example of this.

Great, let's use that as a specific example: https://github.com/git/git/blob/master/configure.ac. Line 2 says "Process this file with autoconf to produce a configure script."

I interpret this as saying that autoconf takes configure.ac as input, and produces a runnable 'configure' script as output. But you are saying that "the output of autoconf is generally just file full of variables the Makefile includes". How can these both be true?


I was using "autoconf" to mean both the software itself and all its output, including the generated configure script.

Confusingly, sorry about that, but for the purposes of discussing what software you need to generate the configure valuables you ultimately need when cloning from source control, it makes no difference.


Chains of discussion like this are why I like CMake. Much less confusion.

Few confuse the output of CMake with things that ought to be committed.


I like something called GNU Make for the same reason.

Few confuse the output of Make (namely your built program) with something that ought to be committed (like its source code or the Makefile).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: