[Zlib-devel] configure - test execution method
Alon Bar-Lev
alon.barlev at gmail.com
Tue Apr 20 16:56:00 EDT 2010
Hello,
Currently the method of running tests is by testing for empty output.
if test "`whatever`" = ""; then
The problem is that warnings can be issued, and they can be valid.
Why not check for execution status?
if whatever; then
If we have compiler specific stuff, such as __attribute__(()) in gcc it can be:
if $CC -Werror ... ; then
This is an old issue [1]..., still handled by Gentoo [for example] using:
---
# trust exit status of the compiler rather than stderr #55434
# -if test "`(...) 2>&1`" = ""; then
# +if (...) 2>/dev/null; then
sed -i 's|\<test "`\([^"]*\) 2>&1`" = ""|\1 2>/dev/null|' configure || die
---
Regards,
Alon.
[1] http://bugs.gentoo.org/show_bug.cgi?id=55434
More information about the Zlib-devel
mailing list