]>
Commit | Line | Data |
---|---|---|
2f1a1aea FCE |
1 | dnl configure.ac --- autoconf input file for systemtap |
2 | dnl Process this file with autoconf to produce a configure script. | |
3 | ||
1254cb0c | 4 | AC_INIT([systemtap], 3.0, systemtap@sourceware.org, systemtap) |
97859b9d | 5 | dnl ^^^ see also NEWS, systemtap.spec, testsuite/configure.ac |
4c4adc41 | 6 | dnl doc/SystemTap_Beginners_Guide/en-US/Book_Info.xml |
e872ae09 | 7 | |
2689a171 SM |
8 | dnl Get the target arch for libHelperSDT.so |
9 | AC_CANONICAL_TARGET | |
10 | ||
97859b9d JS |
11 | AC_PREREQ(2.63) |
12 | dnl We don't maintain a ChangeLog, which makes us non-GNU -> foreign. | |
675c6934 | 13 | AM_INIT_AUTOMAKE([no-dist foreign]) |
2f1a1aea FCE |
14 | AM_MAINTAINER_MODE |
15 | ||
618a8a63 JS |
16 | m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) |
17 | ||
8f223b3e | 18 | AC_USE_SYSTEM_EXTENSIONS |
db887d2c | 19 | AC_PROG_MKDIR_P |
7fbd9d09 | 20 | AC_SUBST(MKDIR_P) |
2f1a1aea FCE |
21 | AC_PROG_LN_S |
22 | AC_PROG_CC | |
23 | AC_PROG_CXX | |
24 | AC_PROG_CPP | |
25 | AM_PROG_CC_STDC | |
8ae7a94a | 26 | AM_PROG_CC_C_O |
2f1a1aea FCE |
27 | AC_PROG_RANLIB |
28 | AC_OBJEXT | |
29 | AC_EXEEXT | |
30 | AC_PROG_INSTALL | |
31 | AC_PROG_MAKE_SET | |
32 | AC_SUBST(CFLAGS) | |
33 | AC_SUBST(CXXFLAGS) | |
97859b9d | 34 | AC_SYS_LARGEFILE |
e04a4b41 | 35 | AC_CHECK_FUNCS(ppoll) |
56629dde | 36 | AC_CHECK_FUNCS(openat) |
3477519f | 37 | AM_GNU_GETTEXT(external) |
42973bd2 | 38 | AM_GNU_GETTEXT_VERSION([0.19.4]) |
3477519f FCE |
39 | |
40 | if test "x$GMSGFMT" = "x:"; then | |
41 | AC_MSG_ERROR([missing gnu /usr/bin/msgfmt]) | |
42 | fi | |
2f1a1aea | 43 | |
e8f3c2c2 DS |
44 | dnl Handle the prologues option. |
45 | dnl | |
70d28673 DS |
46 | dnl If the user didn't specify --enable-prologues/--disable-prologues |
47 | dnl and the x86 system has a version of gcc less than version 4, | |
48 | dnl automatically enable prologues. | |
49 | if test "${enable_prologues+set}" != set; then | |
50 | AC_MSG_CHECKING([to see if prologue searching should be the default]) | |
51 | if { echo '#if __i386__ == 1 && __GNUC__ < 4' | |
52 | echo ' yes ' | |
53 | echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then | |
54 | enable_prologues=yes | |
55 | AC_MSG_RESULT([yes]) | |
56 | else | |
57 | AC_MSG_RESULT([no]) | |
58 | fi | |
59 | fi | |
e8f3c2c2 DS |
60 | AC_ARG_ENABLE([prologues], |
61 | AS_HELP_STRING([--enable-prologues], [make -P prologue-searching default]), | |
62 | [ | |
70d28673 DS |
63 | if test "$enable_prologues" = yes; then |
64 | AC_DEFINE([ENABLE_PROLOGUES],[],[make -P prologue-searching default]) | |
65 | fi]) | |
66 | ||
e1bfefdc SC |
67 | dnl Handle the disable-sdt-probes option. |
68 | dnl | |
69 | dnl Default to --disable-sdt-probes if --enable-sdt-probes/--disable-prologues | |
70 | dnl was not specified and the gcc version is less than version 4, | |
71 | ||
72 | if test "${enable_sdt_probes+set}" != set; then | |
73 | AC_MSG_CHECKING([to see if sdt probes should be the default]) | |
74 | if { echo '#if __GNUC__ < 4' | |
75 | echo ' yes ' | |
76 | echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then | |
8b714d4b | 77 | enable_sdt_probes=no |
e1bfefdc SC |
78 | AC_MSG_RESULT([no]) |
79 | else | |
80 | AC_MSG_RESULT([yes]) | |
81 | fi | |
82 | fi | |
0f5d597d JS |
83 | AC_ARG_ENABLE([sdt-probes], |
84 | [AS_HELP_STRING([--disable-sdt-probes], | |
85 | [disable process.mark probes in stap, staprun, stapio])]) | |
86 | AS_IF([test "x$enable_sdt_probes" != xno], [ | |
87 | AC_DEFINE([ENABLE_SDT_PROBES], [1], | |
88 | [Define to 1 to enable process.mark probes in stap, staprun, stapio.]) | |
89 | ]) | |
90 | ||
9921a199 | 91 | AC_ARG_ENABLE([ssp], |
bbfd8c1a FCE |
92 | [AS_HELP_STRING([--disable-ssp], [disable gcc stack-protector])]) |
93 | AS_IF([test "x$enable_ssp" != xno],[ | |
94 | save_CFLAGS="$CFLAGS" | |
95 | save_CXXFLAGS="$CXXFLAGS" | |
f0510eaa FCE |
96 | CXXFLAGS="$CXXFLAGS -Werror -fstack-protector-all -D_FORTIFY_SOURCE=2" |
97 | CFLAGS="$CFLAGS -Werror -fstack-protector-all -D_FORTIFY_SOURCE=2" | |
5d4aa1f5 | 98 | AC_COMPILE_IFELSE([AC_LANG_SOURCE([int something ();])], [ |
f0510eaa FCE |
99 | AC_MSG_NOTICE([Compiling with gcc -fstack-protector-all et al.]) |
100 | CFLAGS="$save_CFLAGS -fstack-protector-all -D_FORTIFY_SOURCE=2" | |
a530cfe0 | 101 | CXXFLAGS="$save_CXXFLAGS -fstack-protector-all -D_FORTIFY_SOURCE=2"],[ |
bbfd8c1a FCE |
102 | AC_MSG_NOTICE([Compiler does not support -fstack-protector-all et al.]) |
103 | CFLAGS="$save_CFLAGS" | |
104 | CXXFLAGS="$save_CXXFLAGS"])]) | |
70d28673 | 105 | |
cbe7ea07 FCE |
106 | |
107 | dnl Link with gold if possible | |
108 | dnl but: https://bugzilla.redhat.com/show_bug.cgi?id=636603 | |
109 | dnl | |
110 | dnl AC_PATH_PROG(GOLD, [ld.gold], [no]) | |
111 | dnl if test "x$GOLD" != "xno" | |
112 | dnl then | |
113 | dnl mkdir -p Bdir | |
114 | dnl ln -sf $GOLD Bdir/ld | |
115 | dnl LDFLAGS="$LDFLAGS -B`pwd`/Bdir/" | |
116 | dnl AC_MSG_NOTICE([using ld.gold to link]) | |
117 | dnl fi | |
118 | ||
119 | ||
e1e3ba36 | 120 | # Compiling without fPIE by default (see PR 9922) |
8730f377 | 121 | AC_ARG_ENABLE([pie], |
882ddac1 | 122 | [AS_HELP_STRING([--enable-pie], [enable position-independent-executable])]) |
e1e3ba36 | 123 | AS_IF([test "x$enable_pie" == xyes],[ |
97859b9d JS |
124 | PIECFLAGS='-fPIE' |
125 | PIECXXFLAGS='-fPIE' | |
126 | PIELDFLAGS='-pie -Wl,-z,relro -Wl,-z,now' | |
8730f377 FCE |
127 | save_CFLAGS="$CFLAGS" |
128 | save_CXXFLAGS="$CXXFLAGS" | |
129 | save_LDFLAGS="$LDFLAGS" | |
97859b9d JS |
130 | CFLAGS="$CFLAGS $PIECFLAGS" |
131 | CXXFLAGS="$CXXFLAGS $PIECXXFLAGS" | |
132 | LDFLAGS="$LDFLAGS $PIELDFLAGS" | |
5d4aa1f5 | 133 | AC_LINK_IFELSE([AC_LANG_SOURCE([void main () {}])], [ |
8730f377 | 134 | AC_MSG_NOTICE([Compiling with gcc pie et al.]) |
97859b9d | 135 | ], [ |
8730f377 | 136 | AC_MSG_NOTICE([Compiler does not support -pie et al.]) |
5574ef2c | 137 | PIECFLAGS="" |
5574ef2c | 138 | PIECXXFLAGS="" |
8730f377 | 139 | PIELDFLAGS="" |
97859b9d JS |
140 | ]) |
141 | CFLAGS="$save_CFLAGS" | |
142 | CXXFLAGS="$save_CXXFLAGS" | |
143 | LDFLAGS="$save_LDFLAGS" | |
144 | ]) | |
8730f377 | 145 | AC_SUBST(PIELDFLAGS) |
5574ef2c MW |
146 | AC_SUBST(PIECFLAGS) |
147 | AC_SUBST(PIECXXFLAGS) | |
8730f377 | 148 | |
9921a199 DS |
149 | dnl Handle optional sqlite support. If enabled/disabled by the user, |
150 | dnl do the right thing. If not specified by the user, use it if | |
151 | dnl present. | |
152 | AC_ARG_ENABLE([sqlite], | |
e8f3c2c2 DS |
153 | AS_HELP_STRING([--enable-sqlite], [build with sqlite support]), |
154 | [], dnl ACTION-IF-GIVEN | |
155 | [enable_sqlite=check]) dnl ACTION-IF-NOT-GIVEN | |
9921a199 DS |
156 | sqlite3_LIBS= |
157 | AS_IF([test "x$enable_sqlite" != xno], | |
158 | [AC_CHECK_LIB([sqlite3], [sqlite3_open], | |
07606685 | 159 | [AC_SUBST([sqlite3_LIBS], [-lsqlite3]) |
76227acd | 160 | AC_DEFINE([HAVE_LIBSQLITE3], [1], [Define to 1 if you have the 'sqlite3' library (-lsqlite3).])], |
9921a199 DS |
161 | [if test "x$enable_sqlite" != xcheck; then |
162 | AC_MSG_FAILURE([--enable-sqlite was given, but test for sqlite failed]) | |
163 | fi])]) | |
e6c086bb | 164 | |
6d14a4a9 EB |
165 | dnl Handle the option to only build runtime |
166 | AC_ARG_ENABLE([translator], | |
167 | AS_HELP_STRING([--disable-translator], [build only runtime utilities]), | |
168 | [], | |
169 | [enable_translator="yes"]) | |
170 | AM_CONDITIONAL([BUILD_TRANSLATOR], [test "$enable_translator" == "yes"]) | |
171 | ||
564eb0a8 DS |
172 | dnl Handle the option to build the crash extension |
173 | AC_ARG_ENABLE([crash], | |
174 | AS_HELP_STRING([--enable-crash@<:@=DIRECTORY@:>@], | |
175 | [enable crash extension (default is disabled). Optional DIRECTORY | |
176 | is the path to the crash header file (needed if installed in a | |
177 | non-standard location).]), | |
178 | [if test "$enable_crash" != "no"; then | |
179 | dnl Handle custom install dir (if needed) | |
180 | save_CPPFLAGS="$CPPFLAGS" | |
181 | if test "$enable_crash" != "yes"; then | |
182 | staplog_CPPFLAGS=-I$enable_crash | |
183 | CPPFLAGS="${staplog_CPPFLAGS} $CPPFLAGS" | |
184 | AC_SUBST([staplog_CPPFLAGS]) | |
185 | fi | |
186 | AC_CHECK_HEADERS([crash/defs.h], [], | |
187 | [AC_MSG_ERROR([cannot find required crash header (crash-devel may need to be installed)])], | |
188 | [ | |
e8f3c2c2 | 189 | #define NR_CPUS 256 |
564eb0a8 DS |
190 | ]) |
191 | CPPFLAGS="$save_CPPFLAGS" | |
192 | fi], | |
193 | [enable_crash="no"]) | |
194 | AM_CONDITIONAL([BUILD_CRASHMOD], [test "$enable_crash" != "no"]) | |
e6c086bb | 195 | |
465e8fbf | 196 | dnl Handle the option to build the documentation |
92aff3c7 | 197 | building_docs="no" |
465e8fbf FCE |
198 | AC_ARG_ENABLE([docs], |
199 | AS_HELP_STRING([--enable-docs], | |
200 | [enable building documentation (default on if latex etc. found).]), | |
201 | [enable_docs=$enableval], | |
202 | [enable_docs="check"]) | |
203 | AC_CHECK_PROG(have_latex, latex, yes, no) | |
204 | AC_CHECK_PROG(have_dvips, dvips, yes, no) | |
205 | AC_CHECK_PROG(have_ps2pdf, ps2pdf, yes, no) | |
7012fdd5 | 206 | if test "x${have_latex}${have_dvips}${have_ps2pdf}" != "xyesyesyes"; then |
2d4b8ddf | 207 | if test "$enable_docs" == "yes"; then |
465e8fbf FCE |
208 | AC_MSG_ERROR([cannot find all tools for building documentation]) |
209 | fi | |
2d4b8ddf MW |
210 | if test "$enable_docs" == "check"; then |
211 | AC_MSG_WARN([will not build documentation, cannot find all tools]) | |
212 | fi | |
465e8fbf | 213 | fi |
7012fdd5 | 214 | if test "x${have_latex}${have_dvips}${have_ps2pdf}" == "xyesyesyes" -a "$enable_docs" != "no"; then |
92aff3c7 WC |
215 | building_docs="yes" |
216 | fi | |
217 | AM_CONDITIONAL([BUILD_DOCS], [test "$building_docs" == "yes"]) | |
218 | ||
53ade4da | 219 | |
92aff3c7 WC |
220 | dnl Handle the option to build the reference documentation |
221 | building_refdocs="no" | |
222 | AC_ARG_ENABLE([refdocs], | |
223 | AS_HELP_STRING([--enable-refdocs], | |
1ed33130 | 224 | [enable building reference documentation (default on if other documentation built).]), |
92aff3c7 WC |
225 | [enable_refdocs=$enableval], |
226 | [enable_refdocs="check"]) | |
227 | if test "$building_docs" == "no" -a "$enable_refdocs" == "yes" ; then | |
228 | AC_MSG_ERROR([must use --enable-docs with --enable-refdocs]) | |
229 | fi | |
1ed33130 | 230 | if test "$enable_refdocs" != "no" -a "${building_docs}" == "yes"; then |
023337aa EM |
231 | building_refdocs="yes" |
232 | fi | |
233 | AM_CONDITIONAL([BUILD_REFDOCS], [test "$building_refdocs" == "yes"]) | |
234 | ||
d9c42357 | 235 | AC_CHECK_PROG(have_xmlto, xmlto, yes, no) |
327a760e | 236 | AC_CHECK_PROG(have_fop, fop, yes, no) |
61598deb FCE |
237 | if test "x${have_fop}" == "xyes"; then |
238 | # Due to rhbz505364 / 830266, we must actually test-run fop, not just | |
239 | # hope that it works. | |
434e049c | 240 | AC_MSG_CHECKING([to see if xmlto --with-fop actually works]) |
61598deb | 241 | if xmlto --with-fop pdf ${srcdir}/doc/SystemTap_Tapset_Reference/dummy-tapsets.xml >/dev/null 2>&1; then |
434e049c | 242 | AC_MSG_RESULT([yes]) |
61598deb | 243 | else |
434e049c | 244 | AC_MSG_RESULT([it's dead, Jim]) |
61598deb FCE |
245 | have_fop="broken" |
246 | fi | |
72862170 | 247 | rm -f dummy-tapsets.pdf |
61598deb | 248 | fi |
327a760e | 249 | AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" == "yes"]) |
a98010af | 250 | AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" == "yes"]) |
327a760e | 251 | |
d9c42357 FL |
252 | dnl Handle the option to build the html documentation |
253 | building_htmldocs="no" | |
254 | AC_ARG_ENABLE([htmldocs], | |
255 | AS_HELP_STRING([--enable-htmldocs], | |
256 | [enable building html documentation (default off).]), | |
617829c9 | 257 | [building_htmldocs=$enableval], |
d9c42357 | 258 | [building_htmldocs="no"]) |
617829c9 FL |
259 | if test "$have_xmlto" == "no" -a "$building_htmldocs" == "yes"; then |
260 | AC_MSG_ERROR([xmlto required for building html documentation]) | |
261 | fi | |
d9c42357 FL |
262 | |
263 | AM_CONDITIONAL([BUILD_HTMLDOCS], [test "$building_htmldocs" == "yes"]) | |
264 | ||
a8fcf687 MW |
265 | dnl There is a strange bug in older versions of xmlto when generating pdf. |
266 | dnl https://bugzilla.redhat.com/show_bug.cgi?id=526273 | |
267 | dnl So make sure to have a chapter title starting with L plus an refentry. | |
268 | dnl This will make sure the xmlto pdf support test fails on buggy versions. | |
468abaf4 | 269 | cat > conftest.xml << 'EOF' |
aa5951be WC |
270 | <?xml version="1.0" encoding="UTF-8"?> |
271 | <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" | |
272 | "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" []> | |
468abaf4 FCE |
273 | <book lang="en"> |
274 | <bookinfo><title>foo</title></bookinfo> | |
a8fcf687 MW |
275 | <chapter id="logging.stp"><title>Logging Tapset</title> |
276 | <refentry id="API-log"><refnamediv><refname>log</refname> | |
277 | <refpurpose>logging</refpurpose></refnamediv> | |
278 | <refsect1><title>Description</title> | |
279 | <para>baz</para></refsect1></refentry></chapter> | |
aa5951be WC |
280 | </book> |
281 | EOF | |
468abaf4 FCE |
282 | |
283 | if test "x${have_xmlto}" == "xyes"; then | |
284 | AC_MSG_CHECKING([for xmlto --stringparam support]) | |
b653135b | 285 | xmlto --stringparam man.authors.section.enabled=0 html-nochunks conftest.xml >/dev/null 2>&1 |
468abaf4 FCE |
286 | if test $? == 0; then |
287 | have_xmlto_stringparam="yes" | |
288 | AC_MSG_RESULT([yes]) | |
289 | else | |
290 | AC_MSG_RESULT([no]) | |
291 | fi | |
b653135b | 292 | rm -f conftest.html |
468abaf4 FCE |
293 | fi |
294 | AM_CONDITIONAL([XMLTO_STRINGPARAM], [test "$have_xmlto_stringparam" == "yes"]) | |
295 | ||
468abaf4 FCE |
296 | rm -f conftest.xml |
297 | ||
a0e2728a | 298 | dnl See if we have the nss/nspr headers and libraries |
28f121c3 DEP |
299 | AC_ARG_WITH([nss], |
300 | AS_HELP_STRING([--without-nss], | |
301 | [Do not use NSS even if present])) | |
302 | ||
303 | AS_IF([test "x$with_nss" != "xno"], [ | |
304 | PKG_CHECK_MODULES([nss], [nss >= 3], | |
305 | [have_nss=yes | |
306 | AC_DEFINE([HAVE_NSS], [1], [Define to 1 if you have the nss libraries.]) | |
307 | ], [have_nss=no]) | |
308 | ], [have_nss=no]) | |
309 | ||
f5a118c0 | 310 | AM_CONDITIONAL([HAVE_NSS], [test "${have_nss}" = "yes"]) |
468abaf4 | 311 | |
2323b028 FCE |
312 | dnl Handle dracut directory configuration. Note we hard-code /usr by default, |
313 | dnl instead of $prefix, because dracut is a system service that doesn't listen | |
314 | dnl at relocatable directories. | |
315 | AC_ARG_WITH([dracutstap], | |
316 | AS_HELP_STRING([--with-dracutstap=DIR], | |
317 | [Install dracut module files in DIR])) | |
318 | AS_IF([test "x$with_dracutstap" != "x"],[dracutstap="$with_dracutstap"], | |
319 | [dracutstap=/usr/lib/dracut/modules.d/99stap]) | |
320 | AC_MSG_NOTICE([using dracut module directory $dracutstap]) | |
321 | AC_SUBST(dracutstap) | |
322 | ||
a0e2728a | 323 | dnl Handle the option to build the compile server. |
19a0d4b6 | 324 | AC_ARG_ENABLE([server], |
6275c8d7 | 325 | AS_HELP_STRING([--enable-server], |
a0e2728a | 326 | [enable building of stap-server (default on if nss etc. found).]), |
19a0d4b6 MW |
327 | [enable_server=$enableval], |
328 | [enable_server="check"]) | |
a0e2728a | 329 | |
161f9ed6 | 330 | if test "$enable_server" != "no"; then |
a0e2728a | 331 | dnl See if we have enough libraries and tools to build the compile server |
f5a118c0 DEP |
332 | if test "x${have_nss}" != "xyes"; then |
333 | AC_MSG_WARN([will not build systemtap compile server, cannot find nss headers]) | |
a0e2728a | 334 | fi |
19a0d4b6 | 335 | fi |
f5a118c0 | 336 | AM_CONDITIONAL([BUILD_SERVER], [test "${have_nss}" == "yes" -a "$enable_server" != "no"]) |
a0e2728a | 337 | |
f5a118c0 | 338 | if test "${have_nss}" != "yes"; then |
c4fd15b4 | 339 | AC_MSG_WARN([compile-server client functionality will be disabled, cannot find nss development files]) |
a0e2728a | 340 | fi |
a0e2728a DB |
341 | |
342 | dnl See if we have the avahi libraries and headers | |
28f121c3 DEP |
343 | AC_ARG_WITH([avahi], |
344 | AS_HELP_STRING([--without-avahi], | |
345 | [Do not use Avahi even if present])) | |
346 | ||
347 | AS_IF([test "x$with_avahi" != "xno"], [ | |
348 | PKG_CHECK_MODULES([avahi], [avahi-client], | |
349 | [have_avahi=yes | |
350 | AC_DEFINE([HAVE_AVAHI], [1], [Define to 1 if you have the avahi libraries.]) | |
351 | ], [have_avahi=no]) | |
352 | ], [have_avahi=no]) | |
353 | ||
f5a118c0 DEP |
354 | AM_CONDITIONAL([HAVE_AVAHI], [test "${have_avahi}" = "yes"]) |
355 | ||
356 | if test "${have_avahi}" != "yes"; then | |
357 | AC_MSG_WARN([some compile-server functionality will be restricted, cannot find avahi development files]) | |
a0e2728a | 358 | fi |
43498922 | 359 | |
1087b83f | 360 | |
bcfa72ed | 361 | dnl Look for librpm. |
2ed04863 WC |
362 | AC_ARG_WITH([rpm], |
363 | [AS_HELP_STRING([--with-rpm], | |
bcfa72ed FCE |
364 | [query rpm database for missing debuginfos])], [], [with_rpm="auto"]) |
365 | if test "$with_rpm" != "no"; then | |
12c1a007 FCE |
366 | AC_CHECK_LIB(rpm, rpmtsInitIterator, [ |
367 | AC_DEFINE([HAVE_LIBRPM],[1],[have librpm]) | |
f02c2e47 | 368 | stap_LIBS="$stap_LIBS -lc -lrpm" |
12c1a007 | 369 | have_librpm="yes"], [have_librpm="no"]) |
44edbcd6 JS |
370 | AC_CHECK_LIB(rpmio, rpmFreeCrypto, [ |
371 | AC_DEFINE([HAVE_LIBRPMIO],[1],[have librpmio]) | |
f02c2e47 | 372 | stap_LIBS="$stap_LIBS -lc -lrpmio" |
44edbcd6 | 373 | have_librpmio="yes"], [have_librpmio="no"]) |
bcfa72ed FCE |
374 | if test "x$have_librpm" != "xyes" -a "$with_rpm" == "yes"; then |
375 | AC_MSG_ERROR([cannot find librpm]) | |
2ed04863 | 376 | fi |
44edbcd6 JS |
377 | if test "x$have_librpmio" != "xyes" -a "$with_rpm" == "yes"; then |
378 | AC_MSG_WARN([cannot find librpmio]) | |
379 | fi | |
2ed04863 WC |
380 | fi |
381 | ||
9ac12b89 DS |
382 | dnl Look for readline. |
383 | dnl | |
384 | dnl First save the orignal value of LIBS. | |
385 | LIBS_no_readline=$LIBS | |
386 | ||
387 | dnl Check how for readline presence and how to link with it. On some | |
388 | dnl systems you need to add a termcap compatible library. | |
389 | have_libreadline="no" | |
390 | AC_MSG_CHECKING([how to link readline libs]) | |
391 | for libtermcap in "" tinfo ncursesw ncurses curses termcap; do | |
392 | if test -z "$libtermcap"; then | |
393 | READLINE_LIBS="-lreadline" | |
394 | else | |
395 | READLINE_LIBS="-lreadline -l$libtermcap" | |
396 | fi | |
397 | LIBS="$READLINE_LIBS $LIBS_no_readline" | |
398 | AC_LINK_IFELSE( | |
399 | [AC_LANG_CALL([],[readline])], | |
400 | [have_libreadline="yes"]) | |
401 | if test "$have_libreadline" = "yes"; then | |
402 | break | |
403 | fi | |
404 | done | |
405 | if test "$have_libreadline" = "no"; then | |
406 | AC_MSG_RESULT([none]) | |
16314eed | 407 | READLINE_LIBS="" |
9ac12b89 DS |
408 | else |
409 | AC_MSG_RESULT([$READLINE_LIBS]) | |
9ac12b89 DS |
410 | AC_DEFINE(HAVE_LIBREADLINE, [1], |
411 | [Define if you have the readline library (-lreadline).]) | |
412 | fi | |
16314eed | 413 | AC_SUBST([READLINE_LIBS]) |
9ac12b89 DS |
414 | AM_CONDITIONAL([HAVE_LIBREADLINE], [test "$have_libreadline" == "yes"]) |
415 | ||
416 | dnl End of readline checks: restore LIBS | |
417 | LIBS=$LIBS_no_readline | |
2ed04863 | 418 | |
0a742545 FCE |
419 | dnl Allow user to choose python3 for /usr/bin/dtrace |
420 | AC_ARG_WITH([python3], | |
421 | AS_HELP_STRING([--with-python3],[prefer /usr/bin/python3])) | |
422 | AS_IF([test "x$with_python3" = "xyes"], | |
423 | [AC_SUBST(python,[python3])], | |
424 | [AC_SUBST(python,[python])]) | |
425 | ||
e8f3c2c2 DS |
426 | dnl Handle elfutils. If '--with-elfutils=DIR' wasn't specified, used |
427 | dnl the system's elfutils. | |
4d9087fc RM |
428 | build_elfutils=no |
429 | AC_ARG_WITH([elfutils], | |
e8f3c2c2 DS |
430 | AS_HELP_STRING([--with-elfutils=DIRECTORY], |
431 | [find elfutils source code in DIRECTORY]), | |
432 | [ | |
4d9087fc RM |
433 | case "$with_elfutils" in |
434 | yes) AC_MSG_ERROR([--with-elfutils requires an argument]) ;; | |
435 | ''|no) ;; | |
436 | *) build_elfutils=yes ;; | |
437 | esac]) | |
438 | AM_CONDITIONAL(BUILD_ELFUTILS, test $build_elfutils = yes) | |
fa1d05cd RM |
439 | AC_SUBST(elfutils_abs_srcdir, `AS_IF([test $build_elfutils = yes], |
440 | [cd $with_elfutils && pwd])`) | |
441 | ||
efa6ba96 PP |
442 | if test $enable_translator = yes; then |
443 | if test $build_elfutils = no; then | |
444 | # Need libdwfl-capable recent elfutils http://elfutils.fedorahosted.org/ | |
c14263d8 FCE |
445 | |
446 | # On modern debian/ubuntu, libebl has been merged into libdw | |
447 | # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=457543 | |
448 | save_LIBS="$LIBS" | |
449 | AC_CHECK_LIB(ebl, ebl_get_elfmachine,[ebl_LIBS=-lebl],[ebl_LIBS=]) | |
450 | LIBS="$save_LIBS" | |
451 | ||
efa6ba96 PP |
452 | save_LIBS="$LIBS" |
453 | AC_CHECK_LIB(dw, dwfl_module_getsym,[],[ | |
454 | AC_MSG_ERROR([missing elfutils development headers/libraries (install elfutils-devel, libebl-dev, libdw-dev and/or libebl-devel)])], | |
c14263d8 | 455 | [-Wl,--start-group -ldw $ebl_LIBS -Wl,--end-group -lelf]) |
2a885a4a MW |
456 | AC_CHECK_LIB(dw, dwarf_next_unit,[],[ |
457 | AC_MSG_ERROR([elfutils, libdw too old, need 0.148+])], | |
c14263d8 FCE |
458 | [-Wl,--start-group -ldw $ebl_LIBS -Wl,--end-group -lelf]) |
459 | stap_LIBS="$stap_LIBS -Wl,--start-group -ldw $ebl_LIBS -Wl,--end-group -lelf" | |
efa6ba96 PP |
460 | LIBS="$save_LIBS" |
461 | else | |
462 | # We built our own and stap_LDFLAGS points at the install. | |
12c1a007 | 463 | stap_LIBS="$stap_LIBS -Wl,--start-group -ldw -lebl -Wl,--end-group -lelf" |
efa6ba96 | 464 | fi |
4d9087fc | 465 | fi |
a74dd276 | 466 | |
6b1a0274 WC |
467 | AC_SUBST(stap_LIBS) |
468 | AC_MSG_NOTICE([stap will link $stap_LIBS]) | |
c3a3c0c9 | 469 | |
97859b9d JS |
470 | # staprun has more modest libelf needs |
471 | if test $build_elfutils = no; then | |
97859b9d JS |
472 | save_LIBS="$LIBS" |
473 | dnl this will only succeed with elfutils 0.142+ | |
94eb87d1 DS |
474 | AC_CHECK_LIB(elf,elf_getshdrstrndx,[],[ |
475 | AC_MSG_FAILURE([libelf too old, need 0.142+])]) | |
476 | staprun_LIBS="$staprun_LIBS -lelf" | |
97859b9d JS |
477 | LIBS="$save_LIBS" |
478 | else | |
479 | # We built our own and staprun_LDFLAGS points at the install. | |
480 | staprun_LIBS="$staprun_LIBS -lelf" | |
481 | fi | |
482 | ||
483 | AC_SUBST(staprun_LIBS) | |
484 | AC_MSG_NOTICE([staprun will link $staprun_LIBS]) | |
485 | ||
cbe7ea07 | 486 | |
69c68955 FCE |
487 | dnl Plop in the build (configure) date |
488 | date=`date +%Y-%m-%d` | |
489 | AC_DEFINE_UNQUOTED(DATE, "$date", [Configuration/build date]) | |
82fab474 | 490 | AC_SUBST(DATE, "$date") |
69c68955 | 491 | |
47f390f9 FCE |
492 | # Before PR4037, we used to arrange to pass CFLAGS+=-m64 for a staprun |
493 | # being compiled on 32-bit userspace but running against 64-bit kernels. | |
494 | # This is no longer necessary. | |
5566993b | 495 | |
3bf6ac45 TM |
496 | # Use tr1/unordered_map if available |
497 | AC_LANG_PUSH(C++) | |
498 | AC_CHECK_HEADERS([tr1/unordered_map]) | |
469c1a1b FCE |
499 | AC_CHECK_HEADERS([tr1/memory]) |
500 | AC_CHECK_HEADERS([boost/shared_ptr.hpp]) | |
3dd76f53 | 501 | AC_CHECK_HEADERS([boost/utility/string_ref.hpp]) |
3bf6ac45 TM |
502 | AC_LANG_POP(C++) |
503 | ||
4d9087fc | 504 | |
138bbe90 | 505 | # Check for Dyninst headers and libraries |
138bbe90 JS |
506 | AC_ARG_WITH([dyninst], |
507 | AS_HELP_STRING([--with-dyninst=DIRECTORY], | |
eab44db5 FCE |
508 | [find dyninst headers/libraries in DIRECTORY])) |
509 | ||
138bbe90 | 510 | case "$with_dyninst" in |
eab44db5 FCE |
511 | no) ;; |
512 | ''|yes) # Try a simple-minded distro search | |
ffbe6348 JS |
513 | DYNINST_CXXFLAGS="-I/usr/include/dyninst" |
514 | DYNINST_LDFLAGS="-L/usr/lib64/dyninst -L/usr/lib/dyninst" # XXX both lib paths!?! | |
515 | ;; | |
516 | *) # Use paths in the user-specified prefix | |
517 | DYNINST_CXXFLAGS="-I$with_dyninst/include" | |
3aeea85c | 518 | DYNINST_LDFLAGS="-L$with_dyninst/lib/" # XXX need lib64 too? |
138bbe90 | 519 | ;; |
ffbe6348 | 520 | esac |
e0a17c00 | 521 | if test "$with_dyninst" != "no"; then |
ffbe6348 JS |
522 | AC_LANG_PUSH(C++) |
523 | old_CPPFLAGS="$CPPFLAGS" | |
524 | CPPFLAGS="$CPPFLAGS $DYNINST_CXXFLAGS" | |
2494675c | 525 | AC_MSG_NOTICE([checking dyninst support]) |
ffbe6348 JS |
526 | AC_CHECK_HEADERS([BPatch_object.h], [ |
527 | AC_SUBST(DYNINST_CXXFLAGS) | |
528 | AC_SUBST(DYNINST_LDFLAGS) | |
a3524565 | 529 | AC_DEFINE([HAVE_DYNINST],[1],[Define to 1 if Dyninst is enabled]) |
ffbe6348 | 530 | have_dyninst=yes |
2494675c | 531 | AC_MSG_NOTICE([dyninst support available])]) |
e0a17c00 | 532 | if test -n "$with_dyninst" -a "$have_dyninst" != "yes"; then |
2494675c DS |
533 | AC_MSG_ERROR([Dyninst does not appear to be usable]) |
534 | fi | |
ffbe6348 JS |
535 | CPPFLAGS="$old_CPPFLAGS" |
536 | AC_LANG_POP(C++) | |
537 | fi | |
138bbe90 JS |
538 | AM_CONDITIONAL([HAVE_DYNINST], [test "${have_dyninst}" = "yes"]) |
539 | ||
b0c670f4 | 540 | |
64b53440 JL |
541 | dnl Check for the libvirt and libxml2 devel packages |
542 | ||
b0c670f4 FCE |
543 | AC_ARG_ENABLE([virt], |
544 | AS_HELP_STRING([--enable-virt], | |
545 | [enable building of stapvirt support (default on if libvirt etc. found).]), | |
546 | [enable_virt=$enableval], | |
547 | [enable_virt="check"]) | |
548 | ||
64b53440 JL |
549 | dnl We require libvirt >= 1.0.2 because stapvirt relies on the |
550 | dnl virDomainOpenChannel function, which was implemented in 1.0.2. | |
c17539a5 JL |
551 | PKG_CHECK_MODULES([libvirt], [libvirt >= 1.0.2], [ |
552 | have_libvirt=yes | |
553 | AC_DEFINE([HAVE_LIBVIRT],[1],[Define to 1 if libvirt development libraries are installed]) | |
554 | ], [have_libvirt=no]) | |
64b53440 | 555 | AM_CONDITIONAL([HAVE_LIBVIRT], [test "${have_libvirt}" = "yes"]) |
c17539a5 JL |
556 | PKG_CHECK_MODULES([libxml2], [libxml-2.0], [ |
557 | have_libxml2=yes | |
558 | AC_DEFINE([HAVE_LIBXML2],[1],[Define to 1 if libxml2 development libraries are installed]) | |
559 | ], [have_libxml2=no]) | |
64b53440 | 560 | AM_CONDITIONAL([HAVE_LIBXML2], [test "${have_libxml2}" = "yes"]) |
138bbe90 | 561 | |
b0c670f4 FCE |
562 | if test "$enable_virt" != "no"; then |
563 | dnl See if we have enough libraries and tools to build the virt server | |
564 | if test "x${have_libvirt}" != "xyes"; then | |
565 | AC_MSG_WARN([will not build systemtap virt support, cannot find libvirt headers]) | |
566 | fi | |
567 | if test "x${have_libxml2}" != "xyes"; then | |
568 | AC_MSG_WARN([will not build systemtap virt support, cannot find xml2 headers]) | |
569 | fi | |
570 | fi | |
571 | AM_CONDITIONAL([BUILD_VIRT], [test "${have_libvirt}" == "yes" -a "${have_libxml2}" == "yes" -a "$enable_virt" != "no"]) | |
572 | ||
11ea78d6 FL |
573 | dnl Check for presence of json-c and ncurses for use in monitor mode |
574 | PKG_CHECK_MODULES([jsonc], [json-c], [have_jsonc=yes], [have_jsonc=no]) | |
575 | PKG_CHECK_MODULES([ncurses], [ncurses], [have_ncurses=yes], [have_ncurses=no]) | |
576 | AM_CONDITIONAL([HAVE_MONITOR_LIBS], [test "${have_jsonc}" == "yes" -a "${have_ncurses}" == "yes"]) | |
577 | if test "${have_jsonc}" == "yes" -a "${have_ncurses}" == yes; then | |
578 | AC_DEFINE([HAVE_MONITOR_LIBS],[1],[Define to 1 if json-c and ncurses libraries are installed]) | |
579 | fi | |
b0c670f4 | 580 | |
f9794ee4 RM |
581 | AC_CACHE_CHECK([for assembler .section "?" flags support], stap_cv_sectionq, [ |
582 | old_CFLAGS="$CFLAGS" | |
583 | CFLAGS="$CFLAGS -Wa,--fatal-warnings" | |
5d4aa1f5 | 584 | AC_COMPILE_IFELSE([AC_LANG_SOURCE([asm(".section .note.foo,\"?\",\"note\"\n" |
f9794ee4 RM |
585 | ".byte 1, 2, 3\n" |
586 | ".previous\n" | |
587 | ".section .text,\"axG\",\"progbits\",foogroup,comdat\n" | |
588 | ".byte 1\n" | |
589 | ".pushsection .note.foo,\"?\",\"note\"\n" | |
590 | ".byte 4, 5, 6\n" | |
591 | ".popsection\n" | |
5d4aa1f5 | 592 | ".byte 2\n");])], |
f9794ee4 | 593 | stap_cv_sectionq=yes, stap_cv_sectionq=no) |
a530cfe0 | 594 | CFLAGS="$old_CFLAGS"]) |
f9794ee4 RM |
595 | AC_SUBST(support_section_question) |
596 | support_section_question=0 | |
597 | if test $stap_cv_sectionq = yes; then | |
598 | support_section_question=1 | |
599 | fi | |
8f223b3e | 600 | AC_CONFIG_FILES([includes/sys/sdt-config.h po/Makefile.in]) |
f9794ee4 | 601 | |
efa6ba96 | 602 | if test $build_elfutils = yes -a $enable_translator = yes; then |
d2bd25ac | 603 | here=`pwd` |
4d9087fc RM |
604 | case "$with_elfutils" in |
605 | /*) elfutils_srcdir="$with_elfutils" ;; | |
d2bd25ac | 606 | *) elfutils_srcdir="${here}/$with_elfutils" ;; |
4d9087fc | 607 | esac |
d2bd25ac MW |
608 | |
609 | if ! test -f ${elfutils_srcdir}/configure; then | |
610 | AC_MSG_ERROR([No ${elfutils_srcdir}/configure, forgot to run autoreconf -i?]) | |
611 | fi | |
4d9087fc | 612 | AC_MSG_NOTICE([running ${elfutils_srcdir}/configure]) |
29b694a7 DS |
613 | |
614 | save_CFLAGS="$CFLAGS" | |
615 | save_CXXFLAGS="$CXXFLAGS" | |
616 | CXXFLAGS="$CXXFLAGS -fgnu89-inline" | |
617 | CFLAGS="$CFLAGS -fgnu89-inline" | |
618 | gnu89_inline_flag="" | |
5d4aa1f5 | 619 | AC_COMPILE_IFELSE([AC_LANG_SOURCE([int something ();])], [ |
29b694a7 DS |
620 | AC_MSG_NOTICE([Compiling elfutils with gcc -fgnu89-inline]) |
621 | gnu89_inline_flag="-fgnu89-inline"],[ | |
622 | AC_MSG_NOTICE([Compiler does not support -fgnu89-inline])]) | |
623 | CFLAGS="$save_CFLAGS" | |
624 | CXXFLAGS="$save_CXXFLAGS" | |
625 | ||
b7165f65 RM |
626 | # Our libdw.so's libebl will look in $ORIGIN/../lib/... but that |
627 | # $ORIGIN is where libdw.so resides, which is not where there is a ../lib. | |
fa1d05cd RM |
628 | # Note that $libdir might be using a quoted use of $exec_prefix or $prefix. |
629 | # So we must make sure to pass those settings to elfutils configure. | |
b7165f65 | 630 | elfutils_rpath="-Wl,--enable-new-dtags,-rpath,${libdir}/${PACKAGE_NAME}" |
33ee059c MW |
631 | # Check whether this is a source release, or a source checkout. |
632 | # We need --enable-maintainer-mode if it isn't a source release. | |
633 | # elfutils.spec is only distributed in source releases. | |
634 | if test -f ${elfutils_srcdir}/elfutils.spec; then | |
635 | need_maintainer_option="" | |
636 | else | |
637 | need_maintainer_option="--enable-maintainer-mode" | |
638 | fi | |
4d9087fc | 639 | (mkdir -p build-elfutils && cd build-elfutils && |
412e1bf7 | 640 | bash ${elfutils_srcdir}/configure --enable-libebl-subdir=${PACKAGE_NAME} \ |
4d9087fc | 641 | --includedir="${here}/include-elfutils" \ |
b7165f65 | 642 | --libdir="${here}/lib-elfutils" \ |
fa1d05cd RM |
643 | --exec-prefix="$exec_prefix" \ |
644 | --prefix="$prefix" \ | |
90491495 | 645 | --enable-dwz \ |
33ee059c | 646 | ${need_maintainer_option} \ |
c2444a96 | 647 | CFLAGS="${CFLAGS/-Wall/} $gnu89_inline_flag -fexceptions" \ |
e016a49a | 648 | LDFLAGS="$LDFLAGS $elfutils_rpath" && |
e3633556 | 649 | if test -f ${elfutils_srcdir}/config/version.h.in; then |
e050d62f MW |
650 | echo Found elfutils/version.h header... |
651 | else | |
652 | echo elfutils/version.h header not found, need elfutils 0.142+... | |
653 | exit -1 | |
e3633556 | 654 | fi |
4d9087fc | 655 | ) |
e050d62f | 656 | if test $? != 0; then exit -1; fi |
4d9087fc | 657 | fi |
5566993b | 658 | |
51030d84 JS |
659 | dnl Optional libselinux support allows stapdyn to check |
660 | dnl for booleans that would prevent Dyninst from working. | |
661 | AC_ARG_WITH([selinux], | |
662 | AS_HELP_STRING([--without-selinux], | |
663 | [Do not use libselinux even if present])) | |
664 | ||
665 | AS_IF([test "x$with_selinux" != "xno"], [ | |
666 | PKG_CHECK_MODULES([selinux], [libselinux], | |
667 | [have_selinux=yes | |
668 | AC_DEFINE([HAVE_SELINUX], [1], [Define to 1 if you have the SELinux libraries.]) | |
669 | ], [have_selinux=no]) | |
670 | ], [have_selinux=no]) | |
671 | ||
672 | AM_CONDITIONAL([HAVE_SELINUX], [test "${have_selinux}" = "yes"]) | |
673 | ||
95835e2c | 674 | dnl Handle java+byteman support |
e9b0aba1 SM |
675 | AC_CHECK_PROG(have_javac, javac, yes, no) |
676 | AC_CHECK_PROG(have_jar, jar, yes, no) | |
677 | if test "$have_javac" != no -a "$have_jar" != no; then | |
678 | echo java found, will try to configure Byteman support | |
95835e2c | 679 | |
26703c63 SM |
680 | AC_ARG_WITH([java], |
681 | [AS_HELP_STRING([--with-java=DIRECTORY], | |
682 | [Specify JDK directory to compile libHelperSDT.so against (default is /usr/lib/jvm/java)])], | |
93933baa | 683 | [], |
26703c63 | 684 | [with_java=/usr/lib/jvm/java]) |
ef50e368 | 685 | dnl don't use AC_CHECK_FILE here, as that blocks cross-compiling |
a71e842d | 686 | if test ! -d "$with_java"; then |
ef50e368 FCE |
687 | with_java=no |
688 | fi | |
26703c63 | 689 | AC_SUBST(JAVADIR, "${with_java}") # always needed to compile |
95835e2c | 690 | |
26703c63 SM |
691 | if test "$with_java" != "no"; then |
692 | AC_DEFINE_UNQUOTED(HAVE_JAVA, "1", [Flag indicating that libHelperSDT.so is available (can be found in PKGLIBDIR)]) | |
13c19b49 | 693 | fi |
275cd71a | 694 | |
26703c63 | 695 | AM_CONDITIONAL([HAVE_JAVA], [test "$with_java" != "no"]) |
7fe06356 | 696 | |
95835e2c SM |
697 | else |
698 | AC_MSG_WARN([will not run per-method java probing, missing byteman or java requirements]) | |
26703c63 | 699 | AM_CONDITIONAL([HAVE_JAVA],false) |
93933baa | 700 | fi # java+byteman support |
7fe06356 | 701 | |
62c8a962 FCE |
702 | AC_SUBST(ENABLE_NLS, "$USE_NLS") |
703 | AC_SUBST(localedir, "$localedir") | |
704 | AC_SUBST(LOCALEDIR, "$localedir") | |
705 | ||
85b62eab FCE |
706 | AC_ARG_WITH([extra-version], |
707 | AS_HELP_STRING([--with-extra-version=STRING], | |
708 | [Add STRING to stap -V version])) | |
709 | AS_IF([test "x$with_extra_version" != "xno"], [ | |
710 | stap_extra_version="$with_extra_version" | |
711 | AC_MSG_NOTICE([Adding extra version $stap_extra_version])], [ | |
712 | stap_extra_version=""]) | |
713 | AC_DEFINE_UNQUOTED(STAP_EXTRA_VERSION, "$stap_extra_version", [extra stap version code]) | |
714 | AC_SUBST(STAP_EXTRA_VERSION, "$stap_extra_version") | |
715 | ||
0de35d9e FCE |
716 | dnl The stap translator stringtable benefits performance-wise from c++11 constructs. |
717 | AX_CHECK_COMPILE_FLAG([-std=c++11],[cxx11="-std=c++11"],[cxx11=""]) | |
718 | AS_IF([test "x$cxx11" != "x"],[ | |
719 | AC_MSG_NOTICE([Compiling parts of systemtap with -std=c++11])]) | |
720 | AC_SUBST(cxx11) | |
721 | ||
50431f30 MW |
722 | dnl This is here mainly to make sure that configure --prefix=... changes |
723 | dnl the config.h files so files depending on it are recompiled | |
724 | dnl prefix is passed through indirectly in the Makefile.am AM_CPPFLAGS. | |
2a1c9b5d FCE |
725 | dnl Formerly: Don't use this directly (when not given it is set to NONE). |
726 | dnl Currently: inline autoconf's later defaulting | |
802cd104 | 727 | |
2a1c9b5d FCE |
728 | stap_prefix=$prefix |
729 | test "$stap_prefix" = NONE && stap_prefix=$ac_default_prefix | |
730 | AC_DEFINE_UNQUOTED(STAP_PREFIX, "$stap_prefix", [configure prefix location]) | |
62c8a962 | 731 | AC_SUBST(STAP_PREFIX, "$stap_prefix") |
50431f30 | 732 | |
e016a49a | 733 | AC_CONFIG_HEADERS([config.h:config.in]) |
d679d193 | 734 | AC_CONFIG_FILES([Makefile doc/Makefile man/Makefile man/cs/Makefile \ |
c24a9d9a | 735 | doc/beginners/Makefile doc/SystemTap_Tapset_Reference/Makefile \ |
0b03204e | 736 | man/stap.1 man/stappaths.7 man/systemtap.8 \ |
24ef0e88 | 737 | man/cs/stap.1 man/cs/stappaths.7 man/cs/systemtap.8 \ |
29fe12e4 | 738 | initscript/config.systemtap initscript/config.stap-server \ |
e6c842d9 JL |
739 | initscript/systemtap initscript/stap-server \ |
740 | initscript/99stap/module-setup.sh ]) | |
97859b9d | 741 | AC_CONFIG_SUBDIRS(testsuite) |
6d14a4a9 EB |
742 | if test $enable_translator == "yes"; then |
743 | AC_CONFIG_FILES([run-stap], [chmod +x run-stap]) | |
744 | fi | |
e4aaabda | 745 | AC_CONFIG_FILES([dtrace], [chmod +x dtrace]) |
66c3c633 | 746 | AC_CONFIG_FILES(stapdyn/Makefile) |
7fe06356 | 747 | AC_CONFIG_FILES(java/Makefile) |
d885563b | 748 | AC_CONFIG_FILES([java/stapbm], [chmod +x java/stapbm]) |
97859b9d JS |
749 | AC_CONFIG_FILES(staprun/Makefile) |
750 | AC_CONFIG_FILES([staprun/run-staprun], [chmod +x staprun/run-staprun]) | |
bf61ca10 JL |
751 | AC_CONFIG_FILES([staprun/guest/stapshd], [chmod +x staprun/guest/stapshd]) |
752 | AC_CONFIG_FILES([staprun/guest/stapsh-daemon], [chmod +x staprun/guest/stapsh-daemon]) | |
753 | AC_CONFIG_FILES([staprun/guest/stapsh@.service]) | |
53ade4da | 754 | |
a98010af AJ |
755 | # Setup "shadow" directory doc/beginners that has the basic directories setup for |
756 | # xmlto in one directory (through directory links if necessary). | |
53ade4da MW |
757 | # It would be nice to use AC_CONFIG_LINKS, but automake complains when |
758 | # the src is a directory and not a file. | |
53ade4da | 759 | AC_CONFIG_COMMANDS([doc/beginners], |
d9c42357 | 760 | [rm -f $ac_abs_top_builddir/doc/beginners/en-US $ac_abs_top_builddir/doc/beginners/build/en-US/testsuite && mkdir -p $ac_abs_top_builddir/doc/beginners/build/en-US && ln -s $ac_abs_top_srcdir/doc/SystemTap_Beginners_Guide/en-US $ac_abs_top_builddir/doc/beginners/en-US && ln -s $ac_abs_top_srcdir/testsuite $ac_abs_top_builddir/doc/beginners/build/en-US/testsuite]) |
53ade4da | 761 | |
e016a49a FCE |
762 | AC_OUTPUT |
763 | ||
af29024d FCE |
764 | if test "${prefix}" = "/usr/local"; then |
765 | AC_MSG_NOTICE([]) | |
766 | AC_MSG_NOTICE([For a private or temporary build of systemtap, we recommend]) | |
767 | AC_MSG_NOTICE([configuring with a prefix. For example, try]) | |
768 | AC_MSG_NOTICE([$0 $ac_configure_args --prefix=$HOME/systemtap-${PACKAGE_VERSION}-$$]) | |
769 | AC_MSG_NOTICE([Running systemtap uninstalled, entirely out of the build tree,]) | |
770 | AC_MSG_NOTICE([is not supported.]) | |
771 | fi |