… | |
… | |
9 | ** If desperate, you could also try linking against the DBD::mysql |
9 | ** If desperate, you could also try linking against the DBD::mysql |
10 | ** shared object itself. |
10 | ** shared object itself. |
11 | ** |
11 | ** |
12 | ** To adjust include and library path, edit the Makefile.PL, near the end. |
12 | ** To adjust include and library path, edit the Makefile.PL, near the end. |
13 | ** |
13 | ** |
|
|
14 | ** The default is to look for mariadb_config, followed by mysql_config. |
|
|
15 | ** |
14 | |
16 | |
15 | EOF |
17 | EOF |
|
|
18 | |
|
|
19 | 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 | } |
16 | |
35 | |
17 | my %wm = ( |
36 | my %wm = ( |
18 | dist => { |
37 | dist => { |
19 | PREOP => 'pod2text Mysql.pm | tee README >$(DISTVNAME)/README; chmod -R u=rwX,go=rX . ;', |
38 | PREOP => 'pod2text Mysql.pm | tee README >$(DISTVNAME)/README; chmod -R u=rwX,go=rX . ;', |
20 | COMPRESS => 'gzip -9v', |
39 | COMPRESS => 'gzip -9v', |
… | |
… | |
28 | DBD::mysql => 0, # not actually a hard dependency |
47 | DBD::mysql => 0, # not actually a hard dependency |
29 | }, |
48 | }, |
30 | NAME => "Coro::Mysql", |
49 | NAME => "Coro::Mysql", |
31 | VERSION_FROM => "Mysql.pm", |
50 | VERSION_FROM => "Mysql.pm", |
32 | |
51 | |
33 | INC => '-I/usr/include/mysql', |
52 | INC => (cfg "--include"), |
34 | LIBS => ['-L/usr/lib -lmysqlclient'], |
53 | LIBS => [cfg "--libs_r"], |
35 | ); |
54 | ); |
36 | |
55 | |
37 | if (eval "require EV::MakeMaker; require Coro::MakeMaker; 1") { |
56 | if (eval "require EV::MakeMaker; require Coro::MakeMaker; 1") { |
38 | %wm = Coro::MakeMaker::coro_args (EV::MakeMaker::ev_args (%wm)); |
57 | %wm = Coro::MakeMaker::coro_args (EV::MakeMaker::ev_args (%wm)); |
39 | $wm{DEFINE} .= " -DHAVE_EV=1"; |
58 | $wm{DEFINE} .= " -DHAVE_EV=1"; |