diff options
author | Richard Hughes <richard@hughsie.com> | 2014-10-09 20:02:01 +0100 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2014-10-09 20:02:12 +0100 |
commit | ba68c7a550f8e8fde479a8181dc3b2fd2a1506b1 (patch) | |
tree | 0ae4eb33b7d066faad0116bbcc9d79b89d5984fa | |
parent | feb65971a24f00b1ca46aae666dd7b3adaf1cdee (diff) | |
download | colord-ba68c7a550f8e8fde479a8181dc3b2fd2a1506b1.tar.gz |
Don't enable PIE support when --without-pic is specified
-rw-r--r-- | configure.ac | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac index 88a0e72..600c360 100644 --- a/configure.ac +++ b/configure.ac @@ -125,11 +125,13 @@ AC_SUBST(LIBM) GLIB_GSETTINGS # check for PIE (position independent executable) support -AX_CHECK_COMPILE_FLAG([-fPIE], - [AX_CHECK_LINK_FLAG([-fPIE -pie], - [PIE_CFLAGS="-fPIE" PIE_LDFLAGS="-pie"])]) -AC_SUBST(PIE_CFLAGS) -AC_SUBST(PIE_LDFLAGS) +if test x$with_pic != xno; then + AX_CHECK_COMPILE_FLAG([-fPIE], + [AX_CHECK_LINK_FLAG([-fPIE -pie], + [PIE_CFLAGS="-fPIE" PIE_LDFLAGS="-pie"])]) + AC_SUBST(PIE_CFLAGS) + AC_SUBST(PIE_LDFLAGS) +fi # check for full RELRO (relocation read-only) support AX_CHECK_LINK_FLAG([-Wl,-z,relro,-z,now], |