Add flag to disable installing unmaintained & deprecated pprof.

Everyone should be using golang pprof from github.com/google/pprof, but
distros still ship our perl version and not everyone is aware of
better pprof yet.

This is another step in completely dropping perl pprof. We still
default to installing it, but hopefully we'll be able to convince
distros to disable this soon.

We still install pprof under pprof-symbolize name because
stack traces symbolization depends on it, and because golang pprof
won't support this feature.

This is related to issue #1038.
diff --git a/.gitignore b/.gitignore
index 42328f2..1ce2460 100644
--- a/.gitignore
+++ b/.gitignore
@@ -89,6 +89,7 @@
 /page_heap_test.exe
 /pagemap_unittest
 /pagemap_unittest.exe
+/pprof-symbolize
 /profile_handler_unittest
 /profiledata_unittest
 /profiler1_unittest
diff --git a/Makefile.am b/Makefile.am
index 04ff5af..be1db83 100755
--- a/Makefile.am
+++ b/Makefile.am
@@ -392,7 +392,10 @@
 # If we are not compiling with stacktrace support, pprof is worthless
 if WITH_STACK_TRACE
 
-bin_SCRIPTS = src/pprof
+bin_SCRIPTS = pprof-symbolize
+
+pprof-symbolize : $(top_srcdir)/src/pprof
+	cp -p $(top_srcdir)/src/pprof $@
 
 ### Unittests
 
@@ -403,9 +406,13 @@
 # Let unittests find pprof if they need to run it
 TESTS_ENVIRONMENT += PPROF_PATH=$(top_srcdir)/src/pprof
 
-### Documentation
+if INSTALL_PPROF
+bin_SCRIPTS += src/pprof
 dist_man_MANS = docs/pprof.1
 dist_doc_DATA += docs/pprof_remote_servers.html
+endif INSTALL_PPROF
+
+### Documentation
 
 # On MSVC, we need our own versions of addr2line and nm to work with pprof.
 WINDOWS_PROJECTS += vsprojects/nm-pdb/nm-pdb.vcxproj
diff --git a/configure.ac b/configure.ac
index ed69dca..c1c33e6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -346,6 +346,16 @@
 AM_CONDITIONAL(HAVE_W_NO_UNUSED_RESULT,
 	       test "$perftools_cv_w_no_unused_result" = yes)
 
+AC_ARG_ENABLE([deprecated-pprof],
+              [AS_HELP_STRING([--disable-deprecated-pprof],
+                [do not install old deprecated and unmaintained bundled pprof
+(see github.com/google/pprof for supported version)])],
+              [enable_pprof="$enableval"],
+              [enable_pprof=yes])
+
+AM_CONDITIONAL(INSTALL_PPROF,
+               [test "x$enable_pprof" = xyes])
+
 AC_ARG_ENABLE([dynamic-sized-delete-support],
               [AS_HELP_STRING([--enable-dynamic-sized-delete-support],
                 [try to build run-time switch for sized delete operator])],
diff --git a/src/symbolize.cc b/src/symbolize.cc
index 4c71010..d28a10d 100755
--- a/src/symbolize.cc
+++ b/src/symbolize.cc
@@ -72,7 +72,7 @@
 // a more-permanent copy that won't ever get destroyed.
 static char* get_pprof_path() {
   static char* result = ([] () {
-      string pprof_string = EnvToString("PPROF_PATH", "pprof");
+      string pprof_string = EnvToString("PPROF_PATH", "pprof-symbolize");
       return strdup(pprof_string.c_str());
     })();