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"
520 # You need Xcode installed to get the compilers.
522 if [ ! -x /usr/bin/xcodebuild ]; then
523 echo "Please install Xcode first (should be available on DVD or from http://developer.apple.com/xcode/index.php)."
528 # You also need the X11 SDK; with at least some versions of OS X and
529 # Xcode, that is, I think, an optional install. (Or it might be
530 # installed with X11, but I think *that* is an optional install on
531 # at least some versions of OS X.)
533 if [ ! -d /usr/X11/include ]; then
534 echo "Please install X11 and the X11 SDK first."
538 export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/X11/lib/pkgconfig
541 # Do all the downloads and untarring in a subdirectory, so all that
542 # stuff can be removed once we've installed the support libraries.
544 if [ ! -d macosx-support-libs ]
546 mkdir macosx-support-libs || exit 1
548 cd macosx-support-libs
550 # Start with xz: It is the sole download format of glib later than 2.31.2
552 if [ "$XZ_VERSION" -a ! -f xz-$XZ_VERSION-done ] ; then
553 echo "Downloading, building, and installing xz:"
554 [ -f xz-$XZ_VERSION.tar.bz2 ] || curl -O http://tukaani.org/xz/xz-$XZ_VERSION.tar.bz2 || exit 1
555 bzcat xz-$XZ_VERSION.tar.bz2 | tar xf - || exit 1
557 CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=0" ./configure || exit 1
558 make $MAKE_BUILD_OPTS || exit 1
559 $DO_MAKE_INSTALL || exit 1
561 touch xz-$XZ_VERSION-done
564 if [ "$AUTOCONF_VERSION" -a ! -f autoconf-$AUTOCONF_VERSION-done ] ; then
565 echo "Downloading, building and installing GNU autoconf..."
566 [ -f autoconf-$AUTOCONF_VERSION.tar.xz ] || curl -O ftp://ftp.gnu.org/gnu/autoconf/autoconf-$AUTOCONF_VERSION.tar.xz || exit 1
567 xzcat autoconf-$AUTOCONF_VERSION.tar.xz | tar xf - || exit 1
568 cd autoconf-$AUTOCONF_VERSION
569 ./configure || exit 1
570 make $MAKE_BUILD_OPTS || exit 1
571 $DO_MAKE_INSTALL || exit 1
573 touch autoconf-$AUTOCONF_VERSION-done
576 if [ "$AUTOMAKE_VERSION" -a ! -f automake-$AUTOMAKE_VERSION-done ] ; then
577 echo "Downloading, building and installing GNU automake..."
578 [ -f automake-$AUTOMAKE_VERSION.tar.xz ] || curl -O ftp://ftp.gnu.org/gnu/automake/automake-$AUTOMAKE_VERSION.tar.xz || exit 1
579 xzcat automake-$AUTOMAKE_VERSION.tar.xz | tar xf - || exit 1
580 cd automake-$AUTOMAKE_VERSION
581 ./configure || exit 1
582 make $MAKE_BUILD_OPTS || exit 1
583 $DO_MAKE_INSTALL || exit 1
585 touch automake-$AUTOMAKE_VERSION-done
588 if [ "$LIBTOOL_VERSION" -a ! -f libtool-$LIBTOOL_VERSION-done ] ; then
589 echo "Downloading, building and installing GNU libtool..."
590 [ -f libtool-$LIBTOOL_VERSION.tar.xz ] || curl -O ftp://ftp.gnu.org/gnu/libtool/libtool-$LIBTOOL_VERSION.tar.xz || exit 1
591 xzcat libtool-$LIBTOOL_VERSION.tar.xz | tar xf - || exit 1
592 cd libtool-$LIBTOOL_VERSION
593 ./configure || exit 1
594 make $MAKE_BUILD_OPTS || exit 1
595 $DO_MAKE_INSTALL || exit 1
596 mv /usr/local/bin/libtool /usr/local/bin/glibtool
597 mv /usr/local/bin/libtoolize /usr/local/bin/glibtoolize
599 touch libtool-$LIBTOOL_VERSION-done
602 if [ -n "$CMAKE" -a ! -f cmake-$CMAKE_VERSION-done ]; then
603 echo "Downloading, building, and installing CMAKE:"
604 cmake_dir=`expr $CMAKE_VERSION : '\([0-9][0-9]*\.[0-9][0-9]*\).*'`
605 [ -f cmake-$CMAKE_VERSION.tar.gz ] || curl -O http://www.cmake.org/files/v$cmake_dir/cmake-$CMAKE_VERSION.tar.gz || exit 1
606 gzcat cmake-$CMAKE_VERSION.tar.gz | tar xf - || exit 1
607 cd cmake-$CMAKE_VERSION
608 ./bootstrap || exit 1
609 make $MAKE_BUILD_OPTS || exit 1
610 $DO_MAKE_INSTALL || exit 1
612 touch cmake-$CMAKE_VERSION-done
616 # Start with GNU gettext; GLib requires it, and OS X doesn't have it
617 # or a BSD-licensed replacement.
619 # At least on Lion with Xcode 4, _FORTIFY_SOURCE gets defined as 2
620 # by default, which causes, for example, stpncpy to be defined as
621 # a hairy macro that collides with the GNU gettext configure script's
622 # attempts to workaround AIX's lack of a declaration for stpncpy,
623 # with the result being a huge train wreck. Define _FORTIFY_SOURCE
624 # as 0 in an attempt to keep the trains on separate tracks.
626 if [ ! -f gettext-$GETTEXT_VERSION-done ] ; then
627 echo "Downloading, building, and installing GNU gettext:"
628 [ -f gettext-$GETTEXT_VERSION.tar.gz ] || curl -O http://ftp.gnu.org/pub/gnu/gettext/gettext-$GETTEXT_VERSION.tar.gz || exit 1
629 gzcat gettext-$GETTEXT_VERSION.tar.gz | tar xf - || exit 1
630 cd gettext-$GETTEXT_VERSION
631 CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=0 $VERSION_MIN_FLAGS $SDKFLAGS" LDFLAGS="$LDFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" ./configure || exit 1
632 make $MAKE_BUILD_OPTS || exit 1
633 $DO_MAKE_INSTALL || exit 1
635 touch gettext-$GETTEXT_VERSION-done
638 if [ ! -f glib-$GLIB_VERSION-done ] ; then
639 echo "Downloading, building, and installing GLib:"
640 glib_dir=`expr $GLIB_VERSION : '\([0-9][0-9]*\.[0-9][0-9]*\).*'`
641 [ -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
642 xzcat glib-$GLIB_VERSION.tar.xz | tar xf - || exit 1
643 cd glib-$GLIB_VERSION
645 # OS X ships with libffi, but doesn't provide its pkg-config file;
646 # explicitly specify LIBFFI_CFLAGS and LIBFFI_LIBS, so the configure
647 # script doesn't try to use pkg-config to get the appropriate
648 # C flags and loader flags.
650 # And, what's worse, at least with the version of Xcode that comes
651 # with Leopard, /usr/include/ffi/fficonfig.h doesn't define MACOSX,
652 # which causes the build of GLib to fail. If we don't find
653 # "#define.*MACOSX" in /usr/include/ffi/fficonfig.h, explictly
656 # While we're at it, suppress -Wformat-nonliteral to avoid a case
657 # where clang's stricter rules on when not to complain about
658 # non-literal format arguments cause it to complain about code
659 # that's safe but it wasn't told that. See my comment #25 in
662 # https://bugzilla.gnome.org/show_bug.cgi?id=691608#c25
664 # First, determine where the system include files are. (It's not
665 # necessarily /usr/include.) There's a bit of a greasy hack here;
666 # pre-5.x versions of the developer tools don't support the
667 # --show-sdk-path option, and will produce no output, so includedir
668 # will be set to /usr/include (in those older versions of the
669 # developer tools, there is a /usr/include directory).
671 includedir=`xcrun --show-sdk-path 2>/dev/null`/usr/include
672 if grep -qs '#define.*MACOSX' $includedir/ffi/fficonfig.h
674 # It's defined, nothing to do
675 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
677 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
679 make $MAKE_BUILD_OPTS || exit 1
680 # Apply patch: we depend on libffi, but pkg-config doesn't get told.
681 patch -p0 <../../macosx-support-lib-patches/glib-pkgconfig.patch || exit 1
682 $DO_MAKE_INSTALL || exit 1
684 touch glib-$GLIB_VERSION-done
687 if [ ! -f pkg-config-$PKG_CONFIG_VERSION-done ] ; then
688 echo "Downloading, building, and installing pkg-config:"
689 [ -f pkg-config-$PKG_CONFIG_VERSION.tar.gz ] || curl -O http://pkgconfig.freedesktop.org/releases/pkg-config-$PKG_CONFIG_VERSION.tar.gz || exit 1
690 gzcat pkg-config-$PKG_CONFIG_VERSION.tar.gz | tar xf - || exit 1
691 cd pkg-config-$PKG_CONFIG_VERSION
692 # Avoid another pkgconfig call, because we don't have pkg-config
694 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
695 make $MAKE_BUILD_OPTS || exit 1
696 $DO_MAKE_INSTALL || exit 1
698 touch pkg-config-$PKG_CONFIG_VERSION-done
702 # Now we have reached a point where we can build everything but
703 # the GUI (Wireshark).
705 # Cairo is part of Mac OS X 10.6 and 10.7.
706 # The *headers* are supplied by 10.5, but the *libraries* aren't, so
707 # we have to build it on 10.5.
708 # GTK+ 3 requires a newer Cairo build than the one that comes with
709 # 10.6, so we build Cairo if we are using GTK+ 3.
710 # In 10.6 and 10.7, it's an X11 library; if we build with "native" GTK+
711 # rather than X11 GTK+, we might have to build and install Cairo.
712 # The major version number of Darwin in 10.5 is 9.
714 if [[ -n "$GTK3" || $DARWIN_MAJOR_VERSION = "9" ]]; then
716 # Requirements for Cairo first
718 # The libpng that comes with the X11 for leopard has a bogus
719 # pkg-config file that lies about where the header files are,
720 # which causes other packages not to be able to find its
723 if [ ! -f libpng-$PNG_VERSION-done ] ; then
724 echo "Downloading, building, and installing libpng:"
725 [ -f libpng-$PNG_VERSION.tar.xz ] || curl -O ftp://ftp.simplesystems.org/pub/libpng/png/src/libpng-$PNG_VERSION.tar.xz
726 xzcat libpng-$PNG_VERSION.tar.xz | tar xf - || exit 1
727 cd libpng-$PNG_VERSION
728 CFLAGS="$CFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" LDFLAGS="$LDFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" ./configure || exit 1
729 make $MAKE_BUILD_OPTS || exit 1
730 $DO_MAKE_INSTALL || exit 1
732 touch libpng-$PNG_VERSION-done
736 # The libpixman that comes with the X11 for Leopard is too old
737 # to support Cairo's image surface backend feature (which requires
738 # pixman-1 >= 0.22.0).
740 if [ ! -f pixman-$PIXMAN_VERSION-done ] ; then
741 echo "Downloading, building, and installing pixman:"
742 [ -f pixman-$PIXMAN_VERSION.tar.gz ] || curl -O http://www.cairographics.org/releases/pixman-$PIXMAN_VERSION.tar.gz
743 gzcat pixman-$PIXMAN_VERSION.tar.gz | tar xf - || exit 1
744 cd pixman-$PIXMAN_VERSION
745 CFLAGS="$CFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" LDFLAGS="$LDFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" ./configure || exit 1
746 make $MAKE_BUILD_OPTS || exit 1
747 $DO_MAKE_INSTALL || exit 1
749 touch pixman-$PIXMAN_VERSION-done
753 # And now Cairo itself.
755 if [ ! -f cairo-$CAIRO_VERSION-done ] ; then
756 echo "Downloading, building, and installing Cairo:"
757 CAIRO_MAJOR_VERSION="`expr $CAIRO_VERSION : '\([0-9][0-9]*\).*'`"
758 CAIRO_MINOR_VERSION="`expr $CAIRO_VERSION : '[0-9][0-9]*\.\([0-9][0-9]*\).*'`"
759 CAIRO_DOTDOT_VERSION="`expr $CAIRO_VERSION : '[0-9][0-9]*\.[0-9][0-9]*\.\([0-9][0-9]*\).*'`"
760 if [[ $CAIRO_MAJOR_VERSION -gt 1 ||
761 $CAIRO_MINOR_VERSION -gt 12 ||
762 ($CAIRO_MINOR_VERSION -eq 12 && $CAIRO_DOTDOT_VERSION -ge 2) ]]
765 # Starting with Cairo 1.12.2, the tarballs are compressed with
766 # xz rather than gzip.
768 [ -f cairo-$CAIRO_VERSION.tar.xz ] || curl -O http://cairographics.org/releases/cairo-$CAIRO_VERSION.tar.xz || exit 1
769 xzcat cairo-$CAIRO_VERSION.tar.xz | tar xf - || exit 1
771 [ -f cairo-$CAIRO_VERSION.tar.gz ] || curl -O http://cairographics.org/releases/cairo-$CAIRO_VERSION.tar.gz || exit 1
772 gzcat cairo-$CAIRO_VERSION.tar.gz | tar xf - || exit 1
774 cd cairo-$CAIRO_VERSION
775 # CFLAGS="$CFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" LDFLAGS="$LDFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" ./configure --enable-quartz=no || exit 1
776 # Maybe follow http://cairographics.org/end_to_end_build_for_mac_os_x/
777 CFLAGS="$CFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" LDFLAGS="$LDFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" ./configure --enable-quartz=yes || exit 1
779 # We must avoid the version of libpng that comes with X11; the
780 # only way I've found to force that is to forcibly set INCLUDES
781 # when we do the build, so that this comes before CAIRO_CFLAGS,
782 # which has -I/usr/X11/include added to it before anything
783 # connected to libpng is.
785 INCLUDES="-I/usr/local/include/libpng15" make $MAKE_BUILD_OPTS || exit 1
786 $DO_MAKE_INSTALL || exit 1
788 touch cairo-$CAIRO_VERSION-done
792 if [ ! -f atk-$ATK_VERSION-done ] ; then
793 echo "Downloading, building, and installing ATK:"
794 atk_dir=`expr $ATK_VERSION : '\([0-9][0-9]*\.[0-9][0-9]*\).*'`
795 [ -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
796 xzcat atk-$ATK_VERSION.tar.xz | tar xf - || exit 1
798 CFLAGS="$CFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" LDFLAGS="$LDFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" ./configure || exit 1
799 make $MAKE_BUILD_OPTS || exit 1
800 $DO_MAKE_INSTALL || exit 1
802 touch atk-$ATK_VERSION-done
805 if [ ! -f pango-$PANGO_VERSION-done ] ; then
806 echo "Downloading, building, and installing Pango:"
807 pango_dir=`expr $PANGO_VERSION : '\([0-9][0-9]*\.[0-9][0-9]*\).*'`
808 PANGO_MAJOR_VERSION="`expr $PANGO_VERSION : '\([0-9][0-9]*\).*'`"
809 PANGO_MINOR_VERSION="`expr $PANGO_VERSION : '[0-9][0-9]*\.\([0-9][0-9]*\).*'`"
810 if [[ $PANGO_MAJOR_VERSION -gt 1 ||
811 $PANGO_MINOR_VERSION -ge 29 ]]
814 # Starting with Pango 1.29, the tarballs are compressed with
815 # xz rather than bzip2.
817 [ -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
818 xzcat pango-$PANGO_VERSION.tar.xz | tar xf - || exit 1
820 [ -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
821 gzcat pango-$PANGO_VERSION.tar.bz2 | tar xf - || exit 1
823 cd pango-$PANGO_VERSION
824 CFLAGS="$CFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" LDFLAGS="$LDFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" ./configure || exit 1
825 make $MAKE_BUILD_OPTS || exit 1
826 $DO_MAKE_INSTALL || exit 1
828 touch pango-$PANGO_VERSION-done
831 if [ ! -f gdk-pixbuf-$GDK_PIXBUF_VERSION-done ] ; then
832 echo "Downloading, building, and installing gdk-pixbuf:"
833 gdk_pixbuf_dir=`expr $GDK_PIXBUF_VERSION : '\([0-9][0-9]*\.[0-9][0-9]*\).*'`
834 [ -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
835 xzcat gdk-pixbuf-$GDK_PIXBUF_VERSION.tar.xz | tar xf - || exit 1
836 cd gdk-pixbuf-$GDK_PIXBUF_VERSION
837 CFLAGS="$CFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" LDFLAGS="$LDFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" ./configure --without-libtiff --without-libjpeg || exit 1
838 make $MAKE_BUILD_OPTS || exit 1
839 $DO_MAKE_INSTALL || exit 1
841 touch gdk-pixbuf-$GDK_PIXBUF_VERSION-done
844 if [ ! -f gtk+-$GTK_VERSION-done ] ; then
845 echo "Downloading, building, and installing GTK+:"
846 gtk_dir=`expr $GTK_VERSION : '\([0-9][0-9]*\.[0-9][0-9]*\).*'`
847 GTK_MAJOR_VERSION="`expr $GTK_VERSION : '\([0-9][0-9]*\).*'`"
848 GTK_MINOR_VERSION="`expr $GTK_VERSION : '[0-9][0-9]*\.\([0-9][0-9]*\).*'`"
849 GTK_DOTDOT_VERSION="`expr $GTK_VERSION : '[0-9][0-9]*\.[0-9][0-9]*\.\([0-9][0-9]*\).*'`"
850 if [[ $GTK_MAJOR_VERSION -gt 2 ||
851 $GTK_MINOR_VERSION -gt 24 ||
852 ($GTK_MINOR_VERSION -eq 24 && $GTK_DOTDOT_VERSION -ge 5) ]]
855 # Starting with GTK+ 2.24.5, the tarballs are compressed with
856 # xz rather than gzip, in addition to bzip2; use xz, as we've
857 # built and installed it, and as xz compresses better than
858 # bzip2 so the tarballs take less time to download.
860 [ -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
861 xzcat gtk+-$GTK_VERSION.tar.xz | tar xf - || exit 1
863 [ -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
864 gzcat gtk+-$GTK_VERSION.tar.bz2 | tar xf - || exit 1
867 if [ $DARWIN_MAJOR_VERSION -ge "12" ]
870 # GTK+ 2.24.10, at least, doesn't build on Mountain Lion with the
871 # CUPS printing backend - either the CUPS API changed incompatibly
872 # or the backend was depending on non-API implementation details.
874 # Configure it out, on Mountain Lion and later, for now.
875 # (12 is the Darwin major version number in Mountain Lion.)
877 CFLAGS="$CFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" LDFLAGS="$LDFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" ./configure --disable-cups || exit 1
879 CFLAGS="$CFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" LDFLAGS="$LDFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" ./configure || exit 1
881 make $MAKE_BUILD_OPTS || exit 1
882 $DO_MAKE_INSTALL || exit 1
884 touch gtk+-$GTK_VERSION-done
888 # Now we have reached a point where we can build everything including
889 # the GUI (Wireshark), but not with any optional features such as
890 # SNMP OID resolution, some forms of decryption, Lua scripting, playback
891 # of audio, or GeoIP mapping of IP addresses.
893 # We now conditionally download optional libraries to support them;
894 # the default is to download them all.
897 if [ "$LIBSMI_VERSION" -a ! -f libsmi-$LIBSMI_VERSION-done ] ; then
898 echo "Downloading, building, and installing libsmi:"
899 [ -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
900 gzcat libsmi-$LIBSMI_VERSION.tar.gz | tar xf - || exit 1
901 cd libsmi-$LIBSMI_VERSION
902 CFLAGS="$CFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" LDFLAGS="$LDFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" ./configure || exit 1
903 make $MAKE_BUILD_OPTS || exit 1
904 $DO_MAKE_INSTALL || exit 1
906 touch libsmi-$LIBSMI_VERSION-done
909 if [ "$LIBGPG_ERROR_VERSION" -a ! -f libgpg-error-$LIBGPG_ERROR_VERSION-done ] ; then
910 echo "Downloading, building, and installing libgpg-error:"
911 [ -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
912 bzcat libgpg-error-$LIBGPG_ERROR_VERSION.tar.bz2 | tar xf - || exit 1
913 cd libgpg-error-$LIBGPG_ERROR_VERSION
914 CFLAGS="$CFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" LDFLAGS="$LDFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" ./configure || exit 1
915 make $MAKE_BUILD_OPTS || exit 1
916 $DO_MAKE_INSTALL || exit 1
918 touch libgpg-error-$LIBGPG_ERROR_VERSION-done
921 if [ "$LIBGCRYPT_VERSION" -a ! -f libgcrypt-$LIBGCRYPT_VERSION-done ] ; then
923 # libgpg-error is required for libgcrypt.
925 if [ -z $LIBGPG_ERROR_VERSION ]
927 echo "libgcrypt requires libgpg-error, but you didn't install libgpg-error." 1>&2
931 echo "Downloading, building, and installing libgcrypt:"
932 [ -f libgcrypt-$LIBGCRYPT_VERSION.tar.gz ] || curl -L -O ftp://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-$LIBGCRYPT_VERSION.tar.gz || exit 1
933 gzcat libgcrypt-$LIBGCRYPT_VERSION.tar.gz | tar xf - || exit 1
934 cd libgcrypt-$LIBGCRYPT_VERSION
936 # The assembler language code is not compatible with the OS X
937 # x86 assembler (or is it an x86-64 vs. x86-32 issue?).
939 # libgcrypt expects gnu89, not c99/gnu99, semantics for
940 # "inline". See, for example:
942 # http://lists.freebsd.org/pipermail/freebsd-ports-bugs/2010-October/198809.html
944 CFLAGS="$CFLAGS -std=gnu89 $VERSION_MIN_FLAGS $SDKFLAGS" LDFLAGS="$LDFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" ./configure --disable-asm || exit 1
945 make $MAKE_BUILD_OPTS || exit 1
946 $DO_MAKE_INSTALL || exit 1
948 touch libgcrypt-$LIBGCRYPT_VERSION-done
951 if [ "$GNUTLS_VERSION" -a ! -f gnutls-$GNUTLS_VERSION-done ] ; then
953 # GnuTLS requires libgcrypt (or nettle, in newer versions).
955 if [ -z $LIBGCRYPT_VERSION ]
957 echo "GnuTLS requires libgcrypt, but you didn't install libgcrypt" 1>&2
961 echo "Downloading, building, and installing GnuTLS:"
962 [ -f gnutls-$GNUTLS_VERSION.tar.bz2 ] || curl -L -O http://ftp.gnu.org/gnu/gnutls/gnutls-$GNUTLS_VERSION.tar.bz2 || exit 1
963 bzcat gnutls-$GNUTLS_VERSION.tar.bz2 | tar xf - || exit 1
964 cd gnutls-$GNUTLS_VERSION
966 # Use libgcrypt, not nettle.
967 # XXX - is there some reason to prefer nettle? Or does
968 # Wireshark directly use libgcrypt routines?
970 CFLAGS="$CFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" LDFLAGS="$LDFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" ./configure --with-libgcrypt --without-p11-kit || exit 1
971 make $MAKE_BUILD_OPTS || exit 1
973 # The pkgconfig file for GnuTLS says "requires zlib", but OS X,
974 # while it supplies zlib, doesn't supply a pkgconfig file for
977 # Patch the GnuTLS pkgconfig file not to require zlib.
978 # (If the capabilities of GnuTLS that Wireshark uses don't
979 # depend on building GnuTLS with zlib, an alternative would be
980 # to configure it not to use zlib.)
982 patch -p0 lib/gnutls.pc.in <../../macosx-support-lib-patches/gnutls-pkgconfig.patch || exit 1
983 $DO_MAKE_INSTALL || exit 1
985 touch gnutls-$GNUTLS_VERSION-done
988 if [ "$LUA_VERSION" -a ! -f lua-$LUA_VERSION-done ] ; then
989 echo "Downloading, building, and installing Lua:"
990 [ -f lua-$LUA_VERSION.tar.gz ] || curl -L -O http://www.lua.org/ftp/lua-$LUA_VERSION.tar.gz || exit 1
991 gzcat lua-$LUA_VERSION.tar.gz | tar xf - || exit 1
993 make $MAKE_BUILD_OPTS macosx || exit 1
994 $DO_MAKE_INSTALL || exit 1
996 touch lua-$LUA_VERSION-done
999 if [ "$PORTAUDIO_VERSION" -a ! -f portaudio-done ] ; then
1000 echo "Downloading, building, and installing PortAudio:"
1001 [ -f $PORTAUDIO_VERSION.tgz ] || curl -L -O http://www.portaudio.com/archives/$PORTAUDIO_VERSION.tgz || exit 1
1002 gzcat $PORTAUDIO_VERSION.tgz | tar xf - || exit 1
1005 # Un-comment an include that's required on Lion.
1007 patch -p0 include/pa_mac_core.h <../../macosx-support-lib-patches/portaudio-pa_mac_core.h.patch
1009 # Fix a bug that showed up with clang (but is a bug with any
1012 patch -p0 src/hostapi/coreaudio/pa_mac_core.c <../../macosx-support-lib-patches/portaudio-pa_mac_core.c.patch
1014 # Disable fat builds - the configure script doesn't work right
1015 # with Xcode 4 if you leave them enabled, and we don't build
1016 # any other libraries fat (GLib, for example, would be very
1017 # hard to build fat), so there's no advantage to having PortAudio
1020 # Set the minimum OS X version to 10.4, to suppress some
1021 # deprecation warnings. (Good luck trying to make any of
1022 # this build on an OS+Xcode with a pre-10.4 SDK; we don't
1023 # worry about the user requesting that.)
1025 CFLAGS="$CFLAGS -mmacosx-version-min=10.4 $SDKFLAGS" LDFLAGS="$LDFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" ./configure --disable-mac-universal || exit 1
1026 make $MAKE_BUILD_OPTS || exit 1
1027 $DO_MAKE_INSTALL || exit 1
1029 touch portaudio-done
1032 if [ "$GEOIP_VERSION" -a ! -f geoip-$GEOIP_VERSION-done ]
1034 echo "Downloading, building, and installing GeoIP API:"
1035 [ -f GeoIP-$GEOIP_VERSION.tar.gz ] || curl -L -O http://geolite.maxmind.com/download/geoip/api/c/GeoIP-$GEOIP_VERSION.tar.gz || exit 1
1036 gzcat GeoIP-$GEOIP_VERSION.tar.gz | tar xf - || exit 1
1037 cd GeoIP-$GEOIP_VERSION
1038 CFLAGS="$CFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" LDFLAGS="$LDFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" ./configure || exit 1
1040 # Grr. Their man pages "helpfully" have an ISO 8859-1
1041 # copyright symbol in the copyright notice, but OS X's
1042 # default character encoding is UTF-8. sed on Mountain
1043 # Lion barfs at the "illegal character sequence" represented
1044 # by an ISO 8859-1 copyright symbol, as it's not a valid
1047 # iconv the relevant man pages into UTF-8.
1049 for i in geoipupdate.1.in geoiplookup6.1.in geoiplookup.1.in
1051 iconv -f iso8859-1 -t utf-8 man/"$i" >man/"$i".tmp &&
1052 mv man/"$i".tmp man/"$i"
1054 make $MAKE_BUILD_OPTS || exit 1
1055 $DO_MAKE_INSTALL || exit 1
1057 touch geoip-$GEOIP_VERSION-done
1062 echo "You are now prepared to build Wireshark. To do so do:"
1063 echo "export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/X11/lib/pkgconfig"
1065 if [ -n "$CMAKE" ]; then
1066 echo "mkdir build; cd build"
1073 echo "mkdir build; cd build"
1076 echo "make $MAKE_BUILD_OPTS"
1081 echo "Make sure you are allowed capture access to the network devices"
1082 echo "See: http://wiki.wireshark.org/CaptureSetup/CapturePrivileges"