notaz.gp2x.de
/
picodrive.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
support mp3 decoding over libavcodec
[picodrive.git]
/
configure
diff --git
a/configure
b/configure
index
0e96a99
..
314cd95
100755
(executable)
--- a/
configure
+++ b/
configure
@@
-39,7
+39,7
@@
have_armv5=""
have_armv6=""
have_armv7=""
have_arm_neon=""
have_armv6=""
have_armv7=""
have_arm_neon=""
-have_
tslib
=""
+have_
libavcodec
=""
enable_dynarec="yes"
need_sdl="no"
need_xlib="no"
enable_dynarec="yes"
need_sdl="no"
need_xlib="no"
@@
-123,10
+123,8
@@
if [ "x$sound_drivers" != "x" ]; then
done
fi
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
fi
#if [ "$need_warm" = "yes" ]; then
@@
-276,12
+274,26
@@
EOF
compile_binary "$@"
}
compile_binary "$@"
}
+check_libavcodec()
+{
+ cat > $TMPC <<EOF
+ #include <libavcodec/avcodec.h>
+ 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)"
#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
# 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
+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_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"
echo "architecture $ARCH"
echo "platform $platform"
@@
-330,6
+343,7
@@
echo "C compiler $CC"
echo "C compiler flags $CFLAGS"
echo "libraries $MAIN_LDLIBS"
echo "linker flags $LDFLAGS"
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"
echo "enable dynarec $enable_dynarec"
# echo "ARMv7 optimizations $have_armv7"
# echo "enable ARM NEON $have_arm_neon"
@@
-351,6
+365,9
@@
echo >> $config_mak
echo "ARCH = $ARCH" >> $config_mak
echo "PLATFORM = $platform" >> $config_mak
echo "SOUND_DRIVERS = $sound_drivers" >> $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
if [ "$have_arm_neon" = "yes" ]; then
echo "HAVE_NEON = 1" >> $config_mak
fi