X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=configure;h=cf525c9f6a0fc6a664d1918d001918c05e12363b;hp=157ecf39086b08a62fa55760fa964d44ad80574b;hb=de1ed86b79a1428cd2f0cf7e3a80748367588e8b;hpb=42b0409f8e27a3e9008b5735f397e67152893cfa diff --git a/configure b/configure index 157ecf39..cf525c9f 100755 --- a/configure +++ b/configure @@ -355,17 +355,30 @@ elif [ $uname = "Linux" ] ; then printf "Linux\n" platform=LINUX linker_resolves_library_dependencies=1 + + printf "Checking for $libdir_expanded in ldconfig... " ldconfig_paths=$(/sbin/ldconfig -N -X -v 2>/dev/null | sed -n -e 's,^\(/.*\):\( (.*)\)\?$,\1,p') # Separate ldconfig_paths only on newline (not on any potential - # embedded space characters in any filenames). + # embedded space characters in any filenames). Note, we use a + # literal newline in the source here rather than something like: + # + # IFS=$(printf '\n') + # + # because the shell's command substitution deletes any trailing newlines. OLD_IFS=$IFS - IFS="$(printf '\n')" + IFS=" +" for path in $ldconfig_paths; do if [ "$path" = "$libdir_expanded" ]; then libdir_in_ldconfig=1 fi done IFS=$OLD_IFS + if [ "$libdir_in_ldconfig" = '0' ]; then + printf "No (will set RPATH)\n" + else + printf "Yes\n" + fi else printf "Unknown.\n" cat < Makefile.config <