[MPlayer-dev-eng] Fix compilation with recent libav
Reimar Döffinger
Reimar.Doeffinger at gmx.de
Wed Jan 13 18:47:27 CET 2010
Not tested by me.
> +echocheck "netdb.h, getaddrinfo, struct addrinfo"
> +cat > $TMPC << EOF
> +#include <sys/types.h>
> +#include <sys/socket.h>
> +#include <netdb.h>
> +int main(void) { struct addrinfo ai; (void) getaddrinfo(0, 0, 0, 0); return 0; }
> +EOF
> +cc_check && struct_addrinfo=yes
> +echores "$struct_addrinfo"
Should be explicitly set to no at the start of the test and the test should only be
run if the original value is auto.
Makes it easy to add a configure option later.
> +if test "x$struct_addrinfo" = "xyes"; then
Drop the x (that's what the quotes are there for) and no
need for quotes around the yes.
> + def_addrinfo="#define HAVE_STRUCT_ADDRINFO 1
> +#define HAVE_GETADDRINFO 1"
> +else
> + def_addrinfo="#define HAVE_STRUCT_ADDRINFO 0
> +#define HAVE_GETADDRINFO 0"
Use two def_ definitions, less ugly, easier to split in the future.
> +echocheck "sockaddr_storage"
> +cat > $TMPC << EOF
> +#include <sys/socket.h>
> +int main(void) { struct sockaddr_storage sas; return 0; }
> +EOF
> +cc_check && struct_sockaddr_storage=yes
> +echores "$struct_sockaddr_storage"
> +
> +if test "x$struct_sockaddr_storage" = "xyes"; then
> + def_sockaddr_storage="#define HAVE_STRUCT_SOCKADDR_STORAGE 1"
> +else
> + def_sockaddr_storage="#define HAVE_STRUCT_SOCKADDR_STORAGE 0"
> +fi
Basically the same comments.
Otherwise, good to see someone take up the initiative on it.
More information about the MPlayer-dev-eng
mailing list