redesign autotools: build library for mac