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

He who fights with monsters should be careful lest he thereby become a monster. And if thou gaze long into an abyss, the abyss will also gaze into thee. -- Neetch, naturlich

You young 'uns may not remember it, but there used to be more systems than Windows, Mac, and Linux, and forced OS updates weren't a thing. Libtool was a way to try to make programs run on most people's computers, by compiling small programs to detect individual features. It was written in a nightmare language called M4, which would generate shell scripts, which would usually generate C programs, which would attempt to compile and run.



libtool's goal is actually smooth over the fact that dynamic linking is hard at compile-time. It's not a good abstraction and must be deeply ingrained into your project because of this.

I typically do not use libtool but rather have an autoconf macro [0] to determine how to interact with the linker. This has the disadvantage that each "./configure" invocation can only produce either static or shared archives, but not both (since the object files that make those up may require different compile flags). libtool's solution is to compile the object file both ways, but it does not really go well with the autoconf mechanism.

I also have a different set of macros for managing the ABI [1], and I'm not sure how that's managed with libtool.

[0] http://chiselapp.com/user/rkeene/repository/autoconf/artifac... [1] http://chiselapp.com/user/rkeene/repository/autoconf/artifac...




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

Search: