comparison configure @ 23565:916056111725

Simplify generation of ARCH_ and corresponding ENABLE_ defines
author reimar
date Tue, 19 Jun 2007 13:55:12 +0000
parents 8b7d62452ebd
children 4ce659b6f501
comparison
equal deleted inserted replaced
23564:8b7d62452ebd 23565:916056111725
1583 cc_check $_march $_gcc3_ext && _march="$_march $_gcc3_ext" 1583 cc_check $_march $_gcc3_ext && _march="$_march $_gcc3_ext"
1584 fi 1584 fi
1585 1585
1586 fi 1586 fi
1587 1587
1588
1589 _arch_all='X86 X86_32 X86_64 IA64 SPARC ARM ARMV4L POWERPC PPC ALPHA SGI_MIPS PA_RISC S390 S390X VAX GENERIC'
1588 case "$host_arch" in 1590 case "$host_arch" in
1589 i[3-9]86|x86|x86pc|k5|k6|k6-2|k6-3|pentium*|athlon*|i586-i686) 1591 i[3-9]86|x86|x86pc|k5|k6|k6-2|k6-3|pentium*|athlon*|i586-i686)
1590 _def_arch_x86="#define ARCH_X86 1" 1592 _arch='X86 X86_32'
1591 _target_arch_x86="ARCH_X86 = yes" 1593 _target_arch_x86="ARCH_X86 = yes"
1592 _def_arch="#define ARCH_X86_32 1"
1593 _target_arch="ARCH_X86_32 = yes" 1594 _target_arch="ARCH_X86_32 = yes"
1594 iproc=486 1595 iproc=486
1595 proc=i486 1596 proc=i486
1596 1597
1597 1598
1820 1821
1821 echores "$proc" 1822 echores "$proc"
1822 ;; 1823 ;;
1823 1824
1824 ia64) 1825 ia64)
1825 _def_arch='#define ARCH_IA64 1' 1826 _arch='IA64'
1826 _target_arch='ARCH_IA64 = yes' 1827 _target_arch='ARCH_IA64 = yes'
1827 iproc='ia64' 1828 iproc='ia64'
1828 proc='' 1829 proc=''
1829 _march='' 1830 _march=''
1830 _mcpu='' 1831 _mcpu=''
1831 _optimizing='' 1832 _optimizing=''
1832 ;; 1833 ;;
1833 1834
1834 x86_64|amd64) 1835 x86_64|amd64)
1835 _def_arch='#define ARCH_X86_64 1' 1836 _arch='X86 X86_64'
1836 _target_arch='ARCH_X86_64 = yes' 1837 _target_arch='ARCH_X86_64 = yes'
1837 _def_arch_x86="#define ARCH_X86 1"
1838 _target_arch_x86="ARCH_X86 = yes" 1838 _target_arch_x86="ARCH_X86 = yes"
1839 iproc='x86_64' 1839 iproc='x86_64'
1840 1840
1841 # gcc >= 3.4.0 doesn't support -mcpu, we have to use -mtune instead 1841 # gcc >= 3.4.0 doesn't support -mcpu, we have to use -mtune instead
1842 if test "$cc_vendor" = "gnu" && test "$_cc_major" -gt 3 -o "$_cc_major" -eq 3 -a "$_cc_minor" -ge 4 ; then 1842 if test "$cc_vendor" = "gnu" && test "$_cc_major" -gt 3 -o "$_cc_major" -eq 3 -a "$_cc_minor" -ge 4 ; then
1909 1909
1910 echores "$proc" 1910 echores "$proc"
1911 ;; 1911 ;;
1912 1912
1913 sparc) 1913 sparc)
1914 _def_arch='#define ARCH_SPARC 1' 1914 _arch='SPARC'
1915 _target_arch='ARCH_SPARC = yes' 1915 _target_arch='ARCH_SPARC = yes'
1916 iproc='sparc' 1916 iproc='sparc'
1917 if sunos ; then 1917 if sunos ; then
1918 echocheck "CPU type" 1918 echocheck "CPU type"
1919 karch=`uname -m` 1919 karch=`uname -m`
1934 _mcpu="-mcpu=$proc" 1934 _mcpu="-mcpu=$proc"
1935 _optimizing="$proc" 1935 _optimizing="$proc"
1936 ;; 1936 ;;
1937 1937
1938 sparc64) 1938 sparc64)
1939 _def_arch='#define ARCH_SPARC 1' 1939 _arch='SPARC'
1940 _target_arch='ARCH_SPARC = yes' 1940 _target_arch='ARCH_SPARC = yes'
1941 _vis='yes' 1941 _vis='yes'
1942 _def_vis='#define HAVE_VIS = yes' 1942 _def_vis='#define HAVE_VIS = yes'
1943 iproc='sparc' 1943 iproc='sparc'
1944 proc='v9' 1944 proc='v9'
1946 _mcpu="-mcpu=$proc" 1946 _mcpu="-mcpu=$proc"
1947 _optimizing="$proc" 1947 _optimizing="$proc"
1948 ;; 1948 ;;
1949 1949
1950 arm|armv4l|armv5tel) 1950 arm|armv4l|armv5tel)
1951 _def_arch='#define ARCH_ARMV4L 1' 1951 _arch='ARM ARMV4L'
1952 _target_arch='ARCH_ARMV4L = yes' 1952 _target_arch='ARCH_ARMV4L = yes'
1953 iproc='arm' 1953 iproc='arm'
1954 proc='' 1954 proc=''
1955 _march='' 1955 _march=''
1956 _mcpu='' 1956 _mcpu=''
1957 _optimizing='' 1957 _optimizing=''
1958 ;; 1958 ;;
1959 1959
1960 ppc|powerpc) 1960 ppc|powerpc)
1961 _def_arch='#define ARCH_POWERPC 1' 1961 _arch='POWERPC PPC'
1962 _def_dcbzl='#define NO_DCBZL 1' 1962 _def_dcbzl='#define NO_DCBZL 1'
1963 _target_arch='ARCH_POWERPC = yes' 1963 _target_arch='ARCH_POWERPC = yes'
1964 iproc='ppc' 1964 iproc='ppc'
1965 proc='' 1965 proc=''
1966 _march='' 1966 _march=''
2068 fi 2068 fi
2069 2069
2070 ;; 2070 ;;
2071 2071
2072 alpha) 2072 alpha)
2073 _def_arch='#define ARCH_ALPHA 1' 2073 _arch='ALPHA'
2074 _target_arch='ARCH_ALPHA = yes' 2074 _target_arch='ARCH_ALPHA = yes'
2075 iproc='alpha' 2075 iproc='alpha'
2076 _march='' 2076 _march=''
2077 2077
2078 echocheck "CPU type" 2078 echocheck "CPU type"
2119 echores "no, GCC = `$_cc -dumpversion 2>&1` (must be >= 3), CPU = $proc (must be pca56 or later)" 2119 echores "no, GCC = `$_cc -dumpversion 2>&1` (must be >= 3), CPU = $proc (must be pca56 or later)"
2120 fi 2120 fi
2121 ;; 2121 ;;
2122 2122
2123 mips) 2123 mips)
2124 _def_arch='#define ARCH_SGI_MIPS 1' 2124 _arch='SGI_MIPS'
2125 _target_arch='ARCH_SGI_MIPS = yes' 2125 _target_arch='ARCH_SGI_MIPS = yes'
2126 iproc='sgi-mips' 2126 iproc='sgi-mips'
2127 proc='' 2127 proc=''
2128 _march='' 2128 _march=''
2129 _mcpu='' 2129 _mcpu=''
2148 fi 2148 fi
2149 2149
2150 ;; 2150 ;;
2151 2151
2152 hppa) 2152 hppa)
2153 _def_arch='#define ARCH_PA_RISC 1' 2153 _arch='PA_RISC'
2154 _target_arch='ARCH_PA_RISC = yes' 2154 _target_arch='ARCH_PA_RISC = yes'
2155 iproc='PA-RISC' 2155 iproc='PA-RISC'
2156 proc='' 2156 proc=''
2157 _march='' 2157 _march=''
2158 _mcpu='' 2158 _mcpu=''
2159 _optimizing='' 2159 _optimizing=''
2160 ;; 2160 ;;
2161 2161
2162 s390) 2162 s390)
2163 _def_arch='#define ARCH_S390 1' 2163 _arch='S390'
2164 _target_arch='ARCH_S390 = yes' 2164 _target_arch='ARCH_S390 = yes'
2165 iproc='390' 2165 iproc='390'
2166 proc='' 2166 proc=''
2167 _march='' 2167 _march=''
2168 _mcpu='' 2168 _mcpu=''
2169 _optimizing='' 2169 _optimizing=''
2170 ;; 2170 ;;
2171 2171
2172 s390x) 2172 s390x)
2173 _def_arch='#define ARCH_S390X 1' 2173 _arch='S390X'
2174 _target_arch='ARCH_S390X = yes' 2174 _target_arch='ARCH_S390X = yes'
2175 iproc='390x' 2175 iproc='390x'
2176 proc='' 2176 proc=''
2177 _march='' 2177 _march=''
2178 _mcpu='' 2178 _mcpu=''
2179 _optimizing='' 2179 _optimizing=''
2180 ;; 2180 ;;
2181 2181
2182 vax) 2182 vax)
2183 _def_arch='#define ARCH_VAX 1' 2183 _arch='VAX'
2184 _target_arch='ARCH_VAX = yes' 2184 _target_arch='ARCH_VAX = yes'
2185 iproc='vax' 2185 iproc='vax'
2186 proc='' 2186 proc=''
2187 _march='' 2187 _march=''
2188 _mcpu='' 2188 _mcpu=''
2189 _optimizing='' 2189 _optimizing=''
2190 ;; 2190 ;;
2191 2191
2192 generic) 2192 generic)
2193 _def_arch='#define ARCH_GENERIC 1' 2193 _arch='GENERIC'
2194 _target_arch='ARCH_GENERIC = yes' 2194 _target_arch='ARCH_GENERIC = yes'
2195 iproc='' 2195 iproc=''
2196 proc='' 2196 proc=''
2197 _march='' 2197 _march=''
2198 _mcpu='' 2198 _mcpu=''
8164 8164
8165 /* Define if your processor stores words with the most significant 8165 /* Define if your processor stores words with the most significant
8166 byte first (like Motorola and SPARC, unlike Intel and VAX). */ 8166 byte first (like Motorola and SPARC, unlike Intel and VAX). */
8167 $_def_words_endian 8167 $_def_words_endian
8168 8168
8169 $_def_arch 8169 `ff_config_enable "$_arch_all" "$_arch" "ARCH"`
8170 $_def_arch_x86
8171 8170
8172 /* For the PPC. G5 has the dcbzl when in 64bit mode but G4s and earlier do not 8171 /* For the PPC. G5 has the dcbzl when in 64bit mode but G4s and earlier do not
8173 have the instruction. */ 8172 have the instruction. */
8174 $_def_dcbzl 8173 $_def_dcbzl
8175
8176 /* libmpeg2 wants ARCH_PPC and the rest of mplayer use ARCH_POWERPC,
8177 * define ARCH_PPC if ARCH_POWERPC is set to cope with that.
8178 */
8179 #ifdef ARCH_POWERPC
8180 #define ARCH_PPC 1
8181 #endif
8182
8183 /* the same issue as with ARCH_POWERPC but with ffmpeg/libavcodec */
8184 #ifdef ARCH_ARMV4L
8185 #define ARCH_ARM 1
8186 #endif
8187 8174
8188 /* only gcc3 can compile mvi instructions */ 8175 /* only gcc3 can compile mvi instructions */
8189 $_def_gcc_mvi_support 8176 $_def_gcc_mvi_support
8190 8177
8191 /* Define this for Cygwin build for win32 */ 8178 /* Define this for Cygwin build for win32 */
8409 #ifdef HAVE_MMX 8396 #ifdef HAVE_MMX
8410 #define ENABLE_MMX 1 8397 #define ENABLE_MMX 1
8411 #else 8398 #else
8412 #define ENABLE_MMX 0 8399 #define ENABLE_MMX 0
8413 #endif 8400 #endif
8414 #ifdef ARCH_ARMV4L
8415 #define ENABLE_ARMV4L 1
8416 #else
8417 #define ENABLE_ARMV4L 0
8418 #endif
8419 #ifdef HAVE_MLIB 8401 #ifdef HAVE_MLIB
8420 #define ENABLE_MLIB 1 8402 #define ENABLE_MLIB 1
8421 #else 8403 #else
8422 #define ENABLE_MLIB 0 8404 #define ENABLE_MLIB 0
8423 #endif
8424 #ifdef ARCH_SPARC
8425 #define ENABLE_SPARC 1
8426 #else
8427 #define ENABLE_SPARC 0
8428 #endif
8429 #ifdef ARCH_ALPHA
8430 #define ENABLE_ALPHA 1
8431 #else
8432 #define ENABLE_ALPHA 0
8433 #endif
8434 #ifdef ARCH_POWERPC
8435 #define ENABLE_POWERPC 1
8436 #else
8437 #define ENABLE_POWERPC 0
8438 #endif 8405 #endif
8439 #define ENABLE_MMI 0 8406 #define ENABLE_MMI 0
8440 #define ENABLE_SH4 0 8407 #define ENABLE_SH4 0
8441 #define ENABLE_BFIN 0 8408 #define ENABLE_BFIN 0
8442 8409