From: Hans Kristian Rosbach Date: Thu, 6 Nov 2014 19:54:38 +0000 (+0100) Subject: Add configure test for __builtin_ctzl() support in compiler X-Git-Tag: 1.9.9-b1~893 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cc48d6daddd6cb70f65cf889128c4c05a48e666d;p=thirdparty%2Fzlib-ng.git Add configure test for __builtin_ctzl() support in compiler --- diff --git a/configure b/configure index 6b5d8773b..0f26657c8 100755 --- a/configure +++ b/configure @@ -582,6 +582,23 @@ EOF fi fi +# Check for __builtin_ctzl() support in compiler +cat > $test.c << EOF +int main(void) +{ + unsigned int zero = 0; + long test = __builtin_ctzl(zero); + return 0; +} +EOF +if try ${CC} ${CFLAGS} $test.c; then + echo "Checking for __builtin_ctzl ... Yes." | tee -a configure.log + CFLAGS="$CFLAGS -DHAVE_BUILTIN_CTZL" + SFLAGS="$SFLAGS -DHAVE_BUILTIN_CTZL" +else + echo "Checking for __builtin_ztzl ... No." | tee -a configure.log +fi + # Check for SSE2 intrinsics cat > $test.c << EOF #include