summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Hervey <edward.hervey@collabora.co.uk>2012-06-06 18:08:26 +0200
committerEdward Hervey <edward.hervey@collabora.co.uk>2012-06-06 18:15:10 +0200
commitb811047a49ae74adc08357af335f57f727948a3b (patch)
tree6690d1f0ee26b85865543830d5b0d516673f0488
parent53a4d74b232a4196a651f9d4f1b6f7328c57dca1 (diff)
gst-arch.m4: Fix cpu defines
We were detecting the host cpu (and not the target one).
-rw-r--r--m4/gst-arch.m440
1 files changed, 21 insertions, 19 deletions
diff --git a/m4/gst-arch.m4 b/m4/gst-arch.m4
index 2e935d2..ff0954a 100644
--- a/m4/gst-arch.m4
+++ b/m4/gst-arch.m4
@@ -6,31 +6,32 @@ dnl defines HOST_CPU
AC_DEFUN([AG_GST_ARCH],
[
AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use host_ variables
+ AC_REQUIRE([AC_CANONICAL_TARGET]) dnl we use target_ variables
dnl Determine CPU
- case "x${host_cpu}" in
+ case "x${target_cpu}" in
xi?86 | xk? | xi?86_64)
- case $host_os in
+ case $target_os in
solaris*)
AC_CHECK_DECL([__i386], [I386_ABI="yes"], [I386_ABI="no"])
AC_CHECK_DECL([__amd64], [AMD64_ABI="yes"], [AMD64_ABI="no"])
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])
+ AC_DEFINE(HAVE_CPU_I386, 1, [Define if the target 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])
+ AC_DEFINE(HAVE_CPU_X86_64, 1, [Define if the target CPU is a x86_64])
fi
;;
*)
HAVE_CPU_I386=yes
- AC_DEFINE(HAVE_CPU_I386, 1, [Define if the host CPU is an x86])
+ AC_DEFINE(HAVE_CPU_I386, 1, [Define if the target CPU is an x86])
dnl FIXME could use some better detection
dnl (ie CPUID)
- case "x${host_cpu}" in
+ case "x${target_cpu}" in
xi386 | xi486) ;;
*)
AC_DEFINE(HAVE_RDTSC, 1, [Define if RDTSC is available]) ;;
@@ -40,43 +41,43 @@ AC_DEFUN([AG_GST_ARCH],
;;
xpowerpc)
HAVE_CPU_PPC=yes
- AC_DEFINE(HAVE_CPU_PPC, 1, [Define if the host CPU is a PowerPC]) ;;
+ AC_DEFINE(HAVE_CPU_PPC, 1, [Define if the target CPU is a PowerPC]) ;;
xpowerpc64)
HAVE_CPU_PPC64=yes
- AC_DEFINE(HAVE_CPU_PPC64, 1, [Define if the host CPU is a 64 bit PowerPC]) ;;
+ AC_DEFINE(HAVE_CPU_PPC64, 1, [Define if the target CPU is a 64 bit PowerPC]) ;;
xalpha*)
HAVE_CPU_ALPHA=yes
- AC_DEFINE(HAVE_CPU_ALPHA, 1, [Define if the host CPU is an Alpha]) ;;
+ AC_DEFINE(HAVE_CPU_ALPHA, 1, [Define if the target CPU is an Alpha]) ;;
xarm*)
HAVE_CPU_ARM=yes
- AC_DEFINE(HAVE_CPU_ARM, 1, [Define if the host CPU is an ARM]) ;;
+ AC_DEFINE(HAVE_CPU_ARM, 1, [Define if the target CPU is an ARM]) ;;
xsparc*)
HAVE_CPU_SPARC=yes
- AC_DEFINE(HAVE_CPU_SPARC, 1, [Define if the host CPU is a SPARC]) ;;
+ AC_DEFINE(HAVE_CPU_SPARC, 1, [Define if the target CPU is a SPARC]) ;;
xmips*)
HAVE_CPU_MIPS=yes
- AC_DEFINE(HAVE_CPU_MIPS, 1, [Define if the host CPU is a MIPS]) ;;
+ AC_DEFINE(HAVE_CPU_MIPS, 1, [Define if the target CPU is a MIPS]) ;;
xhppa*)
HAVE_CPU_HPPA=yes
- AC_DEFINE(HAVE_CPU_HPPA, 1, [Define if the host CPU is a HPPA]) ;;
+ AC_DEFINE(HAVE_CPU_HPPA, 1, [Define if the target CPU is a HPPA]) ;;
xs390*)
HAVE_CPU_S390=yes
- AC_DEFINE(HAVE_CPU_S390, 1, [Define if the host CPU is a S390]) ;;
+ AC_DEFINE(HAVE_CPU_S390, 1, [Define if the target CPU is a S390]) ;;
xia64*)
HAVE_CPU_IA64=yes
- AC_DEFINE(HAVE_CPU_IA64, 1, [Define if the host CPU is a IA64]) ;;
+ AC_DEFINE(HAVE_CPU_IA64, 1, [Define if the target CPU is a IA64]) ;;
xm68k*)
HAVE_CPU_M68K=yes
- AC_DEFINE(HAVE_CPU_M68K, 1, [Define if the host CPU is a M68K]) ;;
+ AC_DEFINE(HAVE_CPU_M68K, 1, [Define if the target CPU is a M68K]) ;;
xx86_64)
HAVE_CPU_X86_64=yes
- AC_DEFINE(HAVE_CPU_X86_64, 1, [Define if the host CPU is a x86_64]) ;;
+ AC_DEFINE(HAVE_CPU_X86_64, 1, [Define if the target CPU is a x86_64]) ;;
xcris)
HAVE_CPU_CRIS=yes
- AC_DEFINE(HAVE_CPU_CRIS, 1, [Define if the host CPU is a CRIS]) ;;
+ AC_DEFINE(HAVE_CPU_CRIS, 1, [Define if the target CPU is a CRIS]) ;;
xcrisv32)
HAVE_CPU_CRISV32=yes
- AC_DEFINE(HAVE_CPU_CRISV32, 1, [Define if the host CPU is a CRISv32]) ;;
+ AC_DEFINE(HAVE_CPU_CRISV32, 1, [Define if the target CPU is a CRISv32]) ;;
esac
dnl Determine endianness
@@ -98,6 +99,7 @@ AC_DEFUN([AG_GST_ARCH],
AM_CONDITIONAL(HAVE_CPU_CRISV32, test "x$HAVE_CPU_CRISV32" = "xyes")
AC_DEFINE_UNQUOTED(HOST_CPU, "$host_cpu", [the host CPU])
+ AC_DEFINE_UNQUOTED(TARGET_CPU, "$target_cpu", [the target CPU])
])
dnl check if unaligned memory access works correctly