Skip to content

Instantly share code, notes, and snippets.

@vguerra
Created May 16, 2012 12:06
Show Gist options
  • Save vguerra/2709857 to your computer and use it in GitHub Desktop.
Save vguerra/2709857 to your computer and use it in GitHub Desktop.
building nsf breaks when dtrace is not installed ( even when --with-dtrace was not used when configuring ).
diff --git a/Makefile.in b/Makefile.in
index c587962..0774957 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -78,8 +78,8 @@ mkinstalldirs= mkdir -p
#========================================================================
DTRACE_OBJ = @DTRACE_OBJ@
-DTRACE_HDR = $(src_generic_dir)/nsfDTrace.h
-DTRACE_SRC = $(src_generic_dir)/nsfDTrace.d
+DTRACE_HDR = @DTRACE_HDR@
+DTRACE_SRC = @DTRACE_SRC@
#========================================================================
# The names of the source files is defined in the configure script.
diff --git a/configure.in b/configure.in
index daf2a93..94a3959 100644
--- a/configure.in
+++ b/configure.in
@@ -182,16 +182,6 @@ if test "$enable_assemble" = call; then
AC_DEFINE(NSF_ASSEMBLE_LT, 1, [Are we building with assembly label threading support?])
fi
-DTRACE_OBJ=
-if test "$with_dtrace" = yes; then
- AC_DEFINE(NSF_DTRACE, 1, [Are we building with DTrace support?])
- # Under Mac OS X, we need no nsfDTrace.o
- if test "`uname -s`" != "Darwin" ; then
- DTRACE_OBJ=nsfDTrace.o
- fi
-fi
-AC_SUBST(DTRACE_OBJ)
-
#-----------------------------------------------------------------------
# __CHANGE__
# Specify the C source files to compile in TEA_ADD_SOURCES,
@@ -405,6 +395,26 @@ dnl such files.
AC_DEFUN(CONFIG_OUTPUT_FILES, [[Makefile nsfConfig.sh library/xotcl/xotclsh library/xotcl/xowish unix/pkgIndex.unix nxsh nxwish]])
#--------------------------------------------------------------------
+# dtrace support related variables
+#--------------------------------------------------------------------
+
+DTRACE_OBJ=
+DTRACE_HDR=
+DTRACE_SRC=
+if test "$with_dtrace" = yes; then
+ AC_DEFINE(NSF_DTRACE, 1, [Are we building with DTrace support?])
+ # Under Mac OS X, we need no nsfDTrace.o
+ if test "`uname -s`" != "Darwin" ; then
+ DTRACE_OBJ=nsfDTrace.o
+ fi
+ DTRACE_HDR=${NSF_BUILD_INCLUDE_DIR}/nsfDTrace.h
+ DTRACE_SRC=${NSF_BUILD_INCLUDE_DIR}/nsfDTrace.d
+fi
+AC_SUBST(DTRACE_OBJ)
+AC_SUBST(DTRACE_HDR)
+AC_SUBST(DTRACE_SRC)
+
+#--------------------------------------------------------------------
# the value of this variable is set to the files which are to be
# removed when the user invokes 'make distclean' (i.e., those
# files generated by ./configure) and is used in the make distclean
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment