Bug 9247 - check for float-endianess uses GNU grep option
Summary: check for float-endianess uses GNU grep option
Status: RESOLVED FIXED
Alias: None
Product: cairo
Classification: Unclassified
Component: general (show other bugs)
Version: 1.3.5
Hardware: x86 (IA32) Solaris
: high normal
Assignee: Daniel Amelang
QA Contact: cairo-bugs mailing list
URL: http://jhbuild.bxlug.be/builds/2006-1...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-12-04 16:50 UTC by James Andrewartha
Modified: 2006-12-12 16:36 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description James Andrewartha 2006-12-04 16:50:28 UTC
The AX_C_FLOAT_WORDS_BIGENDIAN check (defined in acinclude.m4) uses the GNU grep
extension -a, so the test fails on solaris.

http://gitweb.freedesktop.org/?p=cairo.git;a=blob;h=ae78d97612773475eb5f195d6d9051226febc32c;hb=94e086b7b9f4129bde3e32b7005e2a33788f334a;f=acinclude.m4#l87
Comment 1 Daniel Amelang 2006-12-04 18:21:45 UTC
How about this way of detecting if grep accepts the '-a' option?

if (echo asdf | grep -a asdf) >/dev/null 2>&1 ; then
  grep_options=-a
fi

I prefer this over trying to detect GNU grep, as there may be other greps
besides GNU that also want the "-a" option. Then again, maybe the other greps'
"-a" option means something different...so in that case, should we just detect
GNU grep like this?

if (grep -V | grep GNU) >/dev/null 2>&1; then
  grep_options=-a
fi
Comment 2 Daniel Amelang 2006-12-12 16:36:34 UTC
commit a87f494d4b91f3acc78d6d7dd737939633f28d71
Author: Dan Amelang <dan@amelang.net>
Date:   Tue Dec 12 16:34:50 2006 -0800

    Don't use the GNU-only grep option "-a"

    We now use strings first, then grep to find the magic value, as suggested
    by various people in the reports for the bugs that this fixes:

        https://bugs.freedesktop.org/show_bug.cgi?id=9247
        https://bugs.freedesktop.org/show_bug.cgi?id=9124


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.