This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: configure scripts and cross-compiling
- To: <gcc-help at gcc dot gnu dot org>
- Subject: Re: configure scripts and cross-compiling
- From: "Martin Kalen" <martin dot kalen at todaysystems dot com dot au>
- Date: Thu, 24 May 2001 12:18:03 +1000
- Organization: TODAY Systems, Inc.
- References: <200105240104.PAA06835@kalani.keck.hawaii.edu>
From: "Peter Kurpis" <pkurpis@keck.hawaii.edu>
To: <aoliva@redhat.com>
Cc: <gcc-help@gcc.gnu.org>; <bug-autoconf@gnu.org>
Sent: Thursday, May 24, 2001 11:04 AM
Subject: Re: configure scripts and cross-compiling
> `$CXX --print-search-dirs | sed -n 's/^install:
\(.*\)\/lib\/.*$/\1\/lib/p'`
To the best of my knowledge, sed is somewhat broken on a large number
of systems when it comes to using the \( \) backreferences.
One alternative might be:
`$CXX --print-search-dirs | sed -n 's#^install: ##p' | sed
's#/lib/.*#/lib#`
This gets rid of the \1 and save a bit of escaping characters. I know
there are a milion sed, awk, perl etc. ways to do this but as far as I
know simple sed commands like these are more portable. (Perhaps you
could do it in one go to save setting up one of the two pipes...)
Regards,
Martin.