Work around an annoying problem caused by the collision of GNU gettext's

configure script's attempts to deal with AIX 4 and Lion and/or Xcode 4's
dealings with Fortify.

svn path=/trunk/; revision=38104
This commit is contained in:
Guy Harris 2011-07-19 02:29:31 +00:00
parent 4a5c24b6fc
commit 2e2dc7179f
1 changed files with 8 additions and 1 deletions

View File

@ -94,11 +94,18 @@ cd macosx-support-libs
# Start with GNU gettext; GLib requires it, and OS X doesn't have it
# or a BSD-licensed replacement.
#
# At least on Lion with Xcode 4, _FORTIFY_SOURCE gets defined as 2
# by default, which causes, for example, stpncpy to be defined as
# a hairy macro that collides with the GNU gettext configure script's
# attempts to workaround AIX's lack of a declaration for stpncpy,
# with the result being a huge train wreck. Define _FORTIFY_SOURCE
# as 0 in an attempt to keep the trains on separate tracks.
#
echo "Downloading, building, and installing GNU gettext:"
curl -O http://ftp.gnu.org/pub/gnu/gettext/gettext-$GETTEXT_VERSION.tar.gz || exit 1
tar xf gettext-$GETTEXT_VERSION.tar.gz || exit 1
cd gettext-$GETTEXT_VERSION
./configure || exit 1
CFLAGS="-D_FORTIFY_SOURCE=0" ./configure || exit 1
make -j 3 || exit 1
$DO_MAKE_INSTALL || exit 1
cd ..