summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorfche <fche>2007-08-25 01:52:42 +0000
committerfche <fche>2007-08-25 01:52:42 +0000
commit10b202667b8093e063b4ed479855a0d3324030a3 (patch)
tree10b723371db3ab2ff3b5cddc9d019dcc16baf6ff /configure.ac
parent695875ae13c66a22150f1bea22b49447265403a6 (diff)
downloadsystemtap-steved-10b202667b8093e063b4ed479855a0d3324030a3.tar.gz
systemtap-steved-10b202667b8093e063b4ed479855a0d3324030a3.tar.xz
systemtap-steved-10b202667b8093e063b4ed479855a0d3324030a3.zip
2007-08-24 Frank Ch. Eigler <fche@elastic.org>
* configure.ac: Check for proper $PROCFLAGS-dependent -lcap. * Makefile.am (staprun_LDADD): Use autoconf variable rather than -lcap literal. * configure, aclocal.m4, Makefile.in, config.in: Regenerated.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac16
1 files changed, 16 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 7e8526ec..0829f416 100644
--- a/configure.ac
+++ b/configure.ac
@@ -162,6 +162,12 @@ date=`date +%Y-%m-%d`
AC_DEFINE_UNQUOTED(DATE, "$date", [Configuration/build date])
AC_SUBST(DATE, "$date")
+
+# This procflags business is for staprun/stapio, which need to
+# be compiled with the same bitness as the kernel. On e.g. PPC,
+# userspace might be 32-bit default, but staprun needs to be
+# 64-bit. See also bug #4037.
+
processor=`uname -p`
case "$processor" in
ppc64) PROCFLAGS=-m64 ;;
@@ -170,6 +176,16 @@ x86_64) PROCFLAGS=-m64 ;;
esac
AC_SUBST([PROCFLAGS])
+# -lcap is used for staprun, so PROCFLAGS comes in to play
+SAVE_LIBS="$LIBS"
+SAVE_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS $PROCFLAGS"
+AC_CHECK_LIB(cap, cap_init, [], [AC_MSG_ERROR(need $PROCFLAGS -lcap)])
+cap_LIBS="$LIBS"
+AC_SUBST(cap_LIBS)
+LIBS="$SAVE_LIBS"
+CFLAGS="$SAVE_CFLAGS"
+
AC_CONFIG_HEADERS([config.h:config.in])
AC_CONFIG_FILES(Makefile systemtap.spec stap.1 stapprobes.5 stapfuncs.5 stapex.5 staprun.8 lket.5 lket-b2a.1 runtime/lket/b2a/Makefile man/stapprobes.iosched.5 man/stapprobes.netdev.5 man/stapprobes.nfs.5 man/stapprobes.nfsd.5 man/stapprobes.pagefault.5 man/stapprobes.process.5 man/stapprobes.rpc.5 man/stapprobes.scsi.5 man/stapprobes.signal.5 man/stapprobes.socket.5 man/stapprobes.tcp.5 man/stapprobes.udp.5)
AC_CONFIG_SUBDIRS(testsuite)