aboutsummaryrefslogtreecommitdiffstats
path: root/aclocal-fallback
diff options
context:
space:
mode:
authorAndersBroman <anders.broman@ericsson.com>2014-06-10 18:04:43 +0200
committerAnders Broman <a.broman58@gmail.com>2014-06-10 16:08:06 +0000
commitb6f8aea069daffd888d06e020414c10da6e61cee (patch)
tree74bd93424bc4202a8d4a617ba0dabf752cd91bfc /aclocal-fallback
parentfcb019acb8932855d51b0facc45aa3e855fe8524 (diff)
See if this version works better on OSX 10.5
AX_EXT has been extended to deal with a situation where AX_GCC_X86_CPUID(0x00000001) returns 'unknown'. Further details can be found at <http://savannah.gnu.org/patch/?8321>. Change-Id: I0b8173789ddfc1670e9896408f5d022c30a1d0a9 Reviewed-on: https://code.wireshark.org/review/2112 Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'aclocal-fallback')
-rw-r--r--aclocal-fallback/ax_ext.m429
1 files changed, 25 insertions, 4 deletions
diff --git a/aclocal-fallback/ax_ext.m4 b/aclocal-fallback/ax_ext.m4
index a597925387..86fb3985aa 100644
--- a/aclocal-fallback/ax_ext.m4
+++ b/aclocal-fallback/ax_ext.m4
@@ -31,21 +31,43 @@
# and this notice are preserved. This file is offered as-is, without any
# warranty.
-#serial 12
+#serial 13
AC_DEFUN([AX_EXT],
[
AC_REQUIRE([AC_CANONICAL_HOST])
case $host_cpu in
+ powerpc*)
+ AC_CACHE_CHECK([whether altivec is supported], [ax_cv_have_altivec_ext],
+ [
+ if test `/usr/sbin/sysctl -a 2>/dev/null| grep -c hw.optional.altivec` != 0; then
+ if test `/usr/sbin/sysctl -n hw.optional.altivec` = 1; then
+ ax_cv_have_altivec_ext=yes
+ fi
+ fi
+ ])
+
+ if test "$ax_cv_have_altivec_ext" = yes; then
+ AC_DEFINE(HAVE_ALTIVEC,,[Support Altivec instructions])
+ AX_CHECK_COMPILE_FLAG(-faltivec, SIMD_FLAGS="$SIMD_FLAGS -faltivec", [])
+ fi
+ ;;
+
+
i[[3456]]86*|x86_64*|amd64*)
AC_REQUIRE([AX_GCC_X86_CPUID])
AC_REQUIRE([AX_GCC_X86_AVX_XGETBV])
AX_GCC_X86_CPUID(0x00000001)
- ecx=`echo $ax_cv_gcc_x86_cpuid_0x00000001 | cut -d ":" -f 3`
- edx=`echo $ax_cv_gcc_x86_cpuid_0x00000001 | cut -d ":" -f 4`
+ ecx=0
+ edx=0
+ if test "$ax_cv_gcc_x86_cpuid_0x00000001" != "unknown";
+ then
+ ecx=`echo $ax_cv_gcc_x86_cpuid_0x00000001 | cut -d ":" -f 3`
+ edx=`echo $ax_cv_gcc_x86_cpuid_0x00000001 | cut -d ":" -f 4`
+ fi
AC_CACHE_CHECK([whether mmx is supported], [ax_cv_have_mmx_ext],
[
@@ -219,4 +241,3 @@ AC_DEFUN([AX_EXT],
AC_SUBST(SIMD_FLAGS)
])
-