summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--Makefile.am4
-rw-r--r--Makefile.in5
-rwxr-xr-xconfigure55
-rw-r--r--configure.ac52
5 files changed, 84 insertions, 38 deletions
diff --git a/ChangeLog b/ChangeLog
index d496f104..9a41f92b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2008-01-28 David Smith <dsmith@redhat.com>
+ * configure.ac: Fixed a bug when "--disable-permon" was used.
+ Added "--enable-crash" option.
+ * configure: Regenerated.
+ * Makefile.am: Improved staplog.so compile command.
+ * Makefile.in: Regenerated.
+
* tapsets.cxx (dwarf_derived_probe_group::emit_module_decls):
Added 'const' to several members of stap_dwarf_probes.
diff --git a/Makefile.am b/Makefile.am
index 291adfd9..cfdc051d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -88,12 +88,12 @@ if BUILD_CRASHMOD
STAPLOG=staplog.so
$(STAPLOG): staplog.c
- $(CC) -Wall -shared -rdynamic $(LDFLAGS) $(CFLAGS) -fPIC -o $@ $<
+ $(CC) $(staplog_CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -shared -rdynamic \
+ $(AM_LDFLAGS) $(LDFLAGS) -fPIC -o $@ $<
all-local: $(STAPLOG)
install-exec-local: $(STAPLOG)
$(MKDIR_P) $(DESTDIR)$(pkglibdir)
$(INSTALL) $(STAPLOG) $(DESTDIR)$(pkglibdir)
-else
endif
# Get extra libs as needed
diff --git a/Makefile.in b/Makefile.in
index d92d7a94..b3ad3c74 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -181,7 +181,6 @@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
-ELFUTILS_REQUIRED_VERSION = @ELFUTILS_REQUIRED_VERSION@
EXEEXT = @EXEEXT@
GREP = @GREP@
INSTALL = @INSTALL@
@@ -254,6 +253,7 @@ sharedstatedir = @sharedstatedir@
sqlite3_LIBS = @sqlite3_LIBS@
srcdir = @srcdir@
stap_LIBS = @stap_LIBS@
+staplog_CPPFLAGS = @staplog_CPPFLAGS@
subdirs = @subdirs@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
@@ -1474,7 +1474,8 @@ install-exec-hook:
if [ `id -u` -eq 0 ]; then chmod 04111 "$(DESTDIR)$(bindir)/staprun"; fi
@BUILD_CRASHMOD_TRUE@$(STAPLOG): staplog.c
-@BUILD_CRASHMOD_TRUE@ $(CC) -Wall -shared -rdynamic $(LDFLAGS) $(CFLAGS) -fPIC -o $@ $<
+@BUILD_CRASHMOD_TRUE@ $(CC) $(staplog_CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -shared -rdynamic \
+@BUILD_CRASHMOD_TRUE@ $(AM_LDFLAGS) $(LDFLAGS) -fPIC -o $@ $<
@BUILD_CRASHMOD_TRUE@all-local: $(STAPLOG)
@BUILD_CRASHMOD_TRUE@install-exec-local: $(STAPLOG)
@BUILD_CRASHMOD_TRUE@ $(MKDIR_P) $(DESTDIR)$(pkglibdir)
diff --git a/configure b/configure
index 0a14c6a5..97e625ac 100755
--- a/configure
+++ b/configure
@@ -706,6 +706,7 @@ U
ANSI2KNR
RANLIB
sqlite3_LIBS
+staplog_CPPFLAGS
BUILD_CRASHMOD_TRUE
BUILD_CRASHMOD_FALSE
BUILD_ELFUTILS_TRUE
@@ -1318,6 +1319,11 @@ Optional Features:
--enable-prologues make -P prologue-searching default
--enable-ssp enable gcc stack-protector
--enable-sqlite build with sqlite support
+ --enable-crash[=DIRECTORY]
+ enable crash extension (default is disabled).
+ Optional DIRECTORY is the path to the crash header
+ file (needed if installed in a non-standard
+ location).
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -5828,14 +5834,13 @@ fi
# Check whether --enable-perfmon was given.
if test "${enable_perfmon+set}" = set; then
enableval=$enable_perfmon;
- CFLAGS="$CFLAGS -DPERFMON"
- CXXFLAGS="$CXXFLAGS -DPERFMON"
- LIBS="$LIBS -lpfm"
- if test "$enable_perfmon" != "yes"; then
- CFLAGS="$CFLAGS -I$enable_perfmon/include"
- CXXFLAGS="$CXXFLAGS -I$enable_perfmon/include"
- LDFLAGS="$LDFLAGS -L$enable_perfmon/lib"
- fi
+ if test "$enable_perfmon" != "no"; then
+ CPPFLAGS="$CPPFLAGS -DPERFMON"
+ LIBS="$LIBS -lpfm"
+ if test "$enable_perfmon" != "yes"; then
+ CPPFLAGS="$CPPFLAGS -I$enable_perfmon/include"
+ LDFLAGS="$LDFLAGS -L$enable_perfmon/lib"
+ fi
{ echo "$as_me:$LINENO: checking for pfm_start in -lpfm" >&5
echo $ECHO_N "checking for pfm_start in -lpfm... $ECHO_C" >&6; }
@@ -5907,12 +5912,12 @@ _ACEOF
else
- { { echo "$as_me:$LINENO: error: systemtap cannot find required perfmon libs" >&5
-echo "$as_me: error: systemtap cannot find required perfmon libs" >&2;}
+ { { echo "$as_me:$LINENO: error: systemtap cannot find required perfmon libs (libpfm-devel may need to be installed" >&5
+echo "$as_me: error: systemtap cannot find required perfmon libs (libpfm-devel may need to be installed" >&2;}
{ (exit 1); exit 1; }; }
fi
-
+ fi
fi
@@ -6046,6 +6051,15 @@ fi
fi
+# Check whether --enable-crash was given.
+if test "${enable_crash+set}" = set; then
+ enableval=$enable_crash; if test "$enable_crash" != "no"; then
+ save_CPPFLAGS="$CPPFLAGS"
+ if test "$enable_crash" != "yes"; then
+ staplog_CPPFLAGS=-I$enable_crash
+ CPPFLAGS="${staplog_CPPFLAGS} $CPPFLAGS"
+
+ fi
for ac_header in crash/defs.h
do
@@ -6101,14 +6115,22 @@ if test `eval echo '${'$as_ac_Header'}'` = yes; then
cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
- build_crashmod=yes
+
else
- build_crashmod=no
+ { { echo "$as_me:$LINENO: error: cannot find required crash header (crash-devel may need to be installed)" >&5
+echo "$as_me: error: cannot find required crash header (crash-devel may need to be installed)" >&2;}
+ { (exit 1); exit 1; }; }
fi
done
- if test $build_crashmod = yes; then
+ CPPFLAGS="$save_CPPFLAGS"
+ fi
+else
+ enable_crash="no"
+fi
+
+ if test "$enable_crash" != "no"; then
BUILD_CRASHMOD_TRUE=
BUILD_CRASHMOD_FALSE='#'
else
@@ -7370,11 +7392,11 @@ U!$U$ac_delim
ANSI2KNR!$ANSI2KNR$ac_delim
RANLIB!$RANLIB$ac_delim
sqlite3_LIBS!$sqlite3_LIBS$ac_delim
+staplog_CPPFLAGS!$staplog_CPPFLAGS$ac_delim
BUILD_CRASHMOD_TRUE!$BUILD_CRASHMOD_TRUE$ac_delim
BUILD_CRASHMOD_FALSE!$BUILD_CRASHMOD_FALSE$ac_delim
BUILD_ELFUTILS_TRUE!$BUILD_ELFUTILS_TRUE$ac_delim
BUILD_ELFUTILS_FALSE!$BUILD_ELFUTILS_FALSE$ac_delim
-elfutils_abs_srcdir!$elfutils_abs_srcdir$ac_delim
_ACEOF
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
@@ -7416,6 +7438,7 @@ _ACEOF
ac_delim='%!_!# '
for ac_last_try in false false false false false :; do
cat >conf$$subs.sed <<_ACEOF
+elfutils_abs_srcdir!$elfutils_abs_srcdir$ac_delim
stap_LIBS!$stap_LIBS$ac_delim
DATE!$DATE$ac_delim
PROCFLAGS!$PROCFLAGS$ac_delim
@@ -7425,7 +7448,7 @@ LIBOBJS!$LIBOBJS$ac_delim
LTLIBOBJS!$LTLIBOBJS$ac_delim
_ACEOF
- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 7; then
+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 8; then
break
elif $ac_last_try; then
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
diff --git a/configure.ac b/configure.ac
index 8ce6da11..445b592f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -30,19 +30,18 @@ AC_ARG_ENABLE([perfmon],
[enable perfmon support (default is disabled). Optional DIRECTORY
is the path to the perfmon installation (needed if installed in a
non-standard location).]), [
- dnl Add perfmon define and library
- CFLAGS="$CFLAGS -DPERFMON"
- CXXFLAGS="$CXXFLAGS -DPERFMON"
- LIBS="$LIBS -lpfm"
- dnl Handle custom install dir (if needed)
- if test "$enable_perfmon" != "yes"; then
- CFLAGS="$CFLAGS -I$enable_perfmon/include"
- CXXFLAGS="$CXXFLAGS -I$enable_perfmon/include"
- LDFLAGS="$LDFLAGS -L$enable_perfmon/lib"
- fi
- AC_CHECK_LIB([pfm], [pfm_start], [], [
- AC_MSG_ERROR([systemtap cannot find required perfmon libs])])
-])
+ if test "$enable_perfmon" != "no"; then
+ dnl Add perfmon define and library
+ CPPFLAGS="$CPPFLAGS -DPERFMON"
+ LIBS="$LIBS -lpfm"
+ dnl Handle custom install dir (if needed)
+ if test "$enable_perfmon" != "yes"; then
+ CPPFLAGS="$CPPFLAGS -I$enable_perfmon/include"
+ LDFLAGS="$LDFLAGS -L$enable_perfmon/lib"
+ fi
+ AC_CHECK_LIB([pfm], [pfm_start], [], [
+ AC_MSG_ERROR([systemtap cannot find required perfmon libs (libpfm-devel may need to be installed])])
+ fi])
dnl Handle the prologues option.
dnl
@@ -91,12 +90,29 @@ AS_IF([test "x$enable_sqlite" != xno],
AC_MSG_FAILURE([--enable-sqlite was given, but test for sqlite failed])
fi])])
-AC_CHECK_HEADERS(crash/defs.h,
- build_crashmod=yes,build_crashmod=no,
- [
+dnl Handle the option to build the crash extension
+AC_ARG_ENABLE([crash],
+ AS_HELP_STRING([--enable-crash@<:@=DIRECTORY@:>@],
+ [enable crash extension (default is disabled). Optional DIRECTORY
+ is the path to the crash header file (needed if installed in a
+ non-standard location).]),
+ [if test "$enable_crash" != "no"; then
+ dnl Handle custom install dir (if needed)
+ save_CPPFLAGS="$CPPFLAGS"
+ if test "$enable_crash" != "yes"; then
+ staplog_CPPFLAGS=-I$enable_crash
+ CPPFLAGS="${staplog_CPPFLAGS} $CPPFLAGS"
+ AC_SUBST([staplog_CPPFLAGS])
+ fi
+ AC_CHECK_HEADERS([crash/defs.h], [],
+ [AC_MSG_ERROR([cannot find required crash header (crash-devel may need to be installed)])],
+ [
#define NR_CPUS 256
-])
-AM_CONDITIONAL(BUILD_CRASHMOD, test $build_crashmod = yes)
+ ])
+ CPPFLAGS="$save_CPPFLAGS"
+ fi],
+ [enable_crash="no"])
+AM_CONDITIONAL([BUILD_CRASHMOD], [test "$enable_crash" != "no"])
AC_CHECK_HEADERS([sys/capability.h], ,
[AC_MSG_ERROR([cannot find required libcap header (libcap-devel may need to be installed)])])