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

Comparing OpenCL/Makefile.PL (file contents):
Revision 1.5 by root, Thu Apr 19 12:55:30 2012 UTC vs.
Revision 1.11 by root, Tue May 8 00:33:27 2012 UTC

1use ExtUtils::MakeMaker; 1use ExtUtils::MakeMaker;
2 2
3if(0){
4print <<EOF; 3print <<EOF;
5 4
6*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** 5*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
7 6
8 7
9Welcome to OpenCL configuration. If you are in a hurry, just press return here 8OpenCL does not have good backwards compatibility - for example, the only
10and hope for the best. The defaults should usually do. 9way to create a 2D image in OpenCL 1.1 is clCreateImage2D, which is not
10available anymore with OpenCL 1.2.
11
12The OpenCL module can often emulate OpenCL 1.1 functions using OpenCL 1.2
13functions, but even though your OpenCL library might contain the OpenCL
141.2 functions, they might be nonfunctional and crash.
15
16Do you want to prefer the OpenCL 1.1 API over the 1.2 API where possible?
11 17
12EOF 18EOF
13 19
14if (prompt ("Skip further questions and use defaults (y/n)?", "y") =~ /[yY]/) { 20my $DEFINE = " -DPREFER_1_1=" . (0 + (prompt ("Prefer OpenCL 1.1 over 1.2 functions (y/n)?", "y") =~ /[yY]/));
15 $ENV{PERL_MM_USE_DEFAULT} = 1;
16}
17}
18 21
19if(0){
20print <<EOF; 22print <<EOF;
21 23
22*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** 24*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
23 25
24 26
25Most OpenCL implementations can interface to OpenGL. Should This module 27This module needs to link against both the OpenCL and pthread libraries
26try to take advantage of and offer support for OpenGL? 28(even on windows). If you wish you can override the LIBS argument now. If
29not, just press enter to accept the default.
27 30
28EOF 31EOF
29 32
30my $DEFINE .= " -DHAVE_OPENGL=" . (0 + (prompt ("Enable optional support for OpenGL (y/n)?", "y") =~ /[yY]/)); 33my $LIBS = prompt "Value for LIBS?", "-lOpenCL -lpthread";
31} 34
35print <<EOF;
36
37*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
38
39
40Sometimes you need to define extra compilation options (for example, the
41hypothetical OpenCL 1.3 header files might require you to define something
42like CL_USE_DEPRECATED_OPENCL_1_2_APIS). You can do this here, or simply
43press enter.
44
45EOF
46
47my $EXTRADEFS = prompt "Any extra -D options?", "";
32 48
33WriteMakefile( 49WriteMakefile(
34 dist => { 50 dist => {
35 PREOP => 'pod2text OpenCL.pm | tee README >$(DISTVNAME)/README; chmod -R u=rwX,go=rX . ;', 51 PREOP => 'pod2text OpenCL.pm | tee README >$(DISTVNAME)/README; chmod -R u=rwX,go=rX . ;',
36 COMPRESS => 'gzip -9v', 52 COMPRESS => 'gzip -9v',
37 SUFFIX => '.gz', 53 SUFFIX => '.gz',
38 }, 54 },
39 PREREQ_PM => { 55 PREREQ_PM => {
40 common::sense => 0, 56 common::sense => 3,
57 Async::Interrupt => 1.1,
41 }, 58 },
42 DEFINE => $DEFINE, 59 DEFINE => "$DEFINE $EXTRADEFS",
43 NAME => "OpenCL", 60 NAME => "OpenCL",
44 VERSION_FROM => "OpenCL.pm", 61 VERSION_FROM => "OpenCL.pm",
45 LIBS => ["-lOpenCL"], 62 LIBS => [$LIBS],
46); 63);
47 64

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines