Cross-Platform build scripts for audio plugins
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

121 lines
3.3KB

  1. diff -Naur Python-3.8.0-orig/configure.ac Python-3.8.0/configure.ac
  2. --- Python-3.8.0-orig/configure.ac 2019-10-22 10:01:42.698017100 +0300
  3. +++ Python-3.8.0/configure.ac 2019-10-22 10:02:27.392095600 +0300
  4. @@ -377,6 +377,7 @@
  5. then
  6. # avoid using uname for cross builds
  7. if test "$cross_compiling" = yes; then
  8. + ac_sys_release=
  9. # ac_sys_system and ac_sys_release are used for setting
  10. # a lot of different things including 'define_xopen_source'
  11. # in the case statement below.
  12. @@ -390,6 +391,27 @@
  13. *-*-cygwin*)
  14. ac_sys_system=Cygwin
  15. ;;
  16. + *-*-darwin*)
  17. + ac_sys_system=Darwin
  18. + ac_sys_release=$(echo $host | sed -n 's/.*-[^0-9]\+\([0-9]\+\)/\1/p')
  19. + if test -z "$ac_sys_release"; then
  20. + # A reasonable default.
  21. + ac_sys_release=11
  22. + fi
  23. + # Use the last released version number for old versions.
  24. + if test "$ac_sys_release" = "9" ; then
  25. + ac_sys_release=9.8
  26. + elif test "$ac_sys_release" = "10" ; then
  27. + ac_sys_release=10.8
  28. + elif test "$ac_sys_release" = "11" ; then
  29. + ac_sys_release=11.4.0
  30. + elif test "$ac_sys_release" = "12" ; then
  31. + ac_sys_release=12.0.0
  32. + else
  33. + # ..and .0.0 for unknown versions.
  34. + ac_sys_release=${ac_sys_release}.0.0
  35. + fi
  36. + ;;
  37. *-*-vxworks*)
  38. ac_sys_system=VxWorks
  39. ;;
  40. @@ -398,7 +420,6 @@
  41. MACHDEP="unknown"
  42. AC_MSG_ERROR([cross build not supported for $host])
  43. esac
  44. - ac_sys_release=
  45. else
  46. ac_sys_system=`uname -s`
  47. if test "$ac_sys_system" = "AIX" \
  48. @@ -445,6 +466,9 @@
  49. *-*-mingw*)
  50. _host_cpu=
  51. ;;
  52. + *-*-darwin*)
  53. + _host_cpu=
  54. + ;;
  55. *)
  56. # for now, limit cross builds to known configurations
  57. MACHDEP="unknown"
  58. @@ -1619,6 +1643,26 @@
  59. AC_SUBST(CFLAGS_NODIST)
  60. AC_SUBST(LDFLAGS_NODIST)
  61. +if test "x$cross_compiling" = xyes; then
  62. + function cross_arch
  63. + {
  64. + case $host in
  65. + x86_64*darwin*)
  66. + echo i386
  67. + ;;
  68. + x86_64*)
  69. + echo x86_64
  70. + ;;
  71. + *)
  72. + echo i386
  73. + ;;
  74. + esac
  75. + }
  76. + ARCH_PROG=cross_arch
  77. +else
  78. + ARCH_PROG=/usr/bin/arch
  79. +fi
  80. +
  81. # The -arch flags for universal builds on OSX
  82. UNIVERSAL_ARCH_FLAGS=
  83. AC_SUBST(UNIVERSAL_ARCH_FLAGS)
  84. @@ -1970,7 +2014,7 @@
  85. ;;
  86. esac
  87. else
  88. - if test `/usr/bin/arch` = "i386"
  89. + if test "$($ARCH_PROG)" = "i386"
  90. then
  91. # 10.4 was the first release to support Intel archs
  92. cur_target="10.4"
  93. @@ -2526,7 +2570,7 @@
  94. if test "${enable_universalsdk}"; then
  95. :
  96. else
  97. - LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
  98. + LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only $($ARCH_PROG)"
  99. fi
  100. LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
  101. LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
  102. @@ -2551,7 +2595,7 @@
  103. ]])],[ac_osx_32bit=yes],[ac_osx_32bit=no],[ac_osx_32bit=yes])
  104. if test "${ac_osx_32bit}" = "yes"; then
  105. - case `/usr/bin/arch` in
  106. + case $($ARCH_PROG) in
  107. i386)
  108. MACOSX_DEFAULT_ARCH="i386"
  109. ;;
  110. @@ -2563,7 +2607,7 @@
  111. ;;
  112. esac
  113. else
  114. - case `/usr/bin/arch` in
  115. + case $($ARCH_PROG) in
  116. i386)
  117. MACOSX_DEFAULT_ARCH="x86_64"
  118. ;;