diff options
author | Guy Harris <guy@alum.mit.edu> | 2012-08-29 10:31:29 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2012-08-29 10:31:29 +0000 |
commit | d0f32eea2318f0c9a5b336ec03cfdfaf24ffbbf0 (patch) | |
tree | 9896fc94635243ae8b060bf20e42982147b8ed81 /macosx-setup.sh | |
parent | a5c0d49ac259d1e7d50a2d8535d9407833857a43 (diff) | |
download | wireshark-d0f32eea2318f0c9a5b336ec03cfdfaf24ffbbf0.tar.gz wireshark-d0f32eea2318f0c9a5b336ec03cfdfaf24ffbbf0.tar.bz2 wireshark-d0f32eea2318f0c9a5b336ec03cfdfaf24ffbbf0.zip |
At least with the version of Xcode that comes with Leopard,
/usr/include/ffi/fficonfig.h doesn't define MACOSX, which causes the
build of GLib to fail. If we don't find "#define.*MACOSX" in
/usr/include/ffi/fficonfig.h, explictly define it.
svn path=/trunk/; revision=44693
Diffstat (limited to 'macosx-setup.sh')
-rwxr-xr-x | macosx-setup.sh | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/macosx-setup.sh b/macosx-setup.sh index 8a2f03bd38..6c946f55ae 100755 --- a/macosx-setup.sh +++ b/macosx-setup.sh @@ -178,7 +178,19 @@ cd glib-$GLIB_VERSION # script doesn't try to use pkg-config to get the appropriate # CFLAGS and LIBS. # -LIBFFI_CFLAGS="-I/usr/include/ffi" LIBFFI_LIBS="-lffi" ./configure || exit 1 +# And, what's worse, at least with the version of Xcode that comes +# with Leopard, /usr/include/ffi/fficonfig.h doesn't define MACOSX, +# which causes the build of GLib to fail. If we don't find +# "#define.*MACOSX" in /usr/include/ffi/fficonfig.h, explictly +# define it. +# +if grep -qs '#define.*MACOSX' /usr/include/ffi/fficonfig.h +then + # It's defined, nothing to do + LIBFFI_CFLAGS="-I/usr/include/ffi" LIBFFI_LIBS="-lffi" ./configure || exit 1 +else + CFLAGS="-DMACOSX" LIBFFI_CFLAGS="-I/usr/include/ffi" LIBFFI_LIBS="-lffi" ./configure || exit 1 +fi make -j 3 || exit 1 # Apply patch: we depend on libffi, but pkg-config doesn't get told. patch -p0 <../../macosx-support-lib-patches/glib-pkgconfig.patch || exit 1 |