summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorKai Blin <kai@samba.org>2011-04-18 14:55:51 +0200
committerGünther Deschner <gd@samba.org>2011-04-18 16:24:15 +0200
commitc2a62e854632dcae69a5ae911b6ab11e272d0a81 (patch)
treef93e7c0ad019a087a5d43b363660b2951baf2d73 /source3
parentd09f02909f6adae1d68264bd3790c77fcee5e80d (diff)
downloadsamba-c2a62e854632dcae69a5ae911b6ab11e272d0a81.tar.gz
samba-c2a62e854632dcae69a5ae911b6ab11e272d0a81.tar.bz2
samba-c2a62e854632dcae69a5ae911b6ab11e272d0a81.zip
s3 waf: Mimic the autoconf check for netgrent
The autoconf check for netgrent headers makes sure that the compiler flag used (-Werror-implicit-function-declaration) is recognized by the compiler before using it for the test. Mimic this behaviour in the waf checks. Thanks to gd for noticing this. Signed-off-by: Günther Deschner <gd@samba.org> Autobuild-User: Günther Deschner <gd@samba.org> Autobuild-Date: Mon Apr 18 16:24:15 CEST 2011 on sn-devel-104
Diffstat (limited to 'source3')
-rw-r--r--source3/wscript10
1 files changed, 7 insertions, 3 deletions
diff --git a/source3/wscript b/source3/wscript
index ffcecca195..2d454c57fa 100644
--- a/source3/wscript
+++ b/source3/wscript
@@ -522,18 +522,22 @@ msg.msg_acctrightslen = sizeof(fd);
define='HAVE_DIRENT_D_OFF')
conf.CHECK_FUNCS('setnetgrent getnetgrent endnetgrent')
+ if conf.CHECK_CFLAGS('-Werror-implicit-function-declaration'):
+ netgrent_cflags = '-Werror-implicit-function-declaration'
+ else:
+ netgrent_cflags = ''
conf.CHECK_CODE('setnetgrent("foo")', 'HAVE_SETNETGRENT_PROTOTYPE',
msg="Checking for setnetgrent prototype",
headers='netdb.h netgroup.h',
- cflags="-Werror-implicit-function-declaration")
+ cflags=netgrent_cflags)
conf.CHECK_CODE('getnetgrent', 'HAVE_GETNETGRENT_PROTOTYPE',
msg="Checking for getnetgrent prototype",
headers='netdb.h netgroup.h',
- cflags="-Werror-implicit-function-declaration")
+ cflags=netgrent_cflags)
conf.CHECK_CODE('endnetgrent', 'HAVE_ENDNETGRENT_PROTOTYPE',
msg="Checking for endnetgrent prototype",
headers='netdb.h netgroup.h',
- cflags="-Werror-implicit-function-declaration")
+ cflags=netgrent_cflags)
# Look for CUPS