#
GEOIP_VERSION=1.4.8
+CARES_VERSION=1.10.0
+
DARWIN_MAJOR_VERSION=`uname -r | sed 's/\([0-9]*\).*/\1/'`
#
# We also do a "make distclean", so that we don't have leftovers from
# old configurations.
#
+
+ installed_cares_version=`ls cares-*-done 2>/dev/null | sed 's/cares-\(.*\)-done/\1/'`
+ if [ ! -z "$installed_cares_version" ] ; then
+ echo "Uninstalling C-Ares API:"
+ cd cares-$installed_cares_version
+ $DO_MAKE_UNINSTALL || exit 1
+ make distclean || exit 1
+ cd ..
+ rm cares-$installed_cares_version-done
+ fi
+
installed_geoip_version=`ls geoip-*-done 2>/dev/null | sed 's/geoip-\(.*\)-done/\1/'`
if [ ! -z "$installed_geoip_version" ] ; then
echo "Uninstalling GeoIP API:"
touch geoip-$GEOIP_VERSION-done
fi
+if [ "$CARES_VERSION" -a ! -f geoip-$CARES_VERSION-done ]
+then
+ echo "Downloading, building, and installing C-Ares API:"
+ [ -f c-ares-$CARES_VERSION.tar.gz ] || curl -L -O http://c-ares.haxx.se/download/c-ares-$CARES_VERSION.tar.gz || exit 1
+ gzcat c-ares-$CARES_VERSION.tar.gz | tar xf - || exit 1
+ cd c-ares-$CARES_VERSION
+ CFLAGS="$CFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" LDFLAGS="$LDFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" ./configure || exit 1
+ make $MAKE_BUILD_OPTS || exit 1
+ $DO_MAKE_INSTALL || exit 1
+ cd ..
+ touch geoip-$CARES_VERSION-done
+fi
+
echo ""
echo "You are now prepared to build Wireshark. To do so do:"