build: more checking for includes

pull/196/head
Victor Julien 12 years ago
parent 89f83c2ee4
commit 472e061c6d

@ -94,12 +94,19 @@ AC_INIT(configure.ac)
# Checks for libraries.
# Checks for header files.
AC_CHECK_HEADERS([arpa/inet.h inttypes.h limits.h netdb.h poll.h signal.h stdint.h stdlib.h string.h syslog.h sys/ioctl.h sys/prctl.h sys/socket.h sys/syscall.h netinet/in.h sys/time.h unistd.h windows.h winsock2.h ws2tcpip.h sched.h assert.h])
AC_CHECK_HEADERS([sys/socket.h net/if.h sys/mman.h], [], [],
AC_CHECK_HEADERS([arpa/inet.h assert.h ctype.h errno.h fcntl.h inttypes.h])
AC_CHECK_HEADERS([getopt.h])
AC_CHECK_HEADERS([limits.h netdb.h netinet/in.h poll.h sched.h signal.h])
AC_CHECK_HEADERS([stdarg.h stdint.h stdio.h stdlib.h string.h sys/ioctl.h])
AC_CHECK_HEADERS([syslog.h sys/prctl.h sys/socket.h sys/stat.h sys/syscall.h])
AC_CHECK_HEADERS([sys/time.h time.h unistd.h windows.h winsock2.h ws2tcpip.h])
AC_CHECK_HEADERS([sys/ioctl.h linux/if_ether.h linux/if_packet.h linux/filter.h])
AC_CHECK_HEADERS([sys/socket.h net/if.h sys/mman.h linux/if_arp.h], [], [],
[[#ifdef HAVE_SYS_SOCKET_H
#include <sys/types.h>
#include <sys/socket.h>
#endif
#include <sys/types.h>
#include <sys/socket.h>
#endif
]])
@ -846,7 +853,7 @@ AC_INIT(configure.ac)
if test "$with_libpcap_libraries" != "no"; then
LDFLAGS="${LDFLAGS} -L${with_libpcap_libraries}"
fi
AC_CHECK_HEADERS([pcap.h pcap/pcap.h])
AC_CHECK_HEADERS([pcap.h pcap/pcap.h pcap/bpf.h])
LIBPCAP=""
AC_CHECK_LIB(pcap, pcap_open_live,, LIBPCAP="no", [-lpthread])

@ -50,7 +50,6 @@
#include "app-layer-htp.h"
#include "app-layer-htp-file.h"
#include "util-time.h"
#include <htp/htp.h>
#include "util-unittest.h"
#include "util-unittest-helper.h"

@ -47,7 +47,6 @@
#include "util-debug.h"
#include "app-layer-htp.h"
#include "util-time.h"
#include <htp/htp.h>
#include "util-unittest.h"
#include "util-unittest-helper.h"

@ -36,8 +36,6 @@
* stays approach?
*/
#include <string.h>
#include "suricata-common.h"
#include "conf.h"
#include "util-unittest.h"

@ -452,7 +452,6 @@ static int PayloadTestSig13(void)
"content:\"aa\"; content:\"aa\"; distance:0; content:\"aa\"; distance:0; "
"byte_test:1,>,200,0,relative; sid:1;)";
#include <sys/time.h>
struct timeval tv_start, tv_end, tv_diff;
gettimeofday(&tv_start, NULL);

@ -23,11 +23,6 @@
* Signature ordering part of the detection engine.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <pcre.h>
#include "suricata-common.h"
#include "detect.h"
#include "detect-flowbits.h"

@ -53,7 +53,6 @@
#include "app-layer.h"
#include <htp/htp.h>
#include "app-layer-htp.h"
#include "detect-http-client-body.h"
#include "stream-tcp.h"

@ -55,7 +55,6 @@
#include "app-layer.h"
#include <htp/htp.h>
#include "app-layer-htp.h"
#include "detect-http-cookie.h"
#include "stream-tcp.h"

@ -54,7 +54,6 @@
#include "app-layer.h"
#include <htp/htp.h>
#include "app-layer-htp.h"
#include "detect-http-header.h"
#include "stream-tcp.h"

@ -54,7 +54,6 @@
#include "app-layer.h"
#include <htp/htp.h>
#include "app-layer-htp.h"
#include "detect-http-method.h"
#include "stream-tcp.h"

@ -54,7 +54,6 @@
#include "app-layer.h"
#include <htp/htp.h>
#include "app-layer-htp.h"
#include "detect-http-raw-header.h"
#include "stream-tcp.h"

@ -50,7 +50,6 @@
#include "app-layer.h"
#include <htp/htp.h>
#include "app-layer-htp.h"
#include "detect-http-raw-uri.h"
#include "stream-tcp.h"

@ -54,7 +54,6 @@
#include "app-layer.h"
#include <htp/htp.h>
#include "app-layer-htp.h"
#include "detect-http-server-body.h"
#include "stream-tcp.h"

@ -56,7 +56,6 @@
#include "app-layer.h"
#include <htp/htp.h>
#include "app-layer-htp.h"
#include "detect-http-stat-code.h"
#include "stream-tcp-private.h"

@ -56,7 +56,6 @@
#include "app-layer.h"
#include <htp/htp.h>
#include "app-layer-htp.h"
#include "detect-http-stat-msg.h"
#include "stream-tcp-private.h"

@ -53,7 +53,6 @@
#include "app-layer.h"
#include <htp/htp.h>
#include "app-layer-htp.h"
#include "stream-tcp.h"
#include "detect-http-ua.h"

@ -50,7 +50,6 @@
#include "app-layer.h"
#include <htp/htp.h>
#include "app-layer-htp.h"
#include "detect-http-uri.h"
#include "detect-uricontent.h"

@ -57,7 +57,6 @@
#include "app-layer-parser.h"
#include "app-layer-htp.h"
#include <htp/htp.h>
#include "stream.h"

@ -24,8 +24,6 @@
* Implements http logging portion of the engine.
*/
#include <htp/dslib.h>
#include "suricata-common.h"
#include "debug.h"
#include "detect.h"

@ -56,17 +56,32 @@
#include "runmodes.h"
#ifdef HAVE_AF_PACKET
#if HAVE_SYS_IOCTL_H
#include <sys/ioctl.h>
#endif
#if HAVE_LINUX_IF_ETHER_H
#include <linux/if_ether.h>
#endif
#if HAVE_LINUX_IF_PACKET_H
#include <linux/if_packet.h>
#endif
#if HAVE_LINUX_IF_ARP_H
#include <linux/if_arp.h>
#endif
#include <pcap/pcap.h>
#include <pcap/bpf.h>
#if HAVE_LINUX_FILTER_H
#include <linux/filter.h>
#endif
#if HAVE_SYS_MMAN_H
#include <sys/mman.h>
#endif
#endif /* HAVE_AF_PACKET */
extern uint8_t suricata_ctl_flags;
extern int max_pending_packets;

@ -102,7 +102,6 @@ TmEcode NoNFQSupportExit(ThreadVars *tv, void *initdata, void **data)
}
#else /* implied we do have NFQ support */
#include <pthread.h>
extern int max_pending_packets;

