Put the GTK2 vs. GTK3 and autofoo vs. CMake options at the beginning,
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 31 Jul 2013 06:25:40 +0000 (06:25 +0000)
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 31 Jul 2013 06:25:40 +0000 (06:25 +0000)
before either of them are tested.

Put the code to get the OS major version number just before we first use
it.

Fix indentation.

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

macosx-setup.sh

index af245cc6ed05c8e64d73a17978622fccdaca7a90..c31718711d64fd981b92d79ff28803cf7ccaaf3f 100755 (executable)
@@ -8,7 +8,17 @@
 # http://nplab.fh-muenster.de/groups/wiki/wiki/fb7a4/Building_Wireshark_on_SnowLeopard.html
 #
 
-DARWIN_MAJOR_VERSION=`uname -r | sed 's/\([0-9]*\).*/\1/'`
+#
+# To set up a GTK3 environment
+GTK3=1
+# To build cmake
+# CMAKE=1
+#
+# To build all libraries as 32-bit libraries uncomment the following three lines.
+# export CFLAGS="$CFLAGS -arch i386"
+# export CXXFLAGS="$CXXFLAGS -arch i386"
+# export LDFLAGS="$LDFLAGS -arch i386"
+#
 
 #
 # Versions to download and install.
@@ -69,6 +79,8 @@ PORTAUDIO_VERSION=pa_stable_v19_20111121
 #
 GEOIP_VERSION=1.4.8
 
+DARWIN_MAJOR_VERSION=`uname -r | sed 's/\([0-9]*\).*/\1/'`
+
 #
 # GNU autotools; they're provided with releases up to Snow Leopard, but
 # not in later releases.
@@ -396,17 +408,6 @@ if [[ $DARWIN_MAJOR_VERSION -le 9 ]]; then
     exit 1
 fi
 
-# To set up a GTK3 environment
-GTK3=1
-# To build cmake
-# CMAKE=1
-#
-# To build all libraries as 32-bit libraries uncomment the following three lines.
-# export CFLAGS="$CFLAGS -arch i386"
-# export CXXFLAGS="$CXXFLAGS -arch i386"
-# export LDFLAGS="$LDFLAGS -arch i386"
-#
-
 # if no make options are present, set default options
 if [ -z "$MAKE_BUILD_OPTS" ] ; then
     # by default use 1.5x number of cores for parallel build
@@ -574,7 +575,7 @@ then
     #
     export CFLAGS="$CFLAGS -arch i386"
     export CXXFLAGS="$CXXFLAGS -arch i386"
-     export LDFLAGS="$LDFLAGS -arch i386"
+    export LDFLAGS="$LDFLAGS -arch i386"
 fi
 
 #