]> git.meshlink.io Git - catta/blobdiff - configure.ac
don't call pthread_sigmask on windows (MingW defines it as a no-op anyway)
[catta] / configure.ac
index 7a7dc40f528f9d4532703be58b037c7920b9e3ed..696903e91cab32b218d38147578a821a189e6f74 100644 (file)
@@ -23,7 +23,7 @@ AC_INIT([catta],[0.1],[])
 AC_CONFIG_SRCDIR([src/server.c])
 AC_CONFIG_MACRO_DIR([m4])
 AC_CONFIG_HEADERS([config.h])
-AM_INIT_AUTOMAKE([foreign 1.11 -Wall -Wno-portability silent-rules tar-pax])
+AM_INIT_AUTOMAKE([foreign 1.11 -Wall -Wno-portability silent-rules tar-pax subdir-objects])
 
 AC_SUBST(PACKAGE_URL, [http://github.com/everbase/catta/])
 
@@ -58,6 +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 <netinet/in.h>]])
 
 # -fstack-protector
 AC_ARG_ENABLE([stack-protector],
@@ -275,7 +282,7 @@ AC_CHECK_HEADERS([arpa/inet.h fcntl.h netinet/in.h sys/ioctl.h sys/socket.h sys/
 
 # Checks for library functions.
 AC_FUNC_SELECT_ARGTYPES
-AC_CHECK_FUNCS([gethostname select socket uname strcasecmp gettimeofday strncasecmp strlcpy])
+AC_CHECK_FUNCS([gethostname select socket uname strcasecmp gettimeofday strncasecmp strlcpy fcntl])
 
 AC_FUNC_CHOWN
 AC_FUNC_STAT
@@ -339,14 +346,11 @@ AC_OUTPUT
 echo "
  ---{ $PACKAGE_NAME $VERSION }---
 
-    prefix:                                    ${prefix}
-    sysconfdir:                                ${sysconfdir}
-    localstatedir:                             ${localstatedir}
-    C Compiler:                                ${CC}
-    CFLAGS:                                    ${CFLAGS}
-    Enable stack-smashing protection:          ${enable_ssp}
-"
-
-echo "\
+    prefix:                             ${prefix}
+    sysconfdir:                         ${sysconfdir}
+    localstatedir:                      ${localstatedir}
+    C Compiler:                         ${CC}
+    CFLAGS:                             ${CFLAGS}
+    Enable stack-smashing protection:   ${enable_ssp}
     Building tests:                     ${ENABLE_TESTS}
 "