1# -*- perl -*- 2 3use strict; 4 5use ExtUtils::MakeMaker; 6use Config; 7 8$| = 1; 9 10# Check, if fork() is available. If so, we assume that syslog should 11# be available too. Thankfull for any better recommendations ... 12if ($Config::Config{'d_fork'} eq 'define') { 13 print "Checking for Sys::Syslog ... "; 14 eval { require Sys::Syslog }; 15 if ($@) { 16 my $errmsg = $@; 17 $errmsg =~ s/^/ /mg; 18 if ($@ =~ /h2ph/) { 19 print STDERR <<"MSG"; 20 21While loading the Sys::Syslog module, I received the following error message: 22 23$errmsg 24 25Most probably this means that you did not run the h2ph script after 26installing Perl. You can do this now by executing the commands 27 28 cd /usr/include 29 h2ph *.h */*.h */*/*.h 30 31 32MSG 33 exit 10; 34 } 35 my $reply = prompt(qq{ 36 37Your system looks like Unix, as you seem to have fork() available. However 38I cannot load the Sys::Syslog module which should be working on any Unix 39machine. Please check out the following error message: 40 41$@ 42 43In either case, please contact the package author, jochen.wiedmann\@freenet.de and 44let him know your machine configuration (try "perl -V") and the above 45error message. 46 47Do you want to continue? }, "y"); 48 if ($reply !~ /y/i) { 49 exit 1; 50 } 51 } else { 52 print "ok\n"; 53 } 54} 55 56 57# See lib/ExtUtils/MakeMaker.pm for details of how to influence 58# the contents of the Makefile that is written. 59my %opts = ( 60 'NAME' => 'RPC::PlServer', 61 'DISTNAME' => 'PlRPC', 62 'dist' => { SUFFIX => '.gz', DIST_DEFAULT => 'all tardist', 63 COMPRESS => 'gzip -9vf' }, 64 'VERSION_FROM' => 'lib/RPC/PlServer.pm', # finds $VERSION 65 'LIBS' => [''], # e.g., '-lm' 66 'DEFINE' => '', # e.g., '-DHAVE_SOMETHING' 67 'INC' => '', # e.g., '-I/usr/include/other' 68 'clean' => { 'FILES' => 'ndtest.prt t/*.cfg' } 69); 70 71if ($ExtUtils::MakeMaker::VERSION >= 5.43) { 72 $opts{'AUTHOR'} = 'Jochen Wiedmann (jochen.wiedmann@freenet.de)'; 73 $opts{'PREREQ_PM'} = { 'Storable'=> 0, 74 'Net::Daemon' => 0.13 }, 75 $opts{'ABSTRACT'} = 'Perl Remote Method Invocation'; 76} 77 78WriteMakefile(%opts); 79 80package MY; 81 82sub libscan { my($self, $path) = @_; ($path =~ /\~$/) ? undef : $path } 83 84sub postamble { 85 <<"END_OF_POSTAMBLE"; 86pm_to_blib: README 87 88README: lib/RPC/PlServer.pm 89\tperldoc -t lib/RPC/PlServer.pm >README 90 91END_OF_POSTAMBLE 92} 93