mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
set status variables automatically in check_header and check_func
Originally committed as revision 7079 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
18b67ae59e
commit
0701ca7f95
36
configure
vendored
36
configure
vendored
@ -334,6 +334,10 @@ check_header(){
|
|||||||
#include <$header>
|
#include <$header>
|
||||||
int x;
|
int x;
|
||||||
EOF
|
EOF
|
||||||
|
err=$?
|
||||||
|
var=`echo $header | sed 's/[^[:alnum:]]/_/g'`
|
||||||
|
test "$err" = 0 && enable $var || disable $var
|
||||||
|
return $err
|
||||||
}
|
}
|
||||||
|
|
||||||
check_func(){
|
check_func(){
|
||||||
@ -346,6 +350,9 @@ int main(){
|
|||||||
$func();
|
$func();
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
|
err=$?
|
||||||
|
test "$err" = 0 && enable $func || disable $func
|
||||||
|
return $err
|
||||||
}
|
}
|
||||||
|
|
||||||
check_lib(){
|
check_lib(){
|
||||||
@ -1327,7 +1334,7 @@ if test $arch = "powerpc"; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
check_header altivec.h && altivec_h=yes || altivec_h=no
|
check_header altivec.h
|
||||||
|
|
||||||
# check if our compiler supports Motorola AltiVec C API
|
# check if our compiler supports Motorola AltiVec C API
|
||||||
if test $altivec = "yes"; then
|
if test $altivec = "yes"; then
|
||||||
@ -1403,13 +1410,8 @@ fi
|
|||||||
# ---
|
# ---
|
||||||
# check availability of some header files
|
# check availability of some header files
|
||||||
|
|
||||||
memalign=no
|
check_header malloc.h
|
||||||
malloc_h=no
|
check_func memalign
|
||||||
if check_header malloc.h; then
|
|
||||||
malloc_h=yes
|
|
||||||
memalign=yes
|
|
||||||
check_func memalign || memalign="no"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "$memalign" = "no" -a "$mmx" = "yes" -a \
|
if test "$memalign" = "no" -a "$mmx" = "yes" -a \
|
||||||
"$memalign_hack" != "yes" -a "$targetos" != "Darwin" -a \
|
"$memalign_hack" != "yes" -a "$targetos" != "Darwin" -a \
|
||||||
@ -1417,10 +1419,10 @@ if test "$memalign" = "no" -a "$mmx" = "yes" -a \
|
|||||||
die "Error, no memalign() but SSE enabled, disable it or use --enable-memalign-hack."
|
die "Error, no memalign() but SSE enabled, disable it or use --enable-memalign-hack."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
check_header byteswap.h && byteswap_h=yes || byteswap_h=no
|
check_header byteswap.h
|
||||||
|
|
||||||
check_func inet_aton && inet_aton=yes || inet_aton=no
|
check_func inet_aton
|
||||||
check_func localtime_r && localtime_r=yes || localtime_r=no
|
check_func localtime_r
|
||||||
enabled zlib && check_lib zlib.h zlibVersion -lz || zlib="no"
|
enabled zlib && check_lib zlib.h zlibVersion -lz || zlib="no"
|
||||||
|
|
||||||
# check for some common methods of building with pthread support
|
# check for some common methods of building with pthread support
|
||||||
@ -1509,18 +1511,12 @@ done
|
|||||||
|
|
||||||
# dlopen/dlfcn.h probing
|
# dlopen/dlfcn.h probing
|
||||||
|
|
||||||
check_header dlfcn.h && dlfcn_h=yes
|
check_header dlfcn.h
|
||||||
|
|
||||||
temp_extralibs -ldl
|
|
||||||
if check_func dlopen; then
|
|
||||||
dlopen=yes
|
|
||||||
ldl=-ldl
|
|
||||||
fi
|
|
||||||
restore_flags
|
|
||||||
|
|
||||||
if check_func dlopen; then
|
if check_func dlopen; then
|
||||||
dlopen=yes
|
|
||||||
ldl=
|
ldl=
|
||||||
|
elif check_func dlopen -ldl; then
|
||||||
|
ldl=-ldl
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "$vhook" = "default"; then
|
if test "$vhook" = "default"; then
|
||||||
|
Loading…
Reference in New Issue
Block a user