configure.ac: Check if the compiler supports GCC vector extensions
authorSiarhei Siamashka <siarhei.siamashka@gmail.com>
Fri, 7 Mar 2014 04:39:42 +0000 (06:39 +0200)
committerSiarhei Siamashka <siarhei.siamashka@gmail.com>
Wed, 2 Apr 2014 09:46:04 +0000 (12:46 +0300)
commit840912b31159aa8ac7be4ea0cee8bdef95a539a4
tree2931ca0946192069d06f44db477f9619c3369e57
parentc343846625152bacbba8d35c0354ed8aadb3c6a0
configure.ac: Check if the compiler supports GCC vector extensions

The Intel Compiler 14.0.0 claims version GCC 4.7.3 compatibility
via __GNUC__/__GNUC__MINOR__ macros, but does not provide the same
level of GCC vector extensions support as the original GCC compiler:
    http://gcc.gnu.org/onlinedocs/gcc/Vector-Extensions.html

Which results in the following compilation failure:

In file included from ../test/utils.h(7),
                 from ../test/utils.c(3):
../test/utils-prng.h(138): error: expression must have integral type
      uint32x4 e = x->a - ((x->b << 27) + (x->b >> (32 - 27)));
                            ^

The problem is fixed by doing a special check in configure for
this feature.
configure.ac
test/utils-prng.c
test/utils-prng.h