X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=configure;fp=configure;h=314cd954d2bb90c26c85bf3d4a92697dc86c3484;hb=fc11dd059b5c7369a51ddcca532505b588bd0030;hp=c3309b5fe93db800c1e747856f53666be06f7743;hpb=90f0dedf83b5eac80fc6b7aeed36c3429ce752f4;p=picodrive.git diff --git a/configure b/configure index c3309b5..314cd95 100755 --- a/configure +++ b/configure @@ -39,7 +39,7 @@ have_armv5="" have_armv6="" have_armv7="" have_arm_neon="" -have_tslib="" +have_libavcodec="" enable_dynarec="yes" need_sdl="no" need_xlib="no" @@ -274,12 +274,26 @@ EOF compile_binary "$@" } +check_libavcodec() +{ + cat > $TMPC < + void main() { avcodec_decode_audio3(0, 0, 0, 0); } +EOF + compile_binary "$@" -lavcodec +} + #MAIN_LDLIBS="$MAIN_LDLIBS -lz" #check_zlib || fail "please install zlib (libz-dev)" MAIN_LDLIBS="-lpng $MAIN_LDLIBS" check_libpng || fail "please install libpng (libpng-dev)" +if check_libavcodec; then + have_libavcodec="yes" + MAIN_LDLIBS="-lavcodec $MAIN_LDLIBS" +fi + # find what audio support we can compile if [ "x$sound_drivers" = "x" ]; then if check_oss; then sound_drivers="$sound_drivers oss"; fi @@ -320,6 +334,7 @@ fi test "x$have_armv6" != "x" || have_armv6="no" test "x$have_armv7" != "x" || have_armv7="no" test "x$have_arm_neon" != "x" || have_arm_neon="no" +test "x$have_libavcodec" != "x" || have_libavcodec="no" echo "architecture $ARCH" echo "platform $platform" @@ -328,6 +343,7 @@ echo "C compiler $CC" echo "C compiler flags $CFLAGS" echo "libraries $MAIN_LDLIBS" echo "linker flags $LDFLAGS" +echo "libavcodec (mp3) $have_libavcodec" echo "enable dynarec $enable_dynarec" # echo "ARMv7 optimizations $have_armv7" # echo "enable ARM NEON $have_arm_neon" @@ -349,6 +365,9 @@ echo >> $config_mak echo "ARCH = $ARCH" >> $config_mak echo "PLATFORM = $platform" >> $config_mak echo "SOUND_DRIVERS = $sound_drivers" >> $config_mak +if [ "$have_libavcodec" = "yes" ]; then + echo "HAVE_LIBAVCODEC = 1" >> $config_mak +fi if [ "$have_arm_neon" = "yes" ]; then echo "HAVE_NEON = 1" >> $config_mak fi