aboutsummaryrefslogtreecommitdiff
path: root/src/build.pl
diff options
context:
space:
mode:
Diffstat (limited to 'src/build.pl')
-rw-r--r--src/build.pl6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/build.pl b/src/build.pl
index d3c383b..03622fe 100644
--- a/src/build.pl
+++ b/src/build.pl
@@ -64,7 +64,11 @@ chdir(${NAME});
# Cannot have a memory manager with a static library on some systems
# (e.g. Linux); see
# <http://www.open-mpi.org/faq/?category=mpi-apps#static-mpi-apps>
-system("./configure --prefix=$mpi_dir --without-memory-manager --without-libnuma --enable-shared=no --enable-static=yes") == 0 or die;
+my $hwloc_opts = '';
+if ($ENV{HWLOC_DIR} ne '') {
+ $hwloc_opts = "--with-hwloc=$ENV{HWLOC_DIR}";
+}
+system("./configure --prefix=$mpi_dir $hwloc_opts --without-memory-manager --without-libnuma --enable-shared=no --enable-static=yes") == 0 or die;
print "MPI: Building...\n";
system("$ENV{MAKE}") == 0 or die;