patch-configure 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. --- libx264-1.0.1.orig/configure 2014-01-22 11:20:21.000000000 +0100
  2. +++ libx264-1.0.1/configure 2014-02-23 19:54:33.000000000 +0100
  3. @@ -560,7 +560,7 @@ LDFLAGS="$LDFLAGS $libm"
  4. aligned_stack=1
  5. case $host_cpu in
  6. i*86)
  7. - ARCH="X86"
  8. + XARCH="X86"
  9. AS="yasm"
  10. ASFLAGS="$ASFLAGS -O2"
  11. if [ $compiler = GNU ]; then
  12. @@ -600,7 +600,7 @@ case $host_cpu in
  13. fi
  14. ;;
  15. x86_64)
  16. - ARCH="X86_64"
  17. + XARCH="X86_64"
  18. AS="yasm"
  19. [ $compiler = GNU ] && CFLAGS="-m64 $CFLAGS" && LDFLAGS="-m64 $LDFLAGS"
  20. if [ "$SYS" = MACOSX ]; then
  21. @@ -620,7 +620,7 @@ case $host_cpu in
  22. fi
  23. ;;
  24. powerpc|powerpc64)
  25. - ARCH="PPC"
  26. + XARCH="PPC"
  27. if [ $asm = auto ] ; then
  28. define HAVE_ALTIVEC
  29. AS="${AS-${cross_prefix}gcc}"
  30. @@ -633,11 +633,11 @@ case $host_cpu in
  31. fi
  32. ;;
  33. sparc)
  34. - ARCH="SPARC"
  35. + XARCH="SPARC"
  36. case $(uname -m) in
  37. sun4u|sun4v)
  38. if [ $asm = auto ]; then
  39. - ARCH="UltraSPARC"
  40. + XARCH="UltraSPARC"
  41. if ! echo $CFLAGS | grep -Eq '\-mcpu' ; then
  42. CFLAGS="$CFLAGS -mcpu=ultrasparc"
  43. LDFLAGS="$LDFLAGS -mcpu=ultrasparc"
  44. @@ -649,10 +649,10 @@ case $host_cpu in
  45. esac
  46. ;;
  47. mips|mipsel|mips64|mips64el)
  48. - ARCH="MIPS"
  49. + XARCH="MIPS"
  50. ;;
  51. arm*)
  52. - ARCH="ARM"
  53. + XARCH="ARM"
  54. if [ "$SYS" = MACOSX ] ; then
  55. AS="${AS-extras/gas-preprocessor.pl $CC}"
  56. ASFLAGS="$ASFLAGS -DPREFIX -DPIC" # apple's ld doesn't support movw/movt relocations at all
  57. @@ -662,23 +662,23 @@ case $host_cpu in
  58. LDFLAGS="$LDFLAGS -arch armv7"
  59. fi
  60. else
  61. - AS="${AS-${cross_prefix}gcc}"
  62. + AS="${cross_prefix}gcc"
  63. fi
  64. ;;
  65. s390|s390x)
  66. - ARCH="S390"
  67. + XARCH="S390"
  68. ;;
  69. hppa*|parisc*)
  70. - ARCH="PARISC"
  71. + XARCH="PARISC"
  72. ;;
  73. ia64)
  74. - ARCH="IA64"
  75. + XARCH="IA64"
  76. ;;
  77. alpha*)
  78. - ARCH="ALPHA"
  79. + XARCH="ALPHA"
  80. ;;
  81. *)
  82. - ARCH="$(echo $host_cpu | tr a-z A-Z)"
  83. + XARCH="$(echo $host_cpu | tr a-z A-Z)"
  84. ;;
  85. esac
  86. ASFLAGS="$ASFLAGS -DHAVE_ALIGNED_STACK=${aligned_stack}"
  87. @@ -713,11 +713,11 @@ if [ $compiler != ICL ]; then
  88. fi
  89. fi
  90. -if [ $shared = yes -a \( $ARCH = "X86_64" -o $ARCH = "PPC" -o $ARCH = "ALPHA" -o $ARCH = "ARM" -o $ARCH = "IA64" -o $ARCH = "PARISC" -o $ARCH = "MIPS" \) ] ; then
  91. +if [ $shared = yes -a \( $XARCH = "X86_64" -o $XARCH = "PPC" -o $XARCH = "ALPHA" -o $XARCH = "ARM" -o $XARCH = "IA64" -o $XARCH = "PARISC" -o $XARCH = "MIPS" \) ] ; then
  92. pic="yes"
  93. fi
  94. -if [ $asm = auto -a \( $ARCH = X86 -o $ARCH = X86_64 \) ] ; then
  95. +if [ $asm = auto -a \( $XARCH = X86 -o $XARCH = X86_64 \) ] ; then
  96. if ! as_check "vpmovzxwd ymm0, xmm0" ; then
  97. VER=`($AS --version || echo no assembler) 2>/dev/null | head -n 1`
  98. echo "Found $VER"
  99. @@ -740,7 +740,7 @@ if [ $asm = auto -a \( $ARCH = X86 -o $A
  100. fi
  101. fi
  102. -if [ $asm = auto -a $ARCH = ARM ] ; then
  103. +if [ $asm = auto -a $XARCH = ARM ] ; then
  104. # set flags so neon is built by default
  105. echo $CFLAGS | grep -Eq '(-mcpu|-march|-mfpu)' || CFLAGS="$CFLAGS -mcpu=cortex-a8 -mfpu=neon"
  106. @@ -758,7 +758,7 @@ fi
  107. [ $asm = no ] && AS=""
  108. [ "x$AS" = x ] && asm="no" || asm="yes"
  109. -define ARCH_$ARCH
  110. +define ARCH_$XARCH
  111. define SYS_$SYS
  112. # skip endianness check for Intel Compiler, as all supported platforms are little. the -ipo flag will also cause the check to fail
  113. @@ -834,7 +834,7 @@ if cc_check "math.h" "-Werror" "return l
  114. define HAVE_LOG2F
  115. fi
  116. -if [ "$SYS" = "LINUX" -a \( "$ARCH" = "X86" -o "$ARCH" = "X86_64" \) ] && cc_check "sys/mman.h" "" "MADV_HUGEPAGE;" ; then
  117. +if [ "$SYS" = "LINUX" -a \( "$XARCH" = "X86" -o "$XARCH" = "X86_64" \) ] && cc_check "sys/mman.h" "" "MADV_HUGEPAGE;" ; then
  118. define HAVE_THP
  119. fi
  120. @@ -990,7 +990,7 @@ if [ "$pic" = "yes" ] ; then
  121. ASFLAGS="$ASFLAGS -DPIC"
  122. # resolve textrels in the x86 asm
  123. cc_check stdio.h "-shared -Wl,-Bsymbolic" && SOFLAGS="$SOFLAGS -Wl,-Bsymbolic"
  124. - [ $SYS = SunOS -a "$ARCH" = "X86" ] && SOFLAGS="$SOFLAGS -mimpure-text"
  125. + [ $SYS = SunOS -a "$XARCH" = "X86" ] && SOFLAGS="$SOFLAGS -mimpure-text"
  126. fi
  127. if [ "$debug" != "yes" -a "$gprof" != "yes" ]; then
  128. @@ -1004,19 +1004,19 @@ fi
  129. if [ "$debug" = "yes" ]; then
  130. CFLAGS="-O1 -g $CFLAGS"
  131. -elif [ $ARCH = ARM ]; then
  132. +elif [ $XARCH = ARM ]; then
  133. # arm-gcc-4.2 produces incorrect output with -ffast-math
  134. # and it doesn't save any speed anyway on 4.4, so disable it
  135. - CFLAGS="-O3 -fno-fast-math $CFLAGS"
  136. + CFLAGS="-fno-fast-math $CFLAGS"
  137. else
  138. - CFLAGS="-O3 -ffast-math $CFLAGS"
  139. + CFLAGS="-ffast-math $CFLAGS"
  140. fi
  141. if cc_check '' -fno-tree-vectorize ; then
  142. CFLAGS="$CFLAGS -fno-tree-vectorize"
  143. fi
  144. -if [ $SYS = WINDOWS -a $ARCH = X86 -a $compiler = GNU ] ; then
  145. +if [ $SYS = WINDOWS -a $XARCH = X86 -a $compiler = GNU ] ; then
  146. # workaround gcc/ld bug with alignment of static variables/arrays that are initialized to zero
  147. cc_check '' -fno-zero-initialized-in-bss && CFLAGS="$CFLAGS -fno-zero-initialized-in-bss"
  148. fi
  149. @@ -1117,7 +1117,7 @@ if [ $compiler = GNU ]; then
  150. else
  151. CFLAGS="$(intel_cflags $CFLAGS)"
  152. # icc does not define __SSE__ until SSE2 optimization and icl never defines it or _M_IX86_FP
  153. - [ \( $ARCH = X86_64 -o $ARCH = X86 \) -a $asm = yes ] && ! cpp_check "" "" "defined(__SSE__)" && define __SSE__
  154. + [ \( $XARCH = X86_64 -o $XARCH = X86 \) -a $asm = yes ] && ! cpp_check "" "" "defined(__SSE__)" && define __SSE__
  155. PROF_GEN_CC="${QPRE}prof-gen ${QPRE}prof-dir."
  156. PROF_GEN_LD=
  157. PROF_USE_CC="${QPRE}prof-use ${QPRE}prof-dir."
  158. @@ -1146,7 +1146,7 @@ exec_prefix=$exec_prefix
  159. bindir=$bindir
  160. libdir=$libdir
  161. includedir=$includedir
  162. -ARCH=$ARCH
  163. +XARCH=$XARCH
  164. SYS=$SYS
  165. CC=$CC
  166. CFLAGS=$CFLAGS
  167. @@ -1260,7 +1260,7 @@ gpl_filters=""
  168. [ $gpl = yes ] && filters="$filters $gpl_filters"
  169. cat > conftest.log <<EOF
  170. -platform: $ARCH
  171. +platform: $XARCH
  172. system: $SYS
  173. cli: $cli
  174. libx264: $cli_libx264