Paul Hargrove, le Wed 24 Apr 2013 08:06:03 +0200, a écrit : > In my testing on Fedora 17, the patch below applied to hwloc-1.7 produces an > accurate sys_lib_dlsearch_path_spec > > --- config/libtool.m4~ 2013-04-07 16:29:21.000000000 -0700 > +++ config/libtool.m4 2013-04-23 22:43:52.882000000 -0700 > @@ -2669,10 +2669,10 @@ > # before this can be enabled. > hardcode_into_libs=yes > > - # Append ld.so.conf contents to the search path > - if test -f /etc/ld.so.conf; then > - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/ > null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ > ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/= > [^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` > - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" > + # Extract search path from ldconfig > + ldconfig_search_path=`/sbin/ldconfig -N -X -v 2>/dev/null|$SED > 's,^\(/.*\):\ > ( (.*)\)\?$,\1,p;d'|tr '\012' ' '`
It looks better to use ldconfig's output than parsing its configuration files indeed (notably at least since configuration files now have include statements...) Samuel