Navigation Menu

Skip to content

Commit

Permalink
update setup.pir to properly detect cblas on Fedora.
Browse files Browse the repository at this point in the history
  • Loading branch information
Whiteknight committed Dec 10, 2009
1 parent af0e70b commit 371abb2
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions setup.pir
Expand Up @@ -56,6 +56,7 @@ SOURCES
$S0 = pop $P3
$P2['linalg_group'] = $P3
$P0['dynpmc'] = $P2
'system_linker_settings'($P0)

$P4 = new 'Hash'
$P4['t/Glue.pbc'] = 't/Glue.pir'
Expand All @@ -73,6 +74,29 @@ SOURCES
.tailcall setup(args :flat, $P0 :flat :named)
.end

.sub 'system_linker_settings'
.param pmc config
$S0 = sysinfo 4
if $S0 == "linux" goto have_linux

# don't support other things yet.
.return()

have_linux:
$I0 = spawnw "ldd /usr/lib/libblas.so"
if $I0 != 0 goto try_2
config['dynpmc_ldflags'] = "-lblas"
.return()
try_2:
$I0 = spawnw "ldd /usr/lib/atlas/libcblas.so"
if $I0 != 0 goto try_3
config['dynpmc_ldflags'] = "-L/usr/lib/atlas -lcblas"
try_3:
# There is no try 3
.return()
.end



# Local Variables:
# mode: pir
Expand Down

0 comments on commit 371abb2

Please sign in to comment.