Commit f3e24b77 authored by Mat's avatar Mat
Browse files

Link against -lrt only on Linux

On Linux the shm_open(3) and shm_link(3) functions are implemented in
librt. This is specific to Linux, other targets typically don't need
(nor have) librt. This is the case specifically for *BSD and Darwin.
parent 1e01978f
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@
from distutils.core import setup, Extension
from glob import glob
from os import path
import sys
import numpy

# Convert a file to reStructuredText with pypandoc, when available,
@@ -63,6 +64,6 @@ setup(name = 'SharedArray',
      ext_modules  = [
          Extension('SharedArray',
                    glob(path.join('.', 'src', '*.c')),
                    libraries = [ 'rt' ],
                    libraries = [ 'rt' ] if sys.platform.startswith('linux') else [],
                    include_dirs=[numpy.get_include()])
      ])