summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--aclocal.m420
-rw-r--r--configure.ac32
2 files changed, 29 insertions, 23 deletions
diff --git a/aclocal.m4 b/aclocal.m4
index 83b241f7b..9bdea5ec2 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1,8 +1,26 @@
1dnl $Id: aclocal.m4,v 1.7 2011/05/05 03:48:37 djm Exp $ 1dnl $Id: aclocal.m4,v 1.8 2011/05/20 01:45:25 djm Exp $
2dnl 2dnl
3dnl OpenSSH-specific autoconf macros 3dnl OpenSSH-specific autoconf macros
4dnl 4dnl
5 5
6dnl OSSH_CHECK_CFLAG_COMPILE(check_flag[, define_flag])
7dnl Check that $CC accepts a flag 'check_flag'. If it is supported append
8dnl 'define_flag' to $CFLAGS. If 'define_flag' is not specified, then append
9dnl 'check_flag'.
10AC_DEFUN([OSSH_CHECK_CFLAG_COMPILE], [{
11 AC_MSG_CHECKING([if $CC supports $1])
12 saved_CFLAGS="$CFLAGS"
13 CFLAGS="$CFLAGS $1"
14 _define_flag="$2"
15 test "x$_define_flag" = "x" && _define_flag="$1"
16 AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int main(void) { return 0; }]])],
17 [ AC_MSG_RESULT([yes])
18 CFLAGS="$saved_CFLAGS $_define_flag"],
19 [ AC_MSG_RESULT([no])
20 CFLAGS="$saved_CFLAGS" ]
21 )
22}])
23
6 24
7dnl OSSH_CHECK_HEADER_FOR_FIELD(field, header, symbol) 25dnl OSSH_CHECK_HEADER_FOR_FIELD(field, header, symbol)
8dnl Does AC_EGREP_HEADER on 'header' for the string 'field' 26dnl Does AC_EGREP_HEADER on 'header' for the string 'field'
diff --git a/configure.ac b/configure.ac
index 5357cab60..d56bf6d36 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
1# $Id: configure.ac,v 1.473 2011/05/05 04:44:25 tim Exp $ 1# $Id: configure.ac,v 1.474 2011/05/20 01:45:25 djm Exp $
2# 2#
3# Copyright (c) 1999-2004 Damien Miller 3# Copyright (c) 1999-2004 Damien Miller
4# 4#
@@ -15,22 +15,10 @@
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.473 $) 18AC_REVISION($Revision: 1.474 $)
19AC_CONFIG_SRCDIR([ssh.c]) 19AC_CONFIG_SRCDIR([ssh.c])
20AC_LANG([C]) 20AC_LANG([C])
21 21
22# local macros
23AC_DEFUN([OPENSSH_CHECK_CFLAG_COMPILE], [{
24 AC_MSG_CHECKING([if $CC supports $1])
25 saved_CFLAGS="$CFLAGS"
26 CFLAGS="$CFLAGS $1"
27 AC_COMPILE_IFELSE([AC_LANG_SOURCE([[void main(void) { return 0; }]])],
28 [ AC_MSG_RESULT([yes]) ],
29 [ AC_MSG_RESULT([no])
30 CFLAGS="$saved_CFLAGS" ]
31 )
32}])
33
34AC_CONFIG_HEADER([config.h]) 22AC_CONFIG_HEADER([config.h])
35AC_PROG_CC 23AC_PROG_CC
36AC_CANONICAL_HOST 24AC_CANONICAL_HOST
@@ -128,14 +116,14 @@ AC_ARG_WITH([stackprotect],
128 116
129 117
130if test "$GCC" = "yes" || test "$GCC" = "egcs"; then 118if test "$GCC" = "yes" || test "$GCC" = "egcs"; then
131 OPENSSH_CHECK_CFLAG_COMPILE([-Wall]) 119 OSSH_CHECK_CFLAG_COMPILE([-Wall])
132 OPENSSH_CHECK_CFLAG_COMPILE([-Wpointer-arith]) 120 OSSH_CHECK_CFLAG_COMPILE([-Wpointer-arith])
133 OPENSSH_CHECK_CFLAG_COMPILE([-Wuninitialized]) 121 OSSH_CHECK_CFLAG_COMPILE([-Wuninitialized])
134 OPENSSH_CHECK_CFLAG_COMPILE([-Wsign-compare]) 122 OSSH_CHECK_CFLAG_COMPILE([-Wsign-compare])
135 OPENSSH_CHECK_CFLAG_COMPILE([-Wformat-security]) 123 OSSH_CHECK_CFLAG_COMPILE([-Wformat-security])
136 OPENSSH_CHECK_CFLAG_COMPILE([-Wno-pointer-sign]) 124 OSSH_CHECK_CFLAG_COMPILE([-Wpointer-sign], [-Wno-pointer-sign])
137 OPENSSH_CHECK_CFLAG_COMPILE([-Wno-unused-result]) 125 OSSH_CHECK_CFLAG_COMPILE([-Wunused-result], [-Wno-unused-result])
138 OPENSSH_CHECK_CFLAG_COMPILE([-fno-strict-aliasing]) 126 OSSH_CHECK_CFLAG_COMPILE([-fno-strict-aliasing])
139 AC_MSG_CHECKING([gcc version]) 127 AC_MSG_CHECKING([gcc version])
140 GCC_VER=`$CC -v 2>&1 | $AWK '/gcc version /{print $3}'` 128 GCC_VER=`$CC -v 2>&1 | $AWK '/gcc version /{print $3}'`
141 case $GCC_VER in 129 case $GCC_VER in