Revision 304d586d configure

View differences:

configure
445 445
EOF
446 446
}
447 447

  
448
check_yasm(){
449
    log check_yasm "$@"
450
    echo "$1" > $TMPS
451
    log_file $TMPS
452
    shift 1
453
    check_cmd $yasmexe $YASMFLAGS "$@" -o $TMPO $TMPS
454
}
455

  
448 456
check_ld(){
449 457
    log check_ld "$@"
450 458
    check_cc || return
......
781 789
    termios_h
782 790
    threads
783 791
    winsock2_h
792
    yasm
784 793
"
785 794

  
786 795
CMDLINE_SELECT="
......
930 939

  
931 940
# toolchain
932 941
cc="gcc"
942
yasmexe="yasm"
933 943
ar="ar"
934 944
nm="nm"
935 945
ranlib="ranlib"
936 946
strip="strip"
937 947
asmalign_pot="unknown"
938 948
ln_s="ln -sf"
949
objformat="elf"
939 950

  
940 951
# machine
941 952
arch=`uname -m`
......
1091 1102
set >> $logfile
1092 1103

  
1093 1104
cc="${cross_prefix}${cc}"
1105
yasmexe="${cross_prefix}${yasmexe}"
1094 1106
ar="${cross_prefix}${ar}"
1095 1107
nm="${cross_prefix}${nm}"
1096 1108
ranlib="${cross_prefix}${ranlib}"
......
1245 1257
        SLIBNAME_WITH_VERSION='$(SLIBPREF)$(FULLNAME).$(LIBVERSION)$(SLIBSUF)'
1246 1258
        SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(FULLNAME).$(LIBMAJOR)$(SLIBSUF)'
1247 1259
        FFSERVERLDFLAGS=-Wl,-bind_at_load
1260
        objformat="macho"
1248 1261
        ;;
1249 1262
    mingw32*)
1250 1263
        target_os=mingw32
......
1271 1284
            install -m 644 $(SUBDIR)$(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.lib) "$(SHLIBDIR)/$(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.lib)"'
1272 1285
        SLIB_UNINSTALL_EXTRA_CMD='rm -f "$(SHLIBDIR)/$(SLIBNAME:$(SLIBSUF)=.lib)"'
1273 1286
        SHFLAGS='-shared -Wl,--output-def,$$(@:$(SLIBSUF)=.def) -Wl,--enable-runtime-pseudo-reloc -Wl,--enable-auto-image-base'
1287
        objformat="win32"
1274 1288
        ;;
1275 1289
    cygwin*)
1276 1290
        target_os=cygwin
......
1287 1301
        SLIBNAME_WITH_VERSION='$(SLIBPREF)$(FULLNAME)-$(LIBVERSION)$(SLIBSUF)'
1288 1302
        SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(FULLNAME)-$(LIBMAJOR)$(SLIBSUF)'
1289 1303
        SHFLAGS='-shared -Wl,--enable-auto-image-base'
1304
        objformat="win32"
1290 1305
        ;;
1291 1306
    *-dos|freedos|opendos)
1292 1307
        disable ffplay ffserver vhook
1293 1308
        disable $INDEV_LIST $OUTDEV_LIST
1294 1309
        network_extralibs="-lsocket"
1295 1310
        EXESUF=".exe"
1311
        objformat="win32"
1296 1312
        ;;
1297 1313
    linux)
1298 1314
        enable dv1394
......
1535 1551
    enabled mmx2  && check_asm mmx2  '"movss %xmm0, %xmm0"'
1536 1552

  
1537 1553
    check_asm bswap '"bswap %%eax" ::: "%eax"'
1554

  
1555
    YASMFLAGS="-f $objformat -DARCH_$(toupper $arch)"
1556
    enabled     x86_64        && append YASMFLAGS "-m amd64"
1557
    enabled_all x86_64 shared && append YASMFLAGS "-DPIC"
1558
    case "$objformat" in
1559
        elf) enabled debug && append YASMFLAGS "-g dwarf2" ;;
1560
        *)                    append YASMFLAGS "-DPREFIX"  ;;
1561
    esac
1562
    check_yasm "pabsw xmm0, xmm0" && enable yasm
1538 1563
fi
1539 1564

  
1540 1565
# check for assembler specific support
......
2028 2053
echo "BINDIR=\$(DESTDIR)$bindir" >> config.mak
2029 2054
echo "MANDIR=\$(DESTDIR)$mandir" >> config.mak
2030 2055
echo "CC=$cc" >> config.mak
2056
echo "YASM=$yasmexe" >> config.mak
2031 2057
echo "AR=$ar" >> config.mak
2032 2058
echo "RANLIB=$ranlib" >> config.mak
2033 2059
echo "LN_S=$ln_s" >> config.mak
......
2040 2066
echo "LDFLAGS=$LDFLAGS" >> config.mak
2041 2067
echo "FFSERVERLDFLAGS=$FFSERVERLDFLAGS" >> config.mak
2042 2068
echo "SHFLAGS=$SHFLAGS" >> config.mak
2069
echo "YASMFLAGS=$YASMFLAGS" >> config.mak
2043 2070
echo "VHOOKSHFLAGS=$VHOOKSHFLAGS" >> config.mak
2044 2071
echo "VHOOKLIBS=$VHOOKLIBS" >> config.mak
2045 2072
echo "LIBOBJFLAGS=$LIBOBJFLAGS" >> config.mak

Also available in: Unified diff