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 # To make this work on Leopard will take a lot of work.
16 # First of all, Leopard's /usr/X11/lib/libXdamage.la claims, at least
17 # with all software updates applied, that the Xdamage shared library
18 # is libXdamage.1.0.0.dylib, but it is, in fact, libXdamage.1.1.0.dylib.
19 # This causes problems when building GTK+, so the script would have to
22 # Second of all, the version of fontconfig that comes with Leopard
23 # doesn't support FC_WEIGHT_EXTRABLACK, so we can't use any version
24 # of Pango newer than 1.22.4.
26 # However, Pango 1.22.4 doesn't work with versions of GLib after
27 # 2.29.6, because Pango 1.22.4 uses G_CONST_RETURN and GLib 2.29.8
28 # and later deprecate it (there doesn't appear to be a GLib 2.29.7).
29 # That means we'd either have to patch Pango not to use it (just
30 # use "const"; G_CONST_RETURN was there to allow code to choose whether
31 # to use "const" or not), or use GLib 2.29.6 or earlier.
33 # GLib 2.29.6 includes an implementation of g_bit_lock() that, on x86
34 # (32-bit and 64-bit), uses asms in a fashion ("asm volatile goto") that
35 # doesn't work with the Apple version of GCC 4.0.1, which is the compiler
36 # you get with Leopard+updates. Apparently, that requires GCC 4.5 or
37 # later; recent versions of GLib check for that, but 2.29.6 doesn't.
38 # Therefore, we would have to patch glib/gbitlock.c to do what the
39 # newer versions of GLib do:
41 # define a USE_ASM_GOTO macro that indicates whether "asm goto"
43 # #if (defined (i386) || defined (__amd64__))
44 # #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)
45 # #define USE_ASM_GOTO 1
49 # replace all occurrences of
51 # #if defined (__GNUC__) && (defined (i386) || defined (__amd64__))
57 # Using GLib 2.29.6 or earlier, however, would mean that we can't
58 # use a version of ATK later than 2.3.93, as those versions don't
59 # work with GLib 2.29.6. The same applies to gdk-pixbuf; versions
60 # of gdk-pixbuf after 2.24.1 won't work with GLib 2.29.6.
62 # Once you've set this script up to use the older versions of the
63 # libraries, and built and installed them, you find that Wireshark,
64 # when built with them, crashes the X server that comes with Leopard,
65 # at least with all updates from Apple. Maybe patching Pango rather
66 # than going with an older version of Pango would work.
68 # The Leopard Wireshark buildbot uses GTK+ 2.12.9, Cairo 1.6.4,
69 # Pango 1.20.2, and GLib 2.16.3, with an unknown version of ATK,
70 # and, I think, without gdk-pixbuf, as it hadn't been made a
71 # separate library from GTK+ as of GTK+ 2.12.9. Its binaries
72 # don't crash the X server.
74 # However, if you try various older versions of Cairo, including
75 # 1.6.4 and at least some 1.8.x versions, when you try to build
76 # it, the build fails because it can't find png_set_longjmp_fn().
77 # I vaguely remember dealing with that, ages ago, but don't
78 # remember what I did; fixing *that* is left as an exercise for
81 # Oh, and if you're building with a version of GTK+ that doesn't
82 # have the gdk-pixbuf stuff in a separate library, you probably
83 # don't want to bother downloading or installing the gdk-pixbuf
84 # library, *and* you will need to configure GTK+ with
85 # --without-libtiff and --without-libjpeg (as we currently do
88 if [[ $DARWIN_MAJOR_VERSION -le 9 ]]; then
89 echo "This script does not support any versions of OS X before Snow Leopard" 1>&2
93 # To set up a GTK3 environment
98 # Versions to download and install.
100 # The following libraries are required.
102 GETTEXT_VERSION=0.18.1.1
105 # pkg-config 0.26 appears to have broken the "we have our own GLib"
106 # stuff, even if you explicitly set GLIB_CFLAGS and GLIB_LIBS.
108 PKG_CONFIG_VERSION=0.26
112 PIXMAN_VERSION=0.26.0
114 GDK_PIXBUF_VERSION=2.26.1
115 if [ -z "$GTK3" ]; then
122 # Some package need xz to unpack their current source.
123 # xz is not available on OSX (Snow Leopard).
127 # In case we want to build with cmake
131 # The following libraries are optional.
132 # Comment them out if you don't want them, but note that some of
133 # the optional libraries are required by other optional libraries.
137 # libgpg-error is required for libgcrypt.
139 LIBGPG_ERROR_VERSION=1.10
141 # libgcrypt is required for GnuTLS.
142 # XXX - the link for "Libgcrypt source code" at
143 # http://www.gnupg.org/download/#libgcrypt is for 1.5.0, and is a bzip2
144 # file, but http://directory.fsf.org/project/libgcrypt/ lists only
147 LIBGCRYPT_VERSION=1.5.0
148 GNUTLS_VERSION=2.12.19
149 # Stay with Lua 5.1 when updating until the code has been changed
152 PORTAUDIO_VERSION=pa_stable_v19_20111121
154 # XXX - they appear to have an unversioned gzipped tarball for the
155 # current version; should we just download that, with some other
156 # way of specifying whether to download the GeoIP API?
161 # You need Xcode installed to get the compilers.
163 if [ ! -x /usr/bin/xcodebuild ]; then
164 echo "Please install Xcode first (should be available on DVD or from http://developer.apple.com/xcode/index.php)."
169 # You also need the X11 SDK; with at least some versions of OS X and
170 # Xcode, that is, I think, an optional install. (Or it might be
171 # installed with X11, but I think *that* is an optional install on
172 # at least some versions of OS X.)
174 if [ ! -d /usr/X11/include ]; then
175 echo "Please install X11 and the X11 SDK first."
180 # Do we have permission to write in /usr/local?
182 # If so, assume we have permission to write in its subdirectories.
183 # (If that's not the case, this test needs to check the subdirectories
186 # If not, do "make install" with sudo.
190 DO_MAKE_INSTALL="make install"
192 DO_MAKE_INSTALL="sudo make install"
195 export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/X11/lib/pkgconfig
198 # Do all the downloads and untarring in a subdirectory, so all that
199 # stuff can be removed once we've installed the support libraries.
201 if [ ! -d macosx-support-libs ]
203 mkdir macosx-support-libs || exit 1
205 cd macosx-support-libs
207 # Start with xz: It is the sole download format of glib later than 2.31.2
209 echo "Downloading, building, and installing xz:"
210 curl -O http://tukaani.org/xz/xz-$XZ_VERSION.tar.bz2 || exit 1
211 tar xf xz-$XZ_VERSION.tar.bz2 || exit 1
213 CFLAGS="-D_FORTIFY_SOURCE=0" ./configure || exit 1
215 $DO_MAKE_INSTALL || exit 1
218 if [ -n "$CMAKE" ]; then
219 echo "Downloading, building, and installing CMAKE:"
220 cmake_dir=`expr $CMAKE_VERSION : '\([0-9][0-9]*\.[0-9][0-9]*\).*'`
221 curl -O http://www.cmake.org/files/v$cmake_dir/cmake-$CMAKE_VERSION.tar.gz || exit 1
222 gzcat cmake-$CMAKE_VERSION.tar.gz | tar xf - || exit 1
223 cd cmake-$CMAKE_VERSION
224 ./bootstrap || exit 1
226 $DO_MAKE_INSTALL || exit 1
231 # Start with GNU gettext; GLib requires it, and OS X doesn't have it
232 # or a BSD-licensed replacement.
234 # At least on Lion with Xcode 4, _FORTIFY_SOURCE gets defined as 2
235 # by default, which causes, for example, stpncpy to be defined as
236 # a hairy macro that collides with the GNU gettext configure script's
237 # attempts to workaround AIX's lack of a declaration for stpncpy,
238 # with the result being a huge train wreck. Define _FORTIFY_SOURCE
239 # as 0 in an attempt to keep the trains on separate tracks.
241 echo "Downloading, building, and installing GNU gettext:"
242 curl -O http://ftp.gnu.org/pub/gnu/gettext/gettext-$GETTEXT_VERSION.tar.gz || exit 1
243 tar xf gettext-$GETTEXT_VERSION.tar.gz || exit 1
244 cd gettext-$GETTEXT_VERSION
245 CFLAGS="-D_FORTIFY_SOURCE=0" ./configure || exit 1
247 $DO_MAKE_INSTALL || exit 1
250 echo "Downloading, building, and installing GLib:"
251 glib_dir=`expr $GLIB_VERSION : '\([0-9][0-9]*\.[0-9][0-9]*\).*'`
252 curl -L -O http://ftp.gnome.org/pub/gnome/sources/glib/$glib_dir/glib-$GLIB_VERSION.tar.xz || exit 1
253 xzcat glib-$GLIB_VERSION.tar.xz | tar xf - || exit 1
254 cd glib-$GLIB_VERSION
256 # OS X ships with libffi, but doesn't provide its pkg-config file;
257 # explicitly specify LIBFFI_CFLAGS and LIBFFI_LIBS, so the configure
258 # script doesn't try to use pkg-config to get the appropriate
261 # And, what's worse, at least with the version of Xcode that comes
262 # with Leopard, /usr/include/ffi/fficonfig.h doesn't define MACOSX,
263 # which causes the build of GLib to fail. If we don't find
264 # "#define.*MACOSX" in /usr/include/ffi/fficonfig.h, explictly
267 if grep -qs '#define.*MACOSX' /usr/include/ffi/fficonfig.h
269 # It's defined, nothing to do
270 LIBFFI_CFLAGS="-I/usr/include/ffi" LIBFFI_LIBS="-lffi" ./configure || exit 1
272 CFLAGS="-DMACOSX" LIBFFI_CFLAGS="-I/usr/include/ffi" LIBFFI_LIBS="-lffi" ./configure || exit 1
275 # Apply patch: we depend on libffi, but pkg-config doesn't get told.
276 patch -p0 <../../macosx-support-lib-patches/glib-pkgconfig.patch || exit 1
277 $DO_MAKE_INSTALL || exit 1
280 echo "Downloading, building, and installing pkg-config:"
281 curl -O http://pkgconfig.freedesktop.org/releases/pkg-config-$PKG_CONFIG_VERSION.tar.gz || exit 1
282 tar xf pkg-config-$PKG_CONFIG_VERSION.tar.gz || exit 1
283 cd pkg-config-$PKG_CONFIG_VERSION
284 # Avoid another pkgconfig call
285 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" ./configure || exit 1
286 # ./configure || exit 1
288 $DO_MAKE_INSTALL || exit 1
292 # Now we have reached a point where we can build everything but
293 # the GUI (Wireshark).
295 # Cairo is part of Mac OS X 10.6 and 10.7.
296 # The *headers* are supplied by 10.5, but the *libraries* aren't, so
297 # we have to build it on 10.5.
298 # GTK+ 3 requires a newer Cairo build than the one that comes with
299 # 10.6, so we build Cairo if we are using GTK+ 3.
300 # In 10.6 and 10.7, it's an X11 library; if we build with "native" GTK+
301 # rather than X11 GTK+, we might have to build and install Cairo.
302 # The major version number of Darwin in 10.5 is 9.
304 if [[ -n "$GTK3" || $DARWIN_MAJOR_VERSION = "9" ]]; then
306 # Requirements for Cairo first
308 # The libpng that comes with the X11 for leopard has a bogus
309 # pkg-config file that lies about where the header files are,
310 # which causes other packages not to be able to find its
313 echo "Downloading, building, and installing libpng:"
314 curl -O ftp://ftp.simplesystems.org/pub/libpng/png/src/libpng-$PNG_VERSION.tar.xz
315 xzcat libpng-$PNG_VERSION.tar.xz | tar xf - || exit 1
316 cd libpng-$PNG_VERSION
317 ./configure || exit 1
319 $DO_MAKE_INSTALL || exit 1
323 # The libpixman that comes with the X11 for Leopard is too old
324 # to support Cairo's image surface backend feature (which requires
325 # pixman-1 >= 0.22.0).
327 echo "Downloading, building, and installing pixman:"
328 curl -O http://www.cairographics.org/releases/pixman-$PIXMAN_VERSION.tar.gz
329 gzcat pixman-$PIXMAN_VERSION.tar.gz | tar xf - || exit 1
330 cd pixman-$PIXMAN_VERSION
331 ./configure || exit 1
333 $DO_MAKE_INSTALL || exit 1
337 # And now Cairo itself.
339 echo "Downloading, building, and installing Cairo:"
340 CAIRO_MAJOR_VERSION="`expr $CAIRO_VERSION : '\([0-9][0-9]*\).*'`"
341 CAIRO_MINOR_VERSION="`expr $CAIRO_VERSION : '[0-9][0-9]*\.\([0-9][0-9]*\).*'`"
342 CAIRO_DOTDOT_VERSION="`expr $CAIRO_VERSION : '[0-9][0-9]*\.[0-9][0-9]*\.\([0-9][0-9]*\).*'`"
343 if [[ $CAIRO_MAJOR_VERSION -gt 1 ||
344 $CAIRO_MINOR_VERSION -gt 12 ||
345 ($CAIRO_MINOR_VERSION -eq 12 && $CAIRO_DOTDOT_VERSION -ge 2) ]]
348 # Starting with Cairo 1.12.2, the tarballs are compressed with
349 # xz rather than gzip.
351 curl -O http://cairographics.org/releases/cairo-$CAIRO_VERSION.tar.xz || exit 1
352 xzcat cairo-$CAIRO_VERSION.tar.xz | tar xf - || exit 1
354 curl -O http://cairographics.org/releases/cairo-$CAIRO_VERSION.tar.gz || exit 1
355 tar xf cairo-$CAIRO_VERSION.tar.gz || exit 1
357 cd cairo-$CAIRO_VERSION
358 #./configure --enable-quartz=no || exit 1
359 # Maybe follow http://cairographics.org/end_to_end_build_for_mac_os_x/
360 ./configure --enable-quartz=yes || exit 1
362 # We must avoid the version of libpng that comes with X11; the
363 # only way I've found to force that is to forcibly set INCLUDES
364 # when we do the build, so that this comes before CAIRO_CFLAGS,
365 # which has -I/usr/X11/include added to it before anything
366 # connected to libpng is.
368 INCLUDES="-I/usr/local/include/libpng15" make -j 3 || exit 1
369 $DO_MAKE_INSTALL || exit 1
373 echo "Downloading, building, and installing ATK:"
374 atk_dir=`expr $ATK_VERSION : '\([0-9][0-9]*\.[0-9][0-9]*\).*'`
375 curl -O http://ftp.gnome.org/pub/gnome/sources/atk/$atk_dir/atk-$ATK_VERSION.tar.xz || exit 1
376 xzcat atk-$ATK_VERSION.tar.xz | tar xf - || exit 1
378 ./configure || exit 1
380 $DO_MAKE_INSTALL || exit 1
383 echo "Downloading, building, and installing Pango:"
384 pango_dir=`expr $PANGO_VERSION : '\([0-9][0-9]*\.[0-9][0-9]*\).*'`
385 PANGO_MAJOR_VERSION="`expr $PANGO_VERSION : '\([0-9][0-9]*\).*'`"
386 PANGO_MINOR_VERSION="`expr $PANGO_VERSION : '[0-9][0-9]*\.\([0-9][0-9]*\).*'`"
387 if [[ $PANGO_MAJOR_VERSION -gt 1 ||
388 $PANGO_MINOR_VERSION -ge 29 ]]
391 # Starting with Pango 1.29, the tarballs are compressed with
392 # xz rather than bzip2.
394 curl -L -O http://ftp.gnome.org/pub/gnome/sources/pango/$pango_dir/pango-$PANGO_VERSION.tar.xz
395 xzcat pango-$PANGO_VERSION.tar.xz | tar xf - || exit 1
397 curl -L -O http://ftp.gnome.org/pub/gnome/sources/pango/$pango_dir/pango-$PANGO_VERSION.tar.bz2
398 tar xf pango-$PANGO_VERSION.tar.bz2 || exit 1
400 cd pango-$PANGO_VERSION
401 ./configure || exit 1
403 $DO_MAKE_INSTALL || exit 1
406 echo "Downloading, building, and installing gdk-pixbuf:"
407 gdk_pixbuf_dir=`expr $GDK_PIXBUF_VERSION : '\([0-9][0-9]*\.[0-9][0-9]*\).*'`
408 curl -L -O http://ftp.gnome.org/pub/gnome/sources/gdk-pixbuf/$gdk_pixbuf_dir/gdk-pixbuf-$GDK_PIXBUF_VERSION.tar.xz || exit 1
409 xzcat gdk-pixbuf-$GDK_PIXBUF_VERSION.tar.xz | tar xf - || exit 1
410 cd gdk-pixbuf-$GDK_PIXBUF_VERSION
411 ./configure --without-libtiff --without-libjpeg || exit 1
413 $DO_MAKE_INSTALL || exit 1
416 echo "Downloading, building, and installing GTK+:"
417 gtk_dir=`expr $GTK_VERSION : '\([0-9][0-9]*\.[0-9][0-9]*\).*'`
418 GTK_MAJOR_VERSION="`expr $GTK_VERSION : '\([0-9][0-9]*\).*'`"
419 GTK_MINOR_VERSION="`expr $GTK_VERSION : '[0-9][0-9]*\.\([0-9][0-9]*\).*'`"
420 GTK_DOTDOT_VERSION="`expr $GTK_VERSION : '[0-9][0-9]*\.[0-9][0-9]*\.\([0-9][0-9]*\).*'`"
421 if [[ $GTK_MAJOR_VERSION -gt 2 ||
422 $GTK_MINOR_VERSION -gt 24 ||
423 ($GTK_MINOR_VERSION -eq 24 && $GTK_DOTDOT_VERSION -ge 25) ]]
426 # Starting with GTK+ 2.24.5, the tarballs are compressed with
427 # xz rather than gzip, in addition to bzip2; use xz, as we've
428 # built and installed it, and as xz compresses better than
429 # bzip2 so the tarballs take less time to download.
431 curl -L -O http://ftp.gnome.org/pub/gnome/sources/gtk+/$gtk_dir/gtk+-$GTK_VERSION.tar.xz
432 xzcat gtk+-$GTK_VERSION.tar.xz | tar xf - || exit 1
434 curl -L -O http://ftp.gnome.org/pub/gnome/sources/gtk+/$gtk_dir/gtk+-$GTK_VERSION.tar.bz2
435 tar xf gtk+-$GTK_VERSION.tar.bz2 || exit 1
438 if [ $DARWIN_MAJOR_VERSION -ge "12" ]
441 # GTK+ 2.24.10, at least, doesn't build on Mountain Lion with the
442 # CUPS printing backend - either the CUPS API changed incompatibly
443 # or the backend was depending on non-API implementation details.
445 # Configure it out, on Mountain Lion and later, for now.
446 # (12 is the Darwin major version number in Mountain Lion.)
448 ./configure --disable-cups || exit 1
450 ./configure || exit 1
453 $DO_MAKE_INSTALL || exit 1
457 # Now we have reached a point where we can build everything including
458 # the GUI (Wireshark), but not with any optional features such as
459 # SNMP OID resolution, some forms of decryption, Lua scripting, playback
460 # of audio, or GeoIP mapping of IP addresses.
462 # We now conditionally download optional libraries to support them;
463 # the default is to download them all.
466 if [ ! -z $LIBSMI_VERSION ]
468 echo "Downloading, building, and installing libsmi:"
469 curl -L -O ftp://ftp.ibr.cs.tu-bs.de/pub/local/libsmi/libsmi-$LIBSMI_VERSION.tar.gz || exit 1
470 tar xf libsmi-$LIBSMI_VERSION.tar.gz || exit 1
471 cd libsmi-$LIBSMI_VERSION
472 ./configure || exit 1
474 $DO_MAKE_INSTALL || exit 1
478 if [ ! -z $LIBGPG_ERROR_VERSION ]
480 echo "Downloading, building, and installing libgpg-error:"
481 curl -L -O ftp://ftp.gnupg.org/gcrypt/libgpg-error/libgpg-error-$LIBGPG_ERROR_VERSION.tar.bz2 || exit 1
482 bzcat libgpg-error-$LIBGPG_ERROR_VERSION.tar.bz2 | tar xf - || exit 1
483 cd libgpg-error-$LIBGPG_ERROR_VERSION
484 ./configure || exit 1
486 $DO_MAKE_INSTALL || exit 1
490 if [ ! -z $LIBGCRYPT_VERSION ]
493 # libgpg-error is required for libgcrypt.
495 if [ -z $LIBGPG_ERROR_VERSION ]
497 echo "libgcrypt requires libgpg-error, but you didn't install libgpg-error." 1>&2
501 echo "Downloading, building, and installing libgcrypt:"
502 curl -L -O ftp://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-$LIBGCRYPT_VERSION.tar.gz || exit 1
503 tar xf libgcrypt-$LIBGCRYPT_VERSION.tar.gz || exit 1
504 cd libgcrypt-$LIBGCRYPT_VERSION
506 # The assembler language code is not compatible with the OS X
507 # x86 assembler (or is it an x86-64 vs. x86-32 issue?).
509 ./configure --disable-asm || exit 1
511 $DO_MAKE_INSTALL || exit 1
515 if [ ! -z $GNUTLS_VERSION ]
518 # GnuTLS requires libgcrypt (or nettle, in newer versions).
520 if [ -z $LIBGCRYPT_VERSION ]
522 echo "GnuTLS requires libgcrypt, but you didn't install libgcrypt" 1>&2
526 echo "Downloading, building, and installing GnuTLS:"
527 curl -L -O http://ftp.gnu.org/gnu/gnutls/gnutls-$GNUTLS_VERSION.tar.bz2 || exit 1
528 bzcat gnutls-$GNUTLS_VERSION.tar.bz2 | tar xf - || exit 1
529 cd gnutls-$GNUTLS_VERSION
531 # Use libgcrypt, not nettle.
532 # XXX - is there some reason to prefer nettle? Or does
533 # Wireshark directly use libgcrypt routines?
535 ./configure --with-libgcrypt --without-p11-kit || exit 1
538 # The pkgconfig file for GnuTLS says "requires zlib", but OS X,
539 # while it supplies zlib, doesn't supply a pkgconfig file for
542 # Patch the GnuTLS pkgconfig file not to require zlib.
543 # (If the capabilities of GnuTLS that Wireshark uses don't
544 # depend on building GnuTLS with zlib, an alternative would be
545 # to configure it not to use zlib.)
547 patch -p0 lib/gnutls.pc.in <../../macosx-support-lib-patches/gnutls-pkgconfig.patch || exit 1
548 $DO_MAKE_INSTALL || exit 1
552 if [ ! -z $LUA_VERSION ]
554 echo "Downloading, building, and installing Lua:"
555 curl -L -O http://www.lua.org/ftp/lua-$LUA_VERSION.tar.gz || exit 1
556 tar xf lua-$LUA_VERSION.tar.gz || exit 1
558 make -j 3 macosx || exit 1
559 $DO_MAKE_INSTALL || exit 1
563 if [ ! -z $PORTAUDIO_VERSION ]
565 echo "Downloading, building, and installing PortAudio:"
566 curl -L -O http://www.portaudio.com/archives/$PORTAUDIO_VERSION.tgz || exit 1
567 tar xf $PORTAUDIO_VERSION.tgz || exit 1
570 # Un-comment an include that's required on Lion.
572 patch -p0 include/pa_mac_core.h <../../macosx-support-lib-patches/portaudio-pa_mac_core.h.patch
574 # Disable fat builds - the configure script doesn't work right
575 # with Xcode 4 if you leave them enabled, and we don't build
576 # any other libraries fat (GLib, for example, would be very
577 # hard to build fat), so there's no advantage to having PortAudio
580 # Set the minimum OS X version to 10.4, to suppress some
581 # deprecation warnings.
583 CFLAGS="-mmacosx-version-min=10.4" ./configure --disable-mac-universal || exit 1
585 $DO_MAKE_INSTALL || exit 1
589 if [ ! -z $GEOIP_VERSION ]
591 echo "Downloading, building, and installing GeoIP API:"
592 curl -L -O http://geolite.maxmind.com/download/geoip/api/c/GeoIP-$GEOIP_VERSION.tar.gz || exit 1
593 tar xf GeoIP-$GEOIP_VERSION.tar.gz || exit 1
594 cd GeoIP-$GEOIP_VERSION
595 ./configure || exit 1
597 # Grr. Their man pages "helpfully" have an ISO 8859-1
598 # copyright symbol in the copyright notice, but OS X's
599 # default character encoding is UTF-8. sed on Mountain
600 # Lion barfs at the "illegal character sequence" represented
601 # by an ISO 8859-1 copyright symbol, as it's not a valid
604 # iconv the relevant man pages into UTF-8.
606 for i in geoipupdate.1.in geoiplookup6.1.in geoiplookup.1.in
608 iconv -f iso8859-1 -t utf-8 man/"$i" >man/"$i".tmp &&
609 mv man/"$i".tmp man/"$i"
612 $DO_MAKE_INSTALL || exit 1
618 echo "You are now prepared to build Wireshark. To do so do:"
619 echo "export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/X11/lib/pkgconfig"
621 if [ -n "$CMAKE" ]; then
622 echo "mkdir build; cd build"
629 echo "mkdir build; cd build"
637 echo "Make sure you are allowed capture access to the network devices"
638 echo "See: http://wiki.wireshark.org/CaptureSetup/CapturePrivileges"