Follow-up Comment #10, patch #7017 (project grep):
yes, that configure.ac check looks correct, but that is certainly not in any
of the posted patches so far.
ldd is a host test, so that wouldnt work (i.e. it implicitly invokes the host
ldso to find things out). you could use `readelf -d` and assume ELF format,
but that seems like it'll break on non-ELF systems (OS X comes to mind).
a --with-pcre-soname=SONAME option would push the issue onto distro packagers
who would probably be annoyed as then they'll have to implement the things i'm
talking about, but would provide a way of grep washing its hand of possibly
buggy code.
so if you wanted, you could do something like:
AC_ARG_WITH([pcre-soname], [...], with_pcre_soname=$withval, [
AS_IF([test "$ac_cv_lib_dl_dlopen" = "yes"], [
<link simple app against -lpcre>
with_pcre_soname=`readelf -d <simple app> 2>/dev/null | grep NEEDED.*libpcre
| awk '{print $NF}'
if test -z "$with_pcre_soname" ; then
AC_MSG_ERROR([unable to detect libpcre SONAME; please use
--with-pcre-soname])
fi
])])
this would satisfy most distro people while providing a fallback for the
non-ELF freaks
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/patch/?7017>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/