svn cleanup
[anytun.git] / Sockets / Sockets-config.cpp
blob7311147c8fc67494b2df6723c424b61188970598
1 /**
2 ** \file Sockets-config.cpp
3 ** \date 2006-09-04
4 ** \author grymse@alhem.net
5 **/
6 /*
7 Copyright (C) 2007 Anders Hedstrom
9 This program is free software; you can redistribute it and/or
10 modify it under the terms of the GNU General Public License
11 as published by the Free Software Foundation; either version 2
12 of the License, or (at your option) any later version.
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23 #include <stdio.h>
24 #include <string.h>
25 #include "sockets-config.h"
26 #include "socket_include.h"
28 int main(int argc,char *argv[])
30 if (argc > 1 && !strcmp(argv[1], "-info"))
32 #ifdef HAVE_OPENSSL
33 printf("SSL support\n");
34 #endif
35 #ifdef IPPROTO_IPV6
36 printf("IPv6 support\n");
37 #endif
38 #ifdef USE_SCTP
39 #ifdef IPPROTO_SCTP
40 printf("SCTP support\n");
41 # ifdef HAVE_SCTP
42 printf(" HAVE_SCTP: yes\n");
43 # else
44 printf(" HAVE_SCTP: no\n");
45 # endif
46 # ifdef HAVE_KERNEL_SCTP
47 printf(" HAVE_KERNEL_SCTP: yes\n");
48 # else
49 printf(" HAVE_KERNEL_SCTP: no\n");
50 # endif
51 # ifdef HAVE_SCTP_PRSCTP
52 printf(" HAVE_SCTP_PRSCTP: yes\n");
53 # else
54 printf(" HAVE_SCTP_PRSCTP: no\n");
55 # endif
56 # ifdef HAVE_SCTP_ADDIP
57 printf(" HAVE_SCTP_ADDIP: yes\n");
58 # else
59 printf(" HAVE_SCTP_ADDIP: no\n");
60 # endif
61 # ifdef HAVE_SCTP_CANSET_PRIMARY
62 printf(" HAVE_SCTP_CANSETPRIMARY: yes\n");
63 # else
64 printf(" HAVE_SCTP_CANSETPRIMARY: no\n");
65 # endif
66 # ifdef HAVE_SCTP_SAT_NETWORK_CAPABILITY
67 printf(" HAVE_SCTP_SAT_NETWORK_CAPABILITY: yes\n");
68 # else
69 printf(" HAVE_SCTP_SAT_NETWORK_CAPABILITY: no\n");
70 # endif
71 # ifdef HAVE_SCTP_MULTIBUF
72 printf(" HAVE_SCTP_MULTIBUF: yes\n");
73 # else
74 printf(" HAVE_SCTP_MULTIBUF: no\n");
75 # endif
76 # ifdef HAVE_SCTP_NOCONNECT
77 printf(" HAVE_SCTP_NOCONNECT: yes\n");
78 # else
79 printf(" HAVE_SCTP_NOCONNECT: no\n");
80 # endif
81 # ifdef HAVE_SCTP_EXT_RCVINFO
82 printf(" HAVE_SCTP_EXT_RCVINFO: yes\n");
83 # else
84 printf(" HAVE_SCTP_EXT_RCVINFO: no\n");
85 # endif
86 #else
87 printf("No SCTP support\n");
88 #endif
89 #endif
90 return 0;
92 printf(" -D_VERSION='\"%s\"'", _VERSION);
94 #ifdef LINUX
95 printf(" -DLINUX");
96 #endif
97 #ifdef MACOSX
98 printf(" -DMACOSX");
99 #endif
100 #ifdef SOLARIS
101 printf(" -DSOLARIS");
102 #endif
103 #ifdef SOLARIS8
104 printf(" -DSOLARIS8");
105 #endif
106 #ifdef _WIN32
107 printf(" -D_WIN32");
108 #endif
109 #ifdef __CYGWIN__
110 printf(" -D__CYGWIN__");
111 #endif
112 #ifdef SOCKETS_NAMESPACE
113 printf(" -DSOCKETS_NAMESPACE=%s", SOCKETS_NAMESPACE_STR);
114 #endif
115 #ifdef _DEBUG
116 printf(" -D_DEBUG");
117 #endif