Apache OpenOffice (AOO) Bugzilla – Issue 46873
FreeBSD, MacOS X's sed doesn't support -r
Last modified: 2005-08-19 06:35:32 UTC
Hi, configure.in contains: dnl Kaffe specific tests KAFFE_VER=`$JAVAINTERPRETER -version 2>&1 | $EGREP " Version:" | $SED -r "s/.* Version: ([[0-9\.]]*).*/\1/"` and: pavel@leda:~> uname -a FreeBSD leda.fi.muni.cz 4.11-STABLE FreeBSD 4.11-STABLE #0: Wed Jan 12 11:24:02 CET 2005 xbezdek@leda.fi.muni.cz:/usr/obj/usr/src/sys/LEDA i386 pavel@leda:~> sed -r sed: illegal option -- r
yes FreeBSD's sed doesn't support -r (also 5.3-RELEASE)
also MacOS X's sed doesn't support it -> JAVA_HOME in configure9 is not set at all.
vq: can you look. the stuff athe kaffe check is not important because kaffe doesn not really work anyhow but the $SED -n -r's in the java stuff are important abnd will break FreeBSD/MacOS X? Can that be rewritten to not require -r? This looks like it tries to subsitute exe in all possible lower/uppercase combinations so we can do three SEDs, can't we?
I'll have a look ...
Created attachment 24818 [details] Patch to work around sed -r
The previous patch works around that problem, but are we sure that $SED -n "s,//*bin//*java,,p" really does what it is designed to do? If I'm not mistaken that matches /opt//////////bin/////////////javasomething or /usr/bin/java .
This is only one of the two places where you added -r.. Anyway; If it accepts that path you mentioned, it's suboptimal but IMHO shouldn't be that big problem since no one will get this path on sane systems anyway...
> This is only one of the two places where you added -r.. Oeh, but my patch (issue 46572) only added one -r. The other one is in the KAFFE_VER part: KAFFE_VER=`$JAVAINTERPRETER -version 2>&1 | $EGREP " Version:" | $SED -r "s/.* Version: ([[0-9\.]]*).*/\1/"` I don't know what kaffe outputs, but can you try (replace the $SED part with): $AWK '/.*Version: [[0-9.]]*/ {print gensub (".*Version: ([[0-9.]]+).*","\\1",g);}' (One line)
yeah, error. it's two (including the kaffe check, which can be ignored for now) -> fixed in configure9
close issue.