592 |
592 |
593 # platform specific macros |
593 # platform specific macros |
594 for plat, func in [('bsd', 'setproctitle'), ('bsd|darwin|linux', 'statfs')]: |
594 for plat, func in [('bsd', 'setproctitle'), ('bsd|darwin|linux', 'statfs')]: |
595 if re.search(plat, sys.platform) and hasfunction(new_compiler(), func): |
595 if re.search(plat, sys.platform) and hasfunction(new_compiler(), func): |
596 osutil_cflags.append('-DHAVE_%s' % func.upper()) |
596 osutil_cflags.append('-DHAVE_%s' % func.upper()) |
|
597 |
|
598 for plat, header in [ |
|
599 ('bsd|darwin|linux', 'sys/mount.h'), |
|
600 ('bsd|darwin|linux', 'sys/param.h'), |
|
601 ('linux', 'linux/magic.h'), |
|
602 ('linux', 'sys/vfs.h'), |
|
603 ]: |
|
604 if re.search(plat, sys.platform) and hasheader(new_compiler(), header): |
|
605 macro = header.replace('/', '_').replace('.', '_').upper() |
|
606 osutil_cflags.append('-DHAVE_%s' % macro) |
597 |
607 |
598 if sys.platform == 'darwin': |
608 if sys.platform == 'darwin': |
599 osutil_ldflags += ['-framework', 'ApplicationServices'] |
609 osutil_ldflags += ['-framework', 'ApplicationServices'] |
600 |
610 |
601 extmodules = [ |
611 extmodules = [ |