@ -40,22 +40,53 @@
#include <config.h>
#endif
#if HAVE_STDIO_H
#include <stdio.h>
#endif
#if HAVE_STDINT_h
#include <stdint.h>
#endif
#if HAVE_STDARG_H
#include <stdarg.h>
#endif
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#if HAVE_ERRNO_H
#include <errno.h>
#endif
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#if HAVE_INTTYPES_H
#include <inttypes.h>
#endif
#if HAVE_LIMITS_H
#include <limits.h>
#endif
#if HAVE_CTYPE_H
#include <ctype.h>
#endif
#if HAVE_STRING_H
#include <string.h>
#endif
#if HAVE_FCNTL_H
#include <fcntl.h>
#endif
#ifdef HAVE_TIME_H
#include <time.h>
#endif
#if HAVE_SYS_SYSCALL_H
#include <sys/syscall.h>
@ -112,7 +143,9 @@
#include <sys/socket.h>
#endif
#if HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif
#if HAVE_NETINET_IN_H
#include <netinet/in.h>
@ -156,6 +189,10 @@
#include <pcap/pcap.h>
#endif
#ifdef HAVE_PCAP_BPF_H
#include <pcap/bpf.h>
#endif
/* we need this to stringify the defines which are supplied at compiletime see:
http://gcc.gnu.org/onlinedocs/gcc-3.4.1/cpp/Stringification.html#Stringification */
#define xstr(s) str(s)

@ -24,9 +24,13 @@
#include "suricata-common.h"
#include "config.h"
#if HAVE_GETOPT_H
#include <getopt.h>
#endif
#if HAVE_SIGNAL_H
#include <signal.h>
#include <pthread.h>
#endif
#ifdef HAVE_NSS
#include <prinit.h>

@ -36,8 +36,6 @@
#include "tmqh-packetpool.h"
#include "threads.h"
#include "util-debug.h"
#include <pthread.h>
#include <unistd.h>
#include "util-privs.h"
#include "util-cpu.h"
#include "util-optimize.h"

@ -23,11 +23,6 @@
* Retrieve CPU information (configured CPUs, online CPUs)
*/
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include "util-error.h"
#include "util-debug.h"
#include "suricata-common.h"

@ -24,17 +24,6 @@
*/
#include "suricata-common.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include "threads.h"
#include "util-debug.h"
#include "util-debug-filters.h"
#include "util-error.h"
#include "util-enum.h"
#include <pthread.h>
/* both of these are defined in util-debug.c */
extern int sc_log_module_initialized;

@ -32,17 +32,6 @@
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <inttypes.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include "suricata-common.h"
#include "util-decode-der.h"

@ -43,17 +43,6 @@
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <inttypes.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include "suricata-common.h"
#include "util-decode-der.h"

Loading…
Cancel
Save