small tweaks to facilitate the mac homebrew build

This commit is contained in:
Jean-Francois Dockes 2020-05-21 09:41:58 +02:00
parent b5c5734d06
commit 4c39034f5d
2 changed files with 20 additions and 2 deletions

View File

@ -1,7 +1,18 @@
#!/bin/sh
set -x
aclocal
libtoolize --copy
if test X"$HOMEBREW_ENV" != X; then
glt=`which glibtoolize`
fi
if test X"$glt" != X; then
$glt --copy
else
libtoolize --copy
fi
automake --add-missing --force-missing --copy
autoconf
# Our ylwrap gets clobbered by the above.

View File

@ -273,7 +273,10 @@ RclConfig *recollinit(int flags,
if (cleanup)
atexit(cleanup);
#ifdef MACPORTS
#if defined(MACPORTS) || defined(HOMEBREW)
// The MACPORTS and HOMEBREW flags are set by the resp. portfile
// and recipee
// Apple keeps changing the way to set the environment (PATH) for
// a desktop app (started by launchd or whatever). Life is too
// short.
@ -281,7 +284,11 @@ RclConfig *recollinit(int flags,
if (!cp) //??
cp = "";
string PATH(cp);
#if defined(MACPORTS)
PATH = string("/opt/local/bin/") + ":" + PATH;
#elif defined(HOMEBREW)
PATH = string("/usr/local/bin/") + ":" + PATH;
#endif
setenv("PATH", PATH.c_str(), 1);
#endif