diff --git a/python/build/autotools.py b/python/build/autotools.py index d9a1f156b..55a5fc067 100644 --- a/python/build/autotools.py +++ b/python/build/autotools.py @@ -1,4 +1,4 @@ -import os.path, subprocess +import os.path, subprocess, sys from build.project import Project @@ -15,7 +15,10 @@ class AutotoolsProject(Project): def build(self, toolchain): src = self.unpack(toolchain) if self.autogen: - subprocess.check_call(['libtoolize', '--force'], cwd=src) + if sys.platform == 'darwin': + subprocess.check_call(['glibtoolize', '--force'], cwd=src) + else: + subprocess.check_call(['libtoolize', '--force'], cwd=src) subprocess.check_call(['aclocal'], cwd=src) subprocess.check_call(['automake', '--add-missing', '--force-missing', '--foreign'], cwd=src) subprocess.check_call(['autoconf'], cwd=src)