]> jfr.im git - solanum.git/blobdiff - configure.ac
Check for the -rpath linker flag.
[solanum.git] / configure.ac
index 919cc3a095060e585b927816e1afd161a660c38a..e30fb4d997cb4df3d0899d6b1ad0cfd59cf0284b 100644 (file)
@@ -1020,6 +1020,17 @@ if test "$shared_modules" = yes; then
        fi
 fi
 
+# rpath, for finding libratbox.so at run time
+hold_ldflags=$LDFLAGS
+AC_MSG_CHECKING(for the ld -rpath flag)
+LDFLAGS="${LDFLAGS} -Wl,-rpath=${libdir}"
+AC_LINK_IFELSE(AC_LANG_PROGRAM([],[int i;]), found=yes, found=no)
+LDFLAGS=$hold_ldflags
+AC_MSG_RESULT($found)
+if test "$found" = yes; then
+       LDFLAGS="${LDFLAGS} -Wl,-rpath=\${libdir}"
+fi
+
 # This must be down here, or it will mess up checks like the ones
 # for -Wl,-export-dynamic
 # -- jilles