ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/EV/Makefile.PL
(Generate patch)

Comparing EV/Makefile.PL (file contents):
Revision 1.10 by root, Thu Nov 1 06:48:49 2007 UTC vs.
Revision 1.11 by root, Thu Nov 1 09:05:32 2007 UTC

15 15
16EOF 16EOF
17 exit 1; 17 exit 1;
18} 18}
19 19
20print <<EOF;
21
22
23*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
24
25Welcome to EV configuration. If you are in a hurry, just press return here
26and hope for the best. The defaults should usually do.
27
28EOF
29
30if (prompt ("Skip further questions and use defaults (y/n)?", "y") =~ /[yY]/) {
31 $ENV{PERL_MM_USE_DEFAULT} = 1;
32}
33
34print <<EOF;
35
36
37*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
38
39POSIX optionally offers support for a monotonic clock source. EV can
40take advantage of this clock source to detect time jumps reliably. This
41will usually slow down EV a tiny amount, but this is usually
42well-invested. Unfortunately, some systems are bound to be broken, so
43you can disable this here. Whatever your reasons, you can completely
44disable the detection and use of this monotonic clock by answering 'n'
45here. Support for this clock type will otherwise be autodetected at both
46compile- and runtime.
47
48EOF
49
50if (prompt ("Enable optional support for CLOCK_MONOTONIC (y/n)?", "y") =~ /[yY]/) {
51 $DEFINE .= " -DEV_USE_MONOTONIC";
52}
53
54print <<EOF;
55
56
57*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
58
59POSIX optionally offers support for a (potentially) high-resolution
60realtime clock interface. In a good implementation, using it is faster
61than the normal method of using gettimeofday. Unfortunately, this option
62is also bound to be broken on some systems, so you can disable use and
63probing of this feature altogether here. Otherwise support for this clock
64type will be autodetected at compiletime.
65
66EOF
67
68if (prompt ("Prefer clock_gettime (CLOCK_REALTIME) over gettimeofday (y/n)?", "y") !~ /[yY]/) {
69 $DEFINE .= " -DEV_USE_REALTIME=0";
70}
71
72print <<EOF;
73
74
75*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
76
77EV needs the functions pthread_atfork and clock_gettime. On most systems
78you need some special libraries for this (such as -lrt and -lpthread). You can
79specify additional libraries to provide these calls now, or accept the default.
80
81EOF
82
83$LIBS = prompt "Extra libraries for pthread_atfork and clock_gettime?", "-lpthread -lrt";
84
85
86print <<EOF;
87
88
89*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
90
91EV needs the functions pthread_atfork and clock_gettime. On most systems
92you need some special libraries for this (such as -lrt and -lpthread). You can
93specify additional libraries to provide these calls now, or accept the default.
94
95EOF
96
97if (prompt ("Enable epoll backend (y/n)?", (-e "/usr/include/sys/epoll.h") ? "y" : "n") =~ /[yY]/) {
98 $DEFINE .= " -DEV_USE_EPOLL";
99}
100
101print <<EOF;
102
103
104*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
105
106EOF
107
20#$ENV{CC} = $Config{cc}; 108#$ENV{CC} = $Config{cc};
21#$ENV{CFLAGS} = join " ", map $Config{$_}, qw(inc optimize ccflags cccdlflags); 109#$ENV{CFLAGS} = join " ", map $Config{$_}, qw(inc optimize ccflags cccdlflags);
22#system "cd libevent && ./configure --disable-shared --enable-static --disable-maintainer-mode" 110#system "cd libevent && ./configure --disable-shared --enable-static --disable-maintainer-mode"
23# and die "configure failed."; 111# and die "configure failed.";
24 112
32 }, 120 },
33 depend => { 121 depend => {
34 "EV.c" => "EV/EVAPI.h libev/ev.c libev/ev.h libev/ev_epoll.c libev/ev_select.c", 122 "EV.c" => "EV/EVAPI.h libev/ev.c libev/ev.h libev/ev_epoll.c libev/ev_select.c",
35 }, 123 },
36 INC => "-Ilibev", 124 INC => "-Ilibev",
125 DEFINE => "$DEFINE",
37 NAME => "EV", 126 NAME => "EV",
38 LIBS => ["-lrt -lpthread"], 127 LIBS => [$LIBS],
39 VERSION_FROM => "EV.pm", 128 VERSION_FROM => "EV.pm",
40 PM => { 129 PM => {
41 'EV.pm' => '$(INST_LIBDIR)/EV.pm', 130 'EV.pm' => '$(INST_LIBDIR)/EV.pm',
42 'EV/AnyEvent.pm' => '$(INST_LIBDIR)/EV/AnyEvent.pm', 131 'EV/AnyEvent.pm' => '$(INST_LIBDIR)/EV/AnyEvent.pm',
43 #'EV/DNS.pm' => '$(INST_LIBDIR)/EV/DNS.pm', 132 #'EV/DNS.pm' => '$(INST_LIBDIR)/EV/DNS.pm',

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines