Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit bb764e9

Browse files
committed
Produce a clean failure in configure when dtrace is selected but cannot be
found. Besides stopping those early who have no dtrace installed whatsoever, this will also alert those who have dtrace in /usr/sbin, which might not be in the path, which would produce confusing failures much later in the build process. Add documentation about pointing configure to find dtrace.
1 parent 92c651f commit bb764e9

File tree

3 files changed

+43
-2
lines changed

3 files changed

+43
-2
lines changed

configure

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2004,6 +2004,11 @@ fi
20042004
test -n "$DTRACE" && break
20052005
done
20062006

2007+
if test -z "$DTRACE"; then
2008+
{ { echo "$as_me:$LINENO: error: dtrace not found" >&5
2009+
echo "$as_me: error: dtrace not found" >&2;}
2010+
{ (exit 1); exit 1; }; }
2011+
fi
20072012

20082013
;;
20092014
no)

configure.in

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
dnl Process this file with autoconf to produce a configure script.
2-
dnl $PostgreSQL: pgsql/configure.in,v 1.471 2006/08/04 15:16:14 tgl Exp $
2+
dnl $PostgreSQL: pgsql/configure.in,v 1.472 2006/08/17 17:25:43 petere Exp $
33
dnl
44
dnl Developers, please strive to achieve this order:
55
dnl
@@ -213,6 +213,9 @@ PGAC_ARG_BOOL(enable, dtrace, no,
213213
[AC_DEFINE([ENABLE_DTRACE], 1,
214214
[Define to 1 to enable DTrace support. (--enable-dtrace)])
215215
AC_CHECK_PROGS(DTRACE, dtrace)
216+
if test -z "$DTRACE"; then
217+
AC_MSG_ERROR([dtrace not found])
218+
fi
216219
AC_SUBST(DTRACEFLAGS)])
217220
AC_SUBST(enable_dtrace)
218221

doc/src/sgml/installation.sgml

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/installation.sgml,v 1.259 2006/07/24 16:32:44 petere Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/installation.sgml,v 1.260 2006/08/17 17:25:43 petere Exp $ -->
22

33
<chapter id="installation">
44
<title><![%standalone-include[<productname>PostgreSQL</>]]>
@@ -1011,10 +1011,24 @@ su - postgres
10111011
<term><option>--enable-dtrace</option></term>
10121012
<listitem>
10131013
<para>
1014+
<indexterm>
1015+
<primary>DTrace</primary>
1016+
</indexterm>
10141017
Compiles with support for the dynamic tracing tool DTrace.
10151018
Operating system support for DTrace is currently only
10161019
available in Solaris.
10171020
</para>
1021+
1022+
<para>
1023+
To point to the <command>dtrace</command> program, the
1024+
environment variable <envar>DTRACE</envar> can be set. This
1025+
will often be necessary because <command>dtrace</command> is
1026+
typically installed under <filename>/usr/sbin</filename>,
1027+
which might not be in the path. Additional command-line
1028+
options for the <command>dtrace</command> program can be
1029+
specified in the environment variable
1030+
<envar>DTRACEFLAGS</envar>.
1031+
</para>
10181032
</listitem>
10191033
</varlistentry>
10201034

@@ -1113,6 +1127,25 @@ su - postgres
11131127
</listitem>
11141128
</varlistentry>
11151129

1130+
<varlistentry>
1131+
<term><option>DTRACE=<replaceable>/path/to/dtrace</></option></term>
1132+
<listitem>
1133+
<para>
1134+
Specifies the location of the <command>dtrace</command> program.
1135+
</para>
1136+
</listitem>
1137+
</varlistentry>
1138+
1139+
<varlistentry>
1140+
<term><option>DTRACEFLAGS=<replaceable>FLAGS</></option></term>
1141+
<listitem>
1142+
<para>
1143+
<replaceable>FLAGS</> is the a list of flags to pass to the
1144+
<command>dtrace</command> program.
1145+
</para>
1146+
</listitem>
1147+
</varlistentry>
1148+
11161149
<varlistentry>
11171150
<term><option>JADE</option></term>
11181151
<listitem>

0 commit comments

Comments
 (0)