bug-libtool
[Top][All Lists]
Advanced

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

Re: AC_LIBTOOL_SYS_DYNAMIC_LINKER "gcc -print-search-dirs" problem


From: Kate Minola
Subject: Re: AC_LIBTOOL_SYS_DYNAMIC_LINKER "gcc -print-search-dirs" problem
Date: Wed, 20 Sep 2006 16:43:28 -0400

To followup on my previous post on this subject, I propose that in libtool.m4
in the macro AC_LIBTOOL_SYS_DYNAMIC_LINKER the line

 sys_lib_search_path_spec=`$CC -print-search-dirs | grep
"^libraries:" | $SED -e "s
/^libraries://" -e "s,=/,/,g"`

be replaced with

------------------------------------------
 cat > conftest.$ac_ext << EOF
{
 n = split(\[$]0, c, ":");
 for (i = 2; i <= n; i++) {
   if (i == 2) {
     str = substr(c@<:@i@:>@,3,length(c@<:@i@:>@)-2);
   } else {
     str= c@<:@i@:>@;
   }
   m = split(str, d, "/");

   if (d@<:@m-1@:>@ == "..") {
     m--;
     count = 1;
     while (d@<:@m-1@:>@ == "..") {
       m--;
       count += 1;
     }
     m -= count;
   }

   printf "-L/";
   for (j = 2; j < m; j ++) {
     printf "%s/", d@<:@j@:>@;
   }
   if (length(multi) > 1) {
     if (d@<:@m-1@:>@ == "lib") {
       printf "%s", multi;
     }
   }
   printf " ";
 }
}
EOF
 sys_lib_search_path_spec=`$CC -print-search-dirs | tail -1 |  \
awk -v multi=\`gcc-print-multi-os-directory\` -f conftest.$ac_ext`
------------------------------------------

Comments?  Suggestions for improvement?

Kate Minola
University of Maryland, College Park




reply via email to

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