Use this configure line to configure Apache with all available shared modules:
./configure ... --enable-shared=max
apachecompilationshared-modules
If you need to compile Apache with EAPI, this is one way to get it going:
# CFLAGS="-DEAPI" ./configure --enable-shared=max
apachecompilationeapi
You can specify the search path(s) used by ld at runtime to find shared objects by building your program with the -rpath option:
$ gcc -Xlinker -rpath -Xlinker /path/to/my/libraries filename.c
This is the equivalent of:
$ ld -rpath /path/to/my/libraries filename.o
ccommandscompilationgcclanguagesldlinkingprogramming