From 50431f30cac19c57f53bdfe0fd138cdc2dcfa2f9 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Sun, 11 Jan 2009 14:37:28 +0100 Subject: Pick up --prefix dependency usage in config.h. --- ChangeLog | 6 ++++++ config.in | 3 +++ configure | 6 ++++++ configure.ac | 6 ++++++ runtime/staprun/ChangeLog | 4 ++++ runtime/staprun/staprun.h | 3 +++ 6 files changed, 28 insertions(+) diff --git a/ChangeLog b/ChangeLog index 88303b0f..8ea76b96 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-01-11 Mark Wielaard + + * configure.ac: Add prefix as STAP_PREFIX for config.h. + * config.in: Regenerated. + * configure: Regenerated. + 2009-01-09 Elliott Baron * stap.1.in: Added %M info. diff --git a/config.in b/config.in index 44b22917..74b5a738 100644 --- a/config.in +++ b/config.in @@ -75,6 +75,9 @@ /* Define to 1 if the C compiler supports function prototypes. */ #undef PROTOTYPES +/* configure prefix location */ +#undef STAP_PREFIX + /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS diff --git a/configure b/configure index bc51435a..1fad9635 100755 --- a/configure +++ b/configure @@ -7571,6 +7571,12 @@ done CPPFLAGS="$save_CPPFLAGS" + +cat >>confdefs.h <<_ACEOF +#define STAP_PREFIX "$prefix" +_ACEOF + + ac_config_headers="$ac_config_headers config.h:config.in" ac_config_files="$ac_config_files Makefile doc/Makefile doc/SystemTap_Tapset_Reference/Makefile stap.1 stapprobes.5 stapfuncs.5 stapvars.5 stapex.5 staprun.8 stap-server.8 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" diff --git a/configure.ac b/configure.ac index 7866fe96..7e705811 100644 --- a/configure.ac +++ b/configure.ac @@ -313,6 +313,12 @@ CPPFLAGS="${CPPFLAGS} -Iinclude-elfutils" # in case bundled elfutils AC_CHECK_HEADERS([elfutils/version.h]) CPPFLAGS="$save_CPPFLAGS" +dnl This is here mainly to make sure that configure --prefix=... changes +dnl the config.h files so files depending on it are recompiled +dnl prefix is passed through indirectly in the Makefile.am AM_CPPFLAGS. +dnl Don't use this directly (when not given it is set to NONE). +AC_DEFINE_UNQUOTED(STAP_PREFIX, "$prefix", [configure prefix location]) + AC_CONFIG_HEADERS([config.h:config.in]) AC_CONFIG_FILES(Makefile doc/Makefile doc/SystemTap_Tapset_Reference/Makefile stap.1 stapprobes.5 stapfuncs.5 stapvars.5 stapex.5 staprun.8 stap-server.8 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) diff --git a/runtime/staprun/ChangeLog b/runtime/staprun/ChangeLog index 3611b55e..6c2304ce 100644 --- a/runtime/staprun/ChangeLog +++ b/runtime/staprun/ChangeLog @@ -1,3 +1,7 @@ +2008-01-11 Mark Wielaard + + * staprun.h: include config.h for dependency. + 2008-12-08 Frank Ch. Eigler PR7062 diff --git a/runtime/staprun/staprun.h b/runtime/staprun/staprun.h index 2014ce5b..84cf63fc 100644 --- a/runtime/staprun/staprun.h +++ b/runtime/staprun/staprun.h @@ -34,6 +34,9 @@ #include #include +/* Include config.h to pick up dependency for --prefix usage. */ +#include "config.h" + #define dbug(level, args...) {if (verbose>=level) {fprintf(stderr,"%s:%s:%d ",__name__,__FUNCTION__, __LINE__); fprintf(stderr,args);}} extern char *__name__; -- cgit