CPPFLAGS contains the flags for the C preprocessor; CXXFLAGS contains
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 9 Jul 2013 08:48:07 +0000 (08:48 +0000)
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 9 Jul 2013 08:48:07 +0000 (08:48 +0000)
the flags for the C++ compiler.

If we're building for 10.5, force a 32-bit build.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@50459 f5534014-38df-0310-8fa8-9805f1628bb7

configure.ac

index 2cd5cdd977bf7f6e5a9726f636e2479eea5b06a2..917ab7e91f1c75484a3747992f01a07479bac31e 100644 (file)
@@ -352,7 +352,7 @@ darwin*)
                # Add an -isysroot flag to use the SDK.
                #
                CFLAGS="-mmacosx-version-min=$deploy_target -isysroot $SDKPATH $CFLAGS"
-               CPPFLAGS="-mmacosx-version-min=$deploy_target -isysroot $SDKPATH $CPPFLAGS"
+               CXXFLAGS="-mmacosx-version-min=$deploy_target -isysroot $SDKPATH $CXXFLAGS"
                LDFLAGS="-mmacosx-version-min=$deploy_target -isysroot $SDKPATH $LDFLAGS"
 
                #
@@ -366,6 +366,21 @@ darwin*)
                # flag being set?
                #
                OSX_DEPLOY_TARGET="MACOSX_DEPLOYMENT_TARGET=$deploy_target"
+
+               case $deploy_target in
+
+               10.4|10.5)
+                       #
+                       # Only 32-bit builds are supported.  10.5
+                       # (and 10.4?) had a bug that causes some BPF
+                       # functions not to work with 64-bit userland
+                       # code, so capturing won't work.
+                       #
+                       CFLAGS="-arch i386 $CFLAGS"
+                       CXXFLAGS="-arch i386 $CXXFLAGS"
+                       LDFLAGS="-arch i386 $LDFLAGS"
+                       ;;
+               esac
        fi
 esac