view release on metacpan or search on metacpan
lib/Alien/Build/Plugin/Build/SearchDep.pm view on Meta::CPAN
build => sub {
my($orig, $build) = @_;
local $ENV{CFLAGS} = $ENV{CFLAGS};
local $ENV{CXXFLAGS} = $ENV{CXXFLAGS};
local $ENV{LDFLAGS} = $ENV{LDFLAGS};
tie my @CFLAGS, 'Env::ShellWords', 'CFLAGS';
tie my @CXXFLAGS, 'Env::ShellWords', 'CXXFLAGS';
tie my @LDFLAGS, 'Env::ShellWords', 'LDFLAGS';
view all matches for this distribution
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
# Absolut-ize all paths
$ICONV_SOURCE_DIR = File::Spec->rel2abs($ICONV_SOURCE_DIR);
$ICONV_SOURCE = File::Spec->rel2abs($ICONV_SOURCE);
# Construct the necessary flags
my $CCFLAGS = $ENV{CCFLAGS};
my $LDFLAGS = $ENV{LDFLAGS};
if (! $RUNNING_IN_HELL) {
$CCFLAGS ||= '-I/usr/local/include';
$LDFLAGS ||= '-L/usr/local/lib';
}
Makefile.PL view on Meta::CPAN
" $configure_args\n";
chdir $ICONV_SOURCE_DIR;
local $ENV{CFLAGS} = $CCFLAGS;
local $ENV{LDFLAGS} = $LDFLAGS;
my @cmd = (File::Spec->catfile($ICONV_SOURCE_DIR, "configure"),
split(/\s+/, $configure_args));
if (system(@cmd) != 0) {
print <<"END";
configure $configure_args failed: $!
view all matches for this distribution
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
require ExtUtils::MM_Unix;
ExtUtils::MM_Unix->parse_version($DIST);
};
my $LIBANN_VERSION = '1.1.2';
my $CCFLAGS = $ENV{CCFLAGS} || '-I/usr/local/include';
my $LDFLAGS = $ENV{LDFLAGS} || '-L/usr/local/lib';
eval { Devel::CheckLib::assert_lib( lib => "ANN", LIBS => $LDFLAGS ) };
my $install_libann = 1;
if ( !$@ ) {
Makefile.PL view on Meta::CPAN
print "\n$name will be configured with the following arguments:\n", " $configure_args\n";
chdir $destination;
local $ENV{CFLAGS} = $CCFLAGS;
local $ENV{LDFLAGS} = $LDFLAGS;
my @cmd = ( File::Spec->catfile( $destination, "configure" ), split( /\s+/, $configure_args ) );
if ( system(@cmd) != 0 ) {
print <<EOF;
configure $configure_args failed: $!
Something went wrong with the $name configuration.
view all matches for this distribution
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
$MECAB_EXE = File::Spec->rel2abs($MECAB_EXE);
my %REQUIRES;
# Construct the necessary flags
my $CCFLAGS = $ENV{CCFLAGS};
my $LDFLAGS = $ENV{LDFLAGS};
if (! $RUNNING_IN_HELL) {
$CCFLAGS ||= '-I/usr/local/include';
$LDFLAGS ||= '-L/usr/local/lib';
}
Makefile.PL view on Meta::CPAN
" $configure_args\n";
chdir $MECAB_SOURCE_DIR;
local $ENV{CFLAGS} = $CCFLAGS;
local $ENV{LDFLAGS} = $LDFLAGS;
my @cmd = (File::Spec->catfile($MECAB_SOURCE_DIR, "configure"),
split(/\s+/, $configure_args));
if (system(@cmd) != 0) {
print <<"END";
configure $configure_args failed: $!
view all matches for this distribution
view release on metacpan or search on metacpan
use Cwd;
my $base_dir = getcwd();
# make libtool noisy for debug purposes
#$ENV{LTFLAGS} = "--debug --verbose" if $on_windows;
my $min_target_version = '4.9.0';
my $max_target_version = '4.99.99';
view all matches for this distribution
view release on metacpan or search on metacpan
alien_autoconf_with_pic => 0,
alien_build_commands =>
["%x -I../../inc -MMy::AlienPatch -e alien_patch", $conf_cmd, 'make'],
alien_extra_site_config => {
CFLAGS => $ENV{CFLAGS},
LDFLAGS => $ENV{LDFLAGS},
},
# Not using FFI, default_store library only dynamic and needed for XS
alien_isolate_dynamic => 0,
alien_name => 'netsnmp',
view all matches for this distribution
view release on metacpan or search on metacpan
if($alien_ssl)
{
meta->around_hook( $_ => sub {
my $orig = shift;
my $build = shift;
local $ENV{LDFLAGS} = $ENV{LDFLAGS};
unshift @LDFLAGS, grep /^-L/, shellwords( $alien_ssl->libs );
log "using LDFLAGS = $ENV{LDFLAGS}";
$orig->($build, @_);
}) for qw( build build_ffi );
}
plugin 'Build::Autoconf' => ();
view all matches for this distribution
view release on metacpan or search on metacpan
use Cwd;
my $base_dir = getcwd();
# make libtool noisy for debug purposes
#$ENV{LTFLAGS} = "--debug --verbose" if $on_windows;
my $min_target_version = '1.0.4';
view all matches for this distribution
view release on metacpan or search on metacpan
#my $proj_lib = FFI::CheckLib::find_lib (lib => 'proj');
Alien::Build->log ('$ENV{PROJ_LIB} IS ' . ($ENV{PROJ_LIB} // ''));
# make libtool noisy for debug purposes
#$ENV{LTFLAGS} = "--debug --verbose" if $on_windows;
use Cwd;
my $base_dir = getcwd();
# we can get dangling -L values
# bandaid until we find the source
sub cleanup_ldflags {
my ($build, @args) = @_;
if ($ENV{LDFLAGS} && $ENV{LDFLAGS} =~ /\s*-L\s*$/) {
$build->log("Trimming trailing -L from $ENV{LDFLAGS}");
$ENV{LDFLAGS} =~ s/\s*-L\s*$//;
}
#$orig->($build, @args);
return;
}
view all matches for this distribution
view release on metacpan or search on metacpan
public_I => 1,
public_l => 1,
);
# make libtool noisy for debug purposes
#$ENV{LTFLAGS} = "--debug --verbose" if $on_windows;
my $min_target_version = '5.0.0';
view all matches for this distribution
view release on metacpan or search on metacpan
use Cwd;
my $base_dir = getcwd();
# make libtool noisy for debug purposes
#$ENV{LTFLAGS} = "--debug --verbose" if $on_windows;
use Env qw { @PATH };
my $min_target_version = '3.26.0';
view all matches for this distribution
view release on metacpan or search on metacpan
local %ENV = %ENV;
xsh(0, qw/autoreconf -iv/) or die 'autoreconf failed.' unless -e 'configure';
my @p;
if ($s->{bootstrap}) {
$ENV{CPPFLAGS} = "-I$s->{prefix}/include" unless $b->{'no-cppflags'};
$ENV{LDFLAGS} = "-L$s->{prefix}/lib -Wl,-I" . linker($s);
}
push @p, "--prefix=$s->{prefix}";
my $e = $b->{environment};
$ENV{$_} = $e->{$_} for keys %$e;
xsh(0, './configure', @{$b->{switch}}, @p,
view all matches for this distribution
view release on metacpan or search on metacpan
PLCB_ConfUtil.pm view on Meta::CPAN
sub env_from_tmpflags {
my $confhash = do "$TEMPFILE";
$ENV{CFLAGS} .= ' ' . $confhash->{CFLAGS} . ' ' . $Config{ccflags};
$ENV{CFLAGS} .= ' -I' . File::Spec->catfile(__DIR__, 'xs');
$ENV{LDFLAGS}= "";
# $ENV{LDFLAGS} .= ' ' . $confhash->{LDFLAGS};
# printf("CFLAGS: %s\nLDFLAGS=%s\n", $ENV{CFLAGS}, $ENV{LDFLAGS});
}
1;
view all matches for this distribution
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
my @DEFINES;
if (grep { $_ eq '--very-verbose' } @ARGV) {
push @DEFINES, '-DVERY_VERBOSE';
}
my @CCFLAGS = split(' ', $ENV{CCFLAGS} || '');
my @LDFLAGS = split(' ', $ENV{LDFLAGS} || '');
my @INCLUDES;
my @LIBPATHS;
if ($^O eq 'darwin') {
if (! exists $ENV{USE_MACPORTS}) {
view all matches for this distribution
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
my %eumm_args;
my $cflags = " $Config{ccflags} $Config{cccdlflags} $Config{optimize} ";
$cflags .= "$ENV{CFLAGS} " if $ENV{CFLAGS};
$cflags .= "$ENV{CPPFLAGS} " if $ENV{CPPFLAGS};
$cflags .= "$ENV{LDFLAGS} " if $ENV{LDFLAGS};
# lto is recommended against by upstream. best effort to prevent it.
if (_c_compile_test($test_src, "$Config{cc} -fno-lto")) {
$cflags .= '-fno-lto ';
}
else {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/ExtUtils/CBuilder/Base.pm view on Meta::CPAN
$self->{config}{ccflags} = join(" ", $self->{config}{ccflags}, $ENV{CFLAGS})
if defined $ENV{CFLAGS};
$self->{config}{cxx} = $ENV{CXX} if defined $ENV{CXX};
$self->{config}{cxxflags} = $ENV{CXXFLAGS} if defined $ENV{CXXFLAGS};
$self->{config}{ld} = $ENV{LD} if defined $ENV{LD};
$self->{config}{ldflags} = join(" ", $self->{config}{ldflags}, $ENV{LDFLAGS})
if defined $ENV{LDFLAGS};
unless ( exists $self->{config}{cxx} ) {
my ($ccbase, $ccpath, $ccsfx ) = fileparse($self->{config}{cc}, qr/\.[^.]*/);
view all matches for this distribution
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
for my $module (sort keys %$objects) {
my $add = $module;
$add =~ s/:/_/g;
my $LD = $Config{ld};
$LD .= ' '.$ENV{CFLAGS} if $ENV{CFLAGS};
$LD .= ' '.$ENV{LDFLAGS} if $ENV{LDFLAGS};
my $OPTIMIZE = '';
$OPTIMIZE .= ' '.$ENV{CFLAGS} if $ENV{CFLAGS};
$OPTIMIZE .= ' '.$ENV{CPPFLAGS} if $ENV{CFLAGS};
my %PM = ( 'lib/Geo/GDAL.pm' => '$(INST_LIBDIR)/GDAL.pm',
view all matches for this distribution
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
$ENV{MAKE} = $Config{make};
$ENV{SHELL} = $Config{sh};
$ENV{CC} = $Config{cc};
$ENV{CPPFLAGS} = "$Config{cppflags} -I$Config{archlibexp}/CORE";
$ENV{CFLAGS} = $Config{ccflags};
$ENV{LDFLAGS} = "$Config{ldflags} $Config{ccdlflags}";
$ENV{LINKER} = $Config{ld}; # nonstandard
$ENV{LIBS} = "-L$Config{archlibexp}/CORE -L$Config{privlibexp} -lperl $Config{perllibs}";
system $ENV{SHELL}, -c => "./configure --prefix \Q$Config{prefixexp}\E"
and exit $? >> 8;
view all matches for this distribution
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
my @tests = map { glob $_ } 't/*.t', 't/*/*.t';
my $module = 'Image::CCV';
(my $main_file = "lib/$module.pm" ) =~ s!::!/!g;
(my $distbase = $module) =~ s!::!-!g;
my $ccflags = $ENV{CCFLAGS}
|| $Config::Config{ ccflags }
;
# TODO: Add command line switches in addition to %ENV and %Config
# Thanks to Devel::CheckLib, LIBS= and INC= already exist
view all matches for this distribution
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
my $CFLAGS = ccopts();
my $LDFLAGS = ldopts();
chomp($CFLAGS,$LDFLAGS);
my $cmd = "cd $jabberdir; ./bootstrap; libtoolize --force && aclocal $ENV{ACLOCAL_FLAGS} && autoheader && automake --include-deps --add-missing && autoconf; CFLAGS=\'$CFLAGS $ENV{CFLAGS}\' LDFLAGS=\'$LDFLAGS $ENV{LDFLAGS}\' ./configure $conf && make...
#my $cmd = "cd $jabberdir; CFLAGS=\'$CFLAGS $ENV{CFLAGS}\' LDFLAGS=\'$LDFLAGS $ENV{LDFLAGS}\' ./configure $conf && make";
# now for the big kick off
warn "\n\nExecuting $cmd\n To build jabberd.\n";
system("$cmd");
die "jabberd2 build failed!\n" unless -x $jabberdir."/sm/sm";
view all matches for this distribution
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
WriteMakefile(
NAME => 'Logger::Fq',
VERSION_FROM => 'Fq.pm',
OBJECT => 'logger-fq.o',
LIBS => "$ENV{LDFLAGS} -lfq",
OPTIMIZE => $ENV{'OPTIMIZE'},
PREREQ_PM => {},
);
view all matches for this distribution
view release on metacpan or search on metacpan
engine/read_only/win32/do_config_h.pl view on Meta::CPAN
our %PERL_AUTOCONF_OS = map { $_ => 1 } qw( MSWin32 openbsd solaris sunos midnightbsd );
my $MARPA_DEBUG = $ENV{MARPA_DEBUG} || 0;
my $USE_PERL_AUTOCONF = $ENV{MARPA_USE_PERL_AUTOCONF} || ( $PERL_AUTOCONF_OS{$^O} // 0 );
my $CC = $ENV{CC} || $Config{cc} || 'cc';
my $CCFLAGS = $ENV{CCFLAGS} || $Config{ccflags} || '';
my $SH = $ENV{SH} || $Config{sh} || '';
my $OBJ_EXT = $ENV{OBJ_EXT} || $Config{obj_ext} || '.o';
GetOptions ('marpa_debug!' => \$MARPA_DEBUG,
'use_perl_autoconf!' => \$USE_PERL_AUTOCONF,
engine/read_only/win32/do_config_h.pl view on Meta::CPAN
exit($rc ? EXIT_SUCCESS : EXIT_FAILURE);
sub do_config_h {
$ENV{CC} = $CC;
$ENV{CCFLAGS} = $CCFLAGS;
$ENV{OBJ_EXT} = $OBJ_EXT;
# If current directory exists and contains a stamp file more recent than an eventual config.h
# we are done.
if (-e 'config.h' && -e 'stamp-h1' && up_to_date( 'config.h', 'stamp-h1' )) {
view all matches for this distribution
view release on metacpan or search on metacpan
etc/compile_marpaESLIF.pl view on Meta::CPAN
# from default ExtUtils::Cbuilder will ensure cc and cpp settings will become independant
# if we are doing to modify any of them.
# We do that for linker settings as well for coherency although we will NEVER touch them.
# OTHERLDFLAGS will be specific to this makefile.
#
# Take care: with ExtUtils::CBuilder, $ENV{CFLAGS} and $ENV{LDFLAGS} are appended to default perl compile flags, not the others
#
#
my %cbuilder_config = ExtUtils::CBuilder->new()->get_config;
$ENV{CC} = $cbuilder_config{cc} // 'cc';
$ENV{CFLAGS} //= '';
$ENV{CFLAGS} .= ' -DNDEBUG -DNTRACE';
$ENV{CXX} = $cbuilder_config{cxx} // $ENV{CC};
$ENV{CXXFLAGS} = $cbuilder_config{cxxflags} // $cbuilder_config{ccflags} // '';
$ENV{LD} = $cbuilder_config{ld} // $ENV{CC};
$ENV{LDFLAGS} //= '';
my @OTHERLDFLAGS = ();
my $optimize = '';
print "==========================================\n";
print "Original compilers and linker settings as per ExtUtils::CBuilder\n";
etc/compile_marpaESLIF.pl view on Meta::CPAN
print "CFLAGS ( append) $ENV{CFLAGS}\n";
print "CXX (overwrite) $ENV{CXX}\n";
print "CXXFLAGS (overwrite) $ENV{CXXFLAGS}\n";
print "LD (overwrite) $ENV{LD}\n";
print "LDFLAGS ( fixed) " . ($cbuilder_config{ldflags} // '') . "\n";
print "LDFLAGS ( append) $ENV{LDFLAGS}\n";
print "==========================================\n";
print "\n";
my $ac = Config::AutoConf->new();
# goto jdd;
etc/compile_marpaESLIF.pl view on Meta::CPAN
print "CFLAGS ( append) $ENV{CFLAGS}\n";
print "CXX (overwrite) $ENV{CXX}\n";
print "CXXFLAGS (overwrite) $ENV{CXXFLAGS}\n";
print "LD (overwrite) $ENV{LD}\n";
print "LDFLAGS ( fixed) " . ($cbuilder_config{ldflags} // '') . "\n";
print "LDFLAGS ( append) $ENV{LDFLAGS}\n";
print "OTHERLDFLAGS $OTHERLDFLAGS\n";
print "==========================================\n";
print "\n";
my %HAVE_HEADERS = ();
etc/compile_marpaESLIF.pl view on Meta::CPAN
my $otherldflags = 'OTHERLDFLAGS.txt';
open(my $otherldflags_fd, '>', $otherldflags) || die "Cannot open $otherldflags, $!";
foreach (@OTHERLDFLAGS) {
print $otherldflags_fd "$_\n";
}
print $otherldflags_fd "$ENV{LDFLAGS}\n";
close($otherldflags_fd) || warn "Cannot close $otherldflags, $!";
#
# Write CFLAGS to CFLAGS.txt
#
etc/compile_marpaESLIF.pl view on Meta::CPAN
if($lm) {
$ac->msg_result("$lm");
$ac->search_libs('log', $lm, { action_on_true => $ac->define_var("HAVE_LOG", 1) });
$ac->search_libs('exp', $lm, { action_on_true => $ac->define_var("HAVE_EXP", 1) });
$ac->msg_notice("Append -l$lm to LDFLAGS");
$ENV{LDFLAGS} .= " -l$lm";
} else {
$ac->msg_result("not needed");
$ac->search_libs('log', { action_on_true => $ac->define_var("HAVE_LOG", 1) });
$ac->search_libs('exp', { action_on_true => $ac->define_var("HAVE_EXP", 1) });
}
view all matches for this distribution
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
{
my $db_src = 'dropbear/';
local $ENV{DESTDIR}; # do not let Perl module config leak through
local $ENV{CFLAGS} = $Config{cccdlflags} . ' ' . $Config{ccflags};
local $ENV{LDFLAGS} = $Config{ldflags} . ' ' . $Config{ccdlflags};
local $ENV{CPPFLAGS} = $Config{cppflags};
return
if -e "$db_src/dropbear";
view all matches for this distribution
view release on metacpan or search on metacpan
debian/f77conf.pl view on Meta::CPAN
sub runtime {
my $libpath = `gfortran -print-libgcc-file-name`;
$libpath =~ s/libgcc[.]a$//;
chomp $libpath;
my $ldflags = '';
$ldflags .= $ENV{LDFLAGS} if (defined $ENV{LDFLAGS});
$ldflags .= " -L$libpath -lgcc -lgfortran";
return($ldflags);
}
sub trail_ {
view all matches for this distribution
view release on metacpan or search on metacpan
debian/f77conf.pl view on Meta::CPAN
sub runtime {
my $libpath = `gfortran -print-libgcc-file-name`;
$libpath =~ s/libgcc[.]a$//;
chomp $libpath;
my $ldflags = '';
$ldflags .= $ENV{LDFLAGS} if (defined $ENV{LDFLAGS});
$ldflags .= " -L$libpath -lgcc -lgfortran";
return($ldflags);
}
sub trail_ {
view all matches for this distribution
view release on metacpan or search on metacpan
debian/f77conf.pl view on Meta::CPAN
sub runtime {
my $libpath = `gfortran -print-libgcc-file-name`;
$libpath =~ s/libgcc[.]a$//;
chomp $libpath;
my $ldflags = '';
$ldflags .= $ENV{LDFLAGS} if (defined $ENV{LDFLAGS});
$ldflags .= " -L$libpath -lgcc -lgfortran";
return($ldflags);
}
sub trail_ {
view all matches for this distribution
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
#
if ($is_osx) {
my $pgplot_dir = defined $ENV{PGPLOT_DIR} ? $ENV{PGPLOT_DIR} : "/usr/lib";
my $dir = -d 'pgplot_tmp' ? 'pgplot_tmp' : $pgplot_dir;
$items{LIBS}[0] .= " -lobjc " .
(defined $ENV{LDFLAGS} ? $ENV{LDFLAGS} : "-L/sw/lib") .
find_required_driver_libs($pgplot_dir);
}
# The following is needed for PGPLOT compiled on OS-X, at least
# for both the version used from FINK and a hand-compiled version.
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Build/My.pm view on Meta::CPAN
my $self = $class->SUPER::new(@args);
$self->config(cc => $ENV{CC}) if defined $ENV{CC};
$self->config(ld => $ENV{LD}) if defined $ENV{LD};
$self->config(lddl => $ENV{LD}) if defined $ENV{LD};
$self->extra_compiler_flags(grep { $_ ne '' } split /\s/, $ENV{CFLAGS}) if defined $ENV{CFLAGS};
$self->extra_linker_flags( grep { $_ ne '' } split /\s/, $ENV{LDFLAGS}) if defined $ENV{LDFLAGS};
return $self;
};
sub ACTION_xs_config {
my $self = shift;
view all matches for this distribution
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
dist => {
PREOP => 'pod2text lib/Qstruct.pm > $(DISTVNAME)/README',
},
OBJECT => '$(O_FILES)', # link all the C files too
LIBS => $LIBS,
CCFLAGS => $ENV{XCFLAGS} || '',
($myextlib ? (
MYEXTLIB => $myextlib,
INC => '-I./libqstruct',
) : (
INC => $INC
view all matches for this distribution