aboutsummaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorMemphiz <memphis@machzwo.de>2015-02-01 20:44:10 +0100
committerMemphiz <memphis@machzwo.de>2015-02-01 20:44:10 +0100
commit4c37bca07c2eb528e32d7d0969c2960dd4f2bb12 (patch)
tree13af6f4672ec892f338186f7eda584f4a9f69b50 /m4
parent4387ea81f6484d4dc099c13bf6d550aa7548796a (diff)
parentf4d890bea8649807bada6795294191104cfd0595 (diff)
Merge pull request #6275 from Memphiz/fixnative
[depends] - fixes which allow building for android on osx mashines
Diffstat (limited to 'm4')
-rw-r--r--m4/xbmc_arch.m435
1 files changed, 33 insertions, 2 deletions
diff --git a/m4/xbmc_arch.m4 b/m4/xbmc_arch.m4
index f9ab5cd87c..0b66a8257e 100644
--- a/m4/xbmc_arch.m4
+++ b/m4/xbmc_arch.m4
@@ -1,6 +1,37 @@
AC_DEFUN([XBMC_SETUP_ARCH_DEFINES],[
-# host detection and setup
+# build detection and setup - this is the native arch
+case $build in
+ i*86*-linux-gnu*|i*86*-*-linux-uclibc*)
+ AC_SUBST(NATIVE_ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX")
+ ;;
+ x86_64-*-linux-gnu*|x86_64-*-linux-uclibc*)
+ AC_SUBST(NATIVE_ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX")
+ ;;
+ i386-*-freebsd*)
+ AC_SUBST(NATIVE_ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_FREEBSD -D_LINUX")
+ ;;
+ amd64-*-freebsd*)
+ AC_SUBST(NATIVE_ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_FREEBSD -D_LINUX")
+ ;;
+ *86*-apple-darwin*)
+ AC_SUBST(NATIVE_ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_DARWIN -DTARGET_DARWIN_OSX -D_LINUX")
+ ;;
+ powerpc-*-linux-gnu*|powerpc-*-linux-uclibc*)
+ AC_SUBST(NATIVE_ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX -D_POWERPC")
+ ;;
+ powerpc64-*-linux-gnu*|powerpc64-*-linux-uclibc*)
+ AC_SUBST(NATIVE_ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX -D_POWERPC64")
+ ;;
+ arm*-*-linux-gnu*|arm*-*-linux-uclibc*)
+ AC_SUBST(NATIVE_ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX")
+ ;;
+ *)
+ AC_MSG_ERROR(unsupported native build platform: $build)
+esac
+
+
+# host detection and setup - this is the target arch
case $host in
i*86*-linux-gnu*|i*86*-*-linux-uclibc*)
AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX")
@@ -39,7 +70,7 @@ case $host in
AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX -DTARGET_ANDROID")
;;
*)
- AC_MSG_ERROR(unsupported host ($host))
+ AC_MSG_ERROR(unsupported build target: $host)
esac
if test "$target_platform" = "target_android" ; then