summaryrefslogtreecommitdiff
path: root/source4/build/m4
diff options
context:
space:
mode:
authorJames Peach <jpeach@samba.org>2006-01-31 00:00:10 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:51:36 -0500
commitb98a5bf92222e37eb62422f65ecc048511a8f256 (patch)
tree8165f61779632e5b5b2bd3510755b125b80d4623 /source4/build/m4
parentbf75891495f3ea99fd6d10a521a7bd5a13f624f2 (diff)
downloadsamba-b98a5bf92222e37eb62422f65ecc048511a8f256.tar.gz
samba-b98a5bf92222e37eb62422f65ecc048511a8f256.tar.bz2
samba-b98a5bf92222e37eb62422f65ecc048511a8f256.zip
r13243: Bring __FUNCTION__ checks across from Samba 3.
(This used to be commit 92eec049628a79f8d9496c6d199d6de0238e7940)
Diffstat (limited to 'source4/build/m4')
-rw-r--r--source4/build/m4/check_cc.m48
1 files changed, 8 insertions, 0 deletions
diff --git a/source4/build/m4/check_cc.m4 b/source4/build/m4/check_cc.m4
index f65adbbca4..a2d2bae79b 100644
--- a/source4/build/m4/check_cc.m4
+++ b/source4/build/m4/check_cc.m4
@@ -187,3 +187,11 @@ fi
AC_SUBST(HOSTCC)
AC_PATH_PROG(GCOV,gcov)
+
+AC_CACHE_CHECK([for __FUNCTION__ macro],samba_cv_HAVE_FUNCTION_MACRO,[
+AC_TRY_COMPILE([#include <stdio.h>], [printf("%s\n", __FUNCTION__);],
+samba_cv_HAVE_FUNCTION_MACRO=yes,samba_cv_HAVE_FUNCTION_MACRO=no)])
+if test x"$samba_cv_HAVE_FUNCTION_MACRO" = x"yes"; then
+ AC_DEFINE(HAVE_FUNCTION_MACRO,1,[Whether there is a __FUNCTION__ macro])
+fi
+