Note that there are some explanatory texts on larger screens.

plurals
  1. POMakefile.am commands to override library functions
    primarykey
    data
    text
    <p>I have an open source project that relies on another open source project (let's call that other project X). Both are written in C. I've had to hack pieces of X to get multi-threading to work. This causes some issues when trying to package up the code for distribution. To make things easier, I've just included the entirety of X within mine along with the few little hacks I've made.</p> <p>I'd like to do something more sophisticated now in order to keep the improved functionality of X (it has frequent releases and mine does not) without having to repackage the whole project (with my hacks) within my project again each time that X has a release.</p> <p>There are only 3 or 4 functions in that need to override. I can follow what is going on in this <a href="http://www.ibm.com/developerworks/linux/library/l-glibc/index.html" rel="nofollow">IBM Tutorial</a>, but how can I modify my Makefile.am to generate the Makefile changes suggested in that article? To summarize, the article suggests writing my own functions with the same signatures as the ones I want to override (in a file called libfuncs.c) and then add the following 'libs' target to the makefile:</p> <pre><code>all: libs setresgid-tester libs: libfuncs.c gcc -shared -Wl,-soname,libfuncs.so.1 -o libfuncs.so.1.0 libfuncs.c ln -s libfuncs.so.1.0 libfuncs.so.1 ln -s libfuncs.so.1 libfuncs.so setresgid-tester: setresgid-tester.c gcc -o setresgid-tester setresgid-tester.c </code></pre> <p>All of that makes sense to me. What I need to do, however, is to have this 'libs' target created for me with the autotools. I have a Makefile.am works well right now. How do I modify it to produce the desired results above? It was difficult to find in the autotools documentation, but I may just not have known exactly what to look for.</p> <p>I'm happy to provide more details if helpful. Thanks in advance.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload