Hi, I'm working on a library that uses pthread functions both normally and
through dlopen to be MT-safe. Unfortunately, some OS's (Free/OpenBSD) have a 
backwards thread implementation where threadsafe libraries are named 
libXXX_r.so, and there is no libpthread (pthread functions are usually found 
in libc_r.so on these platforms). So I'm trying to build a _r and a standard 
version of my library from the same source, seeing as how the threadsafe and
non-threadsafe versions differ in only a few dlopen, dlsym, and mutex calls. 

Also, I need to support OS's like Linux and Solaris, that put their threaded 
functions in libpthread, and only require one library to be built.

Any ideas? I've spent a good amount of time pouring over the automake/autoconf 
docs looking for ways to rebuild the same set of .c files with different
CFLAGS (IE the threadsafe versions need -pthread, and possibly my own internal
-DBUILD_THREADSAFE), but I couldn't find anything. 

Any help would be appreciated.

P.S. I'm not on the list..

-- 
Mike Perry

http://got.fscked.org?

Reply via email to