Fix build against static FFmpeg.

This commit is contained in:
Themaister 2012-10-06 10:30:45 +02:00
parent 350b15b0f2
commit 0241b463fc
5 changed files with 15 additions and 12 deletions

1
.gitignore vendored
View File

@ -7,6 +7,7 @@
*.elf
*.dol
*.map
config.log
/retroarch
/retroarch.*
/config.h

2
configure vendored
View File

@ -3,6 +3,8 @@
PACKAGE_NAME=retroarch
PACKAGE_VERSION=0.9.7
cat /dev/null > config.log
. qb/qb.params.sh
. qb/qb.comp.sh

View File

@ -70,8 +70,8 @@ typedef struct gfx_ctx_driver
// Also processes events.
void (*check_window)(bool*, bool*, unsigned*, unsigned*, unsigned);
#ifdef ANDROID
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_set_window)(JNIEnv *jenv, jobject obj, jobject surface);
void (*gfx_ctx_free_window)(JNIEnv *jenv, jobject obj, jobject surface);
#endif
// Acknowledge a resize event. This is needed for some APIs. Most backends will ignore this.

View File

@ -121,9 +121,9 @@ if [ "$HAVE_THREADS" != 'no' ]; then
check_lib FFMPEG_ALLOC_CONTEXT3 "$AVCODEC_LIBS" avcodec_alloc_context3
check_lib FFMPEG_AVCODEC_OPEN2 "$AVCODEC_LIBS" avcodec_open2
check_lib FFMPEG_AVCODEC_ENCODE_AUDIO2 "$AVCODEC_LIBS" avcodec_encode_audio2
check_lib FFMPEG_AVIO_OPEN "$AVFORMAT_LIBS" avio_open
check_lib FFMPEG_AVFORMAT_WRITE_HEADER "$AVFORMAT_LIBS" avformat_write_header
check_lib FFMPEG_AVFORMAT_NEW_STREAM "$AVFORMAT_LIBS" avformat_new_stream
check_lib FFMPEG_AVIO_OPEN "$AVFORMAT_LIBS $AVCODEC_LIBS $AVUTIL_LIBS" avio_open
check_lib FFMPEG_AVFORMAT_WRITE_HEADER "$AVFORMAT_LIBS $AVCODEC_LIBS $AVUTIL_LIBS" avformat_write_header
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
fi
else

View File

@ -32,7 +32,7 @@ check_lib() #$1 = HAVE_$1 $2 = lib $3 = function in lib $4 = extralibs
fi
answer='no'
# 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"
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
answer='no'
# 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"
rm "$TEMP_CXX" "$TEMP_EXE" >/dev/null 2>&1
[ "$answer" = 'no' ] && {
@ -75,7 +75,7 @@ check_code_c()
ECHOBUF="Checking C code snippet \"$3\""
# echo -n "Checking C code snippet \"$3\""
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"
rm "$TEMP_C" "$TEMP_EXE" >/dev/null 2>&1
}
@ -87,7 +87,7 @@ check_code_cxx()
ECHOBUF="Checking C++ code snippet \"$3\""
# echo -n "Checking C++ code snippet \"$3\""
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"
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; }
EOF
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"
rm "$TEMP_C" "$TEMP_EXE" >/dev/null 2>&1
[ "$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 "int main(void) { return 0; }" > $TEMP_C
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"
rm "$TEMP_C" "$TEMP_EXE" >/dev/null 2>&1
[ "$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 "int main() { return 0; }" > $TEMP_CXX
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"
rm "$TEMP_CXX" "$TEMP_EXE" >/dev/null 2>&1
[ "$answer" = 'no' ] && {