Set install_name to full path on OSX

When building and installing to a non-standard directory on OSX (for
example: when testing multiple versions of CK) it is desirable for
clients of CK to have the install_name match the installed location,
otherwise they need to resort to setting DYLD_LIBRARY_PATH to pick up
the library.
ck_pring
Wez Furlong 11 years ago
parent 411afc3c47
commit 26e4c27578

4
configure vendored

@ -531,15 +531,17 @@ if test "$COMPILER" = "suncc"; then
PTHREAD_CFLAGS="-mt -lpthread" PTHREAD_CFLAGS="-mt -lpthread"
elif test "$COMPILER" = "gcc" || test "$COMPILER" = "clang" || test "$COMPILER" = "mingw32" || test "$COMPILER" = "mingw64"; then elif test "$COMPILER" = "gcc" || test "$COMPILER" = "clang" || test "$COMPILER" = "mingw32" || test "$COMPILER" = "mingw64"; then
LD=$CC LD=$CC
SONAME="$LDNAME_MAJOR"
if test "$SYSTEM" = "darwin"; then if test "$SYSTEM" = "darwin"; then
CC_WL_OPT="-install_name" CC_WL_OPT="-install_name"
LDNAME="libck.dylib" LDNAME="libck.dylib"
LDNAME_VERSION="libck.$VERSION.dylib" LDNAME_VERSION="libck.$VERSION.dylib"
LDNAME_MAJOR="libck.$VERSION_MAJOR.dylib" LDNAME_MAJOR="libck.$VERSION_MAJOR.dylib"
SONAME="$LIBRARY/$LDNAME_MAJOR"
else else
CC_WL_OPT="-soname" CC_WL_OPT="-soname"
fi fi
LDFLAGS="-shared -fPIC -Wl,$CC_WL_OPT,$LDNAME_MAJOR $LDFLAGS" LDFLAGS="-shared -fPIC -Wl,$CC_WL_OPT,$SONAME $LDFLAGS"
CFLAGS="-D_XOPEN_SOURCE=600 -D_BSD_SOURCE -std=gnu99 -pedantic -Wall -W -Wundef -Wendif-labels -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wdisabled-optimization -fstrict-aliasing -O2 -pipe -Wno-parentheses $CFLAGS" CFLAGS="-D_XOPEN_SOURCE=600 -D_BSD_SOURCE -std=gnu99 -pedantic -Wall -W -Wundef -Wendif-labels -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wdisabled-optimization -fstrict-aliasing -O2 -pipe -Wno-parentheses $CFLAGS"
PTHREAD_CFLAGS="-pthread" PTHREAD_CFLAGS="-pthread"
if test "$COMPILER" = "mingw64"; then if test "$COMPILER" = "mingw64"; then

Loading…
Cancel
Save