From: Hans Kristian Rosbach Date: Wed, 14 Sep 2022 19:29:41 +0000 (+0200) Subject: Make visibility tests run the same way as the other tests. X-Git-Tag: 2.1.0-beta1~157 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=962b3dd2ff809fbd9ceb20a919939937389faa0f;p=thirdparty%2Fzlib-ng.git Make visibility tests run the same way as the other tests. Fix indentation. --- diff --git a/configure b/configure index 4e73a22dc..2cd818624 100755 --- a/configure +++ b/configure @@ -581,16 +581,16 @@ if ($CC -c $CFLAGS $test.c) 2>/dev/null; then } echo - using any output from compiler to indicate an error >> configure.log else -try() -{ - show $* - ( $* ) >> configure.log 2>&1 - ret=$? - if test $ret -ne 0; then - echo "(exit code $ret)" >> configure.log - fi - return $ret -} + try() + { + show $* + ( $* ) >> configure.log 2>&1 + ret=$? + if test $ret -ne 0; then + echo "(exit code $ret)" >> configure.log + fi + return $ret + } fi tryboth() @@ -924,7 +924,7 @@ if test "$gcc" -eq 1; then int Z_INTERNAL foo; int main() { return 0; } EOF - if tryboth $CC -c $CFLAGS $test.c; then + if try $CC $CFLAGS $test.c; then CFLAGS="$CFLAGS -DHAVE_VISIBILITY_HIDDEN" SFLAGS="$SFLAGS -DHAVE_VISIBILITY_HIDDEN" echo >> configure.log @@ -943,7 +943,7 @@ if test "$gcc" -eq 1; then int Z_INTERNAL foo; int main() { return 0; } EOF - if tryboth $CC -c $CFLAGS $test.c; then + if try $CC $CFLAGS $test.c; then CFLAGS="$CFLAGS -DHAVE_VISIBILITY_INTERNAL" SFLAGS="$SFLAGS -DHAVE_VISIBILITY_INTERNAL" echo >> configure.log