summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-10-16 13:57:10 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-10-16 13:57:10 +0200
commit5717562c789f9be9c8e4bab7caec4df83f77cebe (patch)
tree134e045d40aa79aca5d42fd00c72f317cf519a2d /configure
parent25f3827e1daf6b75e6b46e2bccaf8cbc273d6b42 (diff)
parentc1fcfdec75468009dc7de29a5d1c6adf3b2ef77d (diff)
Merge commit 'c1fcfdec75468009dc7de29a5d1c6adf3b2ef77d'
* commit 'c1fcfdec75468009dc7de29a5d1c6adf3b2ef77d': rangecoder-test: Return in case of an error build: simplify enabling of compat objects Conflicts: configure libavutil/Makefile Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure19
1 files changed, 12 insertions, 7 deletions
diff --git a/configure b/configure
index 18f57ae5b6..a1cc82d5b0 100755
--- a/configure
+++ b/configure
@@ -691,6 +691,12 @@ add_host_ldflags(){
append host_ldflags $($host_ldflags_filter "$@")
}
+add_compat(){
+ append compat_objs $1
+ shift
+ map 'add_cppflags -D$v' "$@"
+}
+
check_cmd(){
log "$@"
"$@" >> $logfile 2>&1
@@ -1272,7 +1278,6 @@ HAVE_LIST="
asm_types_h
attribute_may_alias
attribute_packed
- broken_snprintf
cbrtf
clock_gettime
closesocket
@@ -3221,18 +3226,17 @@ elif check_header _mingw.h; then
die "ERROR: MinGW runtime version must be >= 3.15."
if check_cpp_condition _mingw.h "defined(__MINGW64_VERSION_MAJOR) && \
__MINGW64_VERSION_MAJOR < 3"; then
- enable broken_snprintf
+ add_compat msvcrt/snprintf.o
add_cflags "-include $source_path/compat/msvcrt/snprintf.h"
fi
elif check_cpp_condition newlib.h "defined _NEWLIB_VERSION"; then
libc_type=newlib
elif check_func_headers stdlib.h _get_doserrno; then
libc_type=msvcrt
- enable broken_snprintf
- add_cflags -Dstrtod=avpriv_strtod
- add_cflags -Dsnprintf=avpriv_snprintf \
- -D_snprintf=avpriv_snprintf \
- -Dvsnprintf=avpriv_vsnprintf
+ add_compat strtod.o strtod=avpriv_strtod
+ add_compat msvcrt/snprintf.o snprintf=avpriv_snprintf \
+ _snprintf=avpriv_snprintf \
+ vsnprintf=avpriv_vsnprintf
elif check_cpp_condition stddef.h "defined __KLIBC__"; then
libc_type=klibc
fi
@@ -4242,6 +4246,7 @@ CFLAGS-ffplay=$sdl_cflags
ZLIB=$($ldflags_filter -lz)
LIB_INSTALL_EXTRA_CMD=$LIB_INSTALL_EXTRA_CMD
EXTRALIBS=$extralibs
+COMPAT_OBJS=$compat_objs
INSTALL=$install
LIBTARGET=${LIBTARGET}
SLIBNAME=${SLIBNAME}