2 # Setup development environment on Mac OS X (tested with 10.6.8 and Xcode 3.2.6)
6 # Trying to follow "Building Wireshark on SnowLeopard"
7 # given by Michael Tuexen at
8 # http://nplab.fh-muenster.de/groups/wiki/wiki/fb7a4/Building_Wireshark_on_SnowLeopard.html
11 DARWIN_MAJOR_VERSION=`uname -r | sed 's/\([0-9]*\).*/\1/'`
14 # Versions to download and install.
16 # The following libraries and tools are required.
18 GETTEXT_VERSION=0.18.2
20 PKG_CONFIG_VERSION=0.28
26 GDK_PIXBUF_VERSION=2.28.0
27 if [ -z "$GTK3" ]; then
34 # Some package need xz to unpack their current source.
35 # xz is not yet provided with OS X.
39 # In case we want to build with cmake
40 CMAKE_VERSION=2.8.10.2
43 # The following libraries are optional.
44 # Comment them out if you don't want them, but note that some of
45 # the optional libraries are required by other optional libraries.
49 # libgpg-error is required for libgcrypt.
51 LIBGPG_ERROR_VERSION=1.10
53 # libgcrypt is required for GnuTLS.
54 # XXX - the link for "Libgcrypt source code" at
55 # http://www.gnupg.org/download/#libgcrypt is for 1.5.0, and is a bzip2
56 # file, but http://directory.fsf.org/project/libgcrypt/ lists only
59 LIBGCRYPT_VERSION=1.5.0
60 GNUTLS_VERSION=2.12.19
61 # Stay with Lua 5.1 when updating until the code has been changed
64 PORTAUDIO_VERSION=pa_stable_v19_20111121
66 # XXX - they appear to have an unversioned gzipped tarball for the
67 # current version; should we just download that, with some other
68 # way of specifying whether to download the GeoIP API?
73 # GNU autotools; they're provided with releases up to Snow Leopard, but
74 # not in later releases.
76 if [[ $DARWIN_MAJOR_VERSION -gt 10 ]]; then
78 AUTOMAKE_VERSION=1.13.3
83 if [ -d macosx-support-libs ]
85 cd macosx-support-libs
88 # Uninstall items in the reverse order from the order in which they're
89 # installed. Only uninstall if we're configured to install them and
90 # if the download/build/install process completed.
92 # We also do a "make distclean", so that we don't have leftovers from
95 if [ "$GEOIP_VERSION" -a -f geoip-$GEOIP_VERSION-done ]
97 echo "Uninstalling GeoIP API:"
98 cd GeoIP-$GEOIP_VERSION
99 $DO_MAKE_UNINSTALL || exit 1
100 make distclean || exit 1
102 rm geoip-$GEOIP_VERSION-done
105 if [ "$PORTAUDIO_VERSION" -a -f portaudio-done ] ; then
106 echo "Uninstalling PortAudio:"
108 $DO_MAKE_UNINSTALL || exit 1
109 make distclean || exit 1
114 if [ "$LUA_VERSION" -a -f lua-$LUA_VERSION-done ] ; then
115 echo "Uninstalling Lua:"
117 # Lua has no "make uninstall", so just remove stuff manually.
118 # There's no configure script, so there's no need for
119 # "make distclean", either; just do "make clean".
121 (cd /usr/local/bin; $DO_RM -f lua luac)
122 (cd /usr/local/include; $DO_RM -f lua.h luaconf.h lualib.h lauxlib.h lua.hpp)
123 (cd /usr/local/lib; $DO_RM -f liblua.a)
124 (cd /usr/local/man; $DO_RM -f lua.1 luac.1)
128 rm lua-$LUA_VERSION-done
131 if [ "$GNUTLS_VERSION" -a -f gnutls-$GNUTLS_VERSION-done ] ; then
132 echo "Uninstalling GnuTLS:"
133 cd gnutls-$GNUTLS_VERSION
134 $DO_MAKE_UNINSTALL || exit 1
135 make distclean || exit 1
137 rm gnutls-$GNUTLS_VERSION-done
140 if [ "$LIBGCRYPT_VERSION" -a -f libgcrypt-$LIBGCRYPT_VERSION-done ] ; then
141 echo "Uninstalling libgcrypt:"
142 cd libgcrypt-$LIBGCRYPT_VERSION
143 $DO_MAKE_UNINSTALL || exit 1
144 make distclean || exit 1
146 rm libgcrypt-$LIBGCRYPT_VERSION-done
149 if [ "$LIBGPG_ERROR_VERSION" -a -f libgpg-error-$LIBGPG_ERROR_VERSION-done ] ; then
150 echo "Uninstalling libgpg-error:"
151 cd libgpg-error-$LIBGPG_ERROR_VERSION
152 $DO_MAKE_UNINSTALL || exit 1
153 make distclean || exit 1
155 rm libgpg-error-$LIBGPG_ERROR_VERSION-done
158 if [ "$LIBSMI_VERSION" -a -f libsmi-$LIBSMI_VERSION-done ] ; then
159 echo "Uninstalling libsmi:"
160 cd libsmi-$LIBSMI_VERSION
161 $DO_MAKE_UNINSTALL || exit 1
162 make distclean || exit 1
164 rm libsmi-$LIBSMI_VERSION-done
167 if [ -f gtk+-$GTK_VERSION-done ] ; then
168 echo "Uninstalling GTK+:"
170 $DO_MAKE_UNINSTALL || exit 1
171 make distclean || exit 1
173 rm gtk+-$GTK_VERSION-done
176 if [ -f gdk-pixbuf-$GDK_PIXBUF_VERSION-done ] ; then
177 echo "Uninstalling gdk-pixbuf:"
178 cd gdk-pixbuf-$GDK_PIXBUF_VERSION
179 $DO_MAKE_UNINSTALL || exit 1
180 make distclean || exit 1
182 rm gdk-pixbuf-$GDK_PIXBUF_VERSION-done
185 if [ -f pango-$PANGO_VERSION-done ] ; then
186 echo "Uninstalling Pango:"
187 cd pango-$PANGO_VERSION
188 $DO_MAKE_UNINSTALL || exit 1
189 make distclean || exit 1
191 rm pango-$PANGO_VERSION-done
194 if [ -f atk-$ATK_VERSION-done ] ; then
195 echo "Uninstalling ATK:"
197 $DO_MAKE_UNINSTALL || exit 1
198 make distclean || exit 1
200 rm atk-$ATK_VERSION-done
203 if [ -f cairo-$CAIRO_VERSION-done ] ; then
204 echo "Uninstalling Cairo:"
205 cd cairo-$CAIRO_VERSION
206 $DO_MAKE_INSTALL || exit 1
207 make distclean || exit 1
209 rm cairo-$CAIRO_VERSION-done
212 if [ -f pixman-$PIXMAN_VERSION-done ] ; then
213 echo "Uninstalling pixman:"
214 cd pixman-$PIXMAN_VERSION
215 $DO_MAKE_UNINSTALL || exit 1
216 make distclean || exit 1
218 rm pixman-$PIXMAN_VERSION-done
221 if [ -f libpng-$PNG_VERSION-done ] ; then
222 echo "Uninstalling libpng:"
223 cd libpng-$PNG_VERSION
224 $DO_MAKE_UNINSTALL || exit 1
225 make distclean || exit 1
227 rm libpng-$PNG_VERSION-done
230 if [ -f pkg-config-$PKG_CONFIG_VERSION-done ] ; then
231 echo "Uninstalling pkg-config:"
232 cd pkg-config-$PKG_CONFIG_VERSION
233 $DO_MAKE_UNINSTALL || exit 1
234 make distclean || exit 1
236 rm pkg-config-$PKG_CONFIG_VERSION-done
239 if [ -f glib-$GLIB_VERSION-done ] ; then
240 echo "Uninstalling GLib:"
241 cd glib-$GLIB_VERSION
242 $DO_MAKE_UNINSTALL || exit 1
243 make distclean || exit 1
245 rm glib-$GLIB_VERSION-done
248 if [ -f gettext-$GETTEXT_VERSION-done ] ; then
249 echo "Uninstalling GNU gettext:"
250 cd gettext-$GETTEXT_VERSION
251 $DO_MAKE_UNINSTALL || exit 1
252 make distclean || exit 1
254 rm gettext-$GETTEXT_VERSION-done
257 if [ -n "$CMAKE" -a -f cmake-$CMAKE_VERSION-done ]; then
258 echo "Uninstalling CMAKE:"
259 cd cmake-$CMAKE_VERSION
260 $DO_MAKE_UNINSTALL || exit 1
261 make distclean || exit 1
263 rm cmake-$CMAKE_VERSION-done
266 if [ "$LIBTOOL_VERSION" -a -f libtool-$LIBTOOL_VERSION-done ] ; then
267 echo "Uninstalling GNU libtool:"
268 cd libtool-$LIBTOOL_VERSION
269 mv /usr/local/bin/glibtool /usr/local/bin/libtool
270 mv /usr/local/bin/glibtoolize /usr/local/bin/libtoolize
271 $DO_MAKE_UNINSTALL || exit 1
272 make distclean || exit 1
274 rm libtool-$LIBTOOL_VERSION-done
277 if [ "$AUTOMAKE_VERSION" -a -f automake-$AUTOMAKE_VERSION-done ] ; then
278 echo "Uninstalling GNU automake:"
279 cd automake-$AUTOMAKE_VERSION
280 $DO_MAKE_UNINSTALL || exit 1
281 make distclean || exit 1
283 rm automake-$AUTOMAKE_VERSION-done
286 if [ "$AUTOCONF_VERSION" -a -f autoconf-$AUTOCONF_VERSION-done ] ; then
287 echo "Uninstalling GNU autoconf:"
288 cd autoconf-$AUTOCONF_VERSION
289 $DO_MAKE_UNINSTALL || exit 1
290 make distclean || exit 1
292 rm autoconf-$AUTOCONF_VERSION-done
295 if [ "$XZ_VERSION" -a -f xz-$XZ_VERSION-done ] ; then
296 echo "Uninstalling xz:"
298 $DO_MAKE_UNINSTALL || exit 1
299 make distclean || exit 1
301 rm xz-$XZ_VERSION-done
307 # Do we have permission to write in /usr/local?
309 # If so, assume we have permission to write in its subdirectories.
310 # (If that's not the case, this test needs to check the subdirectories
313 # If not, do "make install", "make uninstall", and the removes for Lua
318 DO_MAKE_INSTALL="make install"
319 DO_MAKE_UNINSTALL="make uninstall"
322 DO_MAKE_INSTALL="sudo make install"
323 DO_MAKE_UNINSTALL="sudo make uninstall"
328 # Parse command-line flags:
331 # -t <target> - build libraries so that they'll work on the specified
332 # version of OS X and later versions.
333 # -u - do an uninstall.
335 while getopts ht:u name
342 min_osx_target="$OPTARG"
345 echo "Usage: macosx-setup.sh [ -t <target> ] [ -u ]" 1>&1
351 if [ "$do_uninstall" = "yes" ]
358 # To make this work on Leopard will take a lot of work.
360 # First of all, Leopard's /usr/X11/lib/libXdamage.la claims, at least
361 # with all software updates applied, that the Xdamage shared library
362 # is libXdamage.1.0.0.dylib, but it is, in fact, libXdamage.1.1.0.dylib.
363 # This causes problems when building GTK+, so the script would have to
366 # Second of all, the version of fontconfig that comes with Leopard
367 # doesn't support FC_WEIGHT_EXTRABLACK, so we can't use any version
368 # of Pango newer than 1.22.4.
370 # However, Pango 1.22.4 doesn't work with versions of GLib after
371 # 2.29.6, because Pango 1.22.4 uses G_CONST_RETURN and GLib 2.29.8
372 # and later deprecate it (there doesn't appear to be a GLib 2.29.7).
373 # That means we'd either have to patch Pango not to use it (just
374 # use "const"; G_CONST_RETURN was there to allow code to choose whether
375 # to use "const" or not), or use GLib 2.29.6 or earlier.
377 # GLib 2.29.6 includes an implementation of g_bit_lock() that, on x86
378 # (32-bit and 64-bit), uses asms in a fashion ("asm volatile goto") that
379 # doesn't work with the Apple version of GCC 4.0.1, which is the compiler
380 # you get with Leopard+updates. Apparently, that requires GCC 4.5 or
381 # later; recent versions of GLib check for that, but 2.29.6 doesn't.
382 # Therefore, we would have to patch glib/gbitlock.c to do what the
383 # newer versions of GLib do:
385 # define a USE_ASM_GOTO macro that indicates whether "asm goto"
387 # #if (defined (i386) || defined (__amd64__))
388 # #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)
389 # #define USE_ASM_GOTO 1
393 # replace all occurrences of
395 # #if defined (__GNUC__) && (defined (i386) || defined (__amd64__))
399 # #ifdef USE_ASM_GOTO
401 # Using GLib 2.29.6 or earlier, however, would mean that we can't
402 # use a version of ATK later than 2.3.93, as those versions don't
403 # work with GLib 2.29.6. The same applies to gdk-pixbuf; versions
404 # of gdk-pixbuf after 2.24.1 won't work with GLib 2.29.6.
406 # Once you've set this script up to use the older versions of the
407 # libraries, and built and installed them, you find that Wireshark,
408 # when built with them, crashes the X server that comes with Leopard,
409 # at least with all updates from Apple. Maybe patching Pango rather
410 # than going with an older version of Pango would work.
412 # The Leopard Wireshark buildbot uses GTK+ 2.12.9, Cairo 1.6.4,
413 # Pango 1.20.2, and GLib 2.16.3, with an unknown version of ATK,
414 # and, I think, without gdk-pixbuf, as it hadn't been made a
415 # separate library from GTK+ as of GTK+ 2.12.9. Its binaries
416 # don't crash the X server.
418 # However, if you try various older versions of Cairo, including
419 # 1.6.4 and at least some 1.8.x versions, when you try to build
420 # it, the build fails because it can't find png_set_longjmp_fn().
421 # I vaguely remember dealing with that, ages ago, but don't
422 # remember what I did; fixing *that* is left as an exercise for
425 # Oh, and if you're building with a version of GTK+ that doesn't
426 # have the gdk-pixbuf stuff in a separate library, you probably
427 # don't want to bother downloading or installing the gdk-pixbuf
428 # library, *and* you will need to configure GTK+ with
429 # --without-libtiff and --without-libjpeg (as we currently do
432 if [[ $DARWIN_MAJOR_VERSION -le 9 ]]; then
433 echo "This script does not support any versions of OS X before Snow Leopard" 1>&2
437 # To set up a GTK3 environment
442 # To build all libraries as 32-bit libraries uncomment the following three lines.
443 # export CFLAGS="$CFLAGS -arch i386"
444 # export CXXFLAGS="$CXXFLAGS -arch i386"
445 # export LDFLAGS="$LDFLAGS -arch i386"
448 # if no make options are present, set default options
449 if [ -z "$MAKE_BUILD_OPTS" ] ; then
450 # by default use 1.5x number of cores for parallel build
451 MAKE_BUILD_OPTS="-j $(( $(sysctl -n hw.logicalcpu) * 3 / 2))"
455 # Was a minimum target release specified?
457 if [ ! -z "$min_osx_target" ]
460 # Look for the SDK for that release, and build libraries against
461 # it rather than against the headers and, more importantly,
462 # libraries that come with the OS, so that we don't end up with
463 # support libraries that only work on the OS version on which
464 # we built them, not earlier versions of the same release, or
465 # earlier releases if the minimum is earlier.
467 for i in /Developer/SDKs \
468 /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs \
469 /Library/Developer/CommandLineTools/SDKs
471 if [ -d "$i"/"MacOSX$min_osx_target.sdk" ]
473 SDKPATH="$i"/"MacOSX$min_osx_target.sdk"
480 echo "macosx-setup.sh: Couldn't find the SDK for OS X $min_osx_target" 1>&2
485 # Make sure there are links to /usr/local/include and /usr/local/lib
486 # in the SDK's usr/local.
488 if [ ! -e $SDKPATH/usr/local/include ]
490 if [ ! -d $SDKPATH/usr/local ]
492 sudo mkdir $SDKPATH/usr/local
494 sudo ln -s /usr/local/include $SDKPATH/usr/local/include
496 if [ ! -e $SDKPATH/usr/local/lib ]
498 if [ ! -d $SDKPATH/usr/local ]
500 sudo mkdir $SDKPATH/usr/local
502 sudo ln -s /usr/local/lib $SDKPATH/usr/local/lib
506 # Set the minimum OS version for which to build to the specified
507 # minimum target OS version, so we don't, for example, end up using
508 # linker features supported by the OS verson on which we're building
509 # but not by the target version.
511 VERSION_MIN_FLAGS="-mmacosx-version-min=$min_osx_target"
514 # Compile and link against the SDK.
516 SDKFLAGS="-isysroot $SDKPATH"
518 if [[ "$min_osx_target" == "10.5" ]]
521 # Cairo is part of Mac OS X 10.6 and later.
522 # The *headers* are supplied by 10.5, but the *libraries*
523 # aren't, so we have to build it if we're building for 10.5.
525 cairo_not_in_the_os=yes
529 # We're building for the OS version on which we're running; if it's
530 # Leopard or earlier, we need to build Cairo - see above.
531 # The major version number of Darwin in 10.5 is 9.
533 if [[ $DARWIN_MAJOR_VERSION = "9" ]]
535 cairo_not_in_the_os=yes
540 # You need Xcode installed to get the compilers.
542 if [ ! -x /usr/bin/xcodebuild ]; then
543 echo "Please install Xcode first (should be available on DVD or from http://developer.apple.com/xcode/index.php)."
548 # You also need the X11 SDK; with at least some versions of OS X and
549 # Xcode, that is, I think, an optional install. (Or it might be
550 # installed with X11, but I think *that* is an optional install on
551 # at least some versions of OS X.)
553 if [ ! -d /usr/X11/include ]; then
554 echo "Please install X11 and the X11 SDK first."
558 export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/X11/lib/pkgconfig
561 # Do all the downloads and untarring in a subdirectory, so all that
562 # stuff can be removed once we've installed the support libraries.
564 if [ ! -d macosx-support-libs ]
566 mkdir macosx-support-libs || exit 1
568 cd macosx-support-libs
570 # Start with xz: It is the sole download format of glib later than 2.31.2
572 if [ "$XZ_VERSION" -a ! -f xz-$XZ_VERSION-done ] ; then
573 echo "Downloading, building, and installing xz:"
574 [ -f xz-$XZ_VERSION.tar.bz2 ] || curl -O http://tukaani.org/xz/xz-$XZ_VERSION.tar.bz2 || exit 1
575 bzcat xz-$XZ_VERSION.tar.bz2 | tar xf - || exit 1
577 CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=0" ./configure || exit 1
578 make $MAKE_BUILD_OPTS || exit 1
579 $DO_MAKE_INSTALL || exit 1
581 touch xz-$XZ_VERSION-done
584 if [ "$AUTOCONF_VERSION" -a ! -f autoconf-$AUTOCONF_VERSION-done ] ; then
585 echo "Downloading, building and installing GNU autoconf..."
586 [ -f autoconf-$AUTOCONF_VERSION.tar.xz ] || curl -O ftp://ftp.gnu.org/gnu/autoconf/autoconf-$AUTOCONF_VERSION.tar.xz || exit 1
587 xzcat autoconf-$AUTOCONF_VERSION.tar.xz | tar xf - || exit 1
588 cd autoconf-$AUTOCONF_VERSION
589 ./configure || exit 1
590 make $MAKE_BUILD_OPTS || exit 1
591 $DO_MAKE_INSTALL || exit 1
593 touch autoconf-$AUTOCONF_VERSION-done
596 if [ "$AUTOMAKE_VERSION" -a ! -f automake-$AUTOMAKE_VERSION-done ] ; then
597 echo "Downloading, building and installing GNU automake..."
598 [ -f automake-$AUTOMAKE_VERSION.tar.xz ] || curl -O ftp://ftp.gnu.org/gnu/automake/automake-$AUTOMAKE_VERSION.tar.xz || exit 1
599 xzcat automake-$AUTOMAKE_VERSION.tar.xz | tar xf - || exit 1
600 cd automake-$AUTOMAKE_VERSION
601 ./configure || exit 1
602 make $MAKE_BUILD_OPTS || exit 1
603 $DO_MAKE_INSTALL || exit 1
605 touch automake-$AUTOMAKE_VERSION-done
608 if [ "$LIBTOOL_VERSION" -a ! -f libtool-$LIBTOOL_VERSION-done ] ; then
609 echo "Downloading, building and installing GNU libtool..."
610 [ -f libtool-$LIBTOOL_VERSION.tar.xz ] || curl -O ftp://ftp.gnu.org/gnu/libtool/libtool-$LIBTOOL_VERSION.tar.xz || exit 1
611 xzcat libtool-$LIBTOOL_VERSION.tar.xz | tar xf - || exit 1
612 cd libtool-$LIBTOOL_VERSION
613 ./configure || exit 1
614 make $MAKE_BUILD_OPTS || exit 1
615 $DO_MAKE_INSTALL || exit 1
616 mv /usr/local/bin/libtool /usr/local/bin/glibtool
617 mv /usr/local/bin/libtoolize /usr/local/bin/glibtoolize
619 touch libtool-$LIBTOOL_VERSION-done
622 if [ -n "$CMAKE" -a ! -f cmake-$CMAKE_VERSION-done ]; then
623 echo "Downloading, building, and installing CMAKE:"
624 cmake_dir=`expr $CMAKE_VERSION : '\([0-9][0-9]*\.[0-9][0-9]*\).*'`
625 [ -f cmake-$CMAKE_VERSION.tar.gz ] || curl -O http://www.cmake.org/files/v$cmake_dir/cmake-$CMAKE_VERSION.tar.gz || exit 1
626 gzcat cmake-$CMAKE_VERSION.tar.gz | tar xf - || exit 1
627 cd cmake-$CMAKE_VERSION
628 ./bootstrap || exit 1
629 make $MAKE_BUILD_OPTS || exit 1
630 $DO_MAKE_INSTALL || exit 1
632 touch cmake-$CMAKE_VERSION-done
636 # Start with GNU gettext; GLib requires it, and OS X doesn't have it
637 # or a BSD-licensed replacement.
639 # At least on Lion with Xcode 4, _FORTIFY_SOURCE gets defined as 2
640 # by default, which causes, for example, stpncpy to be defined as
641 # a hairy macro that collides with the GNU gettext configure script's
642 # attempts to workaround AIX's lack of a declaration for stpncpy,
643 # with the result being a huge train wreck. Define _FORTIFY_SOURCE
644 # as 0 in an attempt to keep the trains on separate tracks.
646 if [ ! -f gettext-$GETTEXT_VERSION-done ] ; then
647 echo "Downloading, building, and installing GNU gettext:"
648 [ -f gettext-$GETTEXT_VERSION.tar.gz ] || curl -O http://ftp.gnu.org/pub/gnu/gettext/gettext-$GETTEXT_VERSION.tar.gz || exit 1
649 gzcat gettext-$GETTEXT_VERSION.tar.gz | tar xf - || exit 1
650 cd gettext-$GETTEXT_VERSION
651 CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=0 $VERSION_MIN_FLAGS $SDKFLAGS" LDFLAGS="$LDFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" ./configure || exit 1
652 make $MAKE_BUILD_OPTS || exit 1
653 $DO_MAKE_INSTALL || exit 1
655 touch gettext-$GETTEXT_VERSION-done
658 if [ ! -f glib-$GLIB_VERSION-done ] ; then
659 echo "Downloading, building, and installing GLib:"
660 glib_dir=`expr $GLIB_VERSION : '\([0-9][0-9]*\.[0-9][0-9]*\).*'`
661 [ -f glib-$GLIB_VERSION.tar.xz ] || curl -L -O http://ftp.gnome.org/pub/gnome/sources/glib/$glib_dir/glib-$GLIB_VERSION.tar.xz || exit 1
662 xzcat glib-$GLIB_VERSION.tar.xz | tar xf - || exit 1
663 cd glib-$GLIB_VERSION
665 # OS X ships with libffi, but doesn't provide its pkg-config file;
666 # explicitly specify LIBFFI_CFLAGS and LIBFFI_LIBS, so the configure
667 # script doesn't try to use pkg-config to get the appropriate
668 # C flags and loader flags.
670 # And, what's worse, at least with the version of Xcode that comes
671 # with Leopard, /usr/include/ffi/fficonfig.h doesn't define MACOSX,
672 # which causes the build of GLib to fail. If we don't find
673 # "#define.*MACOSX" in /usr/include/ffi/fficonfig.h, explictly
676 # While we're at it, suppress -Wformat-nonliteral to avoid a case
677 # where clang's stricter rules on when not to complain about
678 # non-literal format arguments cause it to complain about code
679 # that's safe but it wasn't told that. See my comment #25 in
682 # https://bugzilla.gnome.org/show_bug.cgi?id=691608#c25
684 # First, determine where the system include files are. (It's not
685 # necessarily /usr/include.) There's a bit of a greasy hack here;
686 # pre-5.x versions of the developer tools don't support the
687 # --show-sdk-path option, and will produce no output, so includedir
688 # will be set to /usr/include (in those older versions of the
689 # developer tools, there is a /usr/include directory).
691 includedir=`xcrun --show-sdk-path 2>/dev/null`/usr/include
692 if grep -qs '#define.*MACOSX' $includedir/ffi/fficonfig.h
694 # It's defined, nothing to do
695 LIBFFI_CFLAGS="-I $includedir/ffi" LIBFFI_LIBS="-lffi" CFLAGS="$CFLAGS -Wno-format-nonliteral $VERSION_MIN_FLAGS $SDKFLAGS" LDFLAGS="$LDFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" ./configure || exit 1
697 LIBFFI_CFLAGS="-I $includedir/ffi" LIBFFI_LIBS="-lffi" CFLAGS="$CFLAGS -DMACOSX -Wno-format-nonliteral $VERSION_MIN_FLAGS $SDKFLAGS" LDFLAGS="$LDFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" ./configure || exit 1
699 make $MAKE_BUILD_OPTS || exit 1
700 # Apply patch: we depend on libffi, but pkg-config doesn't get told.
701 patch -p0 <../../macosx-support-lib-patches/glib-pkgconfig.patch || exit 1
702 $DO_MAKE_INSTALL || exit 1
704 touch glib-$GLIB_VERSION-done
707 if [ ! -f pkg-config-$PKG_CONFIG_VERSION-done ] ; then
708 echo "Downloading, building, and installing pkg-config:"
709 [ -f pkg-config-$PKG_CONFIG_VERSION.tar.gz ] || curl -O http://pkgconfig.freedesktop.org/releases/pkg-config-$PKG_CONFIG_VERSION.tar.gz || exit 1
710 gzcat pkg-config-$PKG_CONFIG_VERSION.tar.gz | tar xf - || exit 1
711 cd pkg-config-$PKG_CONFIG_VERSION
712 # Avoid another pkgconfig call, because we don't have pkg-config
714 GLIB_CFLAGS="-I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include" GLIB_LIBS="-L/usr/local/lib -lglib-2.0 -lintl" CFLAGS="$CFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" LDFLAGS="$LDFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" ./configure || exit 1
715 make $MAKE_BUILD_OPTS || exit 1
716 $DO_MAKE_INSTALL || exit 1
718 touch pkg-config-$PKG_CONFIG_VERSION-done
722 # Now we have reached a point where we can build everything but
723 # the GUI (Wireshark).
725 # GTK+ 3 requires a newer Cairo build than the one that comes with
726 # 10.6, so we build Cairo if we are using GTK+ 3.
728 # In 10.6 and 10.7, it's an X11 library; if we build with "native" GTK+
729 # rather than X11 GTK+, we might have to build and install Cairo.
730 # In 10.8 and later, there is no X11, but it's included in Xquartz;
731 # again, if we build with "native" GTK+, we'd have to build and install
734 if [[ -n "$GTK3" || "$cairo_not_in_the_os" = yes ]]; then
736 # Requirements for Cairo first
738 # The libpng that comes with the X11 for leopard has a bogus
739 # pkg-config file that lies about where the header files are,
740 # which causes other packages not to be able to find its
743 if [ ! -f libpng-$PNG_VERSION-done ] ; then
744 echo "Downloading, building, and installing libpng:"
746 # The FTP site puts libpng x.y.* into a libpngxy directory.
748 subdir=`echo $PNG_VERSION | sed 's/\([1-9][0-9]*\)\.\([1-9][0-9]*\).*/libpng\1\2'/`
749 [ -f libpng-$PNG_VERSION.tar.xz ] || curl -O ftp://ftp.simplesystems.org/pub/libpng/png/src/$subdir/libpng-$PNG_VERSION.tar.xz
750 xzcat libpng-$PNG_VERSION.tar.xz | tar xf - || exit 1
751 cd libpng-$PNG_VERSION
752 CFLAGS="$CFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" LDFLAGS="$LDFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" ./configure || exit 1
753 make $MAKE_BUILD_OPTS || exit 1
754 $DO_MAKE_INSTALL || exit 1
756 touch libpng-$PNG_VERSION-done
760 # The libpixman that comes with the X11 for Leopard is too old
761 # to support Cairo's image surface backend feature (which requires
762 # pixman-1 >= 0.22.0).
764 if [ ! -f pixman-$PIXMAN_VERSION-done ] ; then
765 echo "Downloading, building, and installing pixman:"
766 [ -f pixman-$PIXMAN_VERSION.tar.gz ] || curl -O http://www.cairographics.org/releases/pixman-$PIXMAN_VERSION.tar.gz
767 gzcat pixman-$PIXMAN_VERSION.tar.gz | tar xf - || exit 1
768 cd pixman-$PIXMAN_VERSION
769 CFLAGS="$CFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" LDFLAGS="$LDFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" ./configure || exit 1
770 make $MAKE_BUILD_OPTS || exit 1
771 $DO_MAKE_INSTALL || exit 1
773 touch pixman-$PIXMAN_VERSION-done
777 # And now Cairo itself.
779 if [ ! -f cairo-$CAIRO_VERSION-done ] ; then
780 echo "Downloading, building, and installing Cairo:"
781 CAIRO_MAJOR_VERSION="`expr $CAIRO_VERSION : '\([0-9][0-9]*\).*'`"
782 CAIRO_MINOR_VERSION="`expr $CAIRO_VERSION : '[0-9][0-9]*\.\([0-9][0-9]*\).*'`"
783 CAIRO_DOTDOT_VERSION="`expr $CAIRO_VERSION : '[0-9][0-9]*\.[0-9][0-9]*\.\([0-9][0-9]*\).*'`"
784 if [[ $CAIRO_MAJOR_VERSION -gt 1 ||
785 $CAIRO_MINOR_VERSION -gt 12 ||
786 ($CAIRO_MINOR_VERSION -eq 12 && $CAIRO_DOTDOT_VERSION -ge 2) ]]
789 # Starting with Cairo 1.12.2, the tarballs are compressed with
790 # xz rather than gzip.
792 [ -f cairo-$CAIRO_VERSION.tar.xz ] || curl -O http://cairographics.org/releases/cairo-$CAIRO_VERSION.tar.xz || exit 1
793 xzcat cairo-$CAIRO_VERSION.tar.xz | tar xf - || exit 1
795 [ -f cairo-$CAIRO_VERSION.tar.gz ] || curl -O http://cairographics.org/releases/cairo-$CAIRO_VERSION.tar.gz || exit 1
796 gzcat cairo-$CAIRO_VERSION.tar.gz | tar xf - || exit 1
798 cd cairo-$CAIRO_VERSION
799 # CFLAGS="$CFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" LDFLAGS="$LDFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" ./configure --enable-quartz=no || exit 1
800 # Maybe follow http://cairographics.org/end_to_end_build_for_mac_os_x/
801 CFLAGS="$CFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" LDFLAGS="$LDFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" ./configure --enable-quartz=yes || exit 1
803 # We must avoid the version of libpng that comes with X11; the
804 # only way I've found to force that is to forcibly set INCLUDES
805 # when we do the build, so that this comes before CAIRO_CFLAGS,
806 # which has -I/usr/X11/include added to it before anything
807 # connected to libpng is.
809 INCLUDES="-I/usr/local/include/libpng15" make $MAKE_BUILD_OPTS || exit 1
810 $DO_MAKE_INSTALL || exit 1
812 touch cairo-$CAIRO_VERSION-done
816 if [ ! -f atk-$ATK_VERSION-done ] ; then
817 echo "Downloading, building, and installing ATK:"
818 atk_dir=`expr $ATK_VERSION : '\([0-9][0-9]*\.[0-9][0-9]*\).*'`
819 [ -f atk-$ATK_VERSION.tar.xz ] || curl -O http://ftp.gnome.org/pub/gnome/sources/atk/$atk_dir/atk-$ATK_VERSION.tar.xz || exit 1
820 xzcat atk-$ATK_VERSION.tar.xz | tar xf - || exit 1
822 CFLAGS="$CFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" LDFLAGS="$LDFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" ./configure || exit 1
823 make $MAKE_BUILD_OPTS || exit 1
824 $DO_MAKE_INSTALL || exit 1
826 touch atk-$ATK_VERSION-done
829 if [ ! -f pango-$PANGO_VERSION-done ] ; then
830 echo "Downloading, building, and installing Pango:"
831 pango_dir=`expr $PANGO_VERSION : '\([0-9][0-9]*\.[0-9][0-9]*\).*'`
832 PANGO_MAJOR_VERSION="`expr $PANGO_VERSION : '\([0-9][0-9]*\).*'`"
833 PANGO_MINOR_VERSION="`expr $PANGO_VERSION : '[0-9][0-9]*\.\([0-9][0-9]*\).*'`"
834 if [[ $PANGO_MAJOR_VERSION -gt 1 ||
835 $PANGO_MINOR_VERSION -ge 29 ]]
838 # Starting with Pango 1.29, the tarballs are compressed with
839 # xz rather than bzip2.
841 [ -f pango-$PANGO_VERSION.tar.xz ] || curl -L -O http://ftp.gnome.org/pub/gnome/sources/pango/$pango_dir/pango-$PANGO_VERSION.tar.xz || exit 1
842 xzcat pango-$PANGO_VERSION.tar.xz | tar xf - || exit 1
844 [ -f pango-$PANGO_VERSION.tar.bz2 ] || curl -L -O http://ftp.gnome.org/pub/gnome/sources/pango/$pango_dir/pango-$PANGO_VERSION.tar.bz2 || exit 1
845 gzcat pango-$PANGO_VERSION.tar.bz2 | tar xf - || exit 1
847 cd pango-$PANGO_VERSION
848 CFLAGS="$CFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" LDFLAGS="$LDFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" ./configure || exit 1
849 make $MAKE_BUILD_OPTS || exit 1
850 $DO_MAKE_INSTALL || exit 1
852 touch pango-$PANGO_VERSION-done
855 if [ ! -f gdk-pixbuf-$GDK_PIXBUF_VERSION-done ] ; then
856 echo "Downloading, building, and installing gdk-pixbuf:"
857 gdk_pixbuf_dir=`expr $GDK_PIXBUF_VERSION : '\([0-9][0-9]*\.[0-9][0-9]*\).*'`
858 [ -f gdk-pixbuf-$GDK_PIXBUF_VERSION.tar.xz ] || curl -L -O http://ftp.gnome.org/pub/gnome/sources/gdk-pixbuf/$gdk_pixbuf_dir/gdk-pixbuf-$GDK_PIXBUF_VERSION.tar.xz || exit 1
859 xzcat gdk-pixbuf-$GDK_PIXBUF_VERSION.tar.xz | tar xf - || exit 1
860 cd gdk-pixbuf-$GDK_PIXBUF_VERSION
861 CFLAGS="$CFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" LDFLAGS="$LDFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" ./configure --without-libtiff --without-libjpeg || exit 1
862 make $MAKE_BUILD_OPTS || exit 1
863 $DO_MAKE_INSTALL || exit 1
865 touch gdk-pixbuf-$GDK_PIXBUF_VERSION-done
868 if [ ! -f gtk+-$GTK_VERSION-done ] ; then
869 echo "Downloading, building, and installing GTK+:"
870 gtk_dir=`expr $GTK_VERSION : '\([0-9][0-9]*\.[0-9][0-9]*\).*'`
871 GTK_MAJOR_VERSION="`expr $GTK_VERSION : '\([0-9][0-9]*\).*'`"
872 GTK_MINOR_VERSION="`expr $GTK_VERSION : '[0-9][0-9]*\.\([0-9][0-9]*\).*'`"
873 GTK_DOTDOT_VERSION="`expr $GTK_VERSION : '[0-9][0-9]*\.[0-9][0-9]*\.\([0-9][0-9]*\).*'`"
874 if [[ $GTK_MAJOR_VERSION -gt 2 ||
875 $GTK_MINOR_VERSION -gt 24 ||
876 ($GTK_MINOR_VERSION -eq 24 && $GTK_DOTDOT_VERSION -ge 5) ]]
879 # Starting with GTK+ 2.24.5, the tarballs are compressed with
880 # xz rather than gzip, in addition to bzip2; use xz, as we've
881 # built and installed it, and as xz compresses better than
882 # bzip2 so the tarballs take less time to download.
884 [ -f gtk+-$GTK_VERSION.tar.xz ] || curl -L -O http://ftp.gnome.org/pub/gnome/sources/gtk+/$gtk_dir/gtk+-$GTK_VERSION.tar.xz || exit 1
885 xzcat gtk+-$GTK_VERSION.tar.xz | tar xf - || exit 1
887 [ -f gtk+-$GTK_VERSION.tar.bz2 ] || curl -L -O http://ftp.gnome.org/pub/gnome/sources/gtk+/$gtk_dir/gtk+-$GTK_VERSION.tar.bz2 || exit 1
888 gzcat gtk+-$GTK_VERSION.tar.bz2 | tar xf - || exit 1
891 if [ $DARWIN_MAJOR_VERSION -ge "12" ]
894 # GTK+ 2.24.10, at least, doesn't build on Mountain Lion with the
895 # CUPS printing backend - either the CUPS API changed incompatibly
896 # or the backend was depending on non-API implementation details.
898 # Configure it out, on Mountain Lion and later, for now.
899 # (12 is the Darwin major version number in Mountain Lion.)
901 CFLAGS="$CFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" LDFLAGS="$LDFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" ./configure --disable-cups || exit 1
903 CFLAGS="$CFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" LDFLAGS="$LDFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" ./configure || exit 1
905 make $MAKE_BUILD_OPTS || exit 1
906 $DO_MAKE_INSTALL || exit 1
908 touch gtk+-$GTK_VERSION-done
912 # Now we have reached a point where we can build everything including
913 # the GUI (Wireshark), but not with any optional features such as
914 # SNMP OID resolution, some forms of decryption, Lua scripting, playback
915 # of audio, or GeoIP mapping of IP addresses.
917 # We now conditionally download optional libraries to support them;
918 # the default is to download them all.
921 if [ "$LIBSMI_VERSION" -a ! -f libsmi-$LIBSMI_VERSION-done ] ; then
922 echo "Downloading, building, and installing libsmi:"
923 [ -f libsmi-$LIBSMI_VERSION.tar.gz ] || curl -L -O ftp://ftp.ibr.cs.tu-bs.de/pub/local/libsmi/libsmi-$LIBSMI_VERSION.tar.gz || exit 1
924 gzcat libsmi-$LIBSMI_VERSION.tar.gz | tar xf - || exit 1
925 cd libsmi-$LIBSMI_VERSION
926 CFLAGS="$CFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" LDFLAGS="$LDFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" ./configure || exit 1
927 make $MAKE_BUILD_OPTS || exit 1
928 $DO_MAKE_INSTALL || exit 1
930 touch libsmi-$LIBSMI_VERSION-done
933 if [ "$LIBGPG_ERROR_VERSION" -a ! -f libgpg-error-$LIBGPG_ERROR_VERSION-done ] ; then
934 echo "Downloading, building, and installing libgpg-error:"
935 [ -f libgpg-error-$LIBGPG_ERROR_VERSION.tar.bz2 ] || curl -L -O ftp://ftp.gnupg.org/gcrypt/libgpg-error/libgpg-error-$LIBGPG_ERROR_VERSION.tar.bz2 || exit 1
936 bzcat libgpg-error-$LIBGPG_ERROR_VERSION.tar.bz2 | tar xf - || exit 1
937 cd libgpg-error-$LIBGPG_ERROR_VERSION
938 CFLAGS="$CFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" LDFLAGS="$LDFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" ./configure || exit 1
939 make $MAKE_BUILD_OPTS || exit 1
940 $DO_MAKE_INSTALL || exit 1
942 touch libgpg-error-$LIBGPG_ERROR_VERSION-done
945 if [ "$LIBGCRYPT_VERSION" -a ! -f libgcrypt-$LIBGCRYPT_VERSION-done ] ; then
947 # libgpg-error is required for libgcrypt.
949 if [ -z $LIBGPG_ERROR_VERSION ]
951 echo "libgcrypt requires libgpg-error, but you didn't install libgpg-error." 1>&2
955 echo "Downloading, building, and installing libgcrypt:"
956 [ -f libgcrypt-$LIBGCRYPT_VERSION.tar.gz ] || curl -L -O ftp://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-$LIBGCRYPT_VERSION.tar.gz || exit 1
957 gzcat libgcrypt-$LIBGCRYPT_VERSION.tar.gz | tar xf - || exit 1
958 cd libgcrypt-$LIBGCRYPT_VERSION
960 # The assembler language code is not compatible with the OS X
961 # x86 assembler (or is it an x86-64 vs. x86-32 issue?).
963 # libgcrypt expects gnu89, not c99/gnu99, semantics for
964 # "inline". See, for example:
966 # http://lists.freebsd.org/pipermail/freebsd-ports-bugs/2010-October/198809.html
968 CFLAGS="$CFLAGS -std=gnu89 $VERSION_MIN_FLAGS $SDKFLAGS" LDFLAGS="$LDFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" ./configure --disable-asm || exit 1
969 make $MAKE_BUILD_OPTS || exit 1
970 $DO_MAKE_INSTALL || exit 1
972 touch libgcrypt-$LIBGCRYPT_VERSION-done
975 if [ "$GNUTLS_VERSION" -a ! -f gnutls-$GNUTLS_VERSION-done ] ; then
977 # GnuTLS requires libgcrypt (or nettle, in newer versions).
979 if [ -z $LIBGCRYPT_VERSION ]
981 echo "GnuTLS requires libgcrypt, but you didn't install libgcrypt" 1>&2
985 echo "Downloading, building, and installing GnuTLS:"
986 [ -f gnutls-$GNUTLS_VERSION.tar.bz2 ] || curl -L -O http://ftp.gnu.org/gnu/gnutls/gnutls-$GNUTLS_VERSION.tar.bz2 || exit 1
987 bzcat gnutls-$GNUTLS_VERSION.tar.bz2 | tar xf - || exit 1
988 cd gnutls-$GNUTLS_VERSION
990 # Use libgcrypt, not nettle.
991 # XXX - is there some reason to prefer nettle? Or does
992 # Wireshark directly use libgcrypt routines?
994 CFLAGS="$CFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" LDFLAGS="$LDFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" ./configure --with-libgcrypt --without-p11-kit || exit 1
995 make $MAKE_BUILD_OPTS || exit 1
997 # The pkgconfig file for GnuTLS says "requires zlib", but OS X,
998 # while it supplies zlib, doesn't supply a pkgconfig file for
1001 # Patch the GnuTLS pkgconfig file not to require zlib.
1002 # (If the capabilities of GnuTLS that Wireshark uses don't
1003 # depend on building GnuTLS with zlib, an alternative would be
1004 # to configure it not to use zlib.)
1006 patch -p0 lib/gnutls.pc.in <../../macosx-support-lib-patches/gnutls-pkgconfig.patch || exit 1
1007 $DO_MAKE_INSTALL || exit 1
1009 touch gnutls-$GNUTLS_VERSION-done
1012 if [ "$LUA_VERSION" -a ! -f lua-$LUA_VERSION-done ] ; then
1013 echo "Downloading, building, and installing Lua:"
1014 [ -f lua-$LUA_VERSION.tar.gz ] || curl -L -O http://www.lua.org/ftp/lua-$LUA_VERSION.tar.gz || exit 1
1015 gzcat lua-$LUA_VERSION.tar.gz | tar xf - || exit 1
1017 make $MAKE_BUILD_OPTS macosx || exit 1
1018 $DO_MAKE_INSTALL || exit 1
1020 touch lua-$LUA_VERSION-done
1023 if [ "$PORTAUDIO_VERSION" -a ! -f portaudio-done ] ; then
1024 echo "Downloading, building, and installing PortAudio:"
1025 [ -f $PORTAUDIO_VERSION.tgz ] || curl -L -O http://www.portaudio.com/archives/$PORTAUDIO_VERSION.tgz || exit 1
1026 gzcat $PORTAUDIO_VERSION.tgz | tar xf - || exit 1
1029 # Un-comment an include that's required on Lion.
1031 patch -p0 include/pa_mac_core.h <../../macosx-support-lib-patches/portaudio-pa_mac_core.h.patch
1033 # Fix a bug that showed up with clang (but is a bug with any
1036 patch -p0 src/hostapi/coreaudio/pa_mac_core.c <../../macosx-support-lib-patches/portaudio-pa_mac_core.c.patch
1038 # Disable fat builds - the configure script doesn't work right
1039 # with Xcode 4 if you leave them enabled, and we don't build
1040 # any other libraries fat (GLib, for example, would be very
1041 # hard to build fat), so there's no advantage to having PortAudio
1044 # Set the minimum OS X version to 10.4, to suppress some
1045 # deprecation warnings. (Good luck trying to make any of
1046 # this build on an OS+Xcode with a pre-10.4 SDK; we don't
1047 # worry about the user requesting that.)
1049 CFLAGS="$CFLAGS -mmacosx-version-min=10.4 $SDKFLAGS" LDFLAGS="$LDFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" ./configure --disable-mac-universal || exit 1
1050 make $MAKE_BUILD_OPTS || exit 1
1051 $DO_MAKE_INSTALL || exit 1
1053 touch portaudio-done
1056 if [ "$GEOIP_VERSION" -a ! -f geoip-$GEOIP_VERSION-done ]
1058 echo "Downloading, building, and installing GeoIP API:"
1059 [ -f GeoIP-$GEOIP_VERSION.tar.gz ] || curl -L -O http://geolite.maxmind.com/download/geoip/api/c/GeoIP-$GEOIP_VERSION.tar.gz || exit 1
1060 gzcat GeoIP-$GEOIP_VERSION.tar.gz | tar xf - || exit 1
1061 cd GeoIP-$GEOIP_VERSION
1062 CFLAGS="$CFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" LDFLAGS="$LDFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" ./configure || exit 1
1064 # Grr. Their man pages "helpfully" have an ISO 8859-1
1065 # copyright symbol in the copyright notice, but OS X's
1066 # default character encoding is UTF-8. sed on Mountain
1067 # Lion barfs at the "illegal character sequence" represented
1068 # by an ISO 8859-1 copyright symbol, as it's not a valid
1071 # iconv the relevant man pages into UTF-8.
1073 for i in geoipupdate.1.in geoiplookup6.1.in geoiplookup.1.in
1075 iconv -f iso8859-1 -t utf-8 man/"$i" >man/"$i".tmp &&
1076 mv man/"$i".tmp man/"$i"
1078 make $MAKE_BUILD_OPTS || exit 1
1079 $DO_MAKE_INSTALL || exit 1
1081 touch geoip-$GEOIP_VERSION-done
1086 echo "You are now prepared to build Wireshark. To do so do:"
1087 echo "export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/X11/lib/pkgconfig"
1089 if [ -n "$CMAKE" ]; then
1090 echo "mkdir build; cd build"
1097 echo "mkdir build; cd build"
1100 echo "make $MAKE_BUILD_OPTS"
1105 echo "Make sure you are allowed capture access to the network devices"
1106 echo "See: http://wiki.wireshark.org/CaptureSetup/CapturePrivileges"