1 iperf: fix out of tree configuration
3 The configure step uses a package header to check for support of types/declares,
4 this package header encapsulates all the required system header for providing
5 the needed resources. When configured from an out of tree directory the package
6 header is not found due to the hard path.
7 We now make the path for package header relative to our 'srcdir' so it is
10 Signed-off-by: Awais Belal <awais_belal@mentor.com>
12 diff --git a/configure.ac b/configure.ac
13 index 2b3fd20..d420f9e 100644
16 @@ -176,8 +176,8 @@ dnl Check for system services
18 dnl check for multicast
19 if test "$ac_cv_multicast" != no; then
20 - AC_CHECK_TYPES(struct ip_mreq,,,[#include "compat/headers_slim.h"])
21 - AC_CHECK_DECLS(IP_ADD_MEMBERSHIP,,,[#include "compat/headers_slim.h"])
22 + AC_CHECK_TYPES(struct ip_mreq,,,[#include "${srcdir}/compat/headers_slim.h"])
23 + AC_CHECK_DECLS(IP_ADD_MEMBERSHIP,,,[#include "${srcdir}/compat/headers_slim.h"])
24 AC_MSG_CHECKING(for multicast support)
26 if test "$ac_cv_have_decl_IP_ADD_MEMBERSHIP" = yes; then
27 @@ -193,9 +193,9 @@ fi
30 if test "$ac_cv_have_ipv6" != no; then
31 - AC_CHECK_TYPES(struct sockaddr_storage,,,[#include "compat/headers_slim.h"])
32 - AC_CHECK_TYPES(struct sockaddr_in6,,,[#include "compat/headers_slim.h"])
33 - AC_CHECK_DECLS(AF_INET6,,,[#include "compat/headers_slim.h"])
34 + AC_CHECK_TYPES(struct sockaddr_storage,,,[#include "${srcdir}/compat/headers_slim.h"])
35 + AC_CHECK_TYPES(struct sockaddr_in6,,,[#include "${srcdir}/compat/headers_slim.h"])
36 + AC_CHECK_DECLS(AF_INET6,,,[#include "${srcdir}/compat/headers_slim.h"])
37 AC_MSG_CHECKING(for IPv6 headers and structures)
39 if test "$ac_cv_type_struct_sockaddr_storage" = yes; then
40 @@ -211,9 +211,9 @@ fi
42 if test "$ac_cv_have_ipv6" = yes; then
43 if test "$ac_cv_multicast" = yes; then
44 - AC_CHECK_TYPES(struct ipv6_mreq,,,[#include "compat/headers_slim.h"])
45 - AC_CHECK_DECLS(IPV6_ADD_MEMBERSHIP,,,[#include "compat/headers_slim.h"])
46 - AC_CHECK_DECLS(IPV6_MULTICAST_HOPS,,,[#include "compat/headers_slim.h"])
47 + AC_CHECK_TYPES(struct ipv6_mreq,,,[#include "${srcdir}/compat/headers_slim.h"])
48 + AC_CHECK_DECLS(IPV6_ADD_MEMBERSHIP,,,[#include "${srcdir}/compat/headers_slim.h"])
49 + AC_CHECK_DECLS(IPV6_MULTICAST_HOPS,,,[#include "${srcdir}/compat/headers_slim.h"])
50 AC_MSG_CHECKING(for IPv6 multicast support)
51 ac_cv_have_ipv6_multicast=no
52 if test "$ac_cv_type_struct_ipv6_mreq" = yes; then