230 lines
8.2 KiB
Text
230 lines
8.2 KiB
Text
Index: configure
|
|
--- configure.orig
|
|
+++ configure
|
|
@@ -289,6 +289,13 @@ arm() {
|
|
esac
|
|
}
|
|
|
|
+riscv() {
|
|
+ case "$host_arch" in
|
|
+ riscv*) return 0;;
|
|
+ *) return 1;;
|
|
+ esac
|
|
+}
|
|
+
|
|
# Use this before starting a check
|
|
echocheck() {
|
|
echo "============ Checking for $@ ============" >> "$TMPLOG"
|
|
@@ -1530,39 +1537,39 @@ echo configuration: $configuration > "$TMPLOG"
|
|
echo >> "$TMPLOG"
|
|
|
|
|
|
-# local FFmpeg checkout handling
|
|
-if test -e ffmpeg/.svn ; then
|
|
- echo "You have an outdated FFmpeg SVN checkout in ffmpeg/, please (re)move or replace it"
|
|
- exit 1
|
|
-fi
|
|
+## local FFmpeg checkout handling
|
|
+#if test -e ffmpeg/.svn ; then
|
|
+# echo "You have an outdated FFmpeg SVN checkout in ffmpeg/, please (re)move or replace it"
|
|
+# exit 1
|
|
+#fi
|
|
+#
|
|
+#FFBRANCH=master
|
|
+#test -e FFBRANCH && FFBRANCH=$(cat FFBRANCH)
|
|
+#
|
|
+#if test -e ffmpeg/mp_auto_pull ; then
|
|
+# echo "Updating FFmpeg, (re)move ffmpeg/mp_auto_pull to disable"
|
|
+# (cd ffmpeg && git checkout $FFBRANCH)
|
|
+# if ! (cd ffmpeg && git pull --rebase --ff-only) ; then
|
|
+# echo "git pull failed, (re)move ffmpeg/mp_auto_pull to disable pulling"
|
|
+# exit 1
|
|
+# fi
|
|
+#fi
|
|
+#
|
|
+#if test "$ffmpeg_a" != "no" && ! test -e ffmpeg ; then
|
|
+# echo "No FFmpeg checkout, press enter to download one with git or CTRL+C to abort"
|
|
+# read tmp
|
|
+# if ! git clone -b $FFBRANCH --depth 1 git://source.ffmpeg.org/ffmpeg.git ffmpeg ; then
|
|
+# rm -rf ffmpeg
|
|
+# echo "Failed to get a FFmpeg checkout"
|
|
+# echo "Please try again or put FFmpeg source code copy into ffmpeg/ manually."
|
|
+# echo "Nightly snapshot: http://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2"
|
|
+# echo "To use a github mirror via http (e.g. because a firewall blocks git):"
|
|
+# echo "git clone --depth 1 https://github.com/FFmpeg/FFmpeg ffmpeg; touch ffmpeg/mp_auto_pull"
|
|
+# exit 1
|
|
+# fi
|
|
+# touch ffmpeg/mp_auto_pull
|
|
+#fi
|
|
|
|
-FFBRANCH=master
|
|
-test -e FFBRANCH && FFBRANCH=$(cat FFBRANCH)
|
|
-
|
|
-if test -e ffmpeg/mp_auto_pull ; then
|
|
- echo "Updating FFmpeg, (re)move ffmpeg/mp_auto_pull to disable"
|
|
- (cd ffmpeg && git checkout $FFBRANCH)
|
|
- if ! (cd ffmpeg && git pull --rebase --ff-only) ; then
|
|
- echo "git pull failed, (re)move ffmpeg/mp_auto_pull to disable pulling"
|
|
- exit 1
|
|
- fi
|
|
-fi
|
|
-
|
|
-if test "$ffmpeg_a" != "no" && ! test -e ffmpeg ; then
|
|
- echo "No FFmpeg checkout, press enter to download one with git or CTRL+C to abort"
|
|
- read tmp
|
|
- if ! git clone -b $FFBRANCH --depth 1 git://source.ffmpeg.org/ffmpeg.git ffmpeg ; then
|
|
- rm -rf ffmpeg
|
|
- echo "Failed to get a FFmpeg checkout"
|
|
- echo "Please try again or put FFmpeg source code copy into ffmpeg/ manually."
|
|
- echo "Nightly snapshot: http://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2"
|
|
- echo "To use a github mirror via http (e.g. because a firewall blocks git):"
|
|
- echo "git clone --depth 1 https://github.com/FFmpeg/FFmpeg ffmpeg; touch ffmpeg/mp_auto_pull"
|
|
- exit 1
|
|
- fi
|
|
- touch ffmpeg/mp_auto_pull
|
|
-fi
|
|
-
|
|
list_subparts() {
|
|
test ! -e ffmpeg/libav${3} && return 1
|
|
pattern="s/^[^#]*${1}.*([^ ,]*, *\([^ ,)]*\).*/\1_${2}/p"
|
|
@@ -1995,7 +2002,10 @@ fi
|
|
if arm ; then
|
|
cc_check && host_arch=aarch64 || host_arch=arm
|
|
fi
|
|
+if riscv ; then
|
|
+ cc_check && host_arch=riscv64 || host_arch=riscv32
|
|
fi
|
|
+fi
|
|
|
|
echo "Detected operating system: $system_name"
|
|
echo "Detected host architecture: $host_arch"
|
|
@@ -2540,7 +2550,7 @@ case "$host_arch" in
|
|
arch='sparc'
|
|
iproc='sparc'
|
|
if test "$host_arch" = "sparc64" ; then
|
|
- _vis='yes'
|
|
+ # _vis='yes'
|
|
proc='ultrasparc'
|
|
def_fast_64bit='#define HAVE_FAST_64BIT 1'
|
|
elif sunos ; then
|
|
@@ -2841,7 +2851,14 @@ EOF
|
|
arch='arc'
|
|
iproc='arc'
|
|
;;
|
|
+ riscv*)
|
|
+ arch='riscv'
|
|
+ iproc='riscv'
|
|
|
|
+ if test "$host_arch" = "riscv64" ; then
|
|
+ def_fast_64bit='#define HAVE_FAST_64BIT 1'
|
|
+ fi
|
|
+ ;;
|
|
*)
|
|
echo "The architecture of your CPU ($host_arch) is not supported by this configure script"
|
|
echo "It seems nobody has ported MPlayer to your OS or CPU type yet."
|
|
@@ -2915,7 +2932,7 @@ cat > $TMPC << EOF
|
|
int ff_extern;
|
|
EOF
|
|
cc_check -c || die "Symbol mangling check failed."
|
|
-sym=$($_nm -P -g $TMPEXE | grep ff_extern)
|
|
+sym=$($_nm -g $TMPEXE | grep ff_extern | cut -d ' ' -f 3)
|
|
extern_prefix=${sym%%ff_extern*}
|
|
def_extern_asm="#define EXTERN_ASM $extern_prefix"
|
|
def_extern_prefix="#define EXTERN_PREFIX \"$extern_prefix\""
|
|
@@ -2980,7 +2997,7 @@ else
|
|
fi
|
|
|
|
CFLAGS="-D_ISOC99_SOURCE -I. -Iffmpeg $CFLAGS"
|
|
-HOSTCFLAGS="-D_ISOC99_SOURCE -I. -Iffmpeg -O3"
|
|
+HOSTCFLAGS="-D_ISOC99_SOURCE -I. -Iffmpeg $CFLAGS"
|
|
|
|
# On glibc, add some more CPPFLAGS for enabling required functionality.
|
|
cpp_condition_check features.h "defined __GLIBC__" &&
|
|
@@ -3061,7 +3078,7 @@ elif test $relocatable = "yes" ; then
|
|
fi
|
|
echores $relocatable
|
|
|
|
-if x86_32 ; then
|
|
+if false ; then # x86_32
|
|
# Checking assembler (_as) compatibility...
|
|
# Added workaround for older as that reads from stdin by default - atmos
|
|
as_version=$(echo '' | $_as -version 2>&1 | sed -n 's/^.*assembler \(version \)*\([0-9.]*\).*$/\2/p')
|
|
@@ -6365,12 +6382,16 @@ fi #if irix
|
|
echocheck "sndio audio"
|
|
if test "$_sndio" = auto ; then
|
|
_sndio=no
|
|
- statement_check sndio.h 'sio_open(SIO_DEVANY, SIO_PLAY, 0)' -lsndio && _sndio=yes
|
|
+ if $_pkg_config --exists 'sndio' ; then
|
|
+ statement_check sndio.h 'sio_open(SIO_DEVANY, SIO_PLAY, 0)' $($_pkg_config --libs --cflags sndio) &&
|
|
+ _sndio=yes
|
|
+ fi
|
|
fi
|
|
if test "$_sndio" = yes ; then
|
|
def_sndio='#define CONFIG_SNDIO_AUDIO 1'
|
|
aomodules="sndio $aomodules"
|
|
- extra_ldflags="$extra_ldflags -lsndio"
|
|
+ extra_ldflags="$extra_ldflags $($_pkg_config --libs sndio)"
|
|
+ extra_cflags="$extra_cflags $($_pkg_config --cflags sndio)"
|
|
else
|
|
def_sndio='#undef CONFIG_SNDIO_AUDIO'
|
|
noaomodules="sndio $noaomodules"
|
|
@@ -6553,7 +6574,7 @@ echocheck "cdparanoia"
|
|
if test "$_cdparanoia" = auto ; then
|
|
_cdparanoia=no
|
|
for inc_tmp in "" "-I/usr/include/cdda" "-I/usr/local/include/cdda" ; do
|
|
- statement_check_broken cdda_interface.h cdda_paranoia.h 'paranoia_cachemodel_size(NULL, 0)' $inc_tmp -lcdda_interface -lcdda_paranoia &&
|
|
+ statement_check_broken cdda_interface.h cdda_paranoia.h 'paranoia_free(NULL)' $inc_tmp -lcdda_interface -lcdda_paranoia &&
|
|
_cdparanoia=yes && extra_cflags="$extra_cflags $inc_tmp" && break
|
|
done
|
|
fi
|
|
@@ -8445,6 +8466,7 @@ extra_ldflags="$extra_ldflags $libm"
|
|
# XML documentation tests
|
|
echocheck "XML catalogs"
|
|
for try_catalog in \
|
|
+ ${LOCALBASE}/share/sgml/catalog \
|
|
/etc/sgml/catalog \
|
|
/usr/share/xml/docbook/*/catalog.xml \
|
|
/opt/local/share/xml/docbook-xml/*/catalog.xml \
|
|
@@ -8472,6 +8494,7 @@ fi
|
|
|
|
echocheck "XML chunked stylesheet"
|
|
for try_chunk_xsl in \
|
|
+ ${LOCALBASE}/share/xsl/docbook/html/chunk.xsl \
|
|
/usr/share/xml/docbook/*/html/chunk.xsl \
|
|
/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/html/chunk.xsl \
|
|
/usr/share/sgml/docbook/yelp/docbook/html/chunk.xsl \
|
|
@@ -8497,6 +8520,7 @@ fi
|
|
|
|
echocheck "XML monolithic stylesheet"
|
|
for try_docbook_xsl in \
|
|
+ ${LOCALBASE}/share/xsl/docbook/html/docbook.xsl \
|
|
/usr/share/xml/docbook/*/html/docbook.xsl \
|
|
/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/html/docbook.xsl \
|
|
/usr/share/sgml/docbook/yelp/docbook/html/docbook.xsl \
|
|
@@ -8550,6 +8574,7 @@ EOF
|
|
echocheck "XML DTD"
|
|
#FIXME: This should prefer higher version numbers, not the other way around ..
|
|
for try_dtd in \
|
|
+ ${LOCALBASE}/share/xml/docbook/*/docbookx.dtd \
|
|
/usr/share/xml/docbook/*/dtd/4*/docbookx.dtd \
|
|
/usr/share/xml/docbook/*/docbookx.dtd \
|
|
/usr/share/sgml/docbook/*/docbookx.dtd \
|
|
@@ -9753,9 +9778,6 @@ cmp -s "$TMPH" config.h || mv -f "$TMPH" config.h
|
|
|
|
############################################################################
|
|
|
|
-# Create FFmpeg config files only for internal ffmpeg
|
|
-if test "$ffmpeg_a" = yes; then
|
|
-
|
|
# Create avconfig.h for FFmpeg.
|
|
cat > "$TMPH" << EOF
|
|
/* Generated by mpconfigure */
|
|
@@ -9848,8 +9870,6 @@ print_enabled_components libavformat/demuxer_list.c AV
|
|
print_enabled_components libavformat/muxer_list.c AVOutputFormat muxer_list $libavmuxers
|
|
print_enabled_components libavformat/protocol_list.c URLProtocol url_protocols $libavprotocols
|
|
print_enabled_filters libavfilter/filter_list.c AVFilter filter_list $libavfilters
|
|
-
|
|
-fi
|
|
|
|
#############################################################################
|
|
|