2 [AC_PATH_PROG([SORT], [sort], [sort])
3 AC_MSG_CHECKING([if $SORT supports the -z option])
4 if test "x$cross_compiling" = xyes
6 # We are cross-compiling, so cannot test the target's "sort".
9 # find out if the sort command has a working -z option.
10 if $SORT -z -c < "${srcdir:-.}/m4/order-good.bin" 2>/dev/null >/dev/null
12 # sort has a -z option, but we have not yet established that
13 # sort thinks there is more than one input line there. We have
14 # to make sort -c do its thing with the input lines in the wrong
15 # order to determine that (we can't do it in one shot because
16 # if sort returns nonzero we cant tell that it wasn't just
17 # complaining about this unknown -z option.
18 if $SORT -z -c < "${srcdir:-.}/m4/order-bad.bin" 2>/dev/null >/dev/null
20 # sort likes -z but it doesn't seem to make \0
27 # Doesn't like the z option.
32 if test "x$cross_compiling" = xyes
34 AC_MSG_RESULT([assume no, since we are cross compiling])
35 AC_SUBST(SORT_SUPPORTS_Z,[false])
39 AC_SUBST(SORT_SUPPORTS_Z,[true])
42 AC_SUBST(SORT_SUPPORTS_Z,[false])