s3-waf: add check for HAVE_FUNCTION_ATTRIBUTE_DESTRUCTOR.
authorGünther Deschner <gd@samba.org>
Thu, 3 Mar 2011 21:10:40 +0000 (22:10 +0100)
committerGünther Deschner <gd@samba.org>
Thu, 3 Mar 2011 23:28:28 +0000 (00:28 +0100)
Guenther

source3/wscript

index 2082a8bd056e465a9071d47bc56fc3da44f6a727..1062b3a463955374fcea3e5189de0650ce074951 100644 (file)
@@ -1493,6 +1493,12 @@ main() {
         # For sys/quota.h and linux/quota.h
         conf.CHECK_HEADERS('sys/quota.h')
 
+    conf.CHECK_CODE('__attribute__((destructor)) static void cleanup(void) { }',
+                   'HAVE_FUNCTION_ATTRIBUTE_DESTRUCTOR',
+                   addmain=False,
+                   link=False,
+                   msg='Checking whether we can compile with __attribute__((destructor))')
+
     default_static_modules=TO_LIST('''pdb_smbpasswd pdb_tdbsam pdb_wbc_sam
                                       auth_sam auth_unix auth_winbind auth_wbc auth_server
                                       auth_domain auth_builtin vfs_default