.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Dev 3pm" .TH Dev 3pm 2024-05-12 "perl v5.38.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME PDL::Core::Dev \- PDL development module .SH DESCRIPTION .IX Header "DESCRIPTION" This module encapsulates most of the stuff useful for PDL development and is often used from within Makefile.PL's. .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 1 \& use PDL::Core::Dev; .Ve .SH FUNCTIONS .IX Header "FUNCTIONS" .SS isbigendian .IX Subsection "isbigendian" Is the machine big or little endian? .PP .Vb 1 \& print "Your machins is big endian.\en" if isbigendian(); .Ve .PP returns 1 if the machine is big endian, 0 if little endian, or dies if neither. It uses the \f(CW\*(C`byteorder\*(C'\fR element of perl's \f(CW%Config\fR array. .PP .Vb 1 \& my $retval = isbigendian(); .Ve .SS trylink .IX Subsection "trylink" a perl configure clone .PP .Vb 9 \& if (trylink \*(AqlibGL\*(Aq, \*(Aq\*(Aq, \*(Aqchar glBegin(); glBegin();\*(Aq, \*(Aq\-lGL\*(Aq) { \& $libs = \*(Aq\-lGLU \-lGL\*(Aq; \& $have_GL = 1; \& } else { \& $have_GL = 0; \& } \& $maybe = \& trylink \*(Aqlibwhatever\*(Aq, $inc, $body, $libs, $cflags, \& {MakeMaker=>1, Hide=>0, Clean=>1}; .Ve .PP Try to link some C\-code making up the body of a function with a given set of library specifiers .PP return 1 if successful, 0 otherwise .PP .Vb 1 \& trylink $infomsg, $include, $progbody, $libs [,$cflags,{OPTIONS}]; .Ve .PP Takes 4 + 2 optional arguments. .IP \(bu 5 an informational message to print (can be empty) .IP \(bu 5 any commands to be included at the top of the generated C program (typically something like \f(CW\*(C`#include "mylib.h"\*(C'\fR) .IP \(bu 5 the body of the program (in function main) .IP \(bu 5 library flags to use for linking. Preprocessing by MakeMaker should be performed as needed (see options and example). .IP \(bu 5 compilation flags. For example, something like \f(CW\*(C`\-I/usr/local/lib\*(C'\fR. Optional argument. Empty if omitted. .IP \(bu 5 OPTIONS .RS 5 .IP MakeMaker 4 .IX Item "MakeMaker" Preprocess library strings in the way MakeMaker does things. This is advisable to ensure that your code will actually work after the link specs have been processed by MakeMaker. .IP Hide 4 .IX Item "Hide" Controls if linking output etc is hidden from the user or not. On by default except within the build of the PDL distribution where the config value set in \fIperldl.conf\fR prevails. .IP Clean 4 .IX Item "Clean" Remove temporary files. Enabled by default. You might want to switch it off during debugging. .RE .RS 5 .RE .SS generate_core_flags .IX Subsection "generate_core_flags" prints on \f(CW\*(C`STDOUT\*(C'\fR XS text with core flags, for \fICore.xs\fR. .SS got_complex_version .IX Subsection "got_complex_version" .Vb 1 \& PDL::Core::Dev::got_complex_version($func_name, $num_params) .Ve .PP For a given function appearing in C99's \f(CW\*(C`complex.h\*(C'\fR, will return a boolean of whether the system being compiled on has the complex version of that. E.g. for \f(CW\*(C`sin\*(C'\fR, will test whether \f(CW\*(C`csinl\*(C'\fR exists (before 2.069, would only check for \f(CW\*(C`csin\*(C'\fR, causing build failures on non\-C99 compliant \&\f(CW\*(C`libc\*(C'\fR which mandates long-double versions).