Add possibility to choose whether the code is compiled with PIE or without. New configuration flags: --enable-pie (default) --disable-pie --- configure.ac | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 62b74c5..96a7038 100644 --- a/configure.ac +++ b/configure.ac @@ -215,7 +215,6 @@ fi # Check for compiler and library settings. LIBVIRT_COMPILE_WARNINGS -LIBVIRT_COMPILE_PIE LIBVIRT_LINKER_RELRO LIBVIRT_LINKER_NO_INDIRECT @@ -581,7 +580,20 @@ if test x"$enable_debug" = x"yes"; then AC_DEFINE([ENABLE_DEBUG], [], [whether debugging is enabled]) fi +dnl --enable-pie=(yes|no) +AC_ARG_ENABLE([pie], + [AS_HELP_STRING([--enable-pie=@<:@no|yes@:>@], + [enable Position-Independent-Executables @<:@default=yes@:>@])], + [],[enable_pie=yes]) +AM_CONDITIONAL([ENABLE_PIE], test x"$enable_pie" = x"yes") +if test x"$enable_debug" = x"yes"; then + AC_DEFINE([ENABLE_PIE], [], [whether Position-Independent-Executables are enabled]) +fi +# Check if Position-Independent-Executables should be supported +if test "$enable_pie" = "yes" ; then +LIBVIRT_COMPILE_PIE +fi dnl dnl init script flavor -- 1.9.0 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list