diff options
Diffstat (limited to 'macosx-setup.sh')
-rwxr-xr-x | macosx-setup.sh | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/macosx-setup.sh b/macosx-setup.sh index 5b6c63454a..07ce89d680 100755 --- a/macosx-setup.sh +++ b/macosx-setup.sh @@ -111,6 +111,8 @@ PORTAUDIO_VERSION=pa_stable_v19_20111121 # GEOIP_VERSION=1.4.8 +CARES_VERSION=1.10.0 + DARWIN_MAJOR_VERSION=`uname -r | sed 's/\([0-9]*\).*/\1/'` # @@ -137,6 +139,17 @@ uninstall() { # 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:" @@ -1274,6 +1287,19 @@ then 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:" |