diff --git a/configure b/configure
index d7b0d7553b24dc0c81632fd0d799a949763af876..8c565ab87b047b463eda30ef83a72aa39c3559c3 100755
--- a/configure
+++ b/configure
@@ -2004,6 +2004,11 @@ fi
   test -n "$DTRACE" && break
 done
 
+if test -z "$DTRACE"; then
+  { { echo "$as_me:$LINENO: error: dtrace not found" >&5
+echo "$as_me: error: dtrace not found" >&2;}
+   { (exit 1); exit 1; }; }
+fi
 
       ;;
     no)
diff --git a/configure.in b/configure.in
index 7a1598832ebf902d6a2cf8a0fb716d46e8a245e9..4350a84c0fd9d25b3357ad47ce88af58b7eac0b0 100644
--- a/configure.in
+++ b/configure.in
@@ -1,5 +1,5 @@
 dnl Process this file with autoconf to produce a configure script.
-dnl $PostgreSQL: pgsql/configure.in,v 1.471 2006/08/04 15:16:14 tgl Exp $
+dnl $PostgreSQL: pgsql/configure.in,v 1.472 2006/08/17 17:25:43 petere Exp $
 dnl
 dnl Developers, please strive to achieve this order:
 dnl
@@ -213,6 +213,9 @@ PGAC_ARG_BOOL(enable, dtrace, no,
 [AC_DEFINE([ENABLE_DTRACE], 1, 
            [Define to 1 to enable DTrace support. (--enable-dtrace)])
 AC_CHECK_PROGS(DTRACE, dtrace)
+if test -z "$DTRACE"; then
+  AC_MSG_ERROR([dtrace not found])
+fi
 AC_SUBST(DTRACEFLAGS)])
 AC_SUBST(enable_dtrace)
 
diff --git a/doc/src/sgml/installation.sgml b/doc/src/sgml/installation.sgml
index e7ed9b4d5ca10ae28ed93b4b9967f8c97247b9af..0769901f24855f869875f892ce52a67d00eb7e4a 100644
--- a/doc/src/sgml/installation.sgml
+++ b/doc/src/sgml/installation.sgml
@@ -1,4 +1,4 @@
-<!-- $PostgreSQL: pgsql/doc/src/sgml/installation.sgml,v 1.259 2006/07/24 16:32:44 petere Exp $ -->
+<!-- $PostgreSQL: pgsql/doc/src/sgml/installation.sgml,v 1.260 2006/08/17 17:25:43 petere Exp $ -->
 
 <chapter id="installation">
  <title><![%standalone-include[<productname>PostgreSQL</>]]>
@@ -1011,10 +1011,24 @@ su - postgres
        <term><option>--enable-dtrace</option></term>
        <listitem>
         <para>
+         <indexterm>
+          <primary>DTrace</primary>
+         </indexterm>
          Compiles with support for the dynamic tracing tool DTrace.
          Operating system support for DTrace is currently only
          available in Solaris.
         </para>
+
+        <para>
+         To point to the <command>dtrace</command> program, the
+         environment variable <envar>DTRACE</envar> can be set.  This
+         will often be necessary because <command>dtrace</command> is
+         typically installed under <filename>/usr/sbin</filename>,
+         which might not be in the path.  Additional command-line
+         options for the <command>dtrace</command> program can be
+         specified in the environment variable
+         <envar>DTRACEFLAGS</envar>.
+        </para>
        </listitem>
       </varlistentry>
 
@@ -1113,6 +1127,25 @@ su - postgres
        </listitem>
       </varlistentry>
 
+      <varlistentry>
+       <term><option>DTRACE=<replaceable>/path/to/dtrace</></option></term>
+       <listitem>
+        <para>
+         Specifies the location of the <command>dtrace</command> program.
+        </para>
+       </listitem>
+      </varlistentry>
+
+      <varlistentry>
+       <term><option>DTRACEFLAGS=<replaceable>FLAGS</></option></term>
+       <listitem>
+        <para>
+         <replaceable>FLAGS</> is the a list of flags to pass to the
+         <command>dtrace</command> program.
+        </para>
+       </listitem>
+      </varlistentry>
+
       <varlistentry>
        <term><option>JADE</option></term>
        <listitem>