diff options
author | Darren Tucker <dtucker@zip.com.au> | 2013-02-08 11:50:09 +1100 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2013-02-08 11:50:09 +1100 |
commit | 951b53b1bede98fdcfeeac8c5c00dbf3948d9b75 (patch) | |
tree | 669491e147904e17ea43fe7f66453bc45876aedb /configure.ac | |
parent | e7f50e1c181bad14787a4b995875ed63b79adf5d (diff) |
- (dtucker) [configure.ac openbsd-compat/sys-tree.h] Test if compiler allows
__attribute__ on return values and work around if necessary. ok djm@
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index f61106441..6df09e210 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -1,4 +1,4 @@ | |||
1 | # $Id: configure.ac,v 1.501 2013/02/06 23:11:05 djm Exp $ | 1 | # $Id: configure.ac,v 1.502 2013/02/08 00:50:09 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 | ||
17 | AC_INIT([OpenSSH], [Portable], [openssh-unix-dev@mindrot.org]) | 17 | AC_INIT([OpenSSH], [Portable], [openssh-unix-dev@mindrot.org]) |
18 | AC_REVISION($Revision: 1.501 $) | 18 | AC_REVISION($Revision: 1.502 $) |
19 | AC_CONFIG_SRCDIR([ssh.c]) | 19 | AC_CONFIG_SRCDIR([ssh.c]) |
20 | AC_LANG([C]) | 20 | AC_LANG([C]) |
21 | 21 | ||
@@ -238,6 +238,18 @@ if test "$GCC" = "yes" || test "$GCC" = "egcs"; then | |||
238 | fi | 238 | fi |
239 | fi | 239 | fi |
240 | 240 | ||
241 | AC_MSG_CHECKING([if compiler allows __attribute__ on return types]) | ||
242 | AC_COMPILE_IFELSE( | ||
243 | [AC_LANG_PROGRAM([[ | ||
244 | #include <stdlib.h> | ||
245 | __attribute__((__unused__)) static void foo(void){return;}]], | ||
246 | [[ exit(0); ]])], | ||
247 | [ AC_MSG_RESULT([yes]) ], | ||
248 | [ AC_MSG_RESULT([no]) | ||
249 | AC_DEFINE(NO_ATTRIBUTE_ON_RETURN_TYPE, 1, | ||
250 | [compiler does not accept __attribute__ on return types]) ] | ||
251 | ) | ||
252 | |||
241 | if test "x$no_attrib_nonnull" != "x1" ; then | 253 | if test "x$no_attrib_nonnull" != "x1" ; then |
242 | AC_DEFINE([HAVE_ATTRIBUTE__NONNULL__], [1], [Have attribute nonnull]) | 254 | AC_DEFINE([HAVE_ATTRIBUTE__NONNULL__], [1], [Have attribute nonnull]) |
243 | fi | 255 | fi |