Is there a way to set where autoconf generates the object files. I would like to have autoconf create all object files in a src/build/ instead of src/
I've tried setting VPATH but that doesn't seem to do anything. VPATH = build
A build directory contains most of the information needed to diagnose build issues. There are different ways to collect it.
To create a configure script with Autoconf, you need to write an Autoconf input file configure.ac (or configure.in ) and run autoconf on it. If you write your own feature tests to supplement those that come with Autoconf, you might also write files called aclocal. m4 and acsite. m4 .
The configure.ac file is used to create the ./configure script. It consists of a series of macros which are processed and expanded by autoconf . These macros can check for packages and libraries, handle --enable and --with switches, and generate various files.
The autogen.sh script generates the configure script (from configure.ac , using autoconf) and any files it needs (like creating Makefile.in from Makefile.am using automake).
You do this by running configure
from the directory where you want the object files. For instance, if configure
and all your code is in a directory named src
, then starting from that directory, these commands should do what you want:
$ mkdir build
$ cd build
$ ../configure
$ make
If you're not using Automake, you have to write your Makefile.in to handle this case; there are instructions for that in the autoconf manual.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With