ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/cvsroot/Coro-Mysql/Makefile.PL
Revision: 1.4
Committed: Mon Mar 4 05:34:52 2019 UTC (5 years, 4 months ago) by root
Content type: text/plain
Branch: MAIN
CVS Tags: rel-2_0
Changes since 1.3: +21 -2 lines
Log Message:
*** empty log message ***

File Contents

# User Rev Content
1 root 1.1 use ExtUtils::MakeMaker;
2    
3     print <<EOF;
4    
5     **
6 root 1.2 ** This module *MUST* be dynamically linked against exactly the same
7     ** libmysqlclient as your DBD::mysql module (also dynamically).
8     ** Otherwise it will die quickly when used.
9     ** If desperate, you could also try linking against the DBD::mysql
10     ** shared object itself.
11 root 1.1 **
12     ** To adjust include and library path, edit the Makefile.PL, near the end.
13     **
14 root 1.4 ** The default is to look for mariadb_config, followed by mysql_config.
15     **
16 root 1.1
17     EOF
18    
19 root 1.4 my $cfg = (system "mariadb_config --cflags >/dev/null 2>&1")
20     ? "mysql_config"
21     : "mariadb_config";
22    
23     print "Using '$cfg' to get compile settings.\n\n";
24    
25     sub cfg {
26     my $param = join " ", @_;
27    
28     my $val = qx<$cfg $param>;
29     $val =~ y/[\r\n]/ /;
30    
31     print "$cfg $param: $val\n";
32    
33     $val
34     }
35    
36 root 1.3 my %wm = (
37 root 1.1 dist => {
38     PREOP => 'pod2text Mysql.pm | tee README >$(DISTVNAME)/README; chmod -R u=rwX,go=rX . ;',
39     COMPRESS => 'gzip -9v',
40     SUFFIX => '.gz',
41     },
42     PREREQ_PM => {
43     Scalar::Util => 0.00,
44     Coro => 5.1,
45     Guard => 1.0,
46     DBI => 0, # not actually a hard dependency
47     DBD::mysql => 0, # not actually a hard dependency
48     },
49     NAME => "Coro::Mysql",
50     VERSION_FROM => "Mysql.pm",
51    
52 root 1.4 INC => (cfg "--include"),
53     LIBS => [cfg "--libs_r"],
54 root 1.1 );
55    
56 root 1.3 if (eval "require EV::MakeMaker; require Coro::MakeMaker; 1") {
57     %wm = Coro::MakeMaker::coro_args (EV::MakeMaker::ev_args (%wm));
58     $wm{DEFINE} .= " -DHAVE_EV=1";
59     } else {
60     print <<EOF;
61    
62     **
63     ** Especially fast with EV!
64     **
65     ** This module is especially fast when used together with EV as
66     ** the event loop - but you don't have EV installed. Too bad,
67     ** but I work with any event loop, including EV, using my
68     ** generic code, so no sweat. If you plan to use EV, better
69     ** install it before this module.
70     **
71    
72     EOF
73     }
74    
75     WriteMakefile %wm;