X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=configure;h=9af719f4b772d0f83af8abda4890f98451199fe2;hb=045a4c528a71e5513acc2cfb8a77e31efcad5d87;hp=0e96a993dc754917496e22208c36de3fa20bd7e6;hpb=d4d626658a7a999f48009f408b4a22d280ab80ea;p=picodrive.git diff --git a/configure b/configure index 0e96a99..9af719f 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" @@ -123,10 +123,8 @@ if [ "x$sound_drivers" != "x" ]; then done fi -if [ "$need_libpicofe" = "yes" ]; then - if ! test -f "frontend/libpicofe/README"; then - fail "libpicofe is missing, please run 'git submodule init && git submodule update'" - fi +if ! test -f "platform/libpicofe/README"; then + fail "libpicofe is missing, please run 'git submodule update --init'" fi #if [ "$need_warm" = "yes" ]; then @@ -276,12 +274,30 @@ EOF compile_binary "$@" } +check_libavcodec() +{ + cat > $TMPC < + void main() { avcodec_decode_audio3(0, 0, 0, 0); } +EOF + compile_object "$@" +} + #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" + # add -ldl if needed + case "$MAIN_LDLIBS" in + *"-ldl"*) ;; + *) MAIN_LDLIBS="-ldl $MAIN_LDLIBS" ;; + esac +fi + # find what audio support we can compile if [ "x$sound_drivers" = "x" ]; then if check_oss; then sound_drivers="$sound_drivers oss"; fi @@ -322,6 +338,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" @@ -330,6 +347,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" @@ -351,6 +369,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