]> git.sesse.net Git - ffmpeg/blobdiff - configure
Simplify: use a for instead of unrolling by hand
[ffmpeg] / configure
index 33467110215bf28ecf6c9dc09ef113c127982eb8..94077a4c5fce9c53e0e950cc205e875ef4020f24 100755 (executable)
--- a/configure
+++ b/configure
@@ -848,6 +848,7 @@ byteswap_h_deps="!armv4l"
 # decoders / encoders
 ac3_decoder_deps="gpl !liba52"
 dxa_decoder_deps="zlib"
+eac3_decoder_deps="gpl"
 flashsv_decoder_deps="zlib"
 flashsv_encoder_deps="zlib"
 mlp_decoder_deps="mlp_parser"
@@ -974,6 +975,7 @@ enable stripping
 vhook="default"
 
 # build settings
+add_cflags -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112
 SHFLAGS='-shared -Wl,-soname,$$(@F)'
 VHOOKSHFLAGS='$(SHFLAGS)'
 FFSERVERLDFLAGS=-Wl,-E
@@ -1124,6 +1126,9 @@ TMPO="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.o"
 TMPS="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.S"
 TMPSH="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.sh"
 
+check_cflags -fasm
+check_cflags -std=c99
+
 case "$arch" in
     i386|i486|i586|i686|i86pc|BePC)
         arch="x86_32"
@@ -1258,6 +1263,7 @@ case $target_os in
         SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(FULLNAME).$(LIBMAJOR)$(SLIBSUF)'
         FFSERVERLDFLAGS=-Wl,-bind_at_load
         objformat="macho"
+        enabled x86_64 && objformat="macho64"
         ;;
     mingw32*)
         target_os=mingw32
@@ -1557,6 +1563,7 @@ EOF
     enabled_all x86_64 shared && append YASMFLAGS "-DPIC"
     case "$objformat" in
         elf) enabled debug && append YASMFLAGS "-g dwarf2" ;;
+        macho64)              append YASMFLAGS "-DPIC -DPREFIX" ;;
         *)                    append YASMFLAGS "-DPREFIX"  ;;
     esac
     check_yasm "pabsw xmm0, xmm0" && enable yasm
@@ -1640,8 +1647,10 @@ check_header byteswap.h
 check_header conio.h
 check_header dlfcn.h
 check_header malloc.h
+check_header poll.h
 check_header sys/mman.h
 check_header sys/resource.h
+check_header sys/select.h
 check_header termios.h
 
 if ! enabled_any memalign memalign_hack && enabled need_memalign ; then
@@ -1651,13 +1660,6 @@ fi
 enabled  zlib && check_lib  zlib.h      zlibVersion -lz   || disable  zlib
 enabled bzlib && check_lib bzlib.h BZ2_bzlibVersion -lbz2 || disable bzlib
 
-# ffserver uses poll(),
-# if it's not found we can emulate it using select().
-if enabled ffserver; then
-    check_header poll.h
-    check_header sys/select.h
-fi
-
 # check for some common methods of building with pthread support
 # do this before the optional library checks as some of them require pthreads
 if enabled pthreads; then
@@ -1689,7 +1691,6 @@ check_lib math.h sin -lm
 # test for C99 functions in math.h
 for func in llrint lrint lrintf round roundf; do
     check_exec <<EOF && enable $func || disable $func
-#define _ISOC9X_SOURCE  1
 #include <math.h>
 int main(void) { return ($func(3.999f) > 0)?0:1; }
 EOF
@@ -1952,6 +1953,7 @@ if test "$build_suffix" != ""; then
 fi
 echo "big-endian                ${bigendian-no}"
 if test $arch = "x86_32" -o $arch = "x86_64"; then
+    echo "yasm                      ${yasm-no}"
     echo "MMX enabled               ${mmx-no}"
     echo "CMOV enabled              ${cmov-no}"
     echo "CMOV is fast              ${fast_cmov-no}"