Index: buildsys.mk.in ================================================================== --- buildsys.mk.in +++ buildsys.mk.in @@ -80,11 +80,11 @@ ${DIR_ENTER}; \ ${MAKE} ${MFLAGS} || exit 1; \ ${DIR_LEAVE}; \ done -depend: +depend: pre-depend regen=0; \ for i in ${SRCS}; do [ $$i -nt .deps ] && regen=1; done; \ if [ $$regen = 1 ]; then \ rm -f .deps; \ for i in ${SRCS}; do \ @@ -92,10 +92,12 @@ c|cc|cxx|m) \ ${CPP} ${CPPFLAGS} -M $$i >>.deps; \ esac; \ done; \ fi + +pre-depend: ${PROG} ${PROG_NOINST}: ${EXT_DEPS} ${OBJS} ${LINK_STATUS} if ${LD} -o $@ ${OBJS} ${LDFLAGS} ${LIBS}; then \ ${LINK_OK}; \ Index: m4/sharedlib.m4 ================================================================== --- m4/sharedlib.m4 +++ m4/sharedlib.m4 @@ -51,11 +51,11 @@ ;; *-sun-* | *-openbsd-* | *-mirbsd-*) AC_MSG_RESULT(Solaris) LIB_CPPFLAGS='-DPIC' LIB_CFLAGS='-fPIC' - LIB_LDFLAGS='-shared -fPIC -Wl,-soname=${LIB}.${LIB_MAJOR}.${LIB_MINOR}' + LIB_LDFLAGS='-shared -fPIC -Wl,-soname=${LIB}.${LIB_MAJOR}.${LIB_MINOR} -Wl,-R ${libdir}' LIB_PREFIX='lib' LIB_SUFFIX='.so' PLUGIN_CPPFLAGS='-DPIC' PLUGIN_CFLAGS='-fPIC' PLUGIN_LDFLAGS='-shared -fPIC' @@ -79,11 +79,11 @@ ;; *) AC_MSG_RESULT(POSIX) LIB_CPPFLAGS='-DPIC' LIB_CFLAGS='-fPIC' - LIB_LDFLAGS='-shared -fPIC -Wl,-soname=${LIB}.${LIB_MAJOR}.${LIB_MINOR}.0' + LIB_LDFLAGS='-shared -fPIC -Wl,-soname=${LIB}.${LIB_MAJOR}.${LIB_MINOR}.0 -Wl,-R ${libdir}' LIB_PREFIX='lib' LIB_SUFFIX='.so' PLUGIN_CPPFLAGS='-DPIC' PLUGIN_CFLAGS='-fPIC' PLUGIN_LDFLAGS='-shared -fPIC'