views:

179

answers:

2

Being perfectly satisfied with old-style Makefiles, I am looking for a simple alternative to libtool. I do not want to switch to automake, and I keep running into problems with libtool when I try to use it directly. The latest one is 'unsupported hardcode properties', and I am getting fed up with the lack of complete documentation that just tells me what is wrong this time...

I only want to compile a bunch of .o files with the right flags and then link them into a shared library, such that it works on as many platforms as possible. Is there anything out there that does just that and not force me to switch all of my other tools at the same time?

+3  A: 

I not sure if it would fit info your workflow but I'd recommend looking at CMake. It works on Windows, Linux and Mac and should not force you to change any of your other tools. You'll have to judge its suitability yourself though.

Milliams
I am aware of CMake, but that is a bit more than what I was looking for. I do not want to switch my Makefile system to something else, I just want one tool that I tell: "give me the compiler flags so that I can compile these n files for use in a shared library, and then give me the commands to link them together".
Kasper Peeters
A: 

Given your description in the comment to Milliams' answer,

I just want one tool that I tell: "give me the compiler flags so that I can compile these n files for use in a shared library, and then give me the commands to link them together",

then libtool may well be the simplest tool for the job. I know of no other alternative.

You are right that the documentation for using libtool with plain makefiles is practically nonexistent, but libtool certainly does not require you to switch to automake. Cross-platform libraries are difficult, and the price you have to pay for them is libtool. (Or maybe the discount price is libtool+automake+autoconf or CMake or Jam.)

ptomato
I was afraid of that answer... Is there perhaps anyone who knows what is the recommended way to setup libtool in configure.in, without doing that through automake? (i.e. using just autoconf, not automake).
Kasper Peeters