views:

279

answers:

4

Over the past couple of days I have been reading into using autotools to build my project instead of the Makefiles I have pieced together over the past couple of months. Unfortunately I have not found an example that gave me enough insight towards how my project structure is currently.

I have three libraries that are included in the application code of my project. I am looking for the best way to use a single configure script to make (and install) the application, and libraries.

+3  A: 

Here are a few I found that don't look to bad:

  1. http://www.lrde.epita.fr/~adl/autotools.html
  2. http://www.developingprogrammers.com/index.php/2006/01/05/autotools-tutorial/
  3. http://sources.redhat.com/autobook/

The last one is a free book

Good Luck

Aiden Bell
I've been using autotools for probably 10 years and still use the 'info automake' docs. The #2 reference here has a useful picture to grasp what is generated. I would also suggest finding an existing autotooled project such as the GNU ones that has the pattern you need - libs+app and see what they did. I'd recommend separate dirs for each library and app.
dajobe
But don't just copy paste from OSS. Licence apart, there are a lot of bad autotools examples out there.
rq
+2  A: 

Here is a starter's guide to autoconf: http://amjith.blogspot.com/2009/04/autoconf-and-automake-tutorial.html

qrdl
Thanks, this helped a lot as well!
John Bellone
+2  A: 

Sorry for offtopic.

I did similar thing now, but I was able to choose between Autotools and CMake. I am happy to have choosen the second.

Might be worth looking at, including CDash, CTest and CPack. http://www.cmake.org/

Best Regards,

Ovanes

ovanes
Would you mind sharing some tutorials for cmake? The website just points to the book.
jinxed_coder
The wiki http://www.vtk.org/Wiki/CMake and also "cmake --help" are useful.
rq
+1 for CMake once you get started it is very easy. I use it for all my c++ projects even if I am just creating a small spike in visual studio.
iain
A: 

When I read this, I was already pretty well familiar with the autotools, but it seems like a pretty good introduction: link text

William Pursell