Skip to content
This repository has been archived by the owner on Mar 7, 2019. It is now read-only.

make --with-pic default for autoconf #47

Merged
merged 3 commits into from Sep 4, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions Changes
Expand Up @@ -17,6 +17,8 @@ Revision history for Perl module Alien::Base.
- Added support for LWP as an alternative to HTTP::Tiny (preaction++ gh#24)
- Added support for content-disposition HTTP header to determine correct filename
and determine format from that (rsimoes++ gh#27)
- By default run autotools style configure scripts with --with-pic and add
alien_autoconf_with_pic property to allow disabling that (plicease gh#47)

0.004 Mar 5, 2014
- Added version token to the interpolator (MidLifeXis++)
Expand Down
10 changes: 8 additions & 2 deletions lib/Alien/Base/ModuleBuild.pm
Expand Up @@ -104,6 +104,7 @@ __PACKAGE__->add_property( 'alien_repository_class' => {} );

# alien_isolate_dynamic
__PACKAGE__->add_property( 'alien_isolate_dynamic' => 0 );
__PACKAGE__->add_property( 'alien_autoconf_with_pic' => 1 );

################
# ConfigData #
Expand Down Expand Up @@ -606,11 +607,16 @@ sub alien_exec_prefix {

sub alien_configure {
my $self = shift;
my $configure;
if ($self->config_data( 'msys' )) {
return 'sh configure';
$configure = 'sh configure';
} else {
return './configure';
$configure = './configure';
}
if ($self->alien_autoconf_with_pic) {
$configure .= ' --with-pic';
}
$configure;
}

########################
Expand Down
6 changes: 6 additions & 0 deletions lib/Alien/Base/ModuleBuild/API.pod
Expand Up @@ -77,6 +77,12 @@ A hashref or arrayref of hashrefs defining the repositories used to find and fet

If set to true, then dynamic libraries will be moved from the C<lib> directory to a separate C<dynamic> directory. This makes them available for FFI modules (see L<FFI::Raw>), while preferring static libraries when creating XS extensions.

=item alien_autoconf_with_pic

[version 0.005]

Add C<--with-pic> option to autoconf style C<configure> script when called. This is the default, and normally a good practice. Normally autoconf will ignore this and any other options that it does not recognize, but some non-autoconf C<configure> scripts may complain.

=over

=item protocol
Expand Down