Skip to content

Commit

Permalink
Improve build instructions for macOS
Browse files Browse the repository at this point in the history
For Homebrew, show how to set CFLAGS and LDFLAGS to find ltdl.
  • Loading branch information
wrljet committed Apr 9, 2023
1 parent ba8cf2f commit bba608a
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion html/hercinst.html
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ <h3>Building from source - Linux and macOS (High Sierra and newer)</h3>
sudo zypper install -y libcap-progs
</code>

<li>Apple Darwin (macOS High Sierra, Mojave, Catalina, Big Sur) with Homebrew
<li>Apple Darwin (macOS High Sierra, Mojave, Catalina, Big Sur, etc.) with Homebrew
<p><code>
xcode-select --install<br>
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"<br>
Expand All @@ -235,6 +235,18 @@ <h3>Building from source - Linux and macOS (High Sierra and newer)</h3>
<!-- ( flex gawk m4 bzip2 zlib ) -->
</code>

<p><i>Note: So configure/make will find ltdl.h and libltdl:</i>
<p><code>
export CFLAGS="$CFLAGS -I$(find $(brew --cellar libtool) -type d -name "include" | sort -n | tail -n 1)"<br>
export LDFLAGS="$LDFLAGS -L$(find $(brew --cellar libtool) -type d -name "lib" | sort -n | tail -n 1)"
</code>

<p><i>And include these options to configure:</i>
<p><code>
--disable-getoptwrapper<br>
--without-included-ltdl
</code>

<li>Apple Darwin (macOS Big Sur) with MacPorts
<p>Information on installing MacPorts may be found
<a href="https://guide.macports.org/chunked/installing.macports.html">here</a>.
Expand Down

0 comments on commit bba608a

Please sign in to comment.