.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.29) .\" .\" 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 .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . 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 turned on, 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 .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "Alien::SDL 3pm" .TH Alien::SDL 3pm "2016-03-07" "perl v5.22.1" "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" Alien::SDL \- building, finding and using SDL binaries .SH "VERSION" .IX Header "VERSION" Version 1.446 .SH "SYNOPSIS" .IX Header "SYNOPSIS" Alien::SDL tries (in given order) during its installation: .IP "\(bu" 4 When given \f(CW\*(C`\-\-with\-sdl\-config\*(C'\fR option use specified sdl-config script to locate \s-1SDL\s0 libs. .Sp .Vb 1 \& perl Build.PL \-\-with\-sdl\-config=/opt/sdl/bin/sdl\-config .Ve .Sp or using default script name 'sdl\-config' by running: .Sp .Vb 1 \& perl Build.PL \-\-with\-sdl\-config .Ve .Sp \&\fB\s-1IMPORTANT NOTE:\s0\fR Using \-\-with\-sdl\-config avoids considering any other build methods; no prompt with other available build options. .IP "\(bu" 4 Locate an already installed \s-1SDL\s0 via 'sdl\-config' script. .IP "\(bu" 4 Check for \s-1SDL\s0 libs in directory specified by \s-1SDL_INST_DIR\s0 variable. In this case the module performs \s-1SDL\s0 library detection via \&'$SDL_INST_DIR/bin/sdl\-config' script. .Sp .Vb 1 \& SDL_INST_DIR=/opt/sdl perl ./Build.PL .Ve .IP "\(bu" 4 Download prebuilt \s-1SDL\s0 binaries (if available for your platform). .IP "\(bu" 4 Build \s-1SDL\s0 binaries from source codes (if possible on your system). .PP Later you can use Alien::SDL in your module that needs to link agains \s-1SDL\s0 and/or related libraries like this: .PP .Vb 3 \& # Sample Makefile.pl \& use ExtUtils::MakeMaker; \& use Alien::SDL; \& \& WriteMakefile( \& NAME => \*(AqAny::SDL::Module\*(Aq, \& VERSION_FROM => \*(Aqlib/Any/SDL/Module.pm\*(Aq, \& LIBS => Alien::SDL\->config(\*(Aqlibs\*(Aq, [\-lAdd_Lib]), \& INC => Alien::SDL\->config(\*(Aqcflags\*(Aq), \& # + additional params \& ); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" Please see Alien for the manifesto of the Alien namespace. .PP In short \f(CW\*(C`Alien::SDL\*(C'\fR can be used to detect and get configuration settings from an installed \s-1SDL\s0 and related libraries. Based on your platform it offers the possibility to download and install prebuilt binaries or to build \s-1SDL &\s0 co. from source codes. .PP The important facts: .IP "\(bu" 4 The module does not modify in any way the already existing \s-1SDL\s0 installation on your system. .IP "\(bu" 4 If you reinstall \s-1SDL\s0 libs on your system you do not need to reinstall Alien::SDL (providing that you use the same directory for the new installation). .IP "\(bu" 4 The prebuild binaries and/or binaries built from sources are always installed into perl module's 'share' directory. .IP "\(bu" 4 If you use prebuild binaries and/or binaries built from sources it happens that some of the dynamic libraries (*.so, *.dll) will not be automatically loadable as they will be stored somewhere under perl module's \&'share' directory. To handle this scenario Alien::SDL offers some special functionality (see below). .SH "METHODS" .IX Header "METHODS" .SS "\fIconfig()\fP" .IX Subsection "config()" This function is the main public interface to this module. Basic functionality works in a very similar maner to 'sdl\-config' script: .PP .Vb 4 \& Alien::SDL\->config(\*(Aqprefix\*(Aq); # gives the same string as \*(Aqsdl\-config \-\-prefix\*(Aq \& Alien::SDL\->config(\*(Aqversion\*(Aq); # gives the same string as \*(Aqsdl\-config \-\-version\*(Aq \& Alien::SDL\->config(\*(Aqlibs\*(Aq); # gives the same string as \*(Aqsdl\-config \-\-libs\*(Aq \& Alien::SDL\->config(\*(Aqcflags\*(Aq); # gives the same string as \*(Aqsdl\-config \-\-cflags\*(Aq .Ve .PP On top of that this function supports special parameters: .PP .Vb 1 \& Alien::SDL\->config(\*(Aqld_shared_libs\*(Aq); .Ve .PP Returns a list of full paths to shared libraries (*.so, *.dll) that will be required for running the resulting binaries you have linked with \s-1SDL\s0 libs. .PP .Vb 1 \& Alien::SDL\->config(\*(Aqld_paths\*(Aq); .Ve .PP Returns a list of full paths to directories with shared libraries (*.so, *.dll) that will be required for running the resulting binaries you have linked with \&\s-1SDL\s0 libs. .PP .Vb 1 \& Alien::SDL\->config(\*(Aqld_shlib_map\*(Aq); .Ve .PP Returns a reference to hash of value pairs '' => ', where '' is shortname for \s-1SDL\s0 related library like: \s-1SDL,\s0 SDL_gfx, SDL_net, SDL_sound ... + some non-SDL shortnames e.g. smpeg, jpeg, png. .PP \&\s-1NOTE:\s0 config('ld_') return an empty list/hash if you have decided to use \s-1SDL\s0 libraries already installed on your system. This concerns 'sdl\-config' detection and detection via '$SDL_INST_DIR/bin/sdl\-config'. .SS "\fIcheck_header()\fP" .IX Subsection "check_header()" This function checks the availability of given header(s) when using compiler options provided by \*(L"Alien::SDL\->config('cflags')\*(R". .PP .Vb 2 \& Alien::SDL\->check_header(\*(AqSDL.h\*(Aq); \& Alien::SDL\->check_header(\*(AqSDL.h\*(Aq, \*(AqSDL_net.h\*(Aq); .Ve .PP Returns 1 if all given headers are available, 0 otherwise. .SS "\fIget_header_version()\fP" .IX Subsection "get_header_version()" Tries to find a header file specified as a param in \s-1SDL\s0 prefix direcotry and based on \*(L"#define\*(R" macros inside this header file tries to get a version triplet. .PP .Vb 8 \& Alien::SDL\->get_header_version(\*(AqSDL_mixer.h\*(Aq); \& Alien::SDL\->get_header_version(\*(AqSDL_version.h\*(Aq); \& Alien::SDL\->get_header_version(\*(AqSDL_gfxPrimitives.h\*(Aq); \& Alien::SDL\->get_header_version(\*(AqSDL_image.h\*(Aq); \& Alien::SDL\->get_header_version(\*(AqSDL_mixer.h\*(Aq); \& Alien::SDL\->get_header_version(\*(AqSDL_net.h\*(Aq); \& Alien::SDL\->get_header_version(\*(AqSDL_ttf.h\*(Aq); \& Alien::SDL\->get_header_version(\*(Aqsmpeg.h\*(Aq); .Ve .PP Returns string like '1.2.3' or undef if not able to find and parse version info. .SH "BUGS" .IX Header "BUGS" Please post issues and bugs at .SH "AUTHOR" .IX Header "AUTHOR" .Vb 4 \& Kartik Thakore \& CPAN ID: KTHAKORE \& Thakore.Kartik@gmail.com \& http://yapgh.blogspot.com .Ve .SH "ACKNOWLEDGEMENTS" .IX Header "ACKNOWLEDGEMENTS" .Vb 1 \& kmx \- complete redesign between versions 0.7.x and 0.8.x .Ve .SH "COPYRIGHT" .IX Header "COPYRIGHT" This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. .PP The full text of the license can be found in the \&\s-1LICENSE\s0 file included with this module.