summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure188
1 files changed, 182 insertions, 6 deletions
diff --git a/configure b/configure
index 7d2a0b41..e05e7321 100755
--- a/configure
+++ b/configure
@@ -1336,6 +1336,7 @@ Optional Features:
location).
--enable-docs enable building documentation (default on if latex
etc. found).
+ --enable-staticdw support distributions with static libdw
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -6022,8 +6023,8 @@ if test "x$enable_pie" != xno; then
save_CFLAGS="$CFLAGS"
save_CXXFLAGS="$CXXFLAGS"
save_LDFLAGS="$LDFLAGS"
- CFLAGS="$CFLAGS -fpie"
- CXXFLAGS="$CXXFLAGS -fpie"
+ CFLAGS="$CFLAGS -fPIE"
+ CXXFLAGS="$CXXFLAGS -fPIE"
LDFLAGS="$LDFLAGS -pie -Wl,-z,relro -Wl,-z,now"
cat >conftest.$ac_ext <<_ACEOF
void main () {}
@@ -6604,9 +6605,17 @@ fi
`
+# Check whether --enable-staticdw was given.
+if test "${enable_staticdw+set}" = set; then
+ enableval=$enable_staticdw;
+fi
+
+
if test $build_elfutils = no; then
# Need libdwfl-capable recent elfutils from Fedora
save_LIBS="$LIBS"
+ if test "x$enable_staticdw" != xyes; then
+
{ echo "$as_me:$LINENO: checking for dwfl_module_getsym in -ldw" >&5
echo $ECHO_N "checking for dwfl_module_getsym in -ldw... $ECHO_C" >&6; }
@@ -6678,7 +6687,7 @@ _ACEOF
else
- { { echo "$as_me:$LINENO: error: missing elfutils development headers/libraries (dw 0.123+)" >&5
+ { { echo "$as_me:$LINENO: error: missing elfutils development headers/libraries (dw 0.123+)" >&5
echo "$as_me: error: missing elfutils development headers/libraries (dw 0.123+)" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -6754,17 +6763,183 @@ _ACEOF
else
- { { echo "$as_me:$LINENO: error: missing elfutils development headers/libraries (ebl 0.123+)" >&5
+ { { echo "$as_me:$LINENO: error: missing elfutils development headers/libraries (ebl 0.123+)" >&5
+echo "$as_me: error: missing elfutils development headers/libraries (ebl 0.123+)" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+
+ stap_LIBS="$LIBS"
+
+else
+
+ # Debian ships with a static libdw, which has a circular dependency on libebl
+
+{ echo "$as_me:$LINENO: checking for dwfl_module_getsym in -ldw" >&5
+echo $ECHO_N "checking for dwfl_module_getsym in -ldw... $ECHO_C" >&6; }
+if test "${ac_cv_lib_dw_dwfl_module_getsym+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldw -Wl,--start-group -ldw -lebl -Wl,--end-group -lelf $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dwfl_module_getsym ();
+int
+main ()
+{
+return dwfl_module_getsym ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ ac_cv_lib_dw_dwfl_module_getsym=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_dw_dwfl_module_getsym=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_dw_dwfl_module_getsym" >&5
+echo "${ECHO_T}$ac_cv_lib_dw_dwfl_module_getsym" >&6; }
+if test $ac_cv_lib_dw_dwfl_module_getsym = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBDW 1
+_ACEOF
+
+ LIBS="-ldw $LIBS"
+
+else
+
+ { { echo "$as_me:$LINENO: error: missing elfutils development headers/libraries (dw 0.123+)" >&5
+echo "$as_me: error: missing elfutils development headers/libraries (dw 0.123+)" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+
+{ echo "$as_me:$LINENO: checking for ebl_openbackend in -lebl" >&5
+echo $ECHO_N "checking for ebl_openbackend in -lebl... $ECHO_C" >&6; }
+if test "${ac_cv_lib_ebl_ebl_openbackend+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lebl -lelf $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char ebl_openbackend ();
+int
+main ()
+{
+return ebl_openbackend ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ ac_cv_lib_ebl_ebl_openbackend=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_ebl_ebl_openbackend=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_ebl_ebl_openbackend" >&5
+echo "${ECHO_T}$ac_cv_lib_ebl_ebl_openbackend" >&6; }
+if test $ac_cv_lib_ebl_ebl_openbackend = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBEBL 1
+_ACEOF
+
+ LIBS="-lebl $LIBS"
+
+else
+
+ { { echo "$as_me:$LINENO: error: missing elfutils development headers/libraries (ebl 0.123+)" >&5
echo "$as_me: error: missing elfutils development headers/libraries (ebl 0.123+)" >&2;}
{ (exit 1); exit 1; }; }
fi
- stap_LIBS="$LIBS"
+ stap_LIBS="-Wl,--start-group -ldw -lebl -Wl,--end-group -lelf"
+
+fi
+
LIBS="$save_LIBS"
else
# We built our own and stap_LDFLAGS points at the install.
+ if test "x$enable_staticdw" != xyes; then
stap_LIBS="-ldw -lebl"
+else
+ stap_LIBS="-Wl,--start-group -ldw -lebl -Wl,--end-group -lelf"
+fi
+
fi
@@ -7267,7 +7442,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_config_headers="$ac_config_headers config.h:config.in"
-ac_config_files="$ac_config_files Makefile doc/Makefile systemtap.spec stap.1 stapprobes.5 stapfuncs.5 stapex.5 staprun.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_files="$ac_config_files Makefile doc/Makefile systemtap.spec stap.1 stapprobes.5 stapfuncs.5 stapvars.5 stapex.5 staprun.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"
subdirs="$subdirs testsuite"
@@ -7899,6 +8074,7 @@ do
"stap.1") CONFIG_FILES="$CONFIG_FILES stap.1" ;;
"stapprobes.5") CONFIG_FILES="$CONFIG_FILES stapprobes.5" ;;
"stapfuncs.5") CONFIG_FILES="$CONFIG_FILES stapfuncs.5" ;;
+ "stapvars.5") CONFIG_FILES="$CONFIG_FILES stapvars.5" ;;
"stapex.5") CONFIG_FILES="$CONFIG_FILES stapex.5" ;;
"staprun.8") CONFIG_FILES="$CONFIG_FILES staprun.8" ;;
"man/stapprobes.iosched.5") CONFIG_FILES="$CONFIG_FILES man/stapprobes.iosched.5" ;;