[gst-cvs] common: gst-arch.m4: fix detection on Solaris
Tim Müller
tpm at kemper.freedesktop.org
Fri Apr 23 06:39:25 PDT 2010
Module: common
Branch: master
Commit: 4d67bd6f51003ea5c7e7ae75f53ce95acc4c4175
URL: http://cgit.freedesktop.org/gstreamer/common/commit/?id=4d67bd6f51003ea5c7e7ae75f53ce95acc4c4175
Author: Brian Cameron <brian.cameron at oracle.com>
Date: Fri Apr 23 14:34:41 2010 +0100
gst-arch.m4: fix detection on Solaris
stop-gap measure to fix CPU/arch detection on solaris, which
makes the goom problems work properly on solaris. Probably
needs more fixes after the release (use target_* etc.).
Fixes #615996.
---
m4/gst-arch.m4 | 36 +++++++++++++++++++++++++++---------
1 files changed, 27 insertions(+), 9 deletions(-)
diff --git a/m4/gst-arch.m4 b/m4/gst-arch.m4
index c136c95..2e935d2 100644
--- a/m4/gst-arch.m4
+++ b/m4/gst-arch.m4
@@ -10,16 +10,34 @@ AC_DEFUN([AG_GST_ARCH],
dnl Determine CPU
case "x${host_cpu}" in
xi?86 | xk? | xi?86_64)
- HAVE_CPU_I386=yes
- AC_DEFINE(HAVE_CPU_I386, 1, [Define if the host CPU is an x86])
+ case $host_os in
+ solaris*)
+ AC_CHECK_DECL([__i386], [I386_ABI="yes"], [I386_ABI="no"])
+ AC_CHECK_DECL([__amd64], [AMD64_ABI="yes"], [AMD64_ABI="no"])
- dnl FIXME could use some better detection
- dnl (ie CPUID)
- case "x${host_cpu}" in
- xi386 | xi486) ;;
- *)
- AC_DEFINE(HAVE_RDTSC, 1, [Define if RDTSC is available]) ;;
- esac ;;
+ if test "x$I386_ABI" = "xyes" ; then
+ HAVE_CPU_I386=yes
+ AC_DEFINE(HAVE_CPU_I386, 1, [Define if the host CPU is an x86])
+ fi
+ if test "x$AMD64_ABI" = "xyes" ; then
+ HAVE_CPU_X86_64=yes
+ AC_DEFINE(HAVE_CPU_X86_64, 1, [Define if the host CPU is a x86_64])
+ fi
+ ;;
+ *)
+ HAVE_CPU_I386=yes
+ AC_DEFINE(HAVE_CPU_I386, 1, [Define if the host CPU is an x86])
+
+ dnl FIXME could use some better detection
+ dnl (ie CPUID)
+ case "x${host_cpu}" in
+ xi386 | xi486) ;;
+ *)
+ AC_DEFINE(HAVE_RDTSC, 1, [Define if RDTSC is available]) ;;
+ esac
+ ;;
+ esac
+ ;;
xpowerpc)
HAVE_CPU_PPC=yes
AC_DEFINE(HAVE_CPU_PPC, 1, [Define if the host CPU is a PowerPC]) ;;
More information about the Gstreamer-commits
mailing list