[前][次][番号順一覧][スレッド一覧]

ruby-changes:45030

From: nobu <ko1@a...>
Date: Sat, 17 Dec 2016 16:49:01 +0900 (JST)
Subject: [ruby-changes:45030] nobu:r57103 (trunk): Reapply r57092 "configure.in: repeated checks"

nobu	2016-12-17 16:48:57 +0900 (Sat, 17 Dec 2016)

  New Revision: 57103

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=57103

  Log:
    Reapply r57092 "configure.in: repeated checks"
    
    Needs DTRACE_OBJ when "$rb_cv_prog_dtrace_g" = rebuild, too.

  Modified files:
    trunk/configure.in
Index: configure.in
===================================================================
--- configure.in	(revision 57102)
+++ configure.in	(revision 57103)
@@ -3990,45 +3990,42 @@ AC_ARG_ENABLE(dtrace, https://github.com/ruby/ruby/blob/trunk/configure.in#L3990
         [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_IF([test "$rb_cv_prog_dtrace_g" != no], [dnl
+	DTRACE_OBJ='probes.$(OBJEXT)'
+    ])
+    AS_IF([test "$rb_cv_prog_dtrace_g" = rebuild], [dnl
+	DTRACE_REBUILD=yes
+	LIBRUBY_A_OBJS='$(DTRACE_GLOMMED_OBJ)'
+    ])
+    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)

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]