diff options
author | Didier Raboud <odyx@debian.org> | 2014-01-02 23:05:18 +0100 |
---|---|---|
committer | Didier Raboud <odyx@debian.org> | 2014-01-02 23:05:18 +0100 |
commit | b4db6beca042dcbfd5530ef8c559bfab71a11ade (patch) | |
tree | a2d41ae625d277d3285167fc64b73b58bc010065 /config-scripts/cups-compiler.m4 | |
parent | d13746555c30d1d1bd617dcf64d5b92e319ae2b5 (diff) | |
download | cups-upstream/1.7.0.tar.gz |
Imported Upstream version 1.7.0upstream/1.7.0
Diffstat (limited to 'config-scripts/cups-compiler.m4')
-rw-r--r-- | config-scripts/cups-compiler.m4 | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/config-scripts/cups-compiler.m4 b/config-scripts/cups-compiler.m4 index 2bf1442a..252f2aa2 100644 --- a/config-scripts/cups-compiler.m4 +++ b/config-scripts/cups-compiler.m4 @@ -132,18 +132,23 @@ if test -n "$GCC"; then # Not available to LSB binaries... AC_MSG_CHECKING(if GCC supports -fPIE) OLDCFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -fPIE" - AC_TRY_COMPILE(,, - [case "$CC" in - *clang) + case "$uname" in + Darwin*) + CFLAGS="$CFLAGS -fPIE -Wl,-pie" + AC_TRY_COMPILE(,,[ PIEFLAGS="-fPIE -Wl,-pie" - ;; - *) + AC_MSG_RESULT(yes)], + AC_MSG_RESULT(no)) + ;; + + *) + CFLAGS="$CFLAGS -fPIE -pie" + AC_TRY_COMPILE(,,[ PIEFLAGS="-fPIE -pie" - ;; - esac - AC_MSG_RESULT(yes)], - AC_MSG_RESULT(no)) + AC_MSG_RESULT(yes)], + AC_MSG_RESULT(no)) + ;; + esac CFLAGS="$OLDCFLAGS" fi |