mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-23 16:09:47 +00:00
Fix build against static FFmpeg.
This commit is contained in:
parent
350b15b0f2
commit
0241b463fc
1
.gitignore
vendored
1
.gitignore
vendored
@ -7,6 +7,7 @@
|
|||||||
*.elf
|
*.elf
|
||||||
*.dol
|
*.dol
|
||||||
*.map
|
*.map
|
||||||
|
config.log
|
||||||
/retroarch
|
/retroarch
|
||||||
/retroarch.*
|
/retroarch.*
|
||||||
/config.h
|
/config.h
|
||||||
|
2
configure
vendored
2
configure
vendored
@ -3,6 +3,8 @@
|
|||||||
PACKAGE_NAME=retroarch
|
PACKAGE_NAME=retroarch
|
||||||
PACKAGE_VERSION=0.9.7
|
PACKAGE_VERSION=0.9.7
|
||||||
|
|
||||||
|
cat /dev/null > config.log
|
||||||
|
|
||||||
. qb/qb.params.sh
|
. qb/qb.params.sh
|
||||||
|
|
||||||
. qb/qb.comp.sh
|
. qb/qb.comp.sh
|
||||||
|
@ -70,8 +70,8 @@ typedef struct gfx_ctx_driver
|
|||||||
// Also processes events.
|
// Also processes events.
|
||||||
void (*check_window)(bool*, bool*, unsigned*, unsigned*, unsigned);
|
void (*check_window)(bool*, bool*, unsigned*, unsigned*, unsigned);
|
||||||
#ifdef ANDROID
|
#ifdef ANDROID
|
||||||
void (*gfx_ctx_set_window)(JNIEnv *jenv,jobject obj, jobject surface);
|
void (*gfx_ctx_set_window)(JNIEnv *jenv, jobject obj, jobject surface);
|
||||||
void (*gfx_ctx_free_window)(JNIEnv *jenv,jobject obj, jobject surface);
|
void (*gfx_ctx_free_window)(JNIEnv *jenv, jobject obj, jobject surface);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Acknowledge a resize event. This is needed for some APIs. Most backends will ignore this.
|
// Acknowledge a resize event. This is needed for some APIs. Most backends will ignore this.
|
||||||
|
@ -121,9 +121,9 @@ if [ "$HAVE_THREADS" != 'no' ]; then
|
|||||||
check_lib FFMPEG_ALLOC_CONTEXT3 "$AVCODEC_LIBS" avcodec_alloc_context3
|
check_lib FFMPEG_ALLOC_CONTEXT3 "$AVCODEC_LIBS" avcodec_alloc_context3
|
||||||
check_lib FFMPEG_AVCODEC_OPEN2 "$AVCODEC_LIBS" avcodec_open2
|
check_lib FFMPEG_AVCODEC_OPEN2 "$AVCODEC_LIBS" avcodec_open2
|
||||||
check_lib FFMPEG_AVCODEC_ENCODE_AUDIO2 "$AVCODEC_LIBS" avcodec_encode_audio2
|
check_lib FFMPEG_AVCODEC_ENCODE_AUDIO2 "$AVCODEC_LIBS" avcodec_encode_audio2
|
||||||
check_lib FFMPEG_AVIO_OPEN "$AVFORMAT_LIBS" avio_open
|
check_lib FFMPEG_AVIO_OPEN "$AVFORMAT_LIBS $AVCODEC_LIBS $AVUTIL_LIBS" avio_open
|
||||||
check_lib FFMPEG_AVFORMAT_WRITE_HEADER "$AVFORMAT_LIBS" avformat_write_header
|
check_lib FFMPEG_AVFORMAT_WRITE_HEADER "$AVFORMAT_LIBS $AVCODEC_LIBS $AVUTIL_LIBS" avformat_write_header
|
||||||
check_lib FFMPEG_AVFORMAT_NEW_STREAM "$AVFORMAT_LIBS" avformat_new_stream
|
check_lib FFMPEG_AVFORMAT_NEW_STREAM "$AVFORMAT_LIBS $AVCODEC_LIBS $AVUTIL_LIBS" avformat_new_stream
|
||||||
check_lib FFMPEG_AVCODEC_ENCODE_VIDEO2 "$AVCODEC_LIBS" avcodec_encode_video2
|
check_lib FFMPEG_AVCODEC_ENCODE_VIDEO2 "$AVCODEC_LIBS" avcodec_encode_video2
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
|
@ -32,7 +32,7 @@ check_lib() #$1 = HAVE_$1 $2 = lib $3 = function in lib $4 = extralibs
|
|||||||
fi
|
fi
|
||||||
answer='no'
|
answer='no'
|
||||||
# echo -n "$ECHOBUF"
|
# echo -n "$ECHOBUF"
|
||||||
"$CC" -o "$TEMP_EXE" "$TEMP_C" $INCLUDE_DIRS $LIBRARY_DIRS $4 $CFLAGS $LDFLAGS $2 >/dev/null 2>&1 && answer='yes'
|
"$CC" -o "$TEMP_EXE" "$TEMP_C" $INCLUDE_DIRS $LIBRARY_DIRS $4 $CFLAGS $LDFLAGS $2 >>config.log 2>&1 && answer='yes'
|
||||||
eval HAVE_$1="$answer"; echo "$ECHOBUF ... $answer"
|
eval HAVE_$1="$answer"; echo "$ECHOBUF ... $answer"
|
||||||
rm "$TEMP_C" "$TEMP_EXE" >/dev/null 2>&1
|
rm "$TEMP_C" "$TEMP_EXE" >/dev/null 2>&1
|
||||||
|
|
||||||
@ -55,7 +55,7 @@ check_lib_cxx() #$1 = HAVE_$1 $2 = lib $3 = function in lib $4 = extralibs $5 =
|
|||||||
fi
|
fi
|
||||||
answer='no'
|
answer='no'
|
||||||
# echo -n "$ECHOBUF"
|
# echo -n "$ECHOBUF"
|
||||||
"$CXX" -o "$TEMP_EXE" "$TEMP_CXX" $INCLUDE_DIRS $LIBRARY_DIRS $4 $CFLAGS $LDFLAGS $2 >/dev/null 2>&1 && answer='yes'
|
"$CXX" -o "$TEMP_EXE" "$TEMP_CXX" $INCLUDE_DIRS $LIBRARY_DIRS $4 $CFLAGS $LDFLAGS $2 >>config.log 2>&1 && answer='yes'
|
||||||
eval HAVE_$1="$answer"; echo "$ECHOBUF ... $answer"
|
eval HAVE_$1="$answer"; echo "$ECHOBUF ... $answer"
|
||||||
rm "$TEMP_CXX" "$TEMP_EXE" >/dev/null 2>&1
|
rm "$TEMP_CXX" "$TEMP_EXE" >/dev/null 2>&1
|
||||||
[ "$answer" = 'no' ] && {
|
[ "$answer" = 'no' ] && {
|
||||||
@ -75,7 +75,7 @@ check_code_c()
|
|||||||
ECHOBUF="Checking C code snippet \"$3\""
|
ECHOBUF="Checking C code snippet \"$3\""
|
||||||
# echo -n "Checking C code snippet \"$3\""
|
# echo -n "Checking C code snippet \"$3\""
|
||||||
answer='no'
|
answer='no'
|
||||||
"$CC" -o "$TEMP_EXE" "$TEMP_C" $INCLUDE_DIRS $LIBRARY_DIRS $2 $CFLAGS $LDFLAGS >/dev/null 2>&1 && answer='yes'
|
"$CC" -o "$TEMP_EXE" "$TEMP_C" $INCLUDE_DIRS $LIBRARY_DIRS $2 $CFLAGS $LDFLAGS >>config.log 2>&1 && answer='yes'
|
||||||
eval HAVE_$1="$answer"; echo "$ECHOBUF ... $answer"
|
eval HAVE_$1="$answer"; echo "$ECHOBUF ... $answer"
|
||||||
rm "$TEMP_C" "$TEMP_EXE" >/dev/null 2>&1
|
rm "$TEMP_C" "$TEMP_EXE" >/dev/null 2>&1
|
||||||
}
|
}
|
||||||
@ -87,7 +87,7 @@ check_code_cxx()
|
|||||||
ECHOBUF="Checking C++ code snippet \"$3\""
|
ECHOBUF="Checking C++ code snippet \"$3\""
|
||||||
# echo -n "Checking C++ code snippet \"$3\""
|
# echo -n "Checking C++ code snippet \"$3\""
|
||||||
answer='no'
|
answer='no'
|
||||||
"$CXX" -o "$TEMP_EXE" "$TEMP_CXX" $INCLUDE_DIRS $LIBRARY_DIRS $2 $CXXFLAGS $LDFLAGS >/dev/null 2>&1 && answer='yes'
|
"$CXX" -o "$TEMP_EXE" "$TEMP_CXX" $INCLUDE_DIRS $LIBRARY_DIRS $2 $CXXFLAGS $LDFLAGS >>config.log 2>&1 && answer='yes'
|
||||||
eval HAVE_$1="$answer"; echo "$ECHOBUF ... $answer"
|
eval HAVE_$1="$answer"; echo "$ECHOBUF ... $answer"
|
||||||
rm "$TEMP_CXX" "$TEMP_EXE" >/dev/null 2>&1
|
rm "$TEMP_CXX" "$TEMP_EXE" >/dev/null 2>&1
|
||||||
}
|
}
|
||||||
@ -135,7 +135,7 @@ check_header() #$1 = HAVE_$1 $2 = header file
|
|||||||
int main(void) { return 0; }
|
int main(void) { return 0; }
|
||||||
EOF
|
EOF
|
||||||
answer='no'
|
answer='no'
|
||||||
"$CC" -o "$TEMP_EXE" "$TEMP_C" $INCLUDE_DIRS >/dev/null 2>&1 && answer='yes'
|
"$CC" -o "$TEMP_EXE" "$TEMP_C" $INCLUDE_DIRS >>config.log 2>&1 && answer='yes'
|
||||||
eval HAVE_$1="$answer"; echo "$ECHOBUF ... $answer"
|
eval HAVE_$1="$answer"; echo "$ECHOBUF ... $answer"
|
||||||
rm "$TEMP_C" "$TEMP_EXE" >/dev/null 2>&1
|
rm "$TEMP_C" "$TEMP_EXE" >/dev/null 2>&1
|
||||||
[ "$tmpval" = 'yes' ] && [ "$answer" = 'no' ] && {
|
[ "$tmpval" = 'yes' ] && [ "$answer" = 'no' ] && {
|
||||||
@ -149,7 +149,7 @@ check_switch_c() #$1 = HAVE_$1 $2 = switch $3 = critical error message [checked
|
|||||||
# echo -n "Checking for availability of switch $2 in $CC "
|
# echo -n "Checking for availability of switch $2 in $CC "
|
||||||
echo "int main(void) { return 0; }" > $TEMP_C
|
echo "int main(void) { return 0; }" > $TEMP_C
|
||||||
answer='no'
|
answer='no'
|
||||||
"$CC" -o "$TEMP_EXE" "$TEMP_C" $2 >/dev/null 2>&1 && answer='yes'
|
"$CC" -o "$TEMP_EXE" "$TEMP_C" $2 >>config.log 2>&1 && answer='yes'
|
||||||
eval HAVE_$1="$answer"; echo "$ECHOBUF ... $answer"
|
eval HAVE_$1="$answer"; echo "$ECHOBUF ... $answer"
|
||||||
rm "$TEMP_C" "$TEMP_EXE" >/dev/null 2>&1
|
rm "$TEMP_C" "$TEMP_EXE" >/dev/null 2>&1
|
||||||
[ "$answer" = 'no' ] && {
|
[ "$answer" = 'no' ] && {
|
||||||
@ -162,7 +162,7 @@ check_switch_cxx() #$1 = HAVE_$1 $2 = switch $3 = critical error message [checke
|
|||||||
# echo -n "Checking for availability of switch $2 in $CXX"
|
# echo -n "Checking for availability of switch $2 in $CXX"
|
||||||
echo "int main() { return 0; }" > $TEMP_CXX
|
echo "int main() { return 0; }" > $TEMP_CXX
|
||||||
answer='no'
|
answer='no'
|
||||||
"$CXX" -o "$TEMP_EXE" "$TEMP_CXX" "$2" >/dev/null 2>&1 && answer='yes'
|
"$CXX" -o "$TEMP_EXE" "$TEMP_CXX" "$2" >>config.log 2>&1 && answer='yes'
|
||||||
eval HAVE_$1="$answer"; echo "$ECHOBUF ... $answer"
|
eval HAVE_$1="$answer"; echo "$ECHOBUF ... $answer"
|
||||||
rm "$TEMP_CXX" "$TEMP_EXE" >/dev/null 2>&1
|
rm "$TEMP_CXX" "$TEMP_EXE" >/dev/null 2>&1
|
||||||
[ "$answer" = 'no' ] && {
|
[ "$answer" = 'no' ] && {
|
||||||
|
Loading…
Reference in New Issue
Block a user