When given --with-sdl-config option use specified sdl-config
script to locate SDL libs.
or using default script name sdl-config by running:
|o||Locate an already installed SDL via sdl-config script.|
Check for SDL libs in directory specified by SDL_INST_DIR variable.
In this case the module performs SDL library detection via
|o||Download prebuilt SDL binaries (if available for your platform).|
|o||Build SDL binaries from source codes (if possible on your system).|
# Sample Makefile.pl
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
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 SDL and related libraries. Based on your platform it offers the possibility to download and install prebuilt binaries or to build SDL & co. from source codes.
The important facts:
o The module does not modify in any way the already existing SDL installation on your system. o If you reinstall SDL libs on your system you do not need to reinstall Alien::SDL (providing that you use the same directory for the new installation). o The prebuild binaries and/or binaries built from sources are always installed into perl modules share directory. o If you use prebuild binaries and/or binaries built from sources it happens that some of the dynamic libraries (*.so, *.dll) will not automaticly loadable as they will be stored somewhere under perl modules share directory. To handle this scenario Alien::SDL offers some special functionality (see below).
config()This function is the main public interface to this module. Basic functionality works in a very similar maner to sdl-config script:
On top of that this function supports special parameters:
Returns a list of full paths to shared libraries (*.so, *.dll) that will be required for running the resulting binaries you have linked with SDL libs.
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 SDL libs.
Returns a reference to hash of value pairs <libnick> => <full_path_to_shlib>, where <libnick> is shortname for SDL related library like: SDL, SDL_gfx, SDL_net, SDL_sound ... + some non-SDL shortnames e.g. smpeg, jpeg, png.
NOTE: config(ld_<something>) return an empty list/hash if you have decided to use SDL libraries already installed on your system. This concerns sdl-config detection and detection via $SDL_INST_DIR/bin/sdl-config.
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 SDL prefix direcotry and based on #define macros inside this header file tries to get a version triplet.
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);
Please post issues and bugs at <http://rt.cpan.org/NoAuth/Bugs.html?Dist=Alien-SDL>
Kartik Thakore CPAN ID: KTHAKORE Thakore.Kartik@gmail.com http://yapgh.blogspot.com
kmx - complete redesign between versions 0.7.x and 0.8.x
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 LICENSE file included with this module.
|perl v5.20.3||ALIEN::SDL (3)||2016-04-05|