summaryrefslogtreecommitdiff
path: root/aclocal.m4
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2011-05-20 11:45:25 +1000
committerDamien Miller <djm@mindrot.org>2011-05-20 11:45:25 +1000
commitb176362d26dd746819b6287e4702bce90eefa2c1 (patch)
tree91fbe7dbeed5ed3751256e9844621d908e908017 /aclocal.m4
parent14684a1f84e2c8fc949ccff1a6dce10e9bf52ac2 (diff)
- (djm) [aclocal.m4 configure.ac] since gcc-4.x ignores all -Wno-options
options, we should corresponding -W-option when trying to determine whether it is accepted. Also includes a warning fix on the program fragment uses (bad main() return type). bz#1900 and bz#1901 reported by g.esp AT free.fr; ok dtucker@
Diffstat (limited to 'aclocal.m4')
-rw-r--r--aclocal.m420
1 files changed, 19 insertions, 1 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'