aboutsummaryrefslogtreecommitdiffstats
path: root/macosx-setup.sh
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2011-07-19 02:29:31 +0000
committerGuy Harris <guy@alum.mit.edu>2011-07-19 02:29:31 +0000
commit2e2dc7179fe0db6aad20ab967faa5d7cc5a38749 (patch)
tree9a7b7c6143cee9ed0bc6b668fbad5c7fc32928bc /macosx-setup.sh
parent4a5c24b6fc30b731b2b167a026aad96c5ac28373 (diff)
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
Diffstat (limited to 'macosx-setup.sh')
-rwxr-xr-xmacosx-setup.sh9
1 files changed, 8 insertions, 1 deletions
diff --git a/macosx-setup.sh b/macosx-setup.sh
index b062535156..aa434f4fc5 100755
--- a/macosx-setup.sh
+++ b/macosx-setup.sh
@@ -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 ..