bug-libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FYI: RFE: ignore comments in ld.so.conf


From: Ralf Wildenhues
Subject: FYI: RFE: ignore comments in ld.so.conf
Date: Wed, 12 Jan 2005 14:01:22 +0100
User-agent: Mutt/1.4.1i

Hi Jens,

* address@hidden wrote on Wed, Dec 29, 2004 at 04:45:30PM CET:
> 
> since there may occure comments (introduced by a #) libtool.m4 should ignore
> them ...

Thanks for your bug report.  Out of curiosity: which distribution puts
comments in there?

Regarding your proposed fix, note that comments may also follow entries
in this file (and, as a consequence, the `#' sign may not appear in file
names mentioned).  Daniel Reed has posted this to the libtool-patches
list some time ago.

I checked in the following different patch against all branches.  This
is still heuristic, and still has the problems Daniel described in his
RFC.

Regards,
Ralf

2005-01-12  Ralf Wildenhues  <address@hidden>

        * m4/libtool.m4 (_LT_SYS_DYNAMIC_LINKER) [linux]: While "parsing"
        /etc/ld.so.conf, skip comments.
        Reported by Jens Elkner <address@hidden>.

Index: m4/libtool.m4
===================================================================
RCS file: /cvsroot/libtool/libtool/m4/libtool.m4,v
retrieving revision 1.152
diff -u -r1.152 libtool.m4
--- m4/libtool.m4       8 Jan 2005 21:17:57 -0000       1.152
+++ m4/libtool.m4       12 Jan 2005 12:36:30 -0000
@@ -1987,7 +1987,7 @@
 
   # 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)); 
skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 
's/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g' | tr '\n' ' '`
+    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); 
skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 
's/#.*//;s/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
     sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
   fi
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]