From 5d1953946e9489787ff56784d544f1af31b9acd6 Mon Sep 17 00:00:00 2001 From: Kevin Easton Date: Thu, 10 May 2012 09:12:27 +0000 Subject: [PATCH] Use the correct dependencies when checking for net/if.h, arpa/inet.h and resolv.h (fixes a nasty configure spew on FreeBSD, reported by flashback). Add check for sys/socket.h, replace unused checks for netinet/in_systm.h and sys/in_system.h with a check for netinet/in.h. Remove unused check for sys/syslimits.h. git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@168 13b04d17-f746-0410-82c6-800466cd88b0 --- Changelog | 3 +++ configure.in | 19 ++++++++++++++++++- include/defs.h.in | 13 +++++-------- 3 files changed, 26 insertions(+), 9 deletions(-) diff --git a/Changelog b/Changelog index a0510fe..926fc25 100644 --- a/Changelog +++ b/Changelog @@ -1,5 +1,8 @@ [Changes 1.2c01] +* configure - use the right dependencies when checking for net/if.h, i + arpa/inet.h and resolv.h. Reported by flashback. (caf) + * Fix plugin Makefiles for out-of-tree building, reported by nyet. (caf) * Add DESTDIR support to build system, to ease rpm and deb packaging. diff --git a/configure.in b/configure.in index 3a15169..95327e3 100644 --- a/configure.in +++ b/configure.in @@ -62,7 +62,24 @@ AC_CHECK_LIB(m, pow, LIBS="-lm $LIBS",) dnl Checks for header files. AC_HEADER_DIRENT -AC_CHECK_HEADERS(arpa/inet.h net/if.h sys/time.h sys/fcntl.h fcntl.h sys/file.h sys/syslimits.h netinet/in_systm.h sys/in_systm.h netdb.h sys/un.h sys/filio.h regex.h resolv.h arpa/nameser.h dirent.h sys/ndir.h sys/dir.h ndir.h) +AC_CHECK_HEADERS([sys/socket.h sys/time.h sys/fcntl.h fcntl.h sys/file.h netinet/in.h netdb.h sys/un.h sys/filio.h regex.h arpa/nameser.h dirent.h sys/ndir.h sys/dir.h ndir.h]) + +AC_CHECK_HEADERS([net/if.h], [], [], +[AC_INCLUDES_DEFAULT +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +]) + +AC_CHECK_HEADERS([arpa/inet.h resolv.h], [], [], +[AC_INCLUDES_DEFAULT +#ifdef HAVE_NETINET_IN_H +#include +#endif +#ifdef HAVE_ARPA_NAMESER_H +#include +#endif +]) dnl Checks for declarations. AC_CHECK_DECLARATION(stpcpy, stpcpy, stpcpy, string.h, STPCPY_DECLARED) diff --git a/include/defs.h.in b/include/defs.h.in index c438f84..3b43c3a 100644 --- a/include/defs.h.in +++ b/include/defs.h.in @@ -159,8 +159,8 @@ /* Define to 1 if you have the header file. */ #undef HAVE_NETDB_H -/* Define to 1 if you have the header file. */ -#undef HAVE_NETINET_IN_SYSTM_H +/* Define to 1 if you have the header file. */ +#undef HAVE_NETINET_IN_H /* Define to 1 if you have the header file. */ #undef HAVE_NET_IF_H @@ -252,21 +252,18 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_FILIO_H -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_IN_SYSTM_H - /* Define to 1 if you have the header file. */ #undef HAVE_SYS_NDIR_H +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_SOCKET_H + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SOUNDCARD_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_SYSLIMITS_H - /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIME_H