summaryrefslogtreecommitdiff
path: root/Sockets/Sockets-config.cpp
blob: 7311147c8fc67494b2df6723c424b61188970598 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
/**
 **	\file Sockets-config.cpp
 **	\date  2006-09-04
 **	\author grymse@alhem.net
**/
/*
Copyright (C) 2007  Anders Hedstrom

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
*/
#include <stdio.h>
#include <string.h>
#include "sockets-config.h"
#include "socket_include.h"

int main(int argc,char *argv[])
{
	if (argc > 1 && !strcmp(argv[1], "-info"))
	{
#ifdef HAVE_OPENSSL
		printf("SSL support\n");
#endif
#ifdef IPPROTO_IPV6
		printf("IPv6 support\n");
#endif
#ifdef USE_SCTP
#ifdef IPPROTO_SCTP
		printf("SCTP support\n");
#	ifdef HAVE_SCTP
		printf("  HAVE_SCTP: yes\n");
#	else
		printf("  HAVE_SCTP: no\n");
#	endif
#	ifdef HAVE_KERNEL_SCTP
		printf("  HAVE_KERNEL_SCTP: yes\n");
#	else
		printf("  HAVE_KERNEL_SCTP: no\n");
#	endif
#	ifdef HAVE_SCTP_PRSCTP
		printf("  HAVE_SCTP_PRSCTP: yes\n");
#	else
		printf("  HAVE_SCTP_PRSCTP: no\n");
#	endif
#	ifdef HAVE_SCTP_ADDIP
		printf("  HAVE_SCTP_ADDIP: yes\n");
#	else
		printf("  HAVE_SCTP_ADDIP: no\n");
#	endif
#	ifdef HAVE_SCTP_CANSET_PRIMARY
		printf("  HAVE_SCTP_CANSETPRIMARY: yes\n");
#	else
		printf("  HAVE_SCTP_CANSETPRIMARY: no\n");
#	endif
#	ifdef HAVE_SCTP_SAT_NETWORK_CAPABILITY
		printf("  HAVE_SCTP_SAT_NETWORK_CAPABILITY: yes\n");
#	else
		printf("  HAVE_SCTP_SAT_NETWORK_CAPABILITY: no\n");
#	endif
#	ifdef HAVE_SCTP_MULTIBUF
		printf("  HAVE_SCTP_MULTIBUF: yes\n");
#	else
		printf("  HAVE_SCTP_MULTIBUF: no\n");
#	endif
#	ifdef HAVE_SCTP_NOCONNECT
		printf("  HAVE_SCTP_NOCONNECT: yes\n");
#	else
		printf("  HAVE_SCTP_NOCONNECT: no\n");
#	endif
#	ifdef HAVE_SCTP_EXT_RCVINFO
		printf("  HAVE_SCTP_EXT_RCVINFO: yes\n");
#	else
		printf("  HAVE_SCTP_EXT_RCVINFO: no\n");
#	endif
#else
		printf("No SCTP support\n");
#endif
#endif
		return 0;
	}
	printf(" -D_VERSION='\"%s\"'", _VERSION);

#ifdef LINUX
	printf(" -DLINUX");
#endif
#ifdef MACOSX
	printf(" -DMACOSX");
#endif
#ifdef SOLARIS
	printf(" -DSOLARIS");
#endif
#ifdef SOLARIS8
	printf(" -DSOLARIS8");
#endif
#ifdef _WIN32
	printf(" -D_WIN32");
#endif
#ifdef __CYGWIN__
	printf(" -D__CYGWIN__");
#endif
#ifdef SOCKETS_NAMESPACE
	printf(" -DSOCKETS_NAMESPACE=%s", SOCKETS_NAMESPACE_STR);
#endif
#ifdef _DEBUG
	printf(" -D_DEBUG");
#endif

}