=head1 NAME Alien::GSL - Easy installation of the GSL library =head1 DESCRIPTION This module is meant to ease the install of the Gnu Scientific Library (GSL). It also provides version checking and build flags via the gsl-config utility. =head1 SYNOPSIS use Alien::GSL; unless (Alien::GSL::require_gsl_version('1.15')) { die "This module requires at least GSL 1.15"; } =head1 INSTALLATION L uses the L system for installation. Therefore the usual build process is perl Build.PL ./Build ./Build test ./Build install N.B. the C<./> is not needed on some platforms, notably Windows. During its build phase (i.e. C<./Build> or more properly C<./Build build> or most properly C<./Build code>) it will attempt the following, more or less in order (also depends on platform and availability): =over 4 =item * Use a system installed copy of the GSL libraries, using the information provided by calling C. =item * Download pre-compiled binaries of the GSL library and store using L. =item * Download and build GSL libraries from source. This build process does not require the C script to be run with root privaledges. Then either: =over 4 =item * Install system-wide if possible (only for Linux, when run as root). =item * Store using L. =back =back The above behaviors may be manipulated by passing ... =head2 Build Flags When running C<./Build>, certain command line flags may be passed, i.e. C<./Build --ShareDir>. =over 4 =item C<--Version 1.15> Specify a version of the GSL library to be installed (here C<1.15>). Without this flag, the highest (read: newest) version available will be used. If a supplied version cannot be found, the install will croak. =item C<--ShareDir> When this flag is given, C will be used, even if a system install was possible (i.e. on Linux as root). =item C<--Force> When this flad is given, action will be taken, even if a system install of GSL is found. Note that this flag is not needed if C<--ShareDir> is used. =item C<--Dir dir> Specify a directory (here C) to download and build the library. This directory will not be removed later. =item C<--TempDir /dev/shm> Specify a location for the temporary build directory (here C, the ramdisk on Ubuntu Linux). =item C<--GSLCheck> When this flag is given, if GSL is to be built from source, also include C in the build phase (before C). Has no effect if GSL is not going to be built from source. =back =head1 NO EXPORTS Currently this module does not export any functions or variables. Use instead the fully qualified symbol name, i.e. C. =head1 INTERFACE STABILITY This module is in an alpha state. The author hopes that major functionality will remain. The module now uses L which allows the install functionality (download, build, install) to be platform specific and separated from the usage functionality described in the L section. =head1 MODULE FUNCTIONS These functions are basically a functional interface to the C utility command. =head2 C Takes no options, returns the version number of the installed GSL library. =head2 C A wrapper around C which (optionally) takes a number specifying a minimum GSL version, returns the GSL version if it is greater than or equal to that specified. Returns zero otherwise. May also be called with zero as the version parameter, or no parameter at all, in which case the behavior is the same as C. =head2 C Takes no options, returns the "GSL installation prefix". =head2 C Takes an optional hash or hash reference, returns "library linking information". A hash key C, whose value is false will return the "library linking information, without cblas", though by default the cblas information is included. =head2 C Takes no options, returns the "pre-processor and compiler flags". =head2 C Returns the path the folder containing C for use with the C command. This file should be setup during installation, however, it must make a few guesses while doing so. Better to use the other C commands provided herein when possible. =head1 TODO =over 4 =item * C script (replaces executable for C installs) =over 4 =item * Document with POD rather than usage statement (pod2usage?). =item * Figure out how to handle script and executable both being in path. =item * Figure out how to launch script on Windows using a C. =back =item * Find a better download site for the compiled libraries. =item * Provide 64 bit libraries. =item * Allow build when C exists (i.e. on strawberry). =item * Clean the C directory when C is run. =item * Improve tests for C. =item * Are tests possible for C subclasses? =back =head1 SEE ALSO =over 4 =item L =item L =item L =item L, L =back =head1 SOURCE REPOSITORY L =head1 AUTHOR Joel Berger, Ejoel.a.berger@gmail.comE =head1 COPYRIGHT AND LICENSE Copyright (C) 2011 by Joel Berger This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.