Index: buildsys.mk.in ================================================================== --- buildsys.mk.in +++ buildsys.mk.in @@ -36,12 +36,12 @@ CPPFLAGS = @CPPFLAGS@ DFLAGS = @DFLAGS@ ERLCFLAGS = @ERLCFLAGS@ OBJCFLAGS = @OBJCFLAGS@ LDFLAGS = @LDFLAGS@ -PYTHON_FLAGS = @PYTHON_FLAGS@ LIBS = @LIBS@ +PYTHON_FLAGS = @PYTHON_FLAGS@ PROG_IMPLIB_NEEDED = @PROG_IMPLIB_NEEDED@ PROG_IMPLIB_LDFLAGS = @PROG_IMPLIB_LDFLAGS@ PROG_SUFFIX = @EXEEXT@ LIB_CPPFLAGS = @LIB_CPPFLAGS@ LIB_CFLAGS = @LIB_CFLAGS@ @@ -50,10 +50,11 @@ LIB_SUFFIX = @LIB_SUFFIX@ PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ PLUGIN_CFLAGS = @PLUGIN_CFLAGS@ PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ PLUGIN_SUFFIX = @PLUGIN_SUFFIX@ +RPATH_LDFLAGS = @RPATH_LDFLAGS@ INSTALL_LIB = @INSTALL_LIB@ UNINSTALL_LIB = @UNINSTALL_LIB@ CLEAN_LIB = @CLEAN_LIB@ LN_S = @LN_S@ MKDIR_P = mkdir -p Index: m4/buildsys.m4 ================================================================== --- m4/buildsys.m4 +++ m4/buildsys.m4 @@ -77,10 +77,11 @@ LIB_SUFFIX='.so' PLUGIN_CPPFLAGS='-DPIC' PLUGIN_CFLAGS='-fPIC' PLUGIN_LDFLAGS='-shared -fPIC' PLUGIN_SUFFIX='.so' + RPATH_LDFLAGS='-Wl,-rpath,${libdir}' INSTALL_LIB='${INSTALL} -m 755 $$i ${DESTDIR}${libdir}/$$i.${LIB_MAJOR}.${LIB_MINOR} && rm -f ${DESTDIR}${libdir}/$$i && ${LN_S} $$i.${LIB_MAJOR}.${LIB_MINOR} ${DESTDIR}${libdir}/$$i' UNINSTALL_LIB='rm -f ${DESTDIR}${libdir}/$$i ${DESTDIR}${libdir}/$$i.${LIB_MAJOR}.${LIB_MINOR}' CLEAN_LIB='' ;; *-*-openbsd* | *-*-mirbsd*) @@ -92,10 +93,11 @@ LIB_SUFFIX='.so.${LIB_MAJOR}.${LIB_MINOR}' PLUGIN_CPPFLAGS='-DPIC' PLUGIN_CFLAGS='-fPIC' PLUGIN_LDFLAGS='-shared -fPIC' PLUGIN_SUFFIX='.so' + RPATH_LDFLAGS='-Wl,-rpath,${libdir}' INSTALL_LIB='${INSTALL} -m 755 $$i ${DESTDIR}${libdir}/$$i' UNINSTALL_LIB='rm -f ${DESTDIR}${libdir}/$$i' CLEAN_LIB='' ;; *-*-cygwin* | *-*-mingw*) @@ -107,10 +109,11 @@ LIB_SUFFIX='.dll' PLUGIN_CPPFLAGS='' PLUGIN_CFLAGS='' PLUGIN_LDFLAGS='-shared' PLUGIN_SUFFIX='.dll' + RPATH_LDFLAGS='-Wl,-rpath,${libdir}' INSTALL_LIB='${MKDIR_P} ${DESTDIR}${bindir} && ${INSTALL} -m 755 $$i ${DESTDIR}${bindir}/$$i && ${INSTALL} -m 755 $$i.a ${DESTDIR}${libdir}/$$i.a' UNINSTALL_LIB='rm -f ${DESTDIR}${bindir}/$$i ${DESTDIR}${libdir}/$$i.a' CLEAN_LIB='${LIB}.a' ;; *) @@ -122,10 +125,11 @@ LIB_SUFFIX='.so' PLUGIN_CPPFLAGS='-DPIC' PLUGIN_CFLAGS='-fPIC' PLUGIN_LDFLAGS='-shared -fPIC' PLUGIN_SUFFIX='.so' + RPATH_LDFLAGS='-Wl,-rpath,${libdir}' INSTALL_LIB='${INSTALL} -m 755 $$i ${DESTDIR}${libdir}/$$i.${LIB_MAJOR}.${LIB_MINOR}.0 && ${LN_S} -f $$i.${LIB_MAJOR}.${LIB_MINOR}.0 ${DESTDIR}${libdir}/$$i.${LIB_MAJOR} && ${LN_S} -f $$i.${LIB_MAJOR}.${LIB_MINOR}.0 ${DESTDIR}${libdir}/$$i' UNINSTALL_LIB='rm -f ${DESTDIR}${libdir}/$$i ${DESTDIR}${libdir}/$$i.${LIB_MAJOR} ${DESTDIR}${libdir}/$$i.${LIB_MAJOR}.${LIB_MINOR}.0' CLEAN_LIB='' ;; esac @@ -137,10 +141,11 @@ AC_SUBST(LIB_SUFFIX) AC_SUBST(PLUGIN_CPPFLAGS) AC_SUBST(PLUGIN_CFLAGS) AC_SUBST(PLUGIN_LDFLAGS) AC_SUBST(PLUGIN_SUFFIX) + AC_SUBST(RPATH_LDFLAGS) AC_SUBST(INSTALL_LIB) AC_SUBST(UNINSTALL_LIB) AC_SUBST(CLEAN_LIB) ]) @@ -151,19 +156,21 @@ LIB_CPPFLAGS='' LIB_CFLAGS='' LIB_LDFLAGS='' LIB_PREFIX='lib' LIB_SUFFIX='.a' + RPATH_LDFLAGS='' INSTALL_LIB='${INSTALL} -m 644 $$i ${DESTDIR}${libdir}/$$i' UNINSTALL_LIB='rm -f ${DESTDIR}${libdir}/$$i' CLEAN_LIB='' AC_SUBST(LIB_CPPFLAGS) AC_SUBST(LIB_CFLAGS) AC_SUBST(LIB_LDFLAGS) AC_SUBST(LIB_PREFIX) AC_SUBST(LIB_SUFFIX) + AC_SUBST(RPATH_LDFLAGS) AC_SUBST(INSTALL_LIB) AC_SUBST(UNINSTALL_LIB) AC_SUBST(CLEAN_LIB) ])