svn commit: samba r9305 - in branches/SAMBA_4_0/source: heimdal heimdal/cf heimdal_build

abartlet at samba.org abartlet at samba.org
Mon Aug 15 01:38:22 GMT 2005


Author: abartlet
Date: 2005-08-15 01:38:21 +0000 (Mon, 15 Aug 2005)
New Revision: 9305

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

Log:
Use the check-var.m4 from roken to really, really detect h_errno correctly.

This fixes the build on Fedora Core 4.

Andrew Bartlett

Added:
   branches/SAMBA_4_0/source/heimdal/cf/
   branches/SAMBA_4_0/source/heimdal/cf/check-var.m4
Modified:
   branches/SAMBA_4_0/source/heimdal_build/config.m4


Changeset:
Added: branches/SAMBA_4_0/source/heimdal/cf/check-var.m4
===================================================================
--- branches/SAMBA_4_0/source/heimdal/cf/check-var.m4	2005-08-14 12:13:32 UTC (rev 9304)
+++ branches/SAMBA_4_0/source/heimdal/cf/check-var.m4	2005-08-15 01:38:21 UTC (rev 9305)
@@ -0,0 +1,25 @@
+dnl $Id: check-var.m4,v 1.12 2005/06/16 18:59:10 lha Exp $
+dnl
+dnl rk_CHECK_VAR(variable, includes)
+AC_DEFUN([rk_CHECK_VAR], [
+AC_MSG_CHECKING(for $1)
+AC_CACHE_VAL(ac_cv_var_$1, [
+m4_ifval([$2],[
+	AC_LINK_IFELSE([AC_LANG_PROGRAM([[$2
+	void * foo(void) { return &$1; }]],[[foo()]])],
+	    [ac_cv_var_$1=yes],[ac_cv_var_$1=no])])
+if test "$ac_cv_var_$1" != yes ; then
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[extern int $1;
+int foo(void) { return $1; }]],[[foo()]])],
+	    [ac_cv_var_$1=yes],[ac_cv_var_$1=no])
+fi
+])
+ac_foo=`eval echo \\$ac_cv_var_$1`
+AC_MSG_RESULT($ac_foo)
+if test "$ac_foo" = yes; then
+	AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_[]$1), 1, 
+		[Define if you have the `]$1[' variable.])
+	m4_ifval([$2], AC_CHECK_DECLS([$1],[],[],[$2]))
+fi
+])
+

Modified: branches/SAMBA_4_0/source/heimdal_build/config.m4
===================================================================
--- branches/SAMBA_4_0/source/heimdal_build/config.m4	2005-08-14 12:13:32 UTC (rev 9304)
+++ branches/SAMBA_4_0/source/heimdal_build/config.m4	2005-08-15 01:38:21 UTC (rev 9305)
@@ -1,4 +1,3 @@
-
 m4_define([upcase],`echo $1 | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`)dnl
 
 dnl love_FIND_FUNC(func, includes, arguments)
@@ -165,9 +164,11 @@
 fi
 AC_SUBST(VOID_RETSIGTYPE)
 
-AC_CHECK_DECL(h_errno, 
-              [AC_DEFINE(HAVE_DECL_H_ERRNO,1,whether h_errno is declared)], [], [
-#ifdef HAVE_SYS_TYPES_H
+
+sinclude(heimdal/cf/check-var.m4)
+
+rk_CHECK_VAR(h_errno, 
+[#ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #endif
 #ifdef HAVE_NETDB_H



More information about the samba-cvs mailing list