Skip to content

Instantly share code, notes, and snippets.

@byronmansfield
Last active October 11, 2022 20:10
Show Gist options
  • Save byronmansfield/e972caf0f423af1c84e5b57975ccca3d to your computer and use it in GitHub Desktop.
Save byronmansfield/e972caf0f423af1c84e5b57975ccca3d to your computer and use it in GitHub Desktop.
Install libtool from source Mac OS X
# Install libtool from source on Mac OS X
# prepare workspace
mkdir -p ~/code/build-from-src/ && cd $_
# download source code
curl -LO https://ftp.gnu.org/gnu/libtool/libtool-2.4.6.tar.xz
# expand
tar -xf libtool-2.4.6.tar.xz
cd libtool-2.4.6.tar.xz
# prevent libtool from hardcoding sed path from superenv
export SED="sed"
# configure, make, install
./configure --prefix=/usr/local --disable-dependency-tracking --disable-silent-rules --enable-ltdl-install
make
sudo make install
# verify
# It's not easy, you can see how homebrew does it https://github.com/Homebrew/homebrew-core/blob/master/Formula/libtool.rb#L35
which -a libtool
# clean up
unset SED
make clean
make distclean
cd ..
rm -fr libtool-2.4.6
rm libtool-2.4.6.tar.xz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment