All pastes #2107187 Raw Edit

postgres check for dtrace

public text v1 · immutable
#2107187 ·published 2012-01-28 23:00 UTC
rendered paste body
fix it:

Index: support/build.sh
===================================================================
--- support/build.sh	(revision 8600)
+++ support/build.sh	(working copy)
@@ -625,13 +625,17 @@
       "http://memcached.googlecode.com/files/${mc}.tar.gz";
   fi;
 
+  # See if dtrace is available. If so, build postgres with dtrace support
+  ENABLE_DTRACE=''
+  (dtrace -V >/dev/null)  >/dev/null 2>&1 && 
+               ENABLE_DTRACE="--enable-dtrace"
   if ! type postgres > /dev/null 2>&1; then
     local pgv="9.0.3";
     local pg="postgresql-${pgv}";
     c_dependency -m "56386ded2d5dcd8a4ceef0da81c3d22c" \
       "PostgreSQL" "${pg}" \
       "ftp://ftp5.us.postgresql.org/pub/PostgreSQL/source/v${pgv}/${pg}.tar.gz" \
-      --with-python;
+      --with-python ${ENABLE_DTRACE};
     :;
   fi;