]> git.meshlink.io Git - catta/commitdiff
set the include flag for windows compat headers in configure
authorSven M. Hallberg <pesco@khjk.org>
Fri, 29 Aug 2014 12:24:21 +0000 (14:24 +0200)
committerSven M. Hallberg <pesco@khjk.org>
Fri, 29 Aug 2014 12:24:21 +0000 (14:24 +0200)
configure.ac
src/Makefile.am

index 1be1466b2b0c896de79ee1a1f43ff4e17f57572d..401a9ae1f28cf999a5d74ebd1646da377220aa5d 100644 (file)
@@ -58,10 +58,13 @@ fi
 # Windows stuff
 AC_CHECK_DECL(_WIN32)
 AM_CONDITIONAL([WINDOWS], [ test "x$ac_cv_have_decl__WIN32" = "xyes" ])
+if test "x$ac_cv_have_decl__WIN32" = "xyes" ; then
+    CPPFLAGS="$CPPFLAGS -I`pwd`/src/compat/windows/include"
+fi
 AC_CHECK_MEMBER([struct in_pktinfo.ipi_spec_dst],
     AC_DEFINE([HAVE_IPI_SPEC_DST], [], [struct in_pktinfo has ipi_spec_dst member]),
     [],
-    [[#include <ws2tcpip.h>]])
+    [[#include <netinet/in.h>]])
 
 # -fstack-protector
 AC_ARG_ENABLE([stack-protector],
index 68db4a1e36be964c9ba10ce0cf2c013f37335266..5ce20e06719476460530944353661a3b5ca1e303 100644 (file)
 
 AM_CFLAGS=-I$(top_srcdir)/include
 
-if WINDOWS
-AM_CFLAGS += -Icompat/windows/include
-endif
-
 # This cool debug trap works on i386/gcc only
 AM_CFLAGS+='-DDEBUG_TRAP=__asm__("int $$3")'