aboutsummaryrefslogtreecommitdiffstats
path: root/erts
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2014-02-05 11:39:45 +0100
committerLukas Larsson <[email protected]>2014-02-05 11:49:25 +0100
commitbf011d8116e0102080db8b2586acb8ecb60152d6 (patch)
treeb66ecc2bffc0e4bce5f0e3776d2df9652606c73c /erts
parentfdcdaca338849d7f63d4300e489318f6ee275d82 (diff)
downloadotp-bf011d8116e0102080db8b2586acb8ecb60152d6.tar.gz
otp-bf011d8116e0102080db8b2586acb8ecb60152d6.tar.bz2
otp-bf011d8116e0102080db8b2586acb8ecb60152d6.zip
erts: Rewrite dtrace configure test
The previous version printed error messages from the dtrace command to stderr. This output is now printed to config.log instead.
Diffstat (limited to 'erts')
-rw-r--r--erts/configure.in30
1 files changed, 14 insertions, 16 deletions
diff --git a/erts/configure.in b/erts/configure.in
index 8d245252b5..c20bb032f1 100644
--- a/erts/configure.in
+++ b/erts/configure.in
@@ -3848,28 +3848,26 @@ esac
if test "$enable_dtrace_test" = "yes" ; then
if test "$DTRACE" = "dtrace" ; then
AC_CHECK_HEADERS(sys/sdt.h)
+ AC_MSG_CHECKING([for 1-stage DTrace precompilation])
# The OS X version of dtrace prints a spurious line here.
if ! dtrace -h $DTRACE_CPP -Iemulator/beam -o ./foo-dtrace.h -s emulator/beam/erlang_dtrace.d; then
AC_MSG_ERROR([Could not precompile erlang_dtrace.d: dtrace -h failed])
fi
+ AC_MSG_RESULT([yes])
- $RM -f dtest.{o,c}
- cat > dtest.c <<_DTEST
- #include "foo-dtrace.h"
- int main(void) { ERLANG_DIST_PORT_BUSY_ENABLED(); return 0; }
-_DTEST
- $CC $CFLAGS -c -o dtest.o dtest.c
-
- $RM -f $DTRACE_2STEP_TEST
- if dtrace -G $DTRACE_CPP $DTRACE_BITS_FLAG -Iemulator/beam -o $DTRACE_2STEP_TEST -s emulator/beam/erlang_dtrace.d dtest.o && \
- test -f $DTRACE_2STEP_TEST ; then
- rm $DTRACE_2STEP_TEST
+ AC_MSG_CHECKING([for 2-stage DTrace precompilation])
+ AC_TRY_COMPILE([ #include "foo-dtrace.h" ],
+ [ERLANG_DIST_PORT_BUSY_ENABLED();],
+ [$RM -f $DTRACE_2STEP_TEST
+ dtrace -G $DTRACE_CPP $DTRACE_BITS_FLAG -Iemulator/beam -o $DTRACE_2STEP_TEST -s emulator/beam/erlang_dtrace.d conftest.$OBJEXT 2>&AS_MESSAGE_LOG_FD
+ if test -f $DTRACE_2STEP_TEST; then
+ rm $DTRACE_2STEP_TEST
DTRACE_ENABLED_2STEP=yes
- AC_MSG_NOTICE([dtrace precompilation for 2-stage DTrace successful])
- else
- AC_MSG_NOTICE([dtrace precompilation for 1-stage DTrace successful])
- fi
- $RM -f dtest.{o,c} foo-dtrace.h
+ fi],
+ [])
+ AS_IF([test "x$DTRACE_ENABLED_2STEP" = "xyes"],
+ [AC_MSG_RESULT([yes])],
+ [AC_MSG_RESULT([no])])
DTRACE_ENABLED=yes
case $OPSYS in