summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-05-10 11:53:03 +0200
committerVolker Lendecke <vl@samba.org>2010-05-10 14:11:14 +0200
commit36e736871e28665ffcbbc4d0c87e1a2b60fcf0e0 (patch)
tree39c6e3b4647e79ef5d9c0a6505ae64581879ee23 /source3
parente2806f9e4d027439c983bcede714f5eed5bcf668 (diff)
downloadsamba-36e736871e28665ffcbbc4d0c87e1a2b60fcf0e0.tar.gz
samba-36e736871e28665ffcbbc4d0c87e1a2b60fcf0e0.tar.bz2
samba-36e736871e28665ffcbbc4d0c87e1a2b60fcf0e0.zip
s3: Test for "__attribute__((destructor))"
Diffstat (limited to 'source3')
-rw-r--r--source3/configure.in16
1 files changed, 16 insertions, 0 deletions
diff --git a/source3/configure.in b/source3/configure.in
index 2e677d7b64..046df41320 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -1366,6 +1366,22 @@ if test x"$samba_cv_stat_dos_flags" = x"yes" ; then
AC_DEFINE(HAVE_STAT_DOS_FLAGS, 1, [whether there is DOS flags support in the stat struct])
fi
+AC_CACHE_CHECK([whether we can compile with __attribute__((destructor))],
+ samba_cv_function_attribute_destructor,
+ [
+ AC_COMPILE_IFELSE(
+ [
+ __attribute__((destructor))
+ static void cleanup(void) { }
+ ],
+ samba_cv_function_attribute_destructor=yes)
+ ])
+
+if test x"$samba_cv_function_attribute_destructor" = xyes ; then
+ AC_DEFINE(HAVE_FUNCTION_ATTRIBUTE_DESTRUCTOR, 1,
+ [whether we can compile with __attribute__((destructor))])
+fi
+
#####################################
# needed for SRV lookups
AC_CHECK_LIB(resolv, dn_expand)