Alien::SDL (3)
Leading comments
Automatically generated by Pod::Man 2.28 (Pod::Simple 3.29) Standard preamble: ========================================================================
NAME
Alien::SDL - building, finding and using SDL binariesVERSION
Version 1.446SYNOPSIS
Alien::SDL tries (in given order) during its installation:- *
-
When given "--with-sdl-config" option use specified sdl-config
script to locate SDLlibs.
perl Build.PL --with-sdl-config=/opt/sdl/bin/sdl-config
or using default script name 'sdl-config' by running:
perl Build.PL --with-sdl-config
IMPORTANT NOTE:Using --with-sdl-config avoids considering any other build methods; no prompt with other available build options. - *
-
Locate an already installed SDLvia 'sdl-config' script.
- *
-
Check for SDLlibs in directory specified bySDL_INST_DIRvariable. In this case the module performsSDLlibrary detection via '$SDL_INST_DIR/bin/sdl-config' script.
SDL_INST_DIR=/opt/sdl perl ./Build.PL
- *
-
Download prebuilt SDLbinaries (if available for your platform).
- *
-
Build SDLbinaries from source codes (if possible on your system).
Later you can use Alien::SDL in your module that needs to link agains
# Sample Makefile.pl use ExtUtils::MakeMaker; use Alien::SDL; WriteMakefile( NAME => 'Any::SDL::Module', VERSION_FROM => 'lib/Any/SDL/Module.pm', LIBS => Alien::SDL->config('libs', [-lAdd_Lib]), INC => Alien::SDL->config('cflags'), # + additional params );
DESCRIPTION
Please see Alien for the manifesto of the Alien namespace.In short "Alien::SDL" can be used to detect and get configuration settings from an installed
The important facts:
- *
-
The module does not modify in any way the already existing SDLinstallation on your system.
- *
-
If you reinstall SDLlibs on your system you do not need to reinstall Alien::SDL (providing that you use the same directory for the new installation).
- *
- The prebuild binaries and/or binaries built from sources are always installed into perl module's 'share' directory.
- *
- 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).
METHODS
config()
This function is the main public interface to this module. Basic functionality works in a very similar maner to 'sdl-config' script:
Alien::SDL->config('prefix'); # gives the same string as 'sdl-config --prefix' Alien::SDL->config('version'); # gives the same string as 'sdl-config --version' Alien::SDL->config('libs'); # gives the same string as 'sdl-config --libs' Alien::SDL->config('cflags'); # gives the same string as 'sdl-config --cflags'
On top of that this function supports special parameters:
Alien::SDL->config('ld_shared_libs');
Returns a list of full paths to shared libraries (*.so, *.dll) that will be required for running the resulting binaries you have linked with
Alien::SDL->config('ld_paths');
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
Alien::SDL->config('ld_shlib_map');
Returns a reference to hash of value pairs '<libnick>' => '<full_path_to_shlib'>, where '<libnick>' is shortname for
check_header()
This function checks the availability of given header(s) when using compiler options provided by ``Alien::SDL->config('cflags')''.
Alien::SDL->check_header('SDL.h'); Alien::SDL->check_header('SDL.h', 'SDL_net.h');
Returns 1 if all given headers are available, 0 otherwise.
get_header_version()
Tries to find a header file specified as a param in
Alien::SDL->get_header_version('SDL_mixer.h'); Alien::SDL->get_header_version('SDL_version.h'); Alien::SDL->get_header_version('SDL_gfxPrimitives.h'); Alien::SDL->get_header_version('SDL_image.h'); Alien::SDL->get_header_version('SDL_mixer.h'); Alien::SDL->get_header_version('SDL_net.h'); Alien::SDL->get_header_version('SDL_ttf.h'); Alien::SDL->get_header_version('smpeg.h');
Returns string like '1.2.3' or undef if not able to find and parse version info.
BUGS
Please post issues and bugs at <rt.cpan.org/NoAuth/Bugs.html?Dist=Alien-SDL>AUTHOR
Kartik Thakore CPAN ID: KTHAKORE Thakore.Kartik@gmail.com yapgh.blogspot.com
ACKNOWLEDGEMENTS
kmx - complete redesign between versions 0.7.x and 0.8.x
COPYRIGHT
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.The full text of the license can be found in the