summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authordsmith <dsmith>2008-01-28 21:15:28 +0000
committerdsmith <dsmith>2008-01-28 21:15:28 +0000
commit564eb0a8ce73a298715c94e02988a29c2064a4ad (patch)
treeb3286dd3cbb5a9639a5c0c24917408120e11795d /configure.ac
parent0f16be729dd58136d9791f6fc5d492f34bbbeeba (diff)
downloadsystemtap-steved-564eb0a8ce73a298715c94e02988a29c2064a4ad.tar.gz
systemtap-steved-564eb0a8ce73a298715c94e02988a29c2064a4ad.tar.xz
systemtap-steved-564eb0a8ce73a298715c94e02988a29c2064a4ad.zip
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.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac52
1 files changed, 34 insertions, 18 deletions
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)])])