aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-12-16 11:59:57 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-12-16 11:59:57 +0000
commit3ffa6b549038131d309bb78754e602da08a8c348 (patch)
tree38370158e7f48f6305d206db8ed85642ca89ea82
parent606ac6a48bd687a40fa63e4c8deb7467af34523b (diff)
downloadruby-3ffa6b549038131d309bb78754e602da08a8c348.tar.gz
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
-rw-r--r--configure.in70
1 files changed, 35 insertions, 35 deletions
diff --git a/configure.in b/configure.in
index 3e41be3b6d..ee8561d0d9 100644
--- a/configure.in
+++ b/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=$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)'
DTRACE_REBUILD=
-if test "${enable_dtrace}" = "yes"; then
- if test -z "$DTRACE"; then
- AC_MSG_ERROR([dtrace(1) is missing])
- elif test "$cross_compiling" = yes; then
- AC_MSG_ERROR([--enable-dtrace, however, cross compiling])
- else
- RUBY_DTRACE_AVAILABLE()
- enable_dtrace=$rb_cv_dtrace_available
- if test "${enable_dtrace}" = "no"; then
- AC_MSG_ERROR([--enable-dtrace, however, USDT is not available])
- fi
- RUBY_DTRACE_POSTPROCESS()
- if test "$rb_cv_prog_dtrace_g" != 'no'; then
- DTRACE_OBJ='probes.$(OBJEXT)'
- fi
- if test "$rb_cv_prog_dtrace_g" = 'rebuild'; then
- DTRACE_REBUILD=yes
- LIBRUBY_A_OBJS='$(DTRACE_GLOMMED_OBJ)'
- fi
- AS_CASE("${target_os}", [freebsd*], [
- # FreeBSD's dtrace requires libelf
- LIBS="-lelf $LIBS"
- ])
- fi
+AS_CASE(["${enable_dtrace}"],
+[yes|auto], [
+ RUBY_DTRACE_AVAILABLE()
+], [
+ rb_cv_dtrace_available=no
+])
+AS_IF([test "${enable_dtrace}" = yes], [dnl
+ AS_IF([test -z "$DTRACE"], [dnl
+ AC_MSG_ERROR([dtrace(1) is missing])
+ ], [test "$cross_compiling" = yes], [dnl
+ AC_MSG_ERROR([--enable-dtrace, however, cross compiling])
+ ], [test "${rb_cv_dtrace_available}" = "no"], [dnl
+ AC_MSG_ERROR([--enable-dtrace, however, USDT is not available])
+ ])
+])
+AS_CASE([$rb_cv_dtrace_available],
+[yes*], [dnl
+ RUBY_DTRACE_POSTPROCESS()
+ AS_CASE(["$rb_cv_prog_dtrace_g"],
+ [no], [],
+ [rebuild], [dnl
+ DTRACE_REBUILD=yes
+ LIBRUBY_A_OBJS='$(DTRACE_GLOMMED_OBJ)'
+ ],
+ [dnl
+ DTRACE_OBJ='probes.$(OBJEXT)'
+ ]
+ )
+ AS_CASE("${target_os}", [freebsd*], [dnl
+ # FreeBSD's dtrace requires libelf
+ LIBS="-lelf $LIBS"
+ ])
DTRACE_EXT=d
-else
+], [dnl
+ enable_dtrace=no
DTRACE_EXT=dmyh
-fi
+])
AC_SUBST(DTRACE_EXT)
AC_SUBST(DTRACE_OBJ)
AC_SUBST(DTRACE_REBUILD)