1Dev(3)                User Contributed Perl Documentation               Dev(3)
2
3
4

NAME

6       PDL::Core::Dev - PDL development module
7

DESCRIPTION

9       This module encapsulates most of the stuff useful for PDL development
10       and is often used from within Makefile.PL's.
11

SYNOPSIS

13          use PDL::Core::Dev;
14

FUNCTIONS

16       isbigendian
17
18       Is the machine big or little endian?
19
20         print "Your machins is big endian.\n" if isbigendian();
21
22       returns 1 if the machine is big endian, 0 if little endian, or dies if
23       neither.  It uses the "byteorder" element of perl's %Config array.
24
25          my $retval = isbigendian();
26
27       trylink
28
29       a perl configure clone
30
31         if (trylink 'libGL', '', 'char glBegin(); glBegin();', '-lGL') {
32           $libs = '-lGLU -lGL';
33           $have_GL = 1;
34         } else {
35           $have_GL = 0;
36         }
37         $maybe =
38           trylink 'libwhatever', $inc, $body, $libs, $cflags,
39               {MakeMaker=>1, Hide=>0, Clean=>1};
40
41       Try to link some C-code making up the body of a function with a given
42       set of library specifiers
43
44       return 1 if successful, 0 otherwise
45
46          trylink $infomsg, $include, $progbody, $libs [,$cflags,{OPTIONS}];
47
48       Takes 4 + 2 optional arguments.
49
50       ·    an informational message to print (can be empty)
51
52       ·    any commands to be included at the top of the generated C program
53            (typically something like "#include "mylib.h"")
54
55       ·    the body of the program (in function main)
56
57       ·    library flags to use for linking. Preprocessing by MakeMaker
58            should be performed as needed (see options and example).
59
60       ·    compilation flags. For example, something like "-I/usr/local/lib".
61            Optional argument. Empty if omitted.
62
63       OPTIONS
64            MakeMaker
65                Preprocess library strings in the way MakeMaker does things.
66                This is advisable to ensure that your code will actually work
67                after the link specs have been processed by MakeMaker.
68
69            Hide
70                Controls if linking output etc is hidden from the user or not.
71                On by default except within the build of the PDL distribution
72                where the config value set in perldl.conf prevails.
73
74            Clean
75                Remove temporary files. Enabled by default. You might want to
76                switch it off during debugging.
77
78
79
80perl v5.8.8                       2002-05-21                            Dev(3)
Impressum