Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJack Pappas <jackp@server.fake>2013-02-10 06:40:48 +0400
committerJack Pappas <jackp@server.fake>2013-02-10 06:40:48 +0400
commitd89924d80263ac63cd1edbba71710d7ddae83cb5 (patch)
tree2cc13c873d927a03e90a5eba76112db1d3ec4480 /configure.in
parent21b51635c4758456bfeb25141ed6a76b2e887b1e (diff)
Added checks for BSD-compliant protocol constants.
Fixed the checks for a couple of Linux-specific constants so they work correctly (they included the wrong header). Added a check for the Linux-specific constant IP_PMTUDISC_DO; this'll be used with IP_MTU_DISCOVER in a future patch to make Linux sockets match BSD/OSX/Windows behavior.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in81
1 files changed, 77 insertions, 4 deletions
diff --git a/configure.in b/configure.in
index c6f3f3c010a..6f8db16e078 100644
--- a/configure.in
+++ b/configure.in
@@ -1227,6 +1227,51 @@ if test x$target_win32 = xno; then
])
dnl *****************************
+ dnl *** Checks for IPPROTO_IP ***
+ dnl *****************************
+ AC_MSG_CHECKING(for IPPROTO_IP)
+ AC_TRY_COMPILE([#include <netinet/in.h>], [
+ int level = IPPROTO_IP;
+ ], [
+ # Yes, we have it...
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_IPPROTO_IP, 1, [Have IPPROTO_IP])
+ ], [
+ # We'll have to use getprotobyname
+ AC_MSG_RESULT(no)
+ ])
+
+ dnl *******************************
+ dnl *** Checks for IPPROTO_IPV6 ***
+ dnl *******************************
+ AC_MSG_CHECKING(for IPPROTO_IPV6)
+ AC_TRY_COMPILE([#include <netinet/in.h>], [
+ int level = IPPROTO_IPV6;
+ ], [
+ # Yes, we have it...
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_IPPROTO_IPV6, 1, [Have IPPROTO_IPV6])
+ ], [
+ # We'll have to use getprotobyname
+ AC_MSG_RESULT(no)
+ ])
+
+ dnl ******************************
+ dnl *** Checks for IPPROTO_TCP ***
+ dnl ******************************
+ AC_MSG_CHECKING(for IPPROTO_TCP)
+ AC_TRY_COMPILE([#include <netinet/in.h>], [
+ int level = IPPROTO_TCP;
+ ], [
+ # Yes, we have it...
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_IPPROTO_TCP, 1, [Have IPPROTO_TCP])
+ ], [
+ # We'll have to use getprotobyname
+ AC_MSG_RESULT(no)
+ ])
+
+ dnl *****************************
dnl *** Checks for SOL_IP ***
dnl *****************************
AC_MSG_CHECKING(for SOL_IP)
@@ -1275,7 +1320,7 @@ if test x$target_win32 = xno; then
dnl *** Checks for IP_PKTINFO ***
dnl *****************************
AC_MSG_CHECKING(for IP_PKTINFO)
- AC_TRY_COMPILE([#include <netdb.h>], [
+ AC_TRY_COMPILE([#include <linux/in.h>], [
int level = IP_PKTINFO;
], [
# Yes, we have it...
@@ -1300,10 +1345,24 @@ if test x$target_win32 = xno; then
])
dnl **********************************
+ dnl *** Checks for IP_DONTFRAG ***
+ dnl **********************************
+ AC_MSG_CHECKING(for IP_DONTFRAG)
+ AC_TRY_COMPILE([#include <netinet/in.h>], [
+ int level = IP_DONTFRAG;
+ ], [
+ # Yes, we have it...
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_IP_DONTFRAG, 1, [Have IP_DONTFRAG])
+ ], [
+ AC_MSG_RESULT(no)
+ ])
+
+ dnl **********************************
dnl *** Checks for IP_DONTFRAGMENT ***
dnl **********************************
AC_MSG_CHECKING(for IP_DONTFRAGMENT)
- AC_TRY_COMPILE([#include <netdb.h>], [
+ AC_TRY_COMPILE([#include <Ws2ipdef.h>], [
int level = IP_DONTFRAGMENT;
], [
# Yes, we have it...
@@ -1317,7 +1376,7 @@ if test x$target_win32 = xno; then
dnl *** Checks for IP_MTU_DISCOVER ***
dnl **********************************
AC_MSG_CHECKING(for IP_MTU_DISCOVER)
- AC_TRY_COMPILE([#include <netdb.h>], [
+ AC_TRY_COMPILE([#include <linux/in.h>], [
int level = IP_MTU_DISCOVER;
], [
# Yes, we have it...
@@ -1327,6 +1386,20 @@ if test x$target_win32 = xno; then
AC_MSG_RESULT(no)
])
+ dnl **********************************
+ dnl *** Checks for IP_PMTUDISC_DO ***
+ dnl **********************************
+ AC_MSG_CHECKING(for IP_PMTUDISC_DO)
+ AC_TRY_COMPILE([#include <linux/in.h>], [
+ int level = IP_PMTUDISC_DO;
+ ], [
+ # Yes, we have it...
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_IP_PMTUDISC_DO, 1, [Have IP_PMTUDISC_DO])
+ ], [
+ AC_MSG_RESULT(no)
+ ])
+
dnl *********************************
dnl *** Check for struct ip_mreqn ***
dnl *********************************
@@ -3454,4 +3527,4 @@ echo "
"
if test x$with_static_mono = xno -a "x$host_win32" != "xyes"; then
AC_MSG_WARN(Turning off static Mono is a risk, you might run into unexpected bugs)
-fi
+fi \ No newline at end of file