libtool
[Top][All Lists]
Advanced

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

sys_lib_search_path_spec computed incorrectly in MSYS shell


From: Bob Friesenhahn
Subject: sys_lib_search_path_spec computed incorrectly in MSYS shell
Date: Sat, 22 Jun 2002 19:30:23 -0500 (CDT)

While the CVS libtool code that computes sys_lib_search_path_spec
executes correctly under the MinGW MSYS bash shell (/bin/sh) in a
small test script (attached), it does not execute correctly in the
context of a configure script.  For reasons unknown to me, the egrep
test for ';' is either failing, or the return status is being handled
incorrectly since the final result has replaced the colons with spaces
rather than replacing the ';'s with spaces.  This makes CVS libtool
not very usable under MSYS.

Bob

#!/bin/sh
GCC='yes'
CC=gcc
PATH_SEPARATOR=':'
if test "$GCC" = yes; then
sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e 
"s/^libraries://"`
  if echo "$sys_lib_search_path_spec" | egrep ';' >/dev/null ; then
    # if the path contains ";" then we assume it to be the separator
    # otherwise default to the standard path separator (i.e. ":") - it is
    # assumed that no part of a normal pathname contains ";" but that should
    # okay in the real world where ";" in dirpaths is itself problematic.
    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | sed -e 's/;/ 
/g'`
  else
    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | sed  -e 
"s/$PATH_SEPARATOR/ /g"`
  fi
else
  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
fi
echo "$sys_lib_search_path_spec"

======================================
Bob Friesenhahn
address@hidden
http://www.simplesystems.org/users/bfriesen




reply via email to

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