core, more on chd support

This commit is contained in:
kub 2021-03-04 22:38:11 +01:00
parent 15ca715228
commit 8374e606ab
2 changed files with 20 additions and 2 deletions

19
configure vendored
View file

@ -49,6 +49,7 @@ have_armv7=""
have_arm_oabi=""
have_arm_neon=""
have_libavcodec=""
have_libchdr=""
need_sdl="no"
need_zlib="no"
# these are for known platforms
@ -348,6 +349,15 @@ EOF
compile_object "$@"
}
check_libchdr()
{
cat > $TMPC <<EOF
#include <libchdr/chd.h>
int main (int argc, char *argv[]) { chd_open("", 0, NULL, NULL); }
EOF
compile_object "$@"
}
check_zlib -lz && MAIN_LDLIBS="$MAIN_LDLIBS -lz" || need_zlib="yes"
MAIN_LDLIBS="-lpng $MAIN_LDLIBS"
@ -362,6 +372,10 @@ if check_libavcodec; then
esac
fi
if check_libchdr; then
have_libchdr="yes"
fi
# find what audio support we can compile
if [ "x$sound_drivers" = "x" ]; then
if check_oss; then sound_drivers="$sound_drivers oss"; fi
@ -402,6 +416,7 @@ fi
test "x$have_armv6" != "x" || have_armv6="no"
test "x$have_armv7" != "x" || have_armv7="no"
test "x$have_libavcodec" != "x" || have_libavcodec="no"
test "x$have_libchdr" != "x" || have_libchdr="no"
echo "architecture $ARCH"
echo "platform $platform"
@ -411,6 +426,7 @@ echo "C compiler flags $CFLAGS"
echo "libraries $MAIN_LDLIBS"
echo "linker flags $LDFLAGS"
echo "libavcodec (mp3) $have_libavcodec"
echo "libchdr $have_libchdr"
# echo "ARMv7 optimizations $have_armv7"
echo "# Automatically generated by configure" > $config_mak
@ -434,6 +450,9 @@ echo "SOUND_DRIVERS = $sound_drivers" >> $config_mak
if [ "$have_libavcodec" = "yes" ]; then
echo "HAVE_LIBAVCODEC = 1" >> $config_mak
fi
if [ "$have_libchdr" = "yes" ]; then
echo "HAVE_LIBCHDR = 1" >> $config_mak
fi
if [ "$need_zlib" = "yes" ]; then
echo "PLATFORM_ZLIB = 1" >> $config_mak
fi