From b8e7408b92dd8c1bd33b810ea3d6268fb8437c97 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=98yvind=20Harboe?= Date: Wed, 4 Nov 2009 13:16:38 +0100 Subject: [PATCH] configure: fix build problems with eCos MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Various include files require some other include files to be included first. Copied solution from net/if.h. Signed-off-by: Øyvind Harboe --- configure.in | 63 +++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 57 insertions(+), 6 deletions(-) diff --git a/configure.in b/configure.in index 1b86403688..57723838f9 100644 --- a/configure.in +++ b/configure.in @@ -35,27 +35,78 @@ AC_TYPE_LONG_LONG_INT AC_SEARCH_LIBS([ioperm], [ioperm]) AC_SEARCH_LIBS([dlopen], [dl]) -AC_CHECK_HEADERS(arpa/inet.h) +AC_CHECK_HEADERS(sys/socket.h) +AC_CHECK_HEADERS(arpa/inet.h, [], [], [dnl +#include +#ifdef STDC_HEADERS +# include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif +#endif +#ifdef HAVE_SYS_SOCKET_H +# include +#endif +]) AC_CHECK_HEADERS(elf.h) AC_CHECK_HEADERS(dirent.h) AC_CHECK_HEADERS(fcntl.h) -AC_CHECK_HEADERS(ifaddrs.h) +AC_CHECK_HEADERS(ifaddrs.h, [], [], [dnl +#include +#ifdef STDC_HEADERS +# include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif +#endif +#ifdef HAVE_SYS_SOCKET_H +# include +#endif +]) AC_CHECK_HEADERS(malloc.h) AC_CHECK_HEADERS(netdb.h) -AC_CHECK_HEADERS(netinet/in.h) -AC_CHECK_HEADERS(netinet/tcp.h) +AC_CHECK_HEADERS([netinet/in.h], [], [], [dnl +#include +#ifdef STDC_HEADERS +# include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif +#endif +#ifdef HAVE_SYS_SOCKET_H +# include +#endif +]) +AC_CHECK_HEADERS(netinet/tcp.h, [], [], [dnl +#include +#ifdef STDC_HEADERS +# include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif +#endif +#ifdef HAVE_SYS_SOCKET_H +# include +#endif +]) AC_CHECK_HEADERS(pthread.h) AC_CHECK_HEADERS(strings.h) AC_CHECK_HEADERS(sys/ioctl.h) AC_CHECK_HEADERS(sys/param.h) AC_CHECK_HEADERS(sys/poll.h) AC_CHECK_HEADERS(sys/select.h) -AC_CHECK_HEADERS(sys/socket.h) AC_CHECK_HEADERS(sys/stat.h) AC_CHECK_HEADERS(sys/time.h) AC_CHECK_HEADERS(sys/types.h) AC_CHECK_HEADERS(unistd.h) - AC_CHECK_HEADERS([net/if.h], [], [], [dnl #include #ifdef STDC_HEADERS -- 2.30.2