1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

Move CPU detection code after OS-specific settings and logging system

initialization so that we can use compilation checks inside it.

Originally committed as revision 12602 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Diego Biurrun 2008-03-27 11:33:21 +00:00
parent 61559562f5
commit e9c192562f

146
configure vendored
View File

@ -1054,79 +1054,6 @@ for opt do
esac
done
case "$arch" in
i386|i486|i586|i686|i86pc|BePC)
arch="x86_32"
enable fast_unaligned
;;
x86_64|amd64)
arch="x86_32"
enable fast_unaligned
canon_arch="`$cc -dumpmachine | sed -e 's,\([^-]*\)-.*,\1,'`"
if [ x"$canon_arch" = x"x86_64" -o x"$canon_arch" = x"amd64" ]; then
if ! echo $CFLAGS | grep -q -- -m32; then
arch="x86_64"
enable fast_64bit
fi
fi
;;
# armv4l is a subset of armv[567]*l
arm|armv[4567]*l)
arch="armv4l"
;;
alpha)
arch="alpha"
enable fast_64bit
;;
"Power Macintosh"|ppc|powerpc)
arch="powerpc"
;;
ppc64)
arch="powerpc"
enable fast_64bit
;;
mips|mipsel|IP*)
arch="mips"
;;
sun4u|sparc64)
arch="sparc64"
enable fast_64bit
;;
sparc)
arch="sparc"
;;
sh4)
arch="sh4"
;;
parisc)
arch="parisc"
;;
parisc64)
arch="parisc"
enable fast_64bit
;;
s390|s390x)
arch="s390"
;;
m68k)
arch="m68k"
;;
ia64)
arch="ia64"
enable fast_64bit
;;
bfin)
arch="bfin"
;;
*)
arch="unknown"
;;
esac
enable $arch
enabled_any x86_32 x86_64 && enable x86
enabled sparc64 && enable sparc
# OS specific
case $target_os in
beos|haiku|zeta)
@ -1298,6 +1225,79 @@ disabled logging && logfile=/dev/null
echo "# $0 $@" >$logfile
set >>$logfile
case "$arch" in
i386|i486|i586|i686|i86pc|BePC)
arch="x86_32"
enable fast_unaligned
;;
x86_64|amd64)
arch="x86_32"
enable fast_unaligned
canon_arch="`$cc -dumpmachine | sed -e 's,\([^-]*\)-.*,\1,'`"
if [ x"$canon_arch" = x"x86_64" -o x"$canon_arch" = x"amd64" ]; then
if ! echo $CFLAGS | grep -q -- -m32; then
arch="x86_64"
enable fast_64bit
fi
fi
;;
# armv4l is a subset of armv[567]*l
arm|armv[4567]*l)
arch="armv4l"
;;
alpha)
arch="alpha"
enable fast_64bit
;;
"Power Macintosh"|ppc|powerpc)
arch="powerpc"
;;
ppc64)
arch="powerpc"
enable fast_64bit
;;
mips|mipsel|IP*)
arch="mips"
;;
sun4u|sparc64)
arch="sparc64"
enable fast_64bit
;;
sparc)
arch="sparc"
;;
sh4)
arch="sh4"
;;
parisc)
arch="parisc"
;;
parisc64)
arch="parisc"
enable fast_64bit
;;
s390|s390x)
arch="s390"
;;
m68k)
arch="m68k"
;;
ia64)
arch="ia64"
enable fast_64bit
;;
bfin)
arch="bfin"
;;
*)
arch="unknown"
;;
esac
enable $arch
enabled_any x86_32 x86_64 && enable x86
enabled sparc64 && enable sparc
# Combine FFLDFLAGS and the LDFLAGS environment variable.
LDFLAGS="$FFLDFLAGS $LDFLAGS"