summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac23
1 files changed, 15 insertions, 8 deletions
diff --git a/configure.ac b/configure.ac
index b71f6832a..b6fa19bd0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
1# $Id: configure.ac,v 1.394 2008/03/09 00:34:23 dtucker Exp $ 1# $Id: configure.ac,v 1.395 2008/03/09 11:50:50 dtucker Exp $
2# 2#
3# Copyright (c) 1999-2004 Damien Miller 3# Copyright (c) 1999-2004 Damien Miller
4# 4#
@@ -15,7 +15,7 @@
15# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 16
17AC_INIT(OpenSSH, Portable, openssh-unix-dev@mindrot.org) 17AC_INIT(OpenSSH, Portable, openssh-unix-dev@mindrot.org)
18AC_REVISION($Revision: 1.394 $) 18AC_REVISION($Revision: 1.395 $)
19AC_CONFIG_SRCDIR([ssh.c]) 19AC_CONFIG_SRCDIR([ssh.c])
20 20
21AC_CONFIG_HEADER(config.h) 21AC_CONFIG_HEADER(config.h)
@@ -113,16 +113,23 @@ if test "$GCC" = "yes" || test "$GCC" = "egcs"; then
113 esac 113 esac
114 114
115 # -fstack-protector-all doesn't always work for some GCC versions 115 # -fstack-protector-all doesn't always work for some GCC versions
116 # and/or platforms, so we test if we can. 116 # and/or platforms, so we test if we can. If it's not supported
117 # on a give platform gcc will emit a warning so we use -Werror.
117 if test "x$use_stack_protector" = "x1"; then 118 if test "x$use_stack_protector" = "x1"; then
118 for t in -fstack-protector-all -fstack-protector; do 119 for t in -fstack-protector-all -fstack-protector; do
119 AC_MSG_CHECKING(if $CC understands $t) 120 AC_MSG_CHECKING(if $CC supports $t)
120 saved_CFLAGS="$CFLAGS" 121 saved_CFLAGS="$CFLAGS"
121 saved_LDFLAGS="$LDFLAGS" 122 saved_LDFLAGS="$LDFLAGS"
122 CFLAGS="$CFLAGS $t" 123 CFLAGS="$CFLAGS $t -Werror"
123 LDFLAGS="$LDFLAGS $t" 124 LDFLAGS="$LDFLAGS $t -Werror"
124 AC_TRY_LINK([], [ int main(void){return 0;} ], 125 AC_LINK_IFELSE(
126 [AC_LANG_SOURCE([
127#include <stdlib.h>
128int main(void){return 0;}
129 ])],
125 [ AC_MSG_RESULT(yes) 130 [ AC_MSG_RESULT(yes)
131 CFLAGS="$saved_CFLAGS $t"
132 LDFLAGS="$saved_LDFLAGS $t"
126 AC_MSG_CHECKING(if $t works) 133 AC_MSG_CHECKING(if $t works)
127 AC_RUN_IFELSE( 134 AC_RUN_IFELSE(
128 [AC_LANG_SOURCE([ 135 [AC_LANG_SOURCE([
@@ -134,7 +141,7 @@ int main(void){exit(0);}
134 [ AC_MSG_RESULT(no) ], 141 [ AC_MSG_RESULT(no) ],
135 [ AC_MSG_WARN([cross compiling: cannot test]) 142 [ AC_MSG_WARN([cross compiling: cannot test])
136 break ] 143 break ]
137 ) 144 )
138 ], 145 ],
139 [ AC_MSG_RESULT(no) ] 146 [ AC_MSG_RESULT(no) ]
140 ) 147 )