summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2008-03-27 11:33:21 +0000
committerDiego Biurrun <diego@biurrun.de>2008-03-27 11:33:21 +0000
commite9c192562f9e5e5e43241f748168f9726922e605 (patch)
treeb025c0ecf97a51be0c8338ff9d4a363342dd55c8 /configure
parent61559562f52f9cfaf050500342c5bbba9ece3ce9 (diff)
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
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure146
1 files changed, 73 insertions, 73 deletions
diff --git a/configure b/configure
index 49a75a484e..8d4be56760 100755
--- a/configure
+++ b/configure
@@ -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"