svn commit: samba r18127 - in branches/SAMBA_4_0/source/lib/replace: .

jelmer at samba.org jelmer at samba.org
Wed Sep 6 02:07:44 GMT 2006


Author: jelmer
Date: 2006-09-06 02:07:44 +0000 (Wed, 06 Sep 2006)
New Revision: 18127

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18127

Log:
Add macro AC_CHECK_DECL() for systems that don't have it.

Modified:
   branches/SAMBA_4_0/source/lib/replace/libreplace.m4


Changeset:
Modified: branches/SAMBA_4_0/source/lib/replace/libreplace.m4
===================================================================
--- branches/SAMBA_4_0/source/lib/replace/libreplace.m4	2006-09-06 02:04:30 UTC (rev 18126)
+++ branches/SAMBA_4_0/source/lib/replace/libreplace.m4	2006-09-06 02:07:44 UTC (rev 18127)
@@ -1,3 +1,16 @@
+dnl see if a declaration exists for a function or variable
+dnl defines HAVE_function_DECL if it exists
+dnl AC_HAVE_DECL(var, includes)
+AC_DEFUN(AC_HAVE_DECL,
+[
+ AC_CACHE_CHECK([for $1 declaration],ac_cv_have_$1_decl,[
+    AC_TRY_COMPILE([$2],[int i = (int)$1],
+        ac_cv_have_$1_decl=yes,ac_cv_have_$1_decl=no)])
+ if test x"$ac_cv_have_$1_decl" = x"yes"; then
+    AC_DEFINE([HAVE_]translit([$1], [a-z], [A-Z])[_DECL],1,[Whether $1() is available])
+ fi
+])
+
 dnl find the libreplace sources. This is meant to work both for 
 dnl libreplace standalone builds, and builds of packages using libreplace
 libreplacedir=""



More information about the samba-cvs mailing list