This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Missing chunk in change #26247.
[perl5.git] / ext / Sys / Syslog / Makefile.PL
CommitLineData
8ce86de8 1use ExtUtils::MakeMaker;
1cb0fb50 2use ExtUtils::Constant 0.11 'WriteConstants';
8ce86de8
GS
3
4WriteMakefile(
5 NAME => 'Sys::Syslog',
6 VERSION_FROM => 'Syslog.pm',
f91101c9 7 MAN3PODS => {}, # Pods will be built by installman.
8ce86de8 8 XSPROTOARG => '-noprototypes',
ece2ffd9 9 realclean => {FILES=> 'const-c.inc const-xs.inc'},
8ce86de8 10);
cf2bd340 11
f66a7beb
JB
12my $_PATH_LOG;
13
14if (-S "/dev/log" && -w "/dev/log") {
15 # Most unixes have a unix domain socket /dev/log.
16 $_PATH_LOG = "/dev/log";
17} elsif (-c "/dev/conslog" && -w "/dev/conslog") {
18 # SunOS 5.8 has a worldwritable /dev/conslog STREAMS log driver.
19 # The /dev/log STREAMS log driver on this platform has permissions
20 # and ownership `crw-r----- root sys'. /dev/conslog has more liberal
21 # permissions.
22 $_PATH_LOG = "/dev/conslog";
23} else {
24 $_PATH_LOG = "";
25}
cf2bd340 26
0552bf3a 27WriteConstants(
ae80fb03 28 NAME => 'Sys::Syslog',
0552bf3a
NC
29 NAMES => [qw(LOG_ALERT LOG_AUTH LOG_AUTHPRIV LOG_CONS LOG_CRIT LOG_CRON
30 LOG_DAEMON LOG_DEBUG LOG_EMERG LOG_ERR LOG_FACMASK LOG_FTP
31 LOG_INFO LOG_KERN LOG_LFMT LOG_LOCAL0 LOG_LOCAL1 LOG_LOCAL2
32 LOG_LOCAL3 LOG_LOCAL4 LOG_LOCAL5 LOG_LOCAL6 LOG_LOCAL7 LOG_LPR
33 LOG_MAIL LOG_NDELAY LOG_NEWS LOG_NFACILITIES LOG_NOTICE
34 LOG_NOWAIT LOG_ODELAY LOG_PERROR LOG_PID LOG_PRIMASK LOG_SYSLOG
35 LOG_USER LOG_UUCP LOG_WARNING),
cf2bd340 36 {name=>"_PATH_LOG", type=>"PV", default=>["PV",qq("$_PATH_LOG")]},
0552bf3a
NC
37 ],
38);