mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
configure.in: repeated checks
* configure.in (enable_dtrace): reduce repeated RUBY_DTRACE_AVAILABLE checks. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57092 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
5d6292809f
commit
e341a6724e
1 changed files with 35 additions and 35 deletions
70
configure.in
70
configure.in
|
|
@ -3990,45 +3990,45 @@ AC_ARG_ENABLE(dtrace,
|
||||||
[enable DTrace for tracing inside ruby. enabled by default on systems having dtrace]),
|
[enable DTrace for tracing inside ruby. enabled by default on systems having dtrace]),
|
||||||
[enable_dtrace=$enableval], [enable_dtrace=auto])
|
[enable_dtrace=$enableval], [enable_dtrace=auto])
|
||||||
|
|
||||||
if test "${enable_dtrace}" = "auto"; then
|
|
||||||
if test x"$DTRACE" != x -a x"$cross_compiling" != xyes; then
|
|
||||||
RUBY_DTRACE_AVAILABLE()
|
|
||||||
enable_dtrace=$rb_cv_dtrace_available
|
|
||||||
else
|
|
||||||
enable_dtrace=no
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
LIBRUBY_A_OBJS='$(OBJS)'
|
LIBRUBY_A_OBJS='$(OBJS)'
|
||||||
DTRACE_REBUILD=
|
DTRACE_REBUILD=
|
||||||
if test "${enable_dtrace}" = "yes"; then
|
AS_CASE(["${enable_dtrace}"],
|
||||||
if test -z "$DTRACE"; then
|
[yes|auto], [
|
||||||
AC_MSG_ERROR([dtrace(1) is missing])
|
RUBY_DTRACE_AVAILABLE()
|
||||||
elif test "$cross_compiling" = yes; then
|
], [
|
||||||
AC_MSG_ERROR([--enable-dtrace, however, cross compiling])
|
rb_cv_dtrace_available=no
|
||||||
else
|
])
|
||||||
RUBY_DTRACE_AVAILABLE()
|
AS_IF([test "${enable_dtrace}" = yes], [dnl
|
||||||
enable_dtrace=$rb_cv_dtrace_available
|
AS_IF([test -z "$DTRACE"], [dnl
|
||||||
if test "${enable_dtrace}" = "no"; then
|
AC_MSG_ERROR([dtrace(1) is missing])
|
||||||
AC_MSG_ERROR([--enable-dtrace, however, USDT is not available])
|
], [test "$cross_compiling" = yes], [dnl
|
||||||
fi
|
AC_MSG_ERROR([--enable-dtrace, however, cross compiling])
|
||||||
RUBY_DTRACE_POSTPROCESS()
|
], [test "${rb_cv_dtrace_available}" = "no"], [dnl
|
||||||
if test "$rb_cv_prog_dtrace_g" != 'no'; then
|
AC_MSG_ERROR([--enable-dtrace, however, USDT is not available])
|
||||||
DTRACE_OBJ='probes.$(OBJEXT)'
|
])
|
||||||
fi
|
])
|
||||||
if test "$rb_cv_prog_dtrace_g" = 'rebuild'; then
|
AS_CASE([$rb_cv_dtrace_available],
|
||||||
DTRACE_REBUILD=yes
|
[yes*], [dnl
|
||||||
LIBRUBY_A_OBJS='$(DTRACE_GLOMMED_OBJ)'
|
RUBY_DTRACE_POSTPROCESS()
|
||||||
fi
|
AS_CASE(["$rb_cv_prog_dtrace_g"],
|
||||||
AS_CASE("${target_os}", [freebsd*], [
|
[no], [],
|
||||||
# FreeBSD's dtrace requires libelf
|
[rebuild], [dnl
|
||||||
LIBS="-lelf $LIBS"
|
DTRACE_REBUILD=yes
|
||||||
])
|
LIBRUBY_A_OBJS='$(DTRACE_GLOMMED_OBJ)'
|
||||||
fi
|
],
|
||||||
|
[dnl
|
||||||
|
DTRACE_OBJ='probes.$(OBJEXT)'
|
||||||
|
]
|
||||||
|
)
|
||||||
|
AS_CASE("${target_os}", [freebsd*], [dnl
|
||||||
|
# FreeBSD's dtrace requires libelf
|
||||||
|
LIBS="-lelf $LIBS"
|
||||||
|
])
|
||||||
DTRACE_EXT=d
|
DTRACE_EXT=d
|
||||||
else
|
], [dnl
|
||||||
|
enable_dtrace=no
|
||||||
DTRACE_EXT=dmyh
|
DTRACE_EXT=dmyh
|
||||||
fi
|
])
|
||||||
AC_SUBST(DTRACE_EXT)
|
AC_SUBST(DTRACE_EXT)
|
||||||
AC_SUBST(DTRACE_OBJ)
|
AC_SUBST(DTRACE_OBJ)
|
||||||
AC_SUBST(DTRACE_REBUILD)
|
AC_SUBST(DTRACE_REBUILD)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue