From 5fc5bf06db6f318593736838b842a19868d13b27 Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Sat, 25 Mar 2017 14:09:05 +0100 Subject: [PATCH] Smarter BOOST_DIR --- xs/Build.PL | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/xs/Build.PL b/xs/Build.PL index 619cc879f..2fc5b33c1 100644 --- a/xs/Build.PL +++ b/xs/Build.PL @@ -70,6 +70,9 @@ if (defined $ENV{BOOST_INCLUDEDIR}) { my $subdir = $ENV{BOOST_DIR} . (($mswin == 1) ? '\include' : '/include'); if (-d $subdir) { push @boost_include, $subdir; + } elsif (-d "../$subdir") { + # User might have provided a path relative to the Build.PL in the main directory + push @boost_include, "../$subdir"; } else { push @boost_include, $ENV{BOOST_DIR}; } @@ -99,6 +102,9 @@ if (defined $ENV{BOOST_LIBRARYPATH}) { my $subdir = $ENV{BOOST_DIR} . ($mswin ? '\stage\lib' : '/stage/lib'); if (-d $subdir) { push @boost_libs, $subdir; + } elsif (-d "../$subdir") { + # User might have provided a path relative to the Build.PL in the main directory + push @boost_libs, "../$subdir"; } else { push @boost_libs, $ENV{BOOST_DIR}; }