xref: /onnv-gate/usr/src/cmd/perl/5.8.4/distrib/ext/Socket/Makefile.PL (revision 0:68f95e015346)
1*0Sstevel@tonic-gate#
2*0Sstevel@tonic-gate# CDDL HEADER START
3*0Sstevel@tonic-gate#
4*0Sstevel@tonic-gate# The contents of this file are subject to the terms of the
5*0Sstevel@tonic-gate# Common Development and Distribution License, Version 1.0 only
6*0Sstevel@tonic-gate# (the "License").  You may not use this file except in compliance
7*0Sstevel@tonic-gate# with the License.
8*0Sstevel@tonic-gate#
9*0Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10*0Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing.
11*0Sstevel@tonic-gate# See the License for the specific language governing permissions
12*0Sstevel@tonic-gate# and limitations under the License.
13*0Sstevel@tonic-gate#
14*0Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each
15*0Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16*0Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the
17*0Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying
18*0Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner]
19*0Sstevel@tonic-gate#
20*0Sstevel@tonic-gate# CDDL HEADER END
21*0Sstevel@tonic-gate#
22*0Sstevel@tonic-gateuse ExtUtils::MakeMaker;
23*0Sstevel@tonic-gateuse ExtUtils::Constant 0.11 'WriteConstants';
24*0Sstevel@tonic-gateuse Config;
25*0Sstevel@tonic-gateWriteMakefile(
26*0Sstevel@tonic-gate    NAME	 => 'Socket',
27*0Sstevel@tonic-gate    VERSION_FROM => 'Socket.pm',
28*0Sstevel@tonic-gate   ($Config{libs} =~ /(-lsocks\S*)/ ? (LIBS => [ "$1" ] ) : ()),
29*0Sstevel@tonic-gate    MAN3PODS  	 => {}, 	# Pods will be built by installman.
30*0Sstevel@tonic-gate    XSPROTOARG   => '-noprototypes', 		# XXX remove later?
31*0Sstevel@tonic-gate    realclean => {FILES=> 'const-c.inc const-xs.inc'},
32*0Sstevel@tonic-gate);
33*0Sstevel@tonic-gatemy @names = (qw(AF_802 AF_AAL AF_APPLETALK AF_CCITT AF_CHAOS AF_CTF
34*0Sstevel@tonic-gate		AF_DATAKIT AF_DECnet AF_DLI AF_ECMA AF_GOSIP AF_HYLINK
35*0Sstevel@tonic-gate		AF_IMPLINK AF_INET AF_INET6 AF_ISO AF_KEY
36*0Sstevel@tonic-gate		AF_LAST AF_LAT AF_LINK AF_MAX AF_NBS AF_NIT AF_NS
37*0Sstevel@tonic-gate		AF_OSI AF_OSINET AF_PUP AF_ROUTE AF_SNA
38*0Sstevel@tonic-gate		AF_UNIX AF_UNSPEC AF_USER AF_WAN AF_X25
39*0Sstevel@tonic-gate		IOV_MAX IPPROTO_TCP
40*0Sstevel@tonic-gate		MSG_BCAST MSG_BTAG MSG_CTLFLAGS MSG_CTLIGNORE MSG_DONTWAIT
41*0Sstevel@tonic-gate		MSG_EOF MSG_EOR MSG_ERRQUEUE MSG_ETAG MSG_FIN
42*0Sstevel@tonic-gate		MSG_MAXIOVLEN MSG_MCAST MSG_NOSIGNAL MSG_RST MSG_SYN
43*0Sstevel@tonic-gate		MSG_TRUNC MSG_URG MSG_WAITALL MSG_WIRE
44*0Sstevel@tonic-gate		PF_802 PF_AAL PF_APPLETALK PF_CCITT PF_CHAOS PF_CTF
45*0Sstevel@tonic-gate		PF_DATAKIT PF_DECnet PF_DLI PF_ECMA PF_GOSIP PF_HYLINK
46*0Sstevel@tonic-gate		PF_IMPLINK PF_INET PF_INET6 PF_ISO PF_KEY
47*0Sstevel@tonic-gate		PF_LAST PF_LAT PF_LINK PF_MAX PF_NBS PF_NIT PF_NS
48*0Sstevel@tonic-gate		PF_OSI PF_OSINET PF_PUP PF_ROUTE PF_SNA
49*0Sstevel@tonic-gate		PF_UNIX PF_UNSPEC PF_USER PF_WAN PF_X25
50*0Sstevel@tonic-gate		SCM_CONNECT SCM_CREDENTIALS SCM_CREDS SCM_TIMESTAMP
51*0Sstevel@tonic-gate		SOCK_DGRAM SOCK_RAW SOCK_RDM SOCK_SEQPACKET SOCK_STREAM
52*0Sstevel@tonic-gate		SOL_SOCKET SOMAXCONN
53*0Sstevel@tonic-gate		SO_ACCEPTCONN SO_ATTACH_FILTER SO_BACKLOG SO_BROADCAST
54*0Sstevel@tonic-gate		SO_CHAMELEON SO_DEBUG SO_DETACH_FILTER SO_DGRAM_ERRIND
55*0Sstevel@tonic-gate		SO_DONTLINGER SO_DONTROUTE SO_ERROR SO_FAMILY
56*0Sstevel@tonic-gate		SO_KEEPALIVE SO_LINGER SO_OOBINLINE
57*0Sstevel@tonic-gate		SO_PASSCRED SO_PASSIFNAME SO_PEERCRED
58*0Sstevel@tonic-gate		SO_PROTOCOL SO_PROTOTYPE
59*0Sstevel@tonic-gate		SO_RCVBUF SO_RCVLOWAT SO_RCVTIMEO
60*0Sstevel@tonic-gate		SO_REUSEADDR SO_REUSEPORT
61*0Sstevel@tonic-gate		SO_SECURITY_AUTHENTICATION
62*0Sstevel@tonic-gate		SO_SECURITY_ENCRYPTION_NETWORK
63*0Sstevel@tonic-gate		SO_SECURITY_ENCRYPTION_TRANSPORT
64*0Sstevel@tonic-gate		SO_SNDBUF SO_SNDLOWAT SO_SNDTIMEO
65*0Sstevel@tonic-gate		SO_STATE SO_TYPE SO_USELOOPBACK SO_XOPEN SO_XSE
66*0Sstevel@tonic-gate		TCP_KEEPALIVE TCP_MAXRT TCP_MAXSEG TCP_NODELAY TCP_STDURG
67*0Sstevel@tonic-gate		UIO_MAXIOV
68*0Sstevel@tonic-gate		),
69*0Sstevel@tonic-gate            {name=>"SHUT_RD", type=>"IV", default=>["IV", "0"]},
70*0Sstevel@tonic-gate            {name=>"SHUT_WR", type=>"IV", default=>["IV", "1"]},
71*0Sstevel@tonic-gate            {name=>"SHUT_RDWR", type=>"IV", default=>["IV", "2"]},
72*0Sstevel@tonic-gate);
73*0Sstevel@tonic-gate
74*0Sstevel@tonic-gatepush @names,
75*0Sstevel@tonic-gate  {name=>$_, type=>"IV",
76*0Sstevel@tonic-gate   macro=>["#if defined($_) || defined(HAS_$_) /* might be an enum */\n",
77*0Sstevel@tonic-gate           "#endif\n"]}
78*0Sstevel@tonic-gateforeach qw (MSG_CTRUNC MSG_DONTROUTE MSG_OOB MSG_PEEK MSG_PROXY SCM_RIGHTS);
79*0Sstevel@tonic-gate
80*0Sstevel@tonic-gatepush @names,
81*0Sstevel@tonic-gate{name => $_, type => "SV",
82*0Sstevel@tonic-gate pre=>"struct in_addr ip_address; ip_address.s_addr = htonl($_);",
83*0Sstevel@tonic-gate value => "sv_2mortal(newSVpvn((char *)&ip_address,sizeof ip_address ))",}
84*0Sstevel@tonic-gate         foreach qw(INADDR_ANY INADDR_LOOPBACK INADDR_NONE INADDR_BROADCAST);
85*0Sstevel@tonic-gate
86*0Sstevel@tonic-gateWriteConstants(
87*0Sstevel@tonic-gate    NAME => 'Socket',
88*0Sstevel@tonic-gate    NAMES => \@names,
89*0Sstevel@tonic-gate);
90