aboutsummaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorDave Yeo <daveryeo@telus.net>2008-01-01 22:54:35 +0000
committerDiego Biurrun <diego@biurrun.de>2008-01-01 22:54:35 +0000
commit72be9e73ae76769d1fa6b11f8086d5ad429ae2ed (patch)
tree0079d383774bc9190b9c427ed7ab4ae10798ecf3 /configure
parentc86ec2f4c38b24fa4cf3bba0fd145366c7e3f53b (diff)
downloadffmpeg-72be9e73ae76769d1fa6b11f8086d5ad429ae2ed.tar.gz
Add portable way to check for the existence of definitions and
apply it to socklen_t. patch by Dave Yeo, daveryeo telus net Originally committed as revision 11366 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure21
1 files changed, 21 insertions, 0 deletions
diff --git a/configure b/configure
index c95d900553..0cc53f893a 100755
--- a/configure
+++ b/configure
@@ -551,6 +551,23 @@ int main(void){
EOF
}
+check_type(){
+ log check_type "$@"
+ headers=$1
+ type=$2
+ shift 2
+ disable $type
+ incs=""
+ for hdr in $headers; do
+ incs="$incs
+#include <$hdr>"
+ done
+ check_cc "$@" <<EOF && enable $type
+$incs
+$type v;
+EOF
+}
+
require(){
name="$1"
header="$2"
@@ -720,6 +737,7 @@ HAVE_LIST="
roundf
sdl
sdl_video_size
+ socklen_t
soundcard_h
sys_poll_h
sys_select_h
@@ -1684,6 +1702,8 @@ fi
texi2html -version >/dev/null 2>&1 && enable texi2html || disable texi2html
+check_type sys/socket.h socklen_t
+
##########################################
# Network check
@@ -1693,6 +1713,7 @@ if enabled network; then
check_func closesocket
elif check_header winsock2.h ; then
network_extralibs="-lws2_32"
+ check_type ws2tcpip.h socklen_t
check_func2 winsock2.h closesocket
fi
fi