THRIFT-3910 Do not invoke pip as part of build process

This closes #1073
diff --git a/configure.ac b/configure.ac
index fb22699..b79094c 100755
--- a/configure.ac
+++ b/configure.ac
@@ -280,20 +280,25 @@
 AM_PATH_PYTHON(2.6,, :)
 AX_THRIFT_LIB(python, [Python], yes)
 if test "$with_python" = "yes";  then
-  AC_PATH_PROG([PIP], [pip])
-  AC_PATH_PROG([TRIAL], [trial])
-  if test -n "$TRIAL" && test "x$PYTHON" != "x" && test "x$PYTHON" != "x:" ; then
+  if test -n "$PYTHON"; then
     have_python="yes"
   fi
+  AC_PATH_PROG([TRIAL], [trial])
+  if test -n "$TRIAL"; then
+    have_trial="yes"
+  fi
 fi
 AM_CONDITIONAL(WITH_PYTHON, [test "$have_python" = "yes"])
+AM_CONDITIONAL(WITH_TWISTED_TEST, [test "$have_trial" = "yes"])
 
 # Find "python3" executable.
 # It's distro specific and far from ideal but needed to cross test py2-3 at once.
-AC_PATH_PROG([PYTHON3], [python3])
-AC_PATH_PROG([PIP3], [pip3])
-if test "x$PYTHON3" != "x" && test "x$PYTHON3" != "x:" && test "x$PIP3" != "x" ; then
-  have_py3="yes"
+# TODO: find "python2" if it's 3.x
+if python --version 2>&1 | grep -q "Python 2"; then
+  AC_PATH_PROGS([PYTHON3], [python3 python3.5 python35 python3.4 python34])
+  if test -n "$PYTHON3"; then
+    have_py3="yes"
+  fi
 fi
 AM_CONDITIONAL(WITH_PY3, [test "$have_py3" = "yes"])
 
@@ -859,7 +864,12 @@
   echo
   echo "Python Library:"
   echo "   Using Python .............. : $PYTHON"
-  echo "   Using Trial ............... : $TRIAL"
+  if test "$have_py3" = "yes" ; then
+  echo "   Using Python3 ............. : $PYTHON3"
+  fi
+  if test "$have_trial" = "yes"; then
+  echo "   Using trial ............... : $TRIAL"
+  fi
 fi
 if test "$have_php" = "yes" ; then
   echo