summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2013-02-08 11:50:09 +1100
committerDarren Tucker <dtucker@zip.com.au>2013-02-08 11:50:09 +1100
commit951b53b1bede98fdcfeeac8c5c00dbf3948d9b75 (patch)
tree669491e147904e17ea43fe7f66453bc45876aedb /configure.ac
parente7f50e1c181bad14787a4b995875ed63b79adf5d (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.ac16
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
17AC_INIT([OpenSSH], [Portable], [openssh-unix-dev@mindrot.org]) 17AC_INIT([OpenSSH], [Portable], [openssh-unix-dev@mindrot.org])
18AC_REVISION($Revision: 1.501 $) 18AC_REVISION($Revision: 1.502 $)
19AC_CONFIG_SRCDIR([ssh.c]) 19AC_CONFIG_SRCDIR([ssh.c])
20AC_LANG([C]) 20AC_LANG([C])
21 21
@@ -238,6 +238,18 @@ if test "$GCC" = "yes" || test "$GCC" = "egcs"; then
238 fi 238 fi
239fi 239fi
240 240
241AC_MSG_CHECKING([if compiler allows __attribute__ on return types])
242AC_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
241if test "x$no_attrib_nonnull" != "x1" ; then 253if 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])
243fi 255fi