]> git.sesse.net Git - ffmpeg/blobdiff - configure
Reindent after the last commit, while at it also add some spaces for
[ffmpeg] / configure
index 6916df471bd16550a69b94e1d493bc343a41242f..f1eab728fef7ef3a4ff11d49ec8ca742c7356859 100755 (executable)
--- a/configure
+++ b/configure
@@ -875,6 +875,7 @@ HAVE_LIST="
     roundf
     sdl
     sdl_video_size
+    setmode
     socklen_t
     soundcard_h
     poll_h
@@ -885,6 +886,7 @@ HAVE_LIST="
     sys_videoio_h
     termios_h
     threads
+    truncf
     winsock2_h
     yasm
 "
@@ -1303,15 +1305,17 @@ check_cflags -std=c99
 
 case "$arch" in
     i386|i486|i586|i686|i86pc|BePC)
-        arch="x86_32"
+        arch="x86"
+        subarch="x86_32"
         enable fast_unaligned
     ;;
     x86_64|amd64)
-        arch="x86_32"
+        arch="x86"
+        subarch="x86_32"
         enable cmov
         enable fast_cmov
         enable fast_unaligned
-        check_cc <<EOF && enable fast_64bit && arch="x86_64"
+        check_cc <<EOF && enable fast_64bit && subarch="x86_64"
         int test[sizeof(char*) - 7];
 EOF
     ;;
@@ -1339,7 +1343,8 @@ EOF
         enable fast_64bit
     ;;
     sun4u|sparc64)
-        arch="sparc64"
+        arch="sparc"
+        subarch="sparc64"
         enable fast_64bit
     ;;
     sparc)
@@ -1373,9 +1378,7 @@ EOF
     ;;
 esac
 
-enable $arch
-enabled_any x86_32 x86_64 && enable x86
-enabled     sparc64       && enable sparc
+enable $arch $subarch
 
 # OS specific
 case $target_os in
@@ -1445,7 +1448,7 @@ case $target_os in
     mingw32*)
         target_os=mingw32
         LIBTARGET=i386
-        if test $arch = x86_64; then
+        if enabled x86_64; then
             disable need_memalign
             LIBTARGET=x64
         fi
@@ -1747,7 +1750,7 @@ EOF
 
     check_asm bswap '"bswap %%eax" ::: "%eax"'
 
-    YASMFLAGS="-f $objformat -DARCH_$(toupper $arch)"
+    YASMFLAGS="-f $objformat -DARCH_$(toupper $subarch)"
     enabled     x86_64        && append YASMFLAGS "-m amd64"
     enabled_all x86_64 shared && append YASMFLAGS "-DPIC"
     case "$objformat" in
@@ -1823,6 +1826,7 @@ check_func  inet_aton $network_extralibs
 check_func  memalign
 check_func  mkstemp
 check_func  posix_memalign
+check_func_headers io.h setmode
 check_func_headers windows.h GetProcessTimes
 
 check_header conio.h
@@ -1873,7 +1877,7 @@ done
 check_lib math.h sin -lm
 
 # test for C99 functions in math.h
-for func in llrint lrint lrintf round roundf; do
+for func in llrint lrint lrintf round roundf truncf; do
     check_exec <<EOF && enable $func || disable $func
 #include <math.h>
 int main(void) { return ($func(3.999f) > 0)?0:1; }
@@ -2081,7 +2085,7 @@ fi
 if enabled shared; then
     # LIBOBJFLAGS may have already been set in the OS configuration
     if test -z "$LIBOBJFLAGS" ; then
-        case "$arch" in
+        case "${subarch-$arch}" in
             x86_64|ia64|alpha|sparc*|power*|parisc*|mips*) LIBOBJFLAGS='$(PIC)' ;;
         esac
     fi
@@ -2321,6 +2325,8 @@ fi
 echo "LIB_INSTALL_EXTRA_CMD=${LIB_INSTALL_EXTRA_CMD}" >> config.mak
 echo "EXTRALIBS=$extralibs" >> config.mak
 
+echo "ARCH=$arch" >> config.mak
+
 print_config ARCH_   $TMPH config.mak $ARCH_LIST
 print_config HAVE_   $TMPH config.mak $HAVE_LIST
 print_config CONFIG_ $TMPH config.mak $CONFIG_LIST       \