--- configure.orig 2024-09-21 09:30:02 UTC +++ configure @@ -664,7 +664,7 @@ _altivec=auto _iwmmxt=auto _mtrr=auto _altivec=auto -_install=install +_install=@${BSD_INSTALL_PROGRAM} _ranlib=ranlib _windres=windres _cc=cc @@ -1012,7 +1012,7 @@ for ac_option do ld_static='' ;; --enable-profile) - _profile='-p' + _profile='-pg' ;; --disable-profile) _profile= @@ -1482,7 +1482,6 @@ for ac_option do *) echo "Unknown parameter: $ac_option" - exit 1 ;; esac @@ -1520,40 +1519,6 @@ echo >> "$TMPLOG" 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 - -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" @@ -1843,7 +1808,7 @@ if test -z "$_target" ; then case "$1" in x86_64|amd64|x64|i[3-9]86*|i86pc|x86|x86pc|k5|k6|k6_2|k6_3|k6-2|k6-3|pentium*|athlon*|i586_i686|i586-i686) host_arch=i386 ;; ia64) host_arch=ia64 ;; - macppc|ppc*|Power*) host_arch=ppc ;; + macppc|powerpc|ppc*|Power*) host_arch=ppc ;; alpha) host_arch=alpha ;; sun4*|sparc*) host_arch=sparc ;; parisc*|hppa*|9000*) host_arch=hppa ;; @@ -1965,7 +1930,11 @@ echo "yes" cflag_check "" || die "Compiler is not functioning correctly. Check your installation and custom CFLAGS $CFLAGS ." echo "yes" -cflag_check "-lm" && libm="-lm" +if test -z "$_profile" ; then + cflag_check "-lm" && libm="-lm" +else + cflag_check "-lm_p" && libm="-lm_p" +fi if test -z "$_target" ; then cat > $TMPC << EOF @@ -2975,7 +2944,11 @@ if test -z "$CFLAGS" || test "$_profile" != "" || test fi if test "$_profile" != "" || test "$_debug" != ""; then - CFLAGS="-O2 $_march $_mcpu $_pipe $_debug $_profile" + if test "$cc_vendor" = "gnu"; then + CFLAGS="-O2 $_march $_mcpu $_pipe $_debug $_profile" + else + CFLAGS="-O2 $_march $_pipe $_debug $_profile" + fi WARNFLAGS="-W -Wall $WARNFLAGS" _install_strip= fi @@ -3104,7 +3077,7 @@ if x86_32 ; then _pref_as_version='2.16.92' echo 'pabsd %xmm0, %xmm1' >> $TMPS fi - $_as -c $TMPS -o $TMPEXE > /dev/null 2>&1 || as_verc_fail=yes + $_as $TMPS -o $TMPEXE > /dev/null 2>&1 || as_verc_fail=yes if test "$as_verc_fail" != yes ; then echores "ok" @@ -3264,8 +3237,8 @@ if ppc && ( test "$_altivec" = yes || test "$_runtime_ # check if AltiVec is supported by the compiler, and how to enable it echocheck "GCC AltiVec flags" - if $(cflag_check -maltivec -mabi=altivec) ; then - _altivec_gcc_flags="-maltivec -mabi=altivec" + if $(cflag_check -maltivec) ; then + _altivec_gcc_flags="-maltivec" # check if should be included if $(header_check altivec.h $_altivec_gcc_flags) ; then def_altivec_h='#define HAVE_ALTIVEC_H 1' @@ -3371,6 +3344,13 @@ if arm ; then fi echores "$setend" + echocheck "ARM setend" + if test $setend = "auto" ; then + setend=no + inline_asm_check '"setend be"' && setend=yes + fi + echores "$setend" + echocheck "softfloat ABI" softfloat=yes cpp_condition_check '' 'defined(__ARM_PCS_VFP) || (!defined(__ARM_PCS) && !defined(__SOFTFP__))' && softfloat=no @@ -4281,7 +4261,7 @@ elif freebsd || netbsd || openbsd || bsdos ; then if linux ; then THREAD_CFLAGS=-D_REENTRANT elif freebsd || netbsd || openbsd || bsdos ; then - THREAD_CFLAGS=-D_THREAD_SAFE + THREAD_CFLAGS= fi if test "$_pthreads" = auto ; then cat > $TMPC << EOF @@ -4291,7 +4271,7 @@ if ! hpux ; then EOF _pthreads=no if ! hpux ; then - for ld_tmp in "-lpthreadGC2" "" "-lpthread" "-pthread" ; do + for ld_tmp in "-lpthread" "-pthread" ; do # for crosscompilation, we cannot execute the program, be happy if we can link statically cc_check $THREAD_CFLAGS $ld_tmp && (tmp_run || test "$ld_static") && ld_pthread="$ld_tmp" && _pthreads=yes && break done @@ -4434,7 +4414,7 @@ EOF } EOF _iconv=no - for ld_tmp in "" "-liconv" "-liconv $ld_dl" ; do + for ld_tmp in "" "-L$_prefix/lib -liconv" "-L%%LOCALBASE%%/lib -liconv" "-liconv" "-liconv $ld_dl" ; do cc_check $ld_tmp && extra_ldflags="$extra_ldflags $ld_tmp" && ld_iconv="$ld_tmp" && _iconv=yes && break done @@ -5848,15 +5828,6 @@ EOF break fi done - if test "$_x11" = yes && cc_check -DGL_EGL_X11 -lEGL ; then - _gl=yes - _gl_egl_x11=yes - libs_mplayer="$libs_mplayer -lEGL $ld_dl" - elif cc_check -DGL_EGL_ANDROID -lEGL ; then - _gl=yes - _gl_egl_android=yes - libs_mplayer="$libs_mplayer -lEGL $ld_dl" - fi if win32 && cc_check -DGL_WIN32 -lopengl32 ; then _gl=yes _gl_win32=yes @@ -6391,7 +6362,7 @@ elif freebsd ; then elif dragonfly ; then default_cdrom_device="/dev/cd0" elif freebsd ; then - default_cdrom_device="/dev/acd0" + default_cdrom_device="/dev/cdrom" elif openbsd ; then default_cdrom_device="/dev/rcd0c" elif sunos ; then @@ -6404,7 +6375,7 @@ fi default_cdrom_device="/dev/cdrom" fi -if win32 || os2 || dragonfly || freebsd || openbsd || sunos || amigaos ; then +if win32 || os2 || dragonfly || openbsd || sunos || amigaos ; then default_dvd_device=$default_cdrom_device elif darwin ; then default_dvd_device="/dev/rdiskN" @@ -6931,7 +6902,7 @@ if test "$_libgsm" = auto ; then echocheck "libgsm" if test "$_libgsm" = auto ; then _libgsm=no - statement_check gsm/gsm.h 'gsm_create()' -lgsm && _libgsm=yes + statement_check gsm.h 'gsm_create()' -lgsm && _libgsm=yes fi if test "$_libgsm" = yes ; then def_libgsm='#define CONFIG_LIBGSM 1' @@ -7363,6 +7334,16 @@ if test "$_librtmp" = yes && test "$networking" = yes; nolibrtmp=no def_librtmp='#define CONFIG_LIBRTMP 1' inputmodules="librtmp $inputmodules" + + if $_pkg_config --exists librtmp; then + _inc_tmp=$($_pkg_config --cflags librtmp) + _ld_tmp=$($_pkg_config --libs librtmp) + else + _inc_tmp="-I${LOCALBASE}/include" + _ld_tmp="-L${LOCALBASE}/lib -lrtmp -lz -lssl -lcrypto" + fi + extra_ldflags="$extra_ldflags $_ld_tmp" + extra_cflags="$extra_cflags $_inc_tmp" else nolibrtmp=yes _librtmp=no @@ -7780,7 +7761,7 @@ if test "$_mencoder" = no ; then echocheck "mencoder" if test "$_mencoder" = no ; then # mpeg1video for vf_lavc, snow for vf_uspp / vf_mcdeint, - libavencoders="$mplayer_encoders MPEG1VIDEO_ENCODER SNOW_ENCODER" + libavencoders="$mplayer_encoders MPEG1VIDEO_ENCODER H263_ENCODER SNOW_ENCODER" fi echores "$_mencoder" @@ -8384,7 +8365,7 @@ libs_mplayer=$ld_tmp ############################################################################# -CFLAGS="$CFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE" +CFLAGS="$CFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" CXXFLAGS=" $CFLAGS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -std=c++98